diff --git a/.github/workflows/benchmark-runtime-weights.yml b/.github/workflows/benchmark-runtime-weights.yml index a1469ad91a..6a33d08446 100644 --- a/.github/workflows/benchmark-runtime-weights.yml +++ b/.github/workflows/benchmark-runtime-weights.yml @@ -14,11 +14,6 @@ on: description: litentry required: true default: true - rococo: - type: boolean - description: rococo - required: true - default: true paseo: type: boolean description: paseo @@ -86,9 +81,6 @@ jobs: if [ "${{ github.event.inputs.litentry }}" = "true" ]; then chain="$chain litentry" fi - if [ "${{ github.event.inputs.rococo }}" = "true" ]; then - chain="$chain rococo" - fi if [ "${{ github.event.inputs.paseo }}" = "true" ]; then chain="$chain paseo" fi diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.yml index 2140b3b7ab..ce00b2ec63 100644 --- a/.github/workflows/build-wasm.yml +++ b/.github/workflows/build-wasm.yml @@ -8,7 +8,6 @@ on: description: The chain whose runtime-wasm is built options: - litentry - - rococo - paseo ref: description: The commit SHA or tag for checking out code diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0751852cc..1d7bee414c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -674,7 +674,6 @@ jobs: matrix: chain: - litentry - - rococo - paseo name: ${{ matrix.chain }} steps: @@ -783,8 +782,8 @@ jobs: - name: Run runtime tests working-directory: ./parachain run: | - echo "::group::rococo runtime test" - cargo test --locked -p rococo-parachain-runtime --lib + echo "::group::paseo runtime test" + cargo test --locked -p paseo-parachain-runtime --lib echo "::endgroup::" echo "::group::litentry runtime test" cargo test --locked -p litentry-parachain-runtime --lib @@ -848,6 +847,20 @@ jobs: run: | docker compose -f docker-compose.yml -f ${{ matrix.test_name }}.yml stop + - name: Upload zombienet logs if test fails + continue-on-error: true + uses: actions/upload-artifact@v4 + if: failure() + with: + name: ${{ matrix.test_name }}-zombienet-logs + path: | + /tmp/parachain_dev + !/tmp/parachain_dev/polkadot* + !/tmp/parachain_dev/zombienet* + !/tmp/parachain_dev/litentry-collator + if-no-files-found: ignore + retention-days: 3 + - name: Collect docker logs if test fails continue-on-error: true uses: jwalton/gh-docker-logs@v2 @@ -920,6 +933,20 @@ jobs: run: | docker compose -f multiworker-docker-compose.yml -f ${{ matrix.test_name }}.yml stop + - name: Upload zombienet logs if test fails + continue-on-error: true + uses: actions/upload-artifact@v4 + if: failure() + with: + name: ${{ matrix.test_name }}-zombienet-logs + path: | + /tmp/parachain_dev + !/tmp/parachain_dev/polkadot* + !/tmp/parachain_dev/zombienet* + !/tmp/parachain_dev/litentry-collator + if-no-files-found: ignore + retention-days: 3 + - name: Collect docker logs if test fails continue-on-error: true uses: jwalton/gh-docker-logs@v2 @@ -986,6 +1013,20 @@ jobs: run: | docker compose -f multiworker-docker-compose.yml -f ${{ matrix.test_name }}.yml stop + - name: Upload zombienet logs if test fails + continue-on-error: true + uses: actions/upload-artifact@v4 + if: failure() + with: + name: ${{ matrix.test_name }}-zombienet-logs + path: | + /tmp/parachain_dev + !/tmp/parachain_dev/polkadot* + !/tmp/parachain_dev/zombienet* + !/tmp/parachain_dev/litentry-collator + if-no-files-found: ignore + retention-days: 3 + - name: Collect docker logs if test fails continue-on-error: true uses: jwalton/gh-docker-logs@v2 diff --git a/.github/workflows/create-release-draft.yml b/.github/workflows/create-release-draft.yml index 3cee2c149d..26d3e523f8 100644 --- a/.github/workflows/create-release-draft.yml +++ b/.github/workflows/create-release-draft.yml @@ -35,7 +35,6 @@ on: description: If any of the genesis artefacts should be released alongside options: - none - - rococo - paseo - litentry @@ -76,7 +75,6 @@ jobs: strategy: matrix: chain: - - rococo - paseo - litentry name: ${{ matrix.chain }} diff --git a/Makefile b/Makefile index eea08e7e3b..2fce7c9943 100644 --- a/Makefile +++ b/Makefile @@ -34,10 +34,6 @@ build-node: build-runtime-litentry: cd parachain && cargo build --locked -p litentry-parachain-runtime --release -.PHONY: build-runtime-rococo ## Build rococo release runtime -build-runtime-rococo: - cd parachain && cargo build --locked -p rococo-parachain-runtime --release - .PHONY: build-runtime-paseo ## Build paseo release runtime build-runtime-paseo: cd parachain && cargo build --locked -p paseo-parachain-runtime --release @@ -64,10 +60,6 @@ build-node-tryruntime: launch-standalone: @cd parachain && ./scripts/launch-standalone.sh -.PHONY: launch-network-rococo ## Launch a local rococo network with relaychain network -launch-network-rococo: - @cd parachain && ./scripts/launch-network.sh rococo - .PHONY: launch-network-litentry ## Launch a local litentry network with relaychain network launch-network-litentry: @cd parachain && ./scripts/launch-network.sh litentry @@ -90,10 +82,6 @@ test-cargo-all-benchmarks: test-ts-litentry: launch-network-litentry @cd parachain && ./scripts/run-ts-test.sh litentry -.PHONY: test-ts-rococo ## Run rococo ts tests without clean-up -test-ts-rococo: launch-network-rococo - @cd parachain && ./scripts/run-ts-test.sh rococo - .PHONY: test-ts-paseo ## Run paseo ts tests without clean-up test-ts-paseo: launch-network-paseo @cd parachain && ./scripts/run-ts-test.sh paseo @@ -136,12 +124,12 @@ githooks: # clippy .PHONY: clippy ## cargo clippy clippy: - cd parachain && SKIP_WASM_BUILD=1 cargo clippy --workspace --all-targets --all-features -- -D warnings + cd parachain && SKIP_WASM_BUILD=1 cargo clippy --locked --workspace --all -- -D warnings .PHONY: clippyfix ## cargo clippy --fix clippyfix: - cd parachain && SKIP_WASM_BUILD=1 cargo clippy --allow-dirty --allow-staged --fix --workspace --all-targets --all-features -- -D warnings + cd parachain && SKIP_WASM_BUILD=1 cargo clippy --locked --allow-dirty --allow-staged --fix --workspace --all -- -D warnings .PHONY: cargofix ## cargo fix cargofix: - cd parachain && cargo fix --allow-dirty --allow-staged --workspace --all-targets --all-features + cd parachain && cargo fix --locked --allow-dirty --allow-staged --workspace --all diff --git a/README.md b/README.md index 8fd742b0e4..81da135dd5 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ make build-runtime-litentry The wasms should be located under `target/release/wbuild/litentry-parachain-runtime/` -Similarly, use `make build-runtime-rococo` to build the rococo-parachain-runtime. +Similarly, use `make build-runtime-paseo` to build the paseo-parachain-runtime. ## Launch parachain ### Launch a parachain network with relaychains diff --git a/common/primitives/core/Cargo.toml b/common/primitives/core/Cargo.toml index c07ca703d3..b048198e7e 100644 --- a/common/primitives/core/Cargo.toml +++ b/common/primitives/core/Cargo.toml @@ -20,13 +20,14 @@ strum_macros = { version = "0.26", default-features = false } webpki = { version = "=0.102.0-alpha.3", git = "https://github.com/rustls/webpki", rev = "da923ed", package = "rustls-webpki", default-features = false, features = ["alloc", "ring"] } x509-cert = { version = "0.1.0", default-features = false, features = ["alloc"] } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } scale-info = { version = "2.11", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } litentry-hex-utils = { path = "../../utils/hex", default-features = false } litentry-macros = { path = "macros" } @@ -51,6 +52,7 @@ std = [ "sp-runtime/std", "sp-io/std", "sp-std/std", + "sp-consensus-aura/std", "pallet-evm/std", "litentry-hex-utils/std", ] diff --git a/common/primitives/core/macros/Cargo.toml b/common/primitives/core/macros/Cargo.toml index 03a1b24669..e541bf5684 100644 --- a/common/primitives/core/macros/Cargo.toml +++ b/common/primitives/core/macros/Cargo.toml @@ -7,3 +7,4 @@ edition = "2021" [features] development = [] +std = [] \ No newline at end of file diff --git a/common/primitives/core/src/lib.rs b/common/primitives/core/src/lib.rs index 90537c6b07..9031389b64 100644 --- a/common/primitives/core/src/lib.rs +++ b/common/primitives/core/src/lib.rs @@ -85,6 +85,9 @@ mod types { // Weight Type for XCM pub type Weight = frame_support::weights::Weight; + + // Aura consensus authority. + pub type AuraId = sp_consensus_aura::sr25519::AuthorityId; } /// Common constants of parachains. @@ -92,8 +95,7 @@ mod constants { use super::types::BlockNumber; pub const LITENTRY_PARA_ID: u32 = 2013; - pub const ROCOCO_PARA_ID: u32 = 2106; // will be replaced by paseo - pub const PASEO_PARA_ID: u32 = 2106; // will be replaced by paseo + pub const PASEO_PARA_ID: u32 = 2106; /// This determines the average expected block time that we are targeting. /// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. diff --git a/local-setup/start_parachain.sh b/local-setup/start_parachain.sh index e17601a988..424638ee99 100755 --- a/local-setup/start_parachain.sh +++ b/local-setup/start_parachain.sh @@ -19,4 +19,4 @@ done ROOTDIR=$(git rev-parse --show-toplevel) cd "$ROOTDIR/parachain" -make launch-docker-rococo +make launch-docker-paseo diff --git a/parachain/Cargo.lock b/parachain/Cargo.lock index 045e26d8db..f888828663 100644 --- a/parachain/Cargo.lock +++ b/parachain/Cargo.lock @@ -53,7 +53,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", - "cipher", + "cipher 0.4.4", "cpufeatures", ] @@ -65,10 +65,10 @@ checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", - "cipher", + "cipher 0.4.4", "ctr", "ghash", - "subtle", + "subtle 2.6.1", ] [[package]] @@ -218,6 +218,43 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "aquamarine" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-bls12-381" version = "0.4.0" @@ -230,6 +267,45 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -244,9 +320,35 @@ dependencies = [ "hashbrown 0.13.2", "itertools 0.10.5", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -259,6 +361,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -303,29 +418,29 @@ dependencies = [ ] [[package]] -name = "ark-poly" -version = "0.4.2" +name = "ark-models-ext" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" dependencies = [ + "ark-ec", "ark-ff", "ark-serialize", "ark-std", "derivative", - "hashbrown 0.13.2", ] [[package]] -name = "ark-scale" -version = "0.0.10" +name = "ark-poly" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ec", "ark-ff", "ark-serialize", "ark-std", - "parity-scale-codec", + "derivative", + "hashbrown 0.13.2", ] [[package]] @@ -345,15 +460,15 @@ dependencies = [ [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", "ark-serialize", "ark-std", - "ark-transcript", + "ark-transcript 0.0.2 (git+https://github.com/w3f/ring-vrf?rev=e9782f9)", "digest 0.10.7", - "rand_core 0.6.4", + "getrandom_or_panic", "zeroize", ] @@ -388,12 +503,27 @@ checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", "rand 0.8.5", + "rayon", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "563084372d89271122bd743ef0a608179726f5fad0566008ba55bd0f756489b8" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ff", "ark-serialize", @@ -403,6 +533,12 @@ dependencies = [ "sha3", ] +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "array-bytes" version = "6.2.3" @@ -424,12 +560,6 @@ dependencies = [ "nodrop", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -461,7 +591,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -616,17 +746,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "async-recursion" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "async-signal" version = "0.2.9" @@ -659,7 +778,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -687,17 +806,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[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 = "auto_impl" version = "1.2.0" @@ -706,7 +814,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -732,23 +840,24 @@ dependencies = [ [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +version = "0.0.4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-bls12-381", "ark-ec", "ark-ed-on-bls12-381-bandersnatch", "ark-ff", - "ark-scale 0.0.12", "ark-serialize", "ark-std", "dleq_vrf", "fflonk", - "merlin 3.0.0", + "merlin", "rand_chacha 0.3.1", "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.8", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -799,10 +908,10 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", ] @@ -833,7 +942,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -842,15 +951,31 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ - "bitcoin_hashes", + "bitcoin_hashes 0.11.0", ] +[[package]] +name = "bitcoin-internals" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" +[[package]] +name = "bitcoin_hashes" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -871,10 +996,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.10.6" @@ -929,18 +1067,6 @@ dependencies = [ "constant_time_eq 0.3.0", ] -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -959,15 +1085,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - [[package]] name = "blocking" version = "1.6.1" @@ -983,9 +1100,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.9" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" +checksum = "3d077619e9c237a5d1875166f5e8033e8f6bff0c96f8caf81e1c2d7738c431bf" dependencies = [ "log", "parity-scale-codec", @@ -1002,6 +1119,17 @@ dependencies = [ "thiserror", ] +[[package]] +name = "bp-xcm-bridge-hub-router" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + [[package]] name = "bs58" version = "0.4.0" @@ -1084,6 +1212,16 @@ 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 = "camino" version = "1.1.7" @@ -1172,6 +1310,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" @@ -1179,7 +1327,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher", + "cipher 0.4.4", "cpufeatures", ] @@ -1191,7 +1339,7 @@ checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ "aead", "chacha20", - "cipher", + "cipher 0.4.4", "poly1305", "zeroize", ] @@ -1219,9 +1367,31 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.17.0", "serde", - "unsigned-varint", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "cid" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd94671561e36e4e7de75f753f577edafb0e7c05d6e4547229fdf7938fbcd2c3" +dependencies = [ + "core2", + "multibase", + "multihash 0.18.1", + "serde", + "unsigned-varint 0.7.2", +] + +[[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]] @@ -1275,6 +1445,7 @@ dependencies = [ "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] @@ -1286,7 +1457,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -1322,6 +1493,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "comfy-table" version = "7.1.1" @@ -1336,7 +1517,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +source = "git+https://github.com/w3f/ring-proof#652286c32f96beb9ce7f5793f5e2c2c923f63b73" dependencies = [ "ark-ec", "ark-ff", @@ -1344,7 +1525,8 @@ dependencies = [ "ark-serialize", "ark-std", "fflonk", - "merlin 3.0.0", + "getrandom_or_panic", + "rand_core 0.6.4", ] [[package]] @@ -1413,6 +1595,12 @@ 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" @@ -1456,10 +1644,11 @@ dependencies = [ "scale-info", "serde", "serde_json", + "sp-consensus-aura", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "strum 0.26.3", "strum_macros 0.26.4", "x509-cert", @@ -1526,7 +1715,7 @@ dependencies = [ "gimli 0.27.3", "hashbrown 0.13.2", "log", - "regalloc2", + "regalloc2 0.6.1", "smallvec", "target-lexicon", ] @@ -1600,6 +1789,21 @@ dependencies = [ "wasmtime-types", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.4.2" @@ -1657,7 +1861,7 @@ checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.6.1", "zeroize", ] @@ -1674,22 +1878,22 @@ dependencies = [ [[package]] name = "crypto-mac" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" dependencies = [ - "generic-array 0.14.7", - "subtle", + "generic-array 0.12.4", + "subtle 1.0.0", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.6.1", ] [[package]] @@ -1698,13 +1902,13 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] name = "cumulus-client-cli" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "clap", "parity-scale-codec", @@ -1712,6 +1916,7 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-service", + "sp-blockchain", "sp-core", "sp-runtime", "url", @@ -1719,8 +1924,8 @@ dependencies = [ [[package]] name = "cumulus-client-collator" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1742,16 +1947,16 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" 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.30", "parity-scale-codec", @@ -1784,8 +1989,8 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1813,8 +2018,8 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "anyhow", "async-trait", @@ -1828,8 +2033,8 @@ dependencies = [ [[package]] name = "cumulus-client-network" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1850,9 +2055,33 @@ dependencies = [ ] [[package]] -name = "cumulus-client-pov-recovery" +name = "cumulus-client-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "cumulus-test-relay-sproof-builder", + "parity-scale-codec", + "sc-client-api", + "scale-info", + "sp-api", + "sp-crypto-hashing", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-trie", + "tracing", +] + +[[package]] +name = "cumulus-client-pov-recovery" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1875,8 +2104,8 @@ dependencies = [ [[package]] name = "cumulus-client-service" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1884,6 +2113,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", @@ -1904,14 +2134,15 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-io", "sp-runtime", "sp-transaction-pool", ] [[package]] name = "cumulus-pallet-aura-ext" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -1923,15 +2154,16 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-primitives-core", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -1939,34 +2171,39 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-primitives-proof-size-hostfunction", "environmental", + "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", "log", + "pallet-message-queue", "parity-scale-codec", "polkadot-parachain-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", "scale-info", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", "sp-version", "staging-xcm", @@ -1975,19 +2212,19 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "cumulus-pallet-session-benchmarking" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -1995,13 +2232,13 @@ dependencies = [ "pallet-session", "parity-scale-codec", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2010,35 +2247,39 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" 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", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.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.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2046,13 +2287,13 @@ dependencies = [ "sp-api", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "cumulus-primitives-core" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2061,60 +2302,66 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder", "parity-scale-codec", - "sc-client-api", "scale-info", - "sp-api", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-trie", +] + +[[package]] +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", - "tracing", ] [[package]] name = "cumulus-primitives-timestamp" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-primitives-core", "futures 0.3.30", "parity-scale-codec", "sp-inherents", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-primitives-core", "frame-support", "log", + "pallet-asset-conversion", "parity-scale-codec", "polkadot-runtime-common", + "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2122,8 +2369,8 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2146,8 +2393,8 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2164,43 +2411,50 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures 0.3.30", + "parking_lot 0.12.3", "polkadot-availability-recovery", "polkadot-collator-protocol", "polkadot-core-primitives", "polkadot-network-bridge", "polkadot-node-collation-generation", + "polkadot-node-core-chain-api", + "polkadot-node-core-prospective-parachains", "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", + "polkadot-service", "sc-authority-discovery", + "sc-client-api", "sc-network", "sc-network-common", "sc-service", "sc-tracing", "sc-utils", - "schnellru", "sp-api", + "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", + "substrate-prometheus-endpoint", + "tokio", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2227,7 +2481,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-version", "thiserror", "tokio", "tokio-util", @@ -2237,31 +2492,18 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", ] -[[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -2271,7 +2513,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.6.1", "zeroize", ] @@ -2287,7 +2529,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "rustc_version", - "subtle", + "subtle 2.6.1", "zeroize", ] @@ -2299,7 +2541,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -2339,7 +2581,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -2356,7 +2598,20 @@ checksum = "4b2c1c1776b986979be68bb2285da855f8d8a35851a769fca8740df7c3d07877" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core 0.9.10", ] [[package]] @@ -2452,17 +2707,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive-syn-parse" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "derive-syn-parse" version = "0.2.0" @@ -2471,7 +2715,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -2484,7 +2728,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -2520,14 +2764,14 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.6.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", ] @@ -2544,13 +2788,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]] @@ -2572,23 +2817,22 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", "ark-ff", - "ark-scale 0.0.10", + "ark-scale", "ark-secret-scalar", "ark-serialize", "ark-std", - "ark-transcript", + "ark-transcript 0.0.2 (git+https://github.com/w3f/ring-vrf?rev=e9782f9)", "arrayvec 0.7.4", - "rand_core 0.6.4", "zeroize", ] @@ -2608,12 +2852,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" dependencies = [ "common-path", - "derive-syn-parse 0.2.0", + "derive-syn-parse", "once_cell", "proc-macro2", "quote", "regex", - "syn 2.0.77", + "syn 2.0.89", "termcolor", "toml 0.8.16", "walkdir", @@ -2674,10 +2918,20 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature", + "serdect", + "signature 2.2.0", "spki 0.7.3", ] +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature 1.6.4", +] + [[package]] name = "ed25519" version = "2.2.3" @@ -2685,7 +2939,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature", + "signature 2.2.0", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519 1.5.3", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", ] [[package]] @@ -2695,11 +2963,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek 4.1.3", - "ed25519", + "ed25519 2.2.3", "rand_core 0.6.4", "serde", "sha2 0.10.8", - "subtle", + "subtle 2.6.1", "zeroize", ] @@ -2724,7 +2992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ "curve25519-dalek 4.1.3", - "ed25519", + "ed25519 2.2.3", "hashbrown 0.14.5", "hex", "rand_core 0.6.4", @@ -2753,7 +3021,8 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", - "subtle", + "serdect", + "subtle 2.6.1", "zeroize", ] @@ -2775,6 +3044,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "enumflags2" version = "0.7.10" @@ -2792,7 +3073,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -2803,20 +3084,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", + "syn 2.0.89", ] [[package]] @@ -2862,29 +3130,29 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", "tiny-keccak", ] [[package]] name = "ethereum" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89fb87a9e103f71b903b80b670200b54cc67a07578f070681f1fffb7396fb7" +checksum = "2e04d24d20b8ff2235cffbf242d5092de3aa45f77c5270ddbfadd2778ca13fea" dependencies = [ "bytes", "ethereum-types", - "hash-db 0.15.2", + "hash-db", "hash256-std-hasher", "parity-scale-codec", "rlp", "scale-info", "serde", "sha3", - "triehash", + "trie-root", ] [[package]] @@ -2895,12 +3163,12 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", - "primitive-types", + "impl-serde 0.4.0", + "primitive-types 0.12.2", "scale-info", - "uint", + "uint 0.9.5", ] [[package]] @@ -2943,8 +3211,9 @@ dependencies = [ [[package]] name = "evm" -version = "0.39.1" -source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +version = "0.41.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "767f43e9630cc36cf8ff2777cbb0121b055f0d1fd6eaaa13b46a1808f0d0e7e9" dependencies = [ "auto_impl", "environmental", @@ -2954,7 +3223,7 @@ dependencies = [ "evm-runtime", "log", "parity-scale-codec", - "primitive-types", + "primitive-types 0.12.2", "rlp", "scale-info", "serde", @@ -2963,42 +3232,45 @@ dependencies = [ [[package]] name = "evm-core" -version = "0.39.0" -source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1da6cedc5cedb4208e59467106db0d1f50db01b920920589f8e672c02fdc04f" dependencies = [ "parity-scale-codec", - "primitive-types", + "primitive-types 0.12.2", "scale-info", "serde", ] [[package]] name = "evm-gasometer" -version = "0.39.0" -source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dc0eb591abc5cd7b05bef6a036c2bb6c66ab6c5e0c5ce94bfe377ab670b1fd7" dependencies = [ "environmental", "evm-core", "evm-runtime", - "primitive-types", + "primitive-types 0.12.2", ] [[package]] name = "evm-runtime" -version = "0.39.0" -source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84bbe09b64ae13a29514048c1bb6fda6374ac0b4f6a1f15a443348ab88ef42cd" dependencies = [ "auto_impl", "environmental", "evm-core", - "primitive-types", + "primitive-types 0.12.2", "sha3", ] [[package]] name = "evm-tracing-events" version = "0.1.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "environmental", "ethereum", @@ -3007,7 +3279,7 @@ dependencies = [ "evm-gasometer", "evm-runtime", "parity-scale-codec", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -3031,44 +3303,32 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3774182a5df13c3d1690311ad32fbe913feef26baba609fa2dd5f72042bd2ab6" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", -] - [[package]] name = "expander" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2" dependencies = [ - "blake2", + "blake2 0.10.6", "file-guard", "fs-err", "prettyplease 0.2.20", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] -name = "fake-simd" -version = "0.1.2" +name = "fallible-iterator" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fallible-iterator" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" @@ -3113,7 +3373,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "async-trait", "fp-storage", @@ -3125,7 +3385,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "async-trait", "fp-consensus", @@ -3141,7 +3401,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "async-trait", "fc-api", @@ -3162,7 +3422,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "fc-db", "fc-storage", @@ -3183,7 +3443,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "ethereum", "ethereum-types", @@ -3208,7 +3468,6 @@ dependencies = [ "sc-client-api", "sc-consensus-aura", "sc-network", - "sc-network-common", "sc-network-sync", "sc-rpc", "sc-service", @@ -3223,11 +3482,12 @@ dependencies = [ "sp-consensus", "sp-consensus-aura", "sp-core", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-timestamp", "substrate-prometheus-endpoint", "thiserror", @@ -3237,20 +3497,22 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "ethereum", "ethereum-types", "jsonrpsee", + "rlp", "rustc-hex", "serde", "serde_json", + "sp-crypto-hashing", ] [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "ethereum", "ethereum-types", @@ -3259,19 +3521,19 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sp-api", - "sp-blockchain", "sp-io", "sp-runtime", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[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]] @@ -3281,7 +3543,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.6.1", ] [[package]] @@ -3294,7 +3556,7 @@ dependencies = [ "ark-poly", "ark-serialize", "ark-std", - "merlin 3.0.0", + "merlin", ] [[package]] @@ -3319,7 +3581,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.2", + "env_logger", "log", ] @@ -3401,10 +3663,25 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "fork-tree" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", ] @@ -3421,10 +3698,10 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "hex", - "impl-serde", + "impl-serde 0.4.0", "libsecp256k1", "log", "parity-scale-codec", @@ -3433,39 +3710,36 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "ethereum", "parity-scale-codec", "sp-core", "sp-runtime", - "sp-std", ] [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "ethereum", "ethereum-types", "fp-evm", "frame-support", "parity-scale-codec", - "sp-std", ] [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "evm", "frame-support", @@ -3475,13 +3749,12 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", ] [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "ethereum", "ethereum-types", @@ -3492,13 +3765,12 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-std", ] [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "frame-support", "parity-scale-codec", @@ -3510,7 +3782,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "parity-scale-codec", "serde", @@ -3524,8 +3796,8 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-support-procedural", @@ -3541,19 +3813,19 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "32.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 6.2.3", "chrono", "clap", "comfy-table", @@ -3570,6 +3842,7 @@ dependencies = [ "rand 0.8.5", "rand_pcg", "sc-block-builder", + "sc-chain-spec", "sc-cli", "sc-client-api", "sc-client-db", @@ -3582,34 +3855,35 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "thiserror", "thousands", ] [[package]] name = "frame-election-provider-solution-type" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "frame-election-provider-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3620,14 +3894,15 @@ dependencies = [ "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "frame-executive" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "aquamarine 0.3.3", "frame-support", "frame-system", "frame-try-runtime", @@ -3637,8 +3912,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -3656,9 +3931,9 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "docify", "frame-support", "frame-system", @@ -3668,34 +3943,13 @@ dependencies = [ "sp-runtime", ] -[[package]] -name = "frame-remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -dependencies = [ - "async-recursion", - "futures 0.3.30", - "indicatif", - "jsonrpsee", - "log", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "spinners", - "substrate-rpc-client", - "tokio", - "tokio-retry", -] - [[package]] name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "aquamarine", + "aquamarine 0.5.0", + "array-bytes 6.2.3", "bitflags 1.3.2", "docify", "environmental", @@ -3714,8 +3968,8 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -3723,8 +3977,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-weights", "static_assertions", "tt-call", @@ -3732,12 +3986,12 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse 0.1.5", + "derive-syn-parse", "expander 2.2.1", "frame-support-procedural-tools", "itertools 0.10.5", @@ -3745,37 +3999,39 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.77", + "sp-crypto-hashing", + "syn 2.0.89", ] [[package]] name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cfg-if", + "docify", "frame-support", "log", "parity-scale-codec", @@ -3784,15 +4040,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-version", "sp-weights", ] [[package]] name = "frame-system-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -3801,13 +4057,13 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "sp-api", @@ -3815,14 +4071,14 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -3846,9 +4102,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.34", "windows-sys 0.48.0", @@ -3951,7 +4207,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -4069,6 +4325,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ + "rand 0.8.5", "rand_core 0.6.4", ] @@ -4088,11 +4345,21 @@ version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ - "fallible-iterator", + "fallible-iterator 0.2.0", "indexmap 1.9.3", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +dependencies = [ + "fallible-iterator 0.3.0", + "stable_deref_trait", +] + [[package]] name = "gimli" version = "0.29.0" @@ -4106,16 +4373,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] -name = "globset" -version = "0.4.14" +name = "governor" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "cfg-if", + "dashmap", + "futures 0.3.30", + "futures-timer", + "no-std-compat", + "nonzero_ext", + "parking_lot 0.12.3", + "portable-atomic", + "quanta", + "rand 0.8.5", + "smallvec", + "spinning_top", ] [[package]] @@ -4126,7 +4400,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", - "subtle", + "subtle 2.6.1", ] [[package]] @@ -4150,9 +4424,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.5.0" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" +checksum = "d08485b96a0e6393e9e4d1b8d48cf74ad6c063cd905eb33f42c1ce3f0377539b" dependencies = [ "log", "pest", @@ -4162,12 +4436,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "hash-db" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" - [[package]] name = "hash-db" version = "0.16.0" @@ -4212,6 +4480,21 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "heck" version = "0.4.1" @@ -4224,15 +4507,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -4254,6 +4528,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + [[package]] name = "hex-literal" version = "0.4.1" @@ -4279,16 +4559,6 @@ dependencies = [ "digest 0.9.0", ] -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.1", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.12.1" @@ -4410,10 +4680,9 @@ dependencies = [ "hyper", "log", "rustls 0.21.12", - "rustls-native-certs", + "rustls-native-certs 0.6.3", "tokio", - "tokio-rustls", - "webpki-roots 0.25.4", + "tokio-rustls 0.24.1", ] [[package]] @@ -4450,6 +4719,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.5.0" @@ -4498,6 +4777,26 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "impl-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67aa010c1e3da95bf151bd8b4c059b2ed7e75387cdb969b4f8f2723a43f9941" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-num-traits" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "803d15461ab0dcc56706adf266158acbc44ccf719bf7d0af30705f58b90a4b8c" +dependencies = [ + "integer-sqrt", + "num-traits", + "uint 0.10.0", +] + [[package]] name = "impl-rlp" version = "0.3.0" @@ -4516,6 +4815,15 @@ dependencies = [ "serde", ] +[[package]] +name = "impl-serde" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a143eada6a1ec4aefa5049037a26a6d597bfd64f8c026d07b77133e02b7dd0b" +dependencies = [ + "serde", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -4573,19 +4881,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - [[package]] name = "inout" version = "0.1.3" @@ -4724,115 +5019,95 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.16.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" +checksum = "cfdb12a2381ea5b2e68c3469ec604a007b367778cdb14d09612c8069ebd616ad" dependencies = [ "jsonrpsee-core", - "jsonrpsee-http-client", "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", + "tokio", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.16.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +checksum = "4978087a58c3ab02efc5b07c5e5e2803024536106fd5506f558db172c889b3aa" dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types", "pin-project", - "rustls-native-certs", + "rustls-native-certs 0.7.3", + "rustls-pki-types 1.10.0", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", "tokio-util", "tracing", - "webpki-roots 0.25.4", + "url", ] [[package]] name = "jsonrpsee-core" -version = "0.16.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" +checksum = "b4b257e1ec385e07b0255dde0b933f948b5c8b8c28d42afda9587c3a967b896d" dependencies = [ "anyhow", - "arrayvec 0.7.4", - "async-lock 2.8.0", "async-trait", "beef", - "futures-channel", "futures-timer", "futures-util", - "globset", "hyper", "jsonrpsee-types", "parking_lot 0.12.3", + "pin-project", "rand 0.8.5", "rustc-hash", "serde", "serde_json", - "soketto", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee-http-client" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" -dependencies = [ - "async-trait", - "hyper", - "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", - "rustc-hash", - "serde", - "serde_json", "thiserror", "tokio", + "tokio-stream", "tracing", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.16.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +checksum = "7d0bb047e79a143b32ea03974a6bf59b62c2a4c5f5d42a381c907a8bbb3f75c0" dependencies = [ "heck 0.4.1", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] name = "jsonrpsee-server" -version = "0.16.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" +checksum = "12d8b6a9674422a8572e0b0abb12feeb3f2aeda86528c80d0350c2bd0923ab41" dependencies = [ - "futures-channel", "futures-util", "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", + "pin-project", + "route-recognizer", "serde", "serde_json", "soketto", + "thiserror", "tokio", "tokio-stream", "tokio-util", @@ -4842,28 +5117,28 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" +checksum = "150d6168405890a7a3231a3c74843f58b8959471f6df76078db2619ddee1d07d" dependencies = [ "anyhow", "beef", "serde", "serde_json", "thiserror", - "tracing", ] [[package]] name = "jsonrpsee-ws-client" -version = "0.16.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" +checksum = "58b9db2dfd5bb1194b0ce921504df9ceae210a345bc2f6c5a61432089bbab070" dependencies = [ "http", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", + "url", ] [[package]] @@ -4876,6 +5151,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2 0.10.8", ] @@ -4889,18 +5165,10 @@ dependencies = [ ] [[package]] -name = "kusama-runtime-constants" +name = "keystream" version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kvdb" @@ -4937,9 +5205,9 @@ dependencies = [ [[package]] name = "landlock" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520baa32708c4e957d2fc3a186bc5bd8d26637c33137f399ddfc202adb240068" +checksum = "9baa9eeb6e315942429397e617a190f4fdc696ef1ee0342939d641029cbb4ea7" dependencies = [ "enumflags2", "libc", @@ -4963,9 +5231,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.167" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" @@ -4974,7 +5242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -5054,7 +5322,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.3", @@ -5064,7 +5332,7 @@ dependencies = [ "rw-stream-sink", "smallvec", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", "void", ] @@ -5079,7 +5347,7 @@ dependencies = [ "log", "parking_lot 0.12.3", "smallvec", - "trust-dns-resolver", + "trust-dns-resolver 0.22.0", ] [[package]] @@ -5111,10 +5379,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek", + "ed25519-dalek 2.1.1", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", @@ -5145,8 +5413,8 @@ dependencies = [ "sha2 0.10.8", "smallvec", "thiserror", - "uint", - "unsigned-varint", + "uint 0.9.5", + "unsigned-varint 0.7.2", "void", ] @@ -5167,7 +5435,7 @@ dependencies = [ "smallvec", "socket2 0.4.10", "tokio", - "trust-dns-proto", + "trust-dns-proto 0.22.0", "void", ] @@ -5326,7 +5594,7 @@ dependencies = [ "rustls 0.20.9", "thiserror", "webpki", - "x509-parser", + "x509-parser 0.14.0", "yasna", ] @@ -5360,7 +5628,7 @@ dependencies = [ "rw-stream-sink", "soketto", "url", - "webpki-roots 0.22.6", + "webpki-roots", ] [[package]] @@ -5428,7 +5696,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.6.1", ] [[package]] @@ -5511,23 +5779,37 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[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 = "litentry-collator" -version = "0.9.20" +version = "0.9.21" dependencies = [ "async-trait", "clap", "core-primitives", "cumulus-client-cli", + "cumulus-client-collator", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", "cumulus-client-network", + "cumulus-client-parachain-inherent", "cumulus-client-service", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", - "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", - "cumulus-relay-chain-minimal-node", "cumulus-test-relay-sproof-builder", "fc-api", "fc-consensus", @@ -5539,6 +5821,8 @@ dependencies = [ "fp-rpc", "frame-benchmarking", "frame-benchmarking-cli", + "frame-support", + "frame-system-rpc-runtime-api", "futures 0.3.30", "jsonrpsee", "litentry-parachain-runtime", @@ -5549,12 +5833,17 @@ dependencies = [ "moonbeam-rpc-primitives-txpool", "moonbeam-rpc-trace", "moonbeam-rpc-txpool", + "pallet-ethereum", + "pallet-evm", + "pallet-omni-account-runtime-api", + "pallet-transaction-payment", "pallet-transaction-payment-rpc", + "pallet-transaction-payment-rpc-runtime-api", "paseo-parachain-runtime", "polkadot-cli", "polkadot-primitives", "polkadot-service", - "rococo-parachain-runtime", + "runtime-common", "sc-basic-authorship", "sc-chain-spec", "sc-cli", @@ -5578,19 +5867,22 @@ dependencies = [ "sp-blockchain", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", + "sp-inherents", "sp-io", "sp-keystore", "sp-offchain", "sp-runtime", "sp-session", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-timestamp", "sp-transaction-pool", + "sp-version", "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", "tokio", - "try-runtime-cli", ] [[package]] @@ -5615,6 +5907,7 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-primitives-timestamp", @@ -5636,8 +5929,6 @@ dependencies = [ "moonbeam-rpc-primitives-debug", "moonbeam-rpc-primitives-txpool", "num_enum", - "orml-traits", - "orml-xtokens", "pallet-account-fix", "pallet-asset-manager", "pallet-assets", @@ -5689,10 +5980,11 @@ dependencies = [ "pallet-vc-management", "pallet-vesting", "pallet-xcm", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", + "polkadot-runtime-common", "polkadot-runtime-parachains", "precompile-utils", "runtime-common", @@ -5701,16 +5993,18 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", - "sp-debug-derive", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -5725,7 +6019,62 @@ dependencies = [ "cargo_toml", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", +] + +[[package]] +name = "litep2p" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f02542ae3a94b4c4ffa37dc56388c923e286afa3bf65452e3984b50b2a2f316" +dependencies = [ + "async-trait", + "bs58 0.4.0", + "bytes", + "cid 0.10.1", + "ed25519-dalek 1.0.1", + "futures 0.3.30", + "futures-timer", + "hex-literal", + "indexmap 2.2.6", + "libc", + "mockall 0.12.1", + "multiaddr", + "multihash 0.17.0", + "network-interface", + "nohash-hasher", + "parking_lot 0.12.3", + "pin-project", + "prost 0.11.9", + "prost-build", + "quinn", + "rand 0.8.5", + "rcgen", + "ring 0.16.20", + "rustls 0.20.9", + "serde", + "sha2 0.10.8", + "simple-dns", + "smallvec", + "snow", + "socket2 0.5.7", + "static_assertions", + "str0m", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tokio-util", + "tracing", + "trust-dns-resolver 0.23.2", + "uint 0.9.5", + "unsigned-varint 0.7.2", + "url", + "webpki", + "x25519-dalek 2.0.1", + "x509-parser 0.15.1", + "yasna", + "zeroize", ] [[package]] @@ -5799,58 +6148,52 @@ dependencies = [ [[package]] name = "macro_magic" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "macro_magic_core" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" dependencies = [ "const-random", - "derive-syn-parse 0.1.5", + "derive-syn-parse", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" +checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "macro_magic_macros" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.77", + "syn 2.0.89", ] -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - [[package]] name = "match_cfg" version = "0.1.0" @@ -5859,9 +6202,9 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "matchers" -version = "0.0.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ "regex-automata 0.1.10", ] @@ -5906,6 +6249,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -5930,36 +6282,24 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ - "hash-db 0.16.0", + "hash-db", ] [[package]] name = "merlin" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ "byteorder", "keccak", - "rand_core 0.5.1", + "rand_core 0.6.4", "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" +name = "mick-jaeger" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ @@ -5985,19 +6325,45 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.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.3", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.3", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.6.1", + "thiserror", + "zeroize", +] + [[package]] name = "mmr-gadget" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "log", @@ -6015,10 +6381,9 @@ dependencies = [ [[package]] name = "mmr-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "anyhow", "jsonrpsee", "parity-scale-codec", "serde", @@ -6039,8 +6404,23 @@ dependencies = [ "downcast", "fragile", "lazy_static", - "mockall_derive", - "predicates", + "mockall_derive 0.11.4", + "predicates 2.1.5", + "predicates-tree", +] + +[[package]] +name = "mockall" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive 0.12.1", + "predicates 3.1.2", "predicates-tree", ] @@ -6056,10 +6436,22 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "mockall_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "moonbeam-client-evm-tracing" version = "0.1.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum-types", "evm-tracing-events", @@ -6068,13 +6460,14 @@ dependencies = [ "parity-scale-codec", "serde", "serde_json", - "sp-std", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "moonbeam-evm-tracer" version = "0.1.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum-types", "evm", @@ -6088,28 +6481,30 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "moonbeam-primitives-ext" version = "0.1.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum-types", "evm-tracing-events", "parity-scale-codec", - "sp-externalities", - "sp-runtime-interface", - "sp-std", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "moonbeam-rpc-core-debug" version = "0.1.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ + "ethereum", "ethereum-types", + "fc-rpc-core", "futures 0.3.30", "jsonrpsee", "moonbeam-client-evm-tracing", @@ -6122,7 +6517,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-core-trace" version = "0.6.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum-types", "futures 0.3.30", @@ -6136,7 +6531,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-core-txpool" version = "0.6.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum", "ethereum-types", @@ -6149,7 +6544,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-core-types" version = "0.1.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum-types", "serde", @@ -6159,7 +6554,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-debug" version = "0.1.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum", "ethereum-types", @@ -6167,6 +6562,7 @@ dependencies = [ "fc-consensus", "fc-db", "fc-rpc", + "fc-rpc-core", "fc-storage", "fp-rpc", "futures 0.3.30", @@ -6190,7 +6586,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-primitives-debug" version = "0.1.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "environmental", "ethereum", @@ -6198,18 +6594,17 @@ dependencies = [ "hex", "parity-scale-codec", "serde", - "serde_json", "sp-api", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "moonbeam-rpc-primitives-txpool" version = "0.6.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum", "parity-scale-codec", @@ -6217,13 +6612,13 @@ dependencies = [ "sp-api", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "moonbeam-rpc-trace" version = "0.6.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum", "ethereum-types", @@ -6234,6 +6629,7 @@ dependencies = [ "fp-rpc", "futures 0.3.30", "jsonrpsee", + "log", "moonbeam-client-evm-tracing", "moonbeam-rpc-core-trace", "moonbeam-rpc-core-types", @@ -6248,8 +6644,9 @@ dependencies = [ "sp-blockchain", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-transaction-pool", + "substrate-prometheus-endpoint", "tokio", "tracing", ] @@ -6257,7 +6654,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-txpool" version = "0.6.0" -source = "git+https://github.com/AstarNetwork/Astar?tag=v5.33.0#4f1b31319f4a96df7f2028faa5272d81a7cba4d2" +source = "git+https://github.com/AstarNetwork/Astar?tag=v5.43.1#77a50ac55804be813abc832f31a416122c7b0a43" dependencies = [ "ethereum-types", "fc-rpc", @@ -6274,7 +6671,7 @@ dependencies = [ "sp-blockchain", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -6288,11 +6685,11 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.7.2", "url", ] @@ -6318,10 +6715,57 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive", + "multihash-derive 0.8.0", + "sha2 0.10.8", + "sha3", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" +dependencies = [ + "blake2b_simd", + "blake2s_simd", + "blake3", + "core2", + "digest 0.10.7", + "multihash-derive 0.8.0", + "sha2 0.10.8", + "sha3", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc41f430805af9d1cf4adae4ed2149c759b877b01d909a1f40256188d09345d2" +dependencies = [ + "core2", + "unsigned-varint 0.8.0", +] + +[[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.1", + "ripemd", + "serde", + "sha1", "sha2 0.10.8", "sha3", - "unsigned-varint", + "strobe-rs", ] [[package]] @@ -6335,7 +6779,31 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", +] + +[[package]] +name = "multihash-derive" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f1b7edab35d920890b88643a765fc9bd295cf0201f4154dda231bef9b8404eb" +dependencies = [ + "core2", + "multihash 0.19.2", + "multihash-derive-impl", +] + +[[package]] +name = "multihash-derive-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3dc7141bd06405929948754f0628d247f5ca1865be745099205e5086da957cb" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure 0.13.1", ] [[package]] @@ -6355,7 +6823,27 @@ dependencies = [ "log", "pin-project", "smallvec", - "unsigned-varint", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "munge" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64142d38c84badf60abf06ff9bd80ad2174306a5b11bd4706535090a30a419df" +dependencies = [ + "munge_macro", +] + +[[package]] +name = "munge_macro" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb5c1d8184f13f7d0ccbeeca0def2f9a181bce2624302793005f5ca8aa62e5e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] @@ -6382,14 +6870,14 @@ checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[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", ] @@ -6466,6 +6954,18 @@ dependencies = [ "tokio", ] +[[package]] +name = "network-interface" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a43439bf756eed340bdf8feba761e2d50c7d47175d87545cd5cbe4a137c4d1" +dependencies = [ + "cc", + "libc", + "thiserror", + "winapi", +] + [[package]] name = "nix" version = "0.24.3" @@ -6477,6 +6977,23 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "libc", +] + +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + [[package]] name = "no-std-net" version = "0.6.0" @@ -6505,12 +7022,28 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + [[package]] name = "normalize-line-endings" 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" version = "0.4.3" @@ -6609,6 +7142,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -6639,15 +7173,9 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "object" version = "0.30.4" @@ -6660,6 +7188,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + [[package]] name = "object" version = "0.36.2" @@ -6696,17 +7233,71 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.4.1+3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "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.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" +checksum = "92829eef0328a3d1cd22a02c0e51deb92a5362df3e7d21a4e9bdc38934694e66" dependencies = [ "async-trait", "dyn-clonable", @@ -6721,14 +7312,15 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066" +checksum = "1344346d5af32c95bbddea91b18a88cc83eac394192d20ef2fc4c40a74332355" dependencies = [ - "expander 0.0.6", - "itertools 0.10.5", + "expander 2.2.1", + "indexmap 2.2.6", + "itertools 0.11.0", "petgraph", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -6744,128 +7336,114 @@ dependencies = [ ] [[package]] -name = "orml-traits" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "pallet-account-fix" +version = "0.1.0" dependencies = [ "frame-support", - "impl-trait-for-tuples", - "num-traits", - "orml-utilities", + "frame-system", + "pallet-balances", "parity-scale-codec", - "paste", "scale-info", - "serde", - "sp-core", - "sp-io", "sp-runtime", - "sp-std", - "staging-xcm", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] -name = "orml-utilities" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" +name = "pallet-aiusd-convertor" +version = "0.1.0" dependencies = [ "frame-support", + "frame-system", + "hex-literal", + "pallet-assets", + "pallet-balances", "parity-scale-codec", "scale-info", - "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] -name = "orml-xcm-support" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" +name = "pallet-asset-conversion" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "frame-benchmarking", "frame-support", - "orml-traits", + "frame-system", + "log", "parity-scale-codec", + "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-executor", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] -name = "orml-xtokens" -version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" -dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", - "log", - "orml-traits", - "orml-xcm-support", - "pallet-xcm", - "parity-scale-codec", - "scale-info", - "serde", - "sp-io", - "sp-runtime", - "sp-std", - "staging-xcm", - "staging-xcm-executor", -] - -[[package]] -name = "pallet-account-fix" +name = "pallet-asset-manager" version = "0.1.0" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "pallet-balances", "parity-scale-codec", "scale-info", + "sp-core", + "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "staging-xcm", ] [[package]] -name = "pallet-aiusd-convertor" -version = "0.1.0" +name = "pallet-asset-rate" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", - "hex-literal", - "pallet-assets", - "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", - "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] -name = "pallet-asset-manager" -version = "0.1.0" +name = "pallet-asset-tx-payment" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "orml-traits", - "pallet-balances", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", + "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "staging-xcm", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-assets" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6875,7 +7453,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -6896,13 +7474,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-aura" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -6913,13 +7491,13 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -6929,13 +7507,13 @@ dependencies = [ "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -6943,13 +7521,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-babe" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6967,15 +7545,15 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-bags-list" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "aquamarine", + "aquamarine 0.5.0", "docify", "frame-benchmarking", "frame-election-provider-support", @@ -6988,15 +7566,16 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7004,13 +7583,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -7024,15 +7603,15 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-beefy-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "binary-merkle-tree", "frame-support", "frame-system", @@ -7049,7 +7628,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7070,8 +7649,8 @@ dependencies = [ [[package]] name = "pallet-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7083,7 +7662,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7116,7 +7695,26 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", +] + +[[package]] +name = "pallet-broker" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7130,16 +7728,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core", - "sp-core-hashing", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-child-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7152,7 +7749,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7165,13 +7762,33 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", +] + +[[package]] +name = "pallet-collator-selection" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-balances", + "pallet-session", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-collective" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7182,13 +7799,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-conviction-voting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7199,7 +7816,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7215,13 +7832,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-democracy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7233,13 +7850,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7255,14 +7872,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", - "strum 0.24.1", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "strum 0.26.3", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7270,13 +7887,13 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-elections-phragmen" -version = "5.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7289,13 +7906,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "ethereum", "ethereum-types", @@ -7312,13 +7929,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", ] [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "environmental", "evm", @@ -7327,7 +7943,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "hash-db 0.16.0", + "hash-db", "hex", "hex-literal", "impl-trait-for-tuples", @@ -7338,7 +7954,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", ] [[package]] @@ -7358,7 +7973,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7373,7 +7988,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7399,7 +8014,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7422,13 +8037,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "fp-evm", ] @@ -7436,7 +8051,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "fp-evm", "sp-core", @@ -7463,7 +8078,7 @@ dependencies = [ "sha3", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7489,13 +8104,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "fp-evm", "frame-support", @@ -7507,9 +8122,9 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-ed25519" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ - "ed25519-dalek", + "ed25519-dalek 2.1.1", "fp-evm", ] @@ -7536,7 +8151,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7560,13 +8175,13 @@ dependencies = [ "sha3", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "fp-evm", "num", @@ -7592,7 +8207,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7616,7 +8231,7 @@ dependencies = [ "sha3", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7641,13 +8256,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "fp-evm", "tiny-keccak", @@ -7656,7 +8271,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "fp-evm", "ripemd", @@ -7677,13 +8292,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-fast-unstake" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "docify", "frame-benchmarking", @@ -7696,13 +8311,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7719,7 +8334,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7735,7 +8350,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7751,23 +8366,24 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-identity" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "enumflags2", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7788,13 +8404,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-im-online" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7808,13 +8424,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-indices" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7825,7 +8441,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -7844,13 +8460,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-membership" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7861,14 +8477,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "31.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "environmental", "frame-benchmarking", "frame-support", "frame-system", @@ -7879,14 +8496,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-weights", ] [[package]] name = "pallet-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7898,13 +8515,13 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-multisig" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7914,13 +8531,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-nis" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7930,13 +8547,13 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-nomination-pools" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -7948,14 +8565,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7967,26 +8584,26 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "1.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-offences" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -7997,13 +8614,13 @@ dependencies = [ "serde", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-offences-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8021,7 +8638,7 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -8041,7 +8658,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -8074,10 +8691,28 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "substrate-fixed", ] +[[package]] +name = "pallet-parameters" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", +] + [[package]] name = "pallet-pool-proposal" version = "0.1.0" @@ -8085,7 +8720,6 @@ dependencies = [ "bitflags 1.3.2", "frame-support", "frame-system", - "orml-utilities", "pallet-assets", "pallet-balances", "pallet-collab-ai-common", @@ -8095,13 +8729,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-preimage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8112,13 +8746,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-proxy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8127,17 +8761,18 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-ranked-collective" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", @@ -8145,13 +8780,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-recovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8160,13 +8795,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-referenda" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8179,13 +8814,28 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", +] + +[[package]] +name = "pallet-root-testing" +version = "4.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-scheduler" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "docify", "frame-benchmarking", @@ -8196,7 +8846,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-weights", ] @@ -8218,13 +8868,13 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-session" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -8239,14 +8889,14 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8257,13 +8907,13 @@ dependencies = [ "rand 0.8.5", "sp-runtime", "sp-session", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-society" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8275,13 +8925,13 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8298,24 +8948,24 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-staking-reward-curve" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "pallet-staking-reward-fn" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "log", "sp-arithmetic", @@ -8323,17 +8973,18 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" 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/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8344,14 +8995,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-sudo" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -8359,7 +9011,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -8370,7 +9022,7 @@ dependencies = [ "chrono", "core-primitives", "der 0.6.1", - "env_logger 0.10.2", + "env_logger", "frame-benchmarking", "frame-support", "frame-system", @@ -8381,7 +9033,6 @@ dependencies = [ "pallet-timestamp", "pallet-utility", "parity-scale-codec", - "ring 0.16.20", "rustls-webpki 0.102.0-alpha.3", "scale-info", "serde", @@ -8390,15 +9041,16 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "x509-cert", ] [[package]] name = "pallet-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -8408,15 +9060,15 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-timestamp", ] [[package]] name = "pallet-tips" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8429,13 +9081,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-transaction-payment" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -8445,13 +9097,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -8466,8 +9118,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -8478,9 +9130,10 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -8489,14 +9142,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-utility" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8506,7 +9160,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -8527,13 +9181,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-vesting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8542,13 +9196,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-whitelist" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8557,34 +9211,37 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-xcm" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bounded-collections", "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "staging-xcm", + "staging-xcm-builder", "staging-xcm-executor", + "xcm-fee-payment-runtime-api", ] [[package]] name = "pallet-xcm-benchmarks" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8594,24 +9251,54 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", ] [[package]] -name = "parachain-info" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +name = "parachains-common" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cumulus-primitives-core", + "cumulus-primitives-utility", "frame-support", "frame-system", + "log", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-xcm", "parity-scale-codec", + "polkadot-primitives", "scale-info", + "sp-consensus-aura", + "sp-core", + "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-executor", + "substrate-wasm-builder", +] + +[[package]] +name = "parity-bip39" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +dependencies = [ + "bitcoin_hashes 0.13.0", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", ] [[package]] @@ -8620,14 +9307,14 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ - "blake2", + "blake2 0.10.6", "crc32fast", "fs2", "hex", "libc", "log", "lz4", - "memmap2", + "memmap2 0.5.10", "parking_lot 0.12.3", "rand 0.8.5", "siphasher", @@ -8745,6 +9432,7 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-primitives-timestamp", @@ -8765,8 +9453,6 @@ dependencies = [ "moonbeam-rpc-primitives-debug", "moonbeam-rpc-primitives-txpool", "num_enum", - "orml-traits", - "orml-xtokens", "pallet-account-fix", "pallet-aiusd-convertor", "pallet-asset-manager", @@ -8831,10 +9517,11 @@ dependencies = [ "pallet-vc-management", "pallet-vesting", "pallet-xcm", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", + "polkadot-runtime-common", "polkadot-runtime-parachains", "precompile-utils", "runtime-common", @@ -8843,15 +9530,17 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -8860,28 +9549,21 @@ dependencies = [ ] [[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pbkdf2" -version = "0.8.0" +name = "password-hash" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ - "crypto-mac 0.11.1", + "base64ct", + "rand_core 0.6.4", + "subtle 2.6.1", ] [[package]] -name = "pbkdf2" -version = "0.11.0" +name = "paste" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -8890,6 +9572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", + "password-hash", ] [[package]] @@ -8944,7 +9627,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -8985,7 +9668,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -9035,11 +9718,13 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polkadot-approval-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "bitvec", "futures 0.3.30", "futures-timer", + "itertools 0.10.5", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -9053,8 +9738,8 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "always-assert", "futures 0.3.30", @@ -9069,8 +9754,8 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "derive_more", "fatality", @@ -9092,9 +9777,10 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "async-trait", "fatality", "futures 0.3.30", "parity-scale-codec", @@ -9108,20 +9794,22 @@ dependencies = [ "sc-network", "schnellru", "thiserror", + "tokio", "tracing-gum", ] [[package]] name = "polkadot-cli" -version = "1.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "cfg-if", "clap", "frame-benchmarking-cli", "futures 0.3.30", "log", "polkadot-node-metrics", - "polkadot-performance-test", + "polkadot-node-primitives", "polkadot-service", "sc-cli", "sc-executor", @@ -9133,15 +9821,15 @@ dependencies = [ "sp-io", "sp-keyring", "sp-maybe-compressed-blob", + "sp-runtime", "substrate-build-script-utils", "thiserror", - "try-runtime-cli", ] [[package]] name = "polkadot-collator-protocol" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitvec", "fatality", @@ -9162,26 +9850,26 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "polkadot-dispute-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "derive_more", "fatality", "futures 0.3.30", "futures-timer", - "indexmap 1.9.3", + "indexmap 2.2.6", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9199,8 +9887,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -9213,8 +9901,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "futures-timer", @@ -9228,14 +9916,15 @@ dependencies = [ "sc-network-common", "sp-application-crypto", "sp-core", + "sp-crypto-hashing", "sp-keystore", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "always-assert", "async-trait", @@ -9257,8 +9946,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "parity-scale-codec", @@ -9275,15 +9964,16 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitvec", "derive_more", "futures 0.3.30", "futures-timer", + "itertools 0.10.5", "kvdb", - "merlin 2.0.1", + "merlin", "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", @@ -9291,9 +9981,12 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "sc-keystore", "schnellru", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "sp-application-crypto", "sp-consensus", "sp-consensus-slots", @@ -9304,8 +9997,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitvec", "futures 0.3.30", @@ -9326,8 +10019,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitvec", "fatality", @@ -9338,6 +10031,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-statement-table", + "schnellru", "sp-keystore", "thiserror", "tracing-gum", @@ -9345,8 +10039,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "polkadot-node-subsystem", @@ -9360,8 +10054,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", @@ -9381,23 +10075,22 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "polkadot-node-metrics", "polkadot-node-subsystem", - "polkadot-primitives", + "polkadot-node-subsystem-types", "sc-client-api", "sc-consensus-babe", - "sp-blockchain", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-selection" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "futures-timer", @@ -9413,8 +10106,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "fatality", "futures 0.3.30", @@ -9432,8 +10125,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", @@ -9449,8 +10142,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "6.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitvec", "fatality", @@ -9466,8 +10159,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitvec", "fatality", @@ -9477,42 +10170,44 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", + "schnellru", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "always-assert", + "array-bytes 6.2.3", + "blake3", + "cfg-if", "futures 0.3.30", "futures-timer", - "libc", "parity-scale-codec", "pin-project", "polkadot-core-primitives", "polkadot-node-core-pvf-common", "polkadot-node-metrics", "polkadot-node-primitives", + "polkadot-node-subsystem", "polkadot-parachain-primitives", "polkadot-primitives", "rand 0.8.5", "slotmap", "sp-core", - "sp-maybe-compressed-blob", - "sp-wasm-interface", - "substrate-build-script-utils", "tempfile", + "thiserror", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "polkadot-node-primitives", @@ -9527,54 +10222,34 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "cpu-time", "futures 0.3.30", "landlock", "libc", + "nix 0.27.1", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", + "seccompiler", "sp-core", - "sp-externalities", - "sp-io", - "sp-tracing", - "tokio", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf-prepare-worker" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -dependencies = [ - "futures 0.3.30", - "libc", - "parity-scale-codec", - "polkadot-node-core-pvf-common", - "polkadot-parachain-primitives", - "polkadot-primitives", - "rayon", - "sc-executor", - "sc-executor-common", - "sc-executor-wasmtime", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-io", - "sp-maybe-compressed-blob", - "sp-tracing", - "tikv-jemalloc-ctl", - "tokio", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-runtime-api" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "polkadot-node-metrics", @@ -9588,8 +10263,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "lazy_static", "log", @@ -9599,6 +10274,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "sc-network", + "sc-network-types", "sp-core", "thiserror", "tokio", @@ -9606,8 +10282,8 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bs58 0.5.1", "futures 0.3.30", @@ -9625,8 +10301,8 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -9642,22 +10318,25 @@ dependencies = [ "rand 0.8.5", "sc-authority-discovery", "sc-network", - "strum 0.24.1", + "sc-network-types", + "sp-runtime", + "strum 0.26.3", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "bitvec", "bounded-vec", "futures 0.3.30", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "serde", "sp-application-crypto", "sp-consensus-babe", @@ -9671,8 +10350,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -9681,10 +10360,11 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", + "bitvec", "derive_more", "futures 0.3.30", "orchestra", @@ -9693,20 +10373,24 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "polkadot-statement-table", + "sc-client-api", "sc-network", + "sc-network-types", "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 = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "derive_more", @@ -9717,17 +10401,19 @@ dependencies = [ "kvdb", "parity-db", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.3", "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", + "sc-client-api", "schnellru", "sp-application-crypto", "sp-core", @@ -9738,8 +10424,8 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", @@ -9752,7 +10438,6 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", - "schnellru", "sp-api", "sp-core", "tikv-jemalloc-ctl", @@ -9761,46 +10446,29 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "6.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bounded-collections", "derive_more", - "frame-support", "parity-scale-codec", "polkadot-core-primitives", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std", -] - -[[package]] -name = "polkadot-performance-test" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -dependencies = [ - "env_logger 0.9.3", - "log", - "polkadot-erasure-coding", - "polkadot-node-core-pvf-prepare-worker", - "polkadot-node-primitives", - "polkadot-primitives", - "quote", - "sc-executor-common", - "sp-maybe-compressed-blob", - "staging-kusama-runtime", - "thiserror", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-weights", ] [[package]] name = "polkadot-primitives" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitvec", "hex-literal", + "log", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -9817,13 +10485,13 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "polkadot-rpc" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -9839,6 +10507,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", @@ -9852,107 +10521,10 @@ dependencies = [ "substrate-state-trie-migration-rpc", ] -[[package]] -name = "polkadot-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -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", - "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", - "pallet-xcm-benchmarks", - "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-storage", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", -] - [[package]] name = "polkadot-runtime-common" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitvec", "frame-benchmarking", @@ -9962,11 +10534,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", @@ -9990,42 +10565,30 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", ] -[[package]] -name = "polkadot-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", -] - [[package]] name = "polkadot-runtime-metrics" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bs58 0.5.1", "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "polkadot-runtime-parachains" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -10039,12 +10602,14 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-broker", "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", "pallet-vesting", "parity-scale-codec", + "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", @@ -10055,6 +10620,7 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-core", "sp-inherents", "sp-io", @@ -10062,7 +10628,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -10070,8 +10636,8 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "frame-benchmarking", @@ -10087,12 +10653,12 @@ dependencies = [ "log", "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.3", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -10126,8 +10692,6 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", - "polkadot-runtime", - "polkadot-runtime-common", "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", @@ -10175,34 +10739,34 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-timestamp", "sp-transaction-pool", "sp-version", "sp-weights", - "staging-kusama-runtime", + "staging-xcm", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", "westend-runtime", + "xcm-fee-payment-runtime-api", ] [[package]] name = "polkadot-statement-distribution" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "arrayvec 0.7.4", "bitvec", "fatality", "futures 0.3.30", "futures-timer", - "indexmap 1.9.3", + "indexmap 2.2.6", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "sp-keystore", @@ -10213,14 +10777,98 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "polkadot-primitives", "sp-core", + "tracing-gum", +] + +[[package]] +name = "polkavm" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a3693e5efdb2bf74e449cd25fd777a28bd7ed87e41f5d5da75eb31b4de48b94" +dependencies = [ + "libc", + "log", + "polkavm-assembler", + "polkavm-common", + "polkavm-linux-raw", +] + +[[package]] +name = "polkavm-assembler" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa96d6d868243acc12de813dd48e756cbadcc8e13964c70d272753266deadc1" +dependencies = [ + "log", +] + +[[package]] +name = "polkavm-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" +dependencies = [ + "log", +] + +[[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.89", +] + +[[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.89", +] + +[[package]] +name = "polkavm-linker" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c7be503e60cf56c0eb785f90aaba4b583b36bff00e93997d93fef97f9553c39" +dependencies = [ + "gimli 0.28.1", + "hashbrown 0.14.5", + "log", + "object 0.32.2", + "polkavm-common", + "regalloc2 0.9.3", + "rustc-demangle", ] +[[package]] +name = "polkavm-linux-raw" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26e85d3456948e650dff0cfc85603915847faf893ed1e66b020bb82ef4557120" + [[package]] name = "polling" version = "2.8.0" @@ -10296,7 +10944,7 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "derive_more", "environmental", @@ -10318,20 +10966,21 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-weights", + "staging-xcm", ] [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.1.0#7544791796a93e85716241b72ba68b7c7231376f" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v1.11.0#5779b59043ae018d07d84f4e8e0c49087f804d3a" dependencies = [ "case", "num_enum", "prettyplease 0.2.20", "proc-macro2", "quote", - "sp-core-hashing", + "sp-crypto-hashing", "syn 1.0.109", ] @@ -10349,6 +10998,16 @@ dependencies = [ "regex", ] +[[package]] +name = "predicates" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +dependencies = [ + "anstyle", + "predicates-core", +] + [[package]] name = "predicates-core" version = "1.0.8" @@ -10382,7 +11041,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -10392,18 +11051,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", - "uint", + "uint 0.9.5", +] + +[[package]] +name = "primitive-types" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" +dependencies = [ + "fixed-hash", + "impl-codec 0.7.0", + "impl-num-traits", + "uint 0.10.0", ] [[package]] name = "prioritized-metered-channel" -version = "0.2.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" +checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" dependencies = [ "coarsetime", "crossbeam-queue", @@ -10460,20 +11131,20 @@ dependencies = [ [[package]] name = "proc-macro-warning" -version = "0.4.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -10512,7 +11183,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -10522,7 +11193,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive 0.12.6", ] [[package]] @@ -10539,7 +11220,7 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", + "prost 0.11.9", "prost-types", "regex", "syn 1.0.109", @@ -10560,13 +11241,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", ] [[package]] @@ -10584,7 +11278,16 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ - "ptr_meta_derive", + "ptr_meta_derive 0.1.4", +] + +[[package]] +name = "ptr_meta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9e76f66d3f9606f44e45598d155cb13ecf09f4a28199e48daf8c8fc937ea90" +dependencies = [ + "ptr_meta_derive 0.3.0", ] [[package]] @@ -10598,6 +11301,32 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ptr_meta_derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "quanta" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi 0.11.0+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -10623,7 +11352,7 @@ dependencies = [ "bytes", "quick-protobuf", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -10637,6 +11366,24 @@ dependencies = [ "pin-project-lite 0.1.12", ] +[[package]] +name = "quinn" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +dependencies = [ + "bytes", + "pin-project-lite 0.2.14", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.20.9", + "thiserror", + "tokio", + "tracing", + "webpki", +] + [[package]] name = "quinn-proto" version = "0.9.6" @@ -10655,6 +11402,19 @@ dependencies = [ "webpki", ] +[[package]] +name = "quinn-udp" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +dependencies = [ + "libc", + "quinn-proto", + "socket2 0.4.10", + "tracing", + "windows-sys 0.42.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -10670,6 +11430,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rancor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf5f7161924b9d1cea0e4cabc97c372cea92b5f927fc13c6bca67157a0ad947" +dependencies = [ + "ptr_meta 0.3.0", +] + [[package]] name = "rand" version = "0.7.3" @@ -10732,6 +11501,16 @@ dependencies = [ "getrandom 0.2.15", ] +[[package]] +name = "rand_distr" +version = "0.4.3" +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" @@ -10750,6 +11529,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "raw-cpuid" +version = "11.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -10828,13 +11616,12 @@ dependencies = [ [[package]] name = "reed-solomon-novelpoly" -version = "1.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58130877ca403ab42c864fbac74bb319a0746c07a634a92a5cfc7f54af272582" +checksum = "87413ebb313323d431e85d0afc5a68222aaed972843537cbfe5f061cf1b4bcab" dependencies = [ "derive_more", "fs-err", - "itertools 0.11.0", "static_init", "thiserror", ] @@ -10856,7 +11643,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -10871,6 +11658,19 @@ dependencies = [ "smallvec", ] +[[package]] +name = "regalloc2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +dependencies = [ + "hashbrown 0.13.2", + "log", + "rustc-hash", + "slice-group-by", + "smallvec", +] + [[package]] name = "regex" version = "1.10.6" @@ -10915,6 +11715,12 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +[[package]] +name = "rend" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a35e8a6bf28cd121053a66aa2e6a2e3eaffad4a60012179f0e864aa5ffeff215" + [[package]] name = "resolv-conf" version = "0.7.0" @@ -10932,22 +11738,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.6.1", ] [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +source = "git+https://github.com/w3f/ring-proof#652286c32f96beb9ce7f5793f5e2c2c923f63b73" dependencies = [ "ark-ec", "ark-ff", "ark-poly", "ark-serialize", "ark-std", + "ark-transcript 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.7.4", + "blake2 0.10.6", "common", "fflonk", - "merlin 3.0.0", ] [[package]] @@ -10959,13 +11767,13 @@ dependencies = [ "libc", "log", "once_cell", - "rkyv", + "rkyv 0.4.3", "spin 0.5.2", "untrusted 0.7.1", "winapi", "xous", "xous-api-names", - "xous-ipc", + "xous-ipc 0.9.63", ] [[package]] @@ -10991,181 +11799,97 @@ checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ "digest 0.10.7", ] - -[[package]] -name = "rkyv" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70de01b38fe7baba4ecdd33b777096d2b326993d8ea99bc5b6ede691883d3010" -dependencies = [ - "memoffset 0.6.5", - "ptr_meta", - "rkyv_derive", -] - -[[package]] -name = "rkyv_derive" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a169f6bc5a81033e86ed39d0f4150e2608160b73d2b93c6e8e6a3efa873f14" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rlp-derive", - "rustc-hex", -] - -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "rococo-parachain-runtime" -version = "0.1.0" -dependencies = [ - "core-primitives", - "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-primitives-timestamp", - "cumulus-primitives-utility", - "fp-evm", - "fp-rpc", - "fp-self-contained", - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "log", - "moonbeam-evm-tracer", - "moonbeam-rpc-primitives-debug", - "moonbeam-rpc-primitives-txpool", - "num_enum", - "orml-traits", - "orml-xtokens", - "pallet-account-fix", - "pallet-asset-manager", - "pallet-assets", - "pallet-assets-handler", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-bitacross", - "pallet-bounties", - "pallet-bridge-transfer", - "pallet-chain-bridge", - "pallet-collective", - "pallet-democracy", - "pallet-ethereum", - "pallet-evm", - "pallet-evm-assertions", - "pallet-evm-precompile-assets-erc20", - "pallet-evm-precompile-blake2", - "pallet-evm-precompile-bn128", - "pallet-evm-precompile-bridge-transfer", - "pallet-evm-precompile-dispatch", - "pallet-evm-precompile-ed25519", - "pallet-evm-precompile-modexp", - "pallet-evm-precompile-parachain-staking", - "pallet-evm-precompile-score-staking", - "pallet-evm-precompile-sha3fips", - "pallet-evm-precompile-simple", - "pallet-extrinsic-filter", - "pallet-group", - "pallet-identity", - "pallet-identity-management", - "pallet-membership", - "pallet-message-queue", - "pallet-multisig", - "pallet-omni-account", - "pallet-omni-account-runtime-api", - "pallet-parachain-staking", - "pallet-preimage", - "pallet-proxy", - "pallet-scheduler", - "pallet-score-staking", - "pallet-session", - "pallet-sudo", - "pallet-teebag", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vc-management", - "pallet-vesting", - "pallet-xcm", - "parachain-info", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime-parachains", - "precompile-utils", - "runtime-common", - "scale-info", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-state-machine", - "sp-std", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", - "xcm-simulator", + +[[package]] +name = "rkyv" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70de01b38fe7baba4ecdd33b777096d2b326993d8ea99bc5b6ede691883d3010" +dependencies = [ + "memoffset 0.6.5", + "ptr_meta 0.1.4", + "rkyv_derive 0.4.0", +] + +[[package]] +name = "rkyv" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b11a153aec4a6ab60795f8ebe2923c597b16b05bb1504377451e705ef1a45323" +dependencies = [ + "bytes", + "hashbrown 0.15.2", + "indexmap 2.2.6", + "munge", + "ptr_meta 0.3.0", + "rancor", + "rend", + "rkyv_derive 0.8.9", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a169f6bc5a81033e86ed39d0f4150e2608160b73d2b93c6e8e6a3efa873f14" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rkyv_derive" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beb382a4d9f53bd5c0be86b10d8179c3f8a14c30bf774ff77096ed6581e35981" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rocksdb" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" +dependencies = [ + "libc", + "librocksdb-sys", ] [[package]] name = "rococo-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "binary-merkle-tree", + "bitvec", "frame-benchmarking", "frame-executive", "frame-metadata-hash-extension", @@ -11176,6 +11900,7 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -11185,11 +11910,11 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-elections-phragmen", "pallet-grandpa", "pallet-identity", - "pallet-im-online", "pallet-indices", "pallet-membership", "pallet-message-queue", @@ -11197,9 +11922,13 @@ dependencies = [ "pallet-multisig", "pallet-nis", "pallet-offences", + "pallet-parameters", "pallet-preimage", "pallet-proxy", + "pallet-ranked-collective", "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-society", @@ -11213,6 +11942,7 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", @@ -11224,13 +11954,17 @@ dependencies = [ "scale-info", "serde", "serde_derive", + "serde_json", "smallvec", "sp-api", + "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", + "sp-consensus-grandpa", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-mmr-primitives", @@ -11238,8 +11972,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -11247,12 +11981,13 @@ dependencies = [ "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", + "xcm-fee-payment-runtime-api", ] [[package]] name = "rococo-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "polkadot-primitives", @@ -11261,8 +11996,16 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + [[package]] name = "rpassword" version = "7.3.1" @@ -11284,7 +12027,7 @@ dependencies = [ "log", "netlink-packet-route", "netlink-proto", - "nix", + "nix 0.24.3", "thiserror", "tokio", ] @@ -11304,14 +12047,12 @@ name = "runtime-common" version = "0.1.0" dependencies = [ "core-primitives", - "cumulus-pallet-parachain-system", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", "frame-support", "frame-system", "log", - "orml-xtokens", "pallet-asset-manager", "pallet-assets", "pallet-authorship", @@ -11328,8 +12069,8 @@ dependencies = [ "pallet-treasury", "pallet-vesting", "pallet-xcm", - "parachain-info", "parity-scale-codec", + "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", @@ -11338,7 +12079,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11446,6 +12188,20 @@ dependencies = [ "sct", ] +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-pki-types 1.10.0", + "rustls-webpki 0.102.8", + "subtle 2.6.1", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -11453,7 +12209,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.2.0", + "rustls-pki-types 1.10.0", "schannel", "security-framework", ] @@ -11467,12 +12236,27 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types 1.10.0", +] + [[package]] name = "rustls-pki-types" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a47003264dea418db67060fa420ad16d0d2f8f0a0360d825c00e177ac52cb5d8" +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -11489,7 +12273,18 @@ version = "0.102.0-alpha.3" source = "git+https://github.com/rustls/webpki?rev=da923ed#da923edaab56f599971e58773617fb574cd019dc" dependencies = [ "ring 0.16.20", - "rustls-pki-types", + "rustls-pki-types 0.2.1", + "untrusted 0.9.0", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring 0.17.8", + "rustls-pki-types 1.10.0", "untrusted 0.9.0", ] @@ -11547,33 +12342,36 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "thiserror", ] [[package]] name = "sc-authority-discovery" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", "futures-timer", "ip_network", "libp2p", + "linked_hash_set", "log", - "multihash", + "multihash 0.17.0", + "multihash-codetable", "parity-scale-codec", - "prost", + "prost 0.12.6", "prost-build", "rand 0.8.5", "sc-client-api", "sc-network", + "sc-network-types", "sp-api", "sp-authority-discovery", "sp-blockchain", @@ -11586,15 +12384,14 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", "sc-block-builder", - "sc-client-api", "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", @@ -11609,25 +12406,29 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" 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/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "memmap2", + "array-bytes 6.2.3", + "docify", + "log", + "memmap2 0.9.5", + "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", "sc-executor", @@ -11637,34 +12438,40 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", + "sp-crypto-hashing", + "sp-genesis-builder", + "sp-io", "sp-runtime", "sp-state-machine", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "sc-chain-spec-derive" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "sc-cli" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.36.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "chrono", "clap", "fdlimit", "futures 0.3.30", + "itertools 0.10.5", "libp2p-identity", "log", "names", + "parity-bip39", "parity-scale-codec", "rand 0.8.5", "regex", @@ -11672,6 +12479,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", "sc-service", "sc-telemetry", @@ -11687,14 +12495,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/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "fnv", "futures 0.3.30", @@ -11709,20 +12516,21 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "hash-db 0.16.0", + "hash-db", "kvdb", "kvdb-memorydb", "kvdb-rocksdb", @@ -11745,17 +12553,17 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", "futures-timer", - "libp2p-identity", "log", - "mockall", + "mockall 0.11.4", "parking_lot 0.12.3", "sc-client-api", + "sc-network-types", "sc-utils", "serde", "sp-api", @@ -11770,8 +12578,8 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", @@ -11799,8 +12607,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "fork-tree", @@ -11817,7 +12625,6 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sc-transaction-pool-api", - "scale-info", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -11826,6 +12633,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-slots", "sp-core", + "sp-crypto-hashing", "sp-inherents", "sp-keystore", "sp-runtime", @@ -11835,8 +12643,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "jsonrpsee", @@ -11857,10 +12665,10 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "fnv", @@ -11873,6 +12681,7 @@ dependencies = [ "sc-network", "sc-network-gossip", "sc-network-sync", + "sc-network-types", "sc-utils", "sp-api", "sp-application-crypto", @@ -11881,18 +12690,20 @@ dependencies = [ "sp-consensus", "sp-consensus-beefy", "sp-core", + "sp-crypto-hashing", "sp-keystore", "sp-mmr-primitives", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", "wasm-timer", ] [[package]] name = "sc-consensus-beefy-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "jsonrpsee", @@ -11910,8 +12721,8 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -11923,11 +12734,11 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "ahash 0.8.11", - "array-bytes", + "array-bytes 6.2.3", "async-trait", "dyn-clone", "finality-grandpa", @@ -11945,6 +12756,8 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-gossip", + "sc-network-sync", + "sc-network-types", "sc-telemetry", "sc-transaction-pool-api", "sc-utils", @@ -11956,6 +12769,7 @@ dependencies = [ "sp-consensus", "sp-consensus-grandpa", "sp-core", + "sp-crypto-hashing", "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", @@ -11964,8 +12778,8 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "finality-grandpa", "futures 0.3.30", @@ -11984,8 +12798,8 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", @@ -12007,59 +12821,73 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "sc-executor-common", + "sc-executor-polkavm", "sc-executor-wasmtime", "schnellru", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-io", "sp-panic-handler", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "tracing", ] [[package]] name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "polkavm", "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "thiserror", "wasm-instrument", ] +[[package]] +name = "sc-executor-polkavm" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "log", + "polkavm", + "sc-executor-common", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", +] + [[package]] name = "sc-executor-wasmtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "anyhow", "cfg-if", "libc", "log", + "parking_lot 0.12.3", "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "wasmtime", ] [[package]] name = "sc-informant" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "ansi_term", "futures 0.3.30", @@ -12068,16 +12896,17 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", + "sc-network-sync", "sp-blockchain", "sp-runtime", ] [[package]] name = "sc-keystore" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "parking_lot 0.12.3", "serde_json", "sp-application-crypto", @@ -12086,16 +12915,46 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-mixnet" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "bytes", + "futures 0.3.30", + "futures-timer", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.3", + "sc-client-api", + "sc-network", + "sc-network-types", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", + "cid 0.9.0", "either", "fnv", "futures 0.3.30", @@ -12103,16 +12962,22 @@ dependencies = [ "ip_network", "libp2p", "linked_hash_set", + "litep2p", "log", - "mockall", + "mockall 0.11.4", + "once_cell", "parity-scale-codec", "parking_lot 0.12.3", "partial_sort", "pin-project", + "prost 0.11.9", + "prost-build", "rand 0.8.5", "sc-client-api", "sc-network-common", + "sc-network-types", "sc-utils", + "schnellru", "serde", "serde_json", "smallvec", @@ -12122,35 +12987,18 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", - "unsigned-varint", + "tokio", + "tokio-stream", + "unsigned-varint 0.7.2", + "void", "wasm-timer", "zeroize", ] -[[package]] -name = "sc-network-bitswap" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -dependencies = [ - "async-channel 1.9.0", - "cid", - "futures 0.3.30", - "libp2p-identity", - "log", - "prost", - "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-runtime", - "thiserror", - "unsigned-varint", -] - [[package]] name = "sc-network-common" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -12159,6 +13007,7 @@ dependencies = [ "parity-scale-codec", "prost-build", "sc-consensus", + "sc-network-types", "sp-consensus", "sp-consensus-grandpa", "sp-runtime", @@ -12166,8 +13015,8 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "ahash 0.8.11", "futures 0.3.30", @@ -12176,6 +13025,8 @@ dependencies = [ "log", "sc-network", "sc-network-common", + "sc-network-sync", + "sc-network-types", "schnellru", "sp-runtime", "substrate-prometheus-endpoint", @@ -12184,19 +13035,19 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "futures 0.3.30", - "libp2p-identity", "log", "parity-scale-codec", - "prost", + "prost 0.12.6", "prost-build", "sc-client-api", "sc-network", + "sc-network-types", "sp-blockchain", "sp-core", "sp-runtime", @@ -12205,10 +13056,10 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "async-channel 1.9.0", "async-trait", "fork-tree", @@ -12216,14 +13067,15 @@ dependencies = [ "futures-timer", "libp2p", "log", - "mockall", + "mockall 0.11.4", "parity-scale-codec", - "prost", + "prost 0.12.6", "prost-build", "sc-client-api", "sc-consensus", "sc-network", "sc-network-common", + "sc-network-types", "sc-utils", "schnellru", "smallvec", @@ -12235,32 +13087,50 @@ 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/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "futures 0.3.30", "libp2p", "log", "parity-scale-codec", "sc-network", "sc-network-common", + "sc-network-sync", + "sc-network-types", "sc-utils", "sp-consensus", "sp-runtime", "substrate-prometheus-endpoint", ] +[[package]] +name = "sc-network-types" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "bs58 0.4.0", + "libp2p-identity", + "litep2p", + "multiaddr", + "multihash 0.17.0", + "rand 0.8.5", + "thiserror", +] + [[package]] name = "sc-offchain" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "bytes", "fnv", "futures 0.3.30", @@ -12277,11 +13147,12 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", + "sc-network-types", "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-keystore", "sp-offchain", "sp-runtime", @@ -12291,8 +13162,8 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -12300,8 +13171,8 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "jsonrpsee", @@ -12311,6 +13182,7 @@ dependencies = [ "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", @@ -12331,12 +13203,13 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.33.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", @@ -12350,10 +13223,13 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "futures 0.3.30", + "governor", "http", + "hyper", "jsonrpsee", "log", "serde_json", @@ -12365,10 +13241,10 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", + "array-bytes 6.2.3", "futures 0.3.30", "futures-util", "hex", @@ -12376,14 +13252,18 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.3", + "rand 0.8.5", "sc-chain-spec", "sc-client-api", + "sc-rpc", "sc-transaction-pool-api", "sc-utils", + "schnellru", "serde", "sp-api", "sp-blockchain", "sp-core", + "sp-rpc", "sp-runtime", "sp-version", "thiserror", @@ -12393,8 +13273,8 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "directories", @@ -12407,7 +13287,6 @@ dependencies = [ "parking_lot 0.12.3", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -12416,11 +13295,11 @@ dependencies = [ "sc-informant", "sc-keystore", "sc-network", - "sc-network-bitswap", "sc-network-common", "sc-network-light", "sc-network-sync", "sc-network-transactions", + "sc-network-types", "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", @@ -12430,18 +13309,19 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "sc-utils", + "schnellru", "serde", "serde_json", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -12457,8 +13337,8 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.30.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "log", "parity-scale-codec", @@ -12468,13 +13348,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.16.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "clap", "fs4", "log", - "sc-client-db", "sp-core", "thiserror", "tokio", @@ -12482,8 +13361,8 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12501,9 +13380,10 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "6.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "derive_more", "futures 0.3.30", "libc", "log", @@ -12514,14 +13394,15 @@ dependencies = [ "serde", "serde_json", "sp-core", + "sp-crypto-hashing", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "sc-telemetry" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "chrono", "futures 0.3.30", @@ -12530,6 +13411,7 @@ dependencies = [ "parking_lot 0.12.3", "pin-project", "rand 0.8.5", + "sc-network", "sc-utils", "serde", "serde_json", @@ -12539,15 +13421,16 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "ansi_term", - "atty", "chrono", + "is-terminal", "lazy_static", "libc", "log", + "parity-scale-codec", "parking_lot 0.12.3", "regex", "rustc-hash", @@ -12559,28 +13442,28 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "thiserror", "tracing", - "tracing-log", + "tracing-log 0.1.4", "tracing-subscriber", ] [[package]] name = "sc-tracing-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "sc-transaction-pool" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", @@ -12596,8 +13479,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-core", + "sp-crypto-hashing", "sp-runtime", - "sp-tracing", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -12605,8 +13489,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", @@ -12621,8 +13505,8 @@ dependencies = [ [[package]] name = "sc-utils" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-channel 1.9.0", "futures 0.3.30", @@ -12680,24 +13564,6 @@ dependencies = [ "hashbrown 0.13.2", ] -[[package]] -name = "schnorrkel" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "curve25519-dalek 2.1.3", - "getrandom 0.1.16", - "merlin 2.0.1", - "rand 0.7.3", - "rand_core 0.5.1", - "sha2 0.8.2", - "subtle", - "zeroize", -] - [[package]] name = "schnorrkel" version = "0.10.2" @@ -12707,7 +13573,7 @@ dependencies = [ "arrayref", "arrayvec 0.7.4", "curve25519-dalek-ng", - "merlin 3.0.0", + "merlin", "rand_core 0.6.4", "sha2 0.9.9", "subtle-ng", @@ -12720,14 +13586,16 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ + "aead", "arrayref", "arrayvec 0.7.4", "curve25519-dalek 4.1.3", "getrandom_or_panic", - "merlin 3.0.0", + "merlin", "rand_core 0.6.4", + "serde_bytes", "sha2 0.10.8", - "subtle", + "subtle 2.6.1", "zeroize", ] @@ -12753,6 +13621,21 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "sctp-proto" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6220f78bb44c15f326b0596113305f6101097a18755d53727a575c97e09fb24" +dependencies = [ + "bytes", + "crc", + "fxhash", + "log", + "rand 0.8.5", + "slab", + "thiserror", +] + [[package]] name = "sec1" version = "0.7.3" @@ -12763,24 +13646,34 @@ dependencies = [ "der 0.7.9", "generic-array 0.14.7", "pkcs8", - "subtle", + "serdect", + "subtle 2.6.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.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" dependencies = [ "cc", ] @@ -12843,22 +13736,31 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -12881,6 +13783,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "sha-1" version = "0.9.8" @@ -12895,15 +13807,35 @@ dependencies = [ ] [[package]] -name = "sha2" -version = "0.8.2" +name = "sha-1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", + "cfg-if", + "cpufeatures", + "digest 0.10.7", + "sha1-asm", +] + +[[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 = "sha1-asm" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "286acebaf8b67c1130aedffad26f594eff0c1292389158135327d2e23aed582b" +dependencies = [ + "cc", ] [[package]] @@ -12964,6 +13896,12 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + [[package]] name = "signature" version = "2.2.0" @@ -13007,6 +13945,21 @@ dependencies = [ "similar", ] +[[package]] +name = "simple-dns" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae9a3fcdadafb6d97f4c0e007e4247b114ee0f119f650c3cbf3a8b3a1479694" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "simple-mermaid" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" + [[package]] name = "siphasher" version = "0.3.11" @@ -13030,14 +13983,14 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "enumn", "parity-scale-codec", "paste", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -13099,13 +14052,13 @@ dependencies = [ "hmac 0.12.1", "itertools 0.11.0", "libsecp256k1", - "merlin 3.0.0", + "merlin", "no-std-net", "nom", "num-bigint", "num-rational", "num-traits", - "pbkdf2 0.12.2", + "pbkdf2", "pin-project", "poly1305", "rand 0.8.5", @@ -13175,14 +14128,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" dependencies = [ "aes-gcm", - "blake2", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.1.3", "rand_core 0.6.4", "ring 0.17.8", "rustc_version", "sha2 0.10.8", - "subtle", + "subtle 2.6.1", ] [[package]] @@ -13219,25 +14172,26 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "sha-1", + "sha-1 0.9.8", ] [[package]] name = "sp-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", "parity-scale-codec", "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-metadata-ir", "sp-runtime", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-state-machine", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", "sp-version", "thiserror", @@ -13245,73 +14199,90 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "15.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "Inflector", - "blake2", + "blake2 0.10.6", "expander 2.2.1", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "sp-application-crypto" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "sp-arithmetic" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "docify", "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.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/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std", ] [[package]] name = "sp-block-builder" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std", ] [[package]] name = "sp-blockchain" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "futures 0.3.30", "log", @@ -13328,8 +14299,8 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "futures 0.3.30", @@ -13343,8 +14314,8 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "parity-scale-codec", @@ -13354,14 +14325,13 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "parity-scale-codec", @@ -13373,14 +14343,13 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "lazy_static", "parity-scale-codec", @@ -13389,17 +14358,18 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", + "sp-crypto-hashing", "sp-io", + "sp-keystore", "sp-mmr-primitives", "sp-runtime", - "sp-std", - "strum 0.24.1", + "strum 0.26.3", ] [[package]] name = "sp-consensus-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "finality-grandpa", "log", @@ -13411,72 +14381,90 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std", ] [[package]] name = "sp-consensus-slots" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", "sp-timestamp", ] [[package]] name = "sp-core" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "array-bytes", - "arrayvec 0.7.4", + "array-bytes 6.2.3", "bandersnatch_vrfs", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", "bs58 0.5.1", "dyn-clonable", "ed25519-zebra 3.1.0", "futures 0.3.30", - "hash-db 0.16.0", + "hash-db", "hash256-std-hasher", - "impl-serde", - "lazy_static", + "impl-serde 0.4.0", + "itertools 0.10.5", + "k256", "libsecp256k1", "log", - "merlin 2.0.1", + "merlin", + "parity-bip39", "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types", + "primitive-types 0.12.2", "rand 0.8.5", - "regex", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-crypto-hashing", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] [[package]] -name = "sp-core-hashing" -version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +name = "sp-crypto-ec-utils" +version = "0.10.0" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "blake2b_simd", "byteorder", @@ -13487,19 +14475,19 @@ dependencies = [ ] [[package]] -name = "sp-core-hashing-proc-macro" -version = "9.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +name = "sp-crypto-hashing-proc-macro" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "quote", - "sp-core-hashing", - "syn 2.0.77", + "sp-crypto-hashing", + "syn 2.0.89", ] [[package]] name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -13507,69 +14495,90 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "sp-externalities" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", +] + +[[package]] +name = "sp-externalities" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-genesis-builder" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.8.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "parity-scale-codec", + "scale-info", "serde_json", "sp-api", "sp-runtime", - "sp-std", ] [[package]] name = "sp-inherents" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", "thiserror", ] [[package]] name = "sp-io" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "30.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "bytes", - "ed25519-dalek", + "ed25519-dalek 2.1.1", "libsecp256k1", "log", "parity-scale-codec", + "polkavm-derive", "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", "tracing", "tracing-core", @@ -13577,31 +14586,29 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "31.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "lazy_static", "sp-core", "sp-runtime", - "strum 0.24.1", + "strum 0.26.3", ] [[package]] name = "sp-keystore" -version = "0.27.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.34.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "sp-core", - "sp-externalities", - "thiserror", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "sp-maybe-compressed-blob" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "thiserror", "zstd 0.12.4", @@ -13609,19 +14616,29 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", +] + +[[package]] +name = "sp-mixnet" +version = "0.4.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", ] [[package]] name = "sp-mmr-primitives" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -13630,16 +14647,15 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-runtime", - "sp-std", "thiserror", ] [[package]] name = "sp-npos-elections" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "scale-info", @@ -13647,13 +14663,12 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", ] [[package]] name = "sp-offchain" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "sp-api", "sp-core", @@ -13662,8 +14677,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "backtrace", "lazy_static", @@ -13672,8 +14687,8 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "6.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "rustc-hash", "serde", @@ -13682,9 +14697,10 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "31.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", @@ -13694,48 +14710,83 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", + "simple-mermaid", "sp-application-crypto", "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive", + "primitive-types 0.12.2", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" 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", + "polkavm-derive", + "primitive-types 0.13.1", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "Inflector", - "proc-macro-crate 1.3.1", + "expander 2.2.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" +dependencies = [ + "Inflector", + "expander 2.2.1", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] name = "sp-session" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "scale-info", @@ -13744,13 +14795,12 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", ] [[package]] name = "sp-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -13758,24 +14808,22 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.28.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.3", "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-panic-handler", - "sp-std", "sp-trie", "thiserror", "tracing", @@ -13784,12 +14832,12 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "aes-gcm", "curve25519-dalek 4.1.3", - "ed25519-dalek", + "ed25519-dalek 2.1.1", "hkdf", "parity-scale-codec", "rand 0.8.5", @@ -13798,52 +14846,77 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "thiserror", "x25519-dalek 2.0.1", ] [[package]] name = "sp-std" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" [[package]] name = "sp-storage" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "impl-serde 0.4.0", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", +] + +[[package]] +name = "sp-storage" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" dependencies = [ - "impl-serde", + "impl-serde 0.5.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", "thiserror", ] [[package]] name = "sp-tracing" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "parity-scale-codec", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" dependencies = [ "parity-scale-codec", - "sp-std", "tracing", "tracing-core", "tracing-subscriber", @@ -13851,8 +14924,8 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "sp-api", "sp-runtime", @@ -13860,8 +14933,8 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "async-trait", "parity-scale-codec", @@ -13869,27 +14942,26 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", "sp-trie", ] [[package]] name = "sp-trie" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "ahash 0.8.11", - "hash-db 0.16.0", - "hashbrown 0.13.2", + "hash-db", "lazy_static", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.3", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "thiserror", "tracing", "trie-db", @@ -13898,58 +14970,67 @@ dependencies = [ [[package]] name = "sp-version" -version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "impl-serde", + "impl-serde 0.4.0", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro", + "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "sp-wasm-interface" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", "wasmtime", ] [[package]] -name = "sp-weights" +name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +source = "git+https://github.com/paritytech/polkadot-sdk#5e0bcb0ee9788b7bb16ccfbda4fdc153b24c6386" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + +[[package]] +name = "sp-weights" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -13965,14 +15046,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] -name = "spinners" -version = "4.1.1" +name = "spinning_top" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" dependencies = [ - "lazy_static", - "maplit", - "strum 0.24.1", + "lock_api", ] [[package]] @@ -14017,116 +15096,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "staging-kusama-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +name = "staging-parachain-info" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "binary-merkle-tree", - "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", + "cumulus-primitives-core", "frame-support", "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "kusama-runtime-constants", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-beefy", - "pallet-beefy-mmr", - "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-mmr", - "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-state-trie-migration", - "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-application-crypto", - "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-storage", - "sp-transaction-pool", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "staging-xcm" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ + "array-bytes 6.2.3", "bounded-collections", "derivative", "environmental", @@ -14141,8 +15129,8 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "frame-system", @@ -14155,7 +15143,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -14163,8 +15151,8 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "environmental", "frame-benchmarking", @@ -14172,11 +15160,12 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-weights", "staging-xcm", ] @@ -14215,6 +15204,39 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "str0m" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6706347e49b13373f7ddfafad47df7583ed52083d6fc8a594eb2c80497ef959d" +dependencies = [ + "combine", + "crc", + "fastrand 2.1.0", + "hmac 0.12.1", + "once_cell", + "openssl", + "openssl-sys", + "sctp-proto", + "serde", + "sha-1 0.10.1", + "thiserror", + "tracing", +] + +[[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.6.1", + "zeroize", +] + [[package]] name = "strsim" version = "0.11.1" @@ -14226,15 +15248,15 @@ name = "strum" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" -dependencies = [ - "strum_macros 0.24.3", -] [[package]] name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", +] [[package]] name = "strum_macros" @@ -14259,19 +15281,18 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "substrate-bip39" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f" +version = "0.4.7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "hmac 0.11.0", - "pbkdf2 0.8.0", + "hmac 0.12.1", + "pbkdf2", "schnorrkel 0.11.4", - "sha2 0.9.9", + "sha2 0.10.8", "zeroize", ] @@ -14290,8 +15311,8 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" [[package]] name = "substrate-fixed" @@ -14300,13 +15321,14 @@ source = "git+https://github.com/encointer/substrate-fixed#879c58bcc6fd676a74315 dependencies = [ "parity-scale-codec", "scale-info", + "serde", "substrate-typenum", ] [[package]] name = "substrate-frame-rpc-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.30", @@ -14324,8 +15346,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "0.17.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "hyper", "log", @@ -14334,23 +15356,10 @@ dependencies = [ "tokio", ] -[[package]] -name = "substrate-rpc-client" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -dependencies = [ - "async-trait", - "jsonrpsee", - "log", - "sc-rpc-api", - "serde", - "sp-runtime", -] - [[package]] name = "substrate-state-trie-migration-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "27.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -14376,27 +15385,34 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "5.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ - "ansi_term", "build-helper", "cargo_metadata", + "console", "filetime", "parity-wasm", + "polkavm-linker", "sp-maybe-compressed-blob", - "strum 0.24.1", + "strum 0.26.3", "tempfile", - "toml 0.7.8", + "toml 0.8.16", "walkdir", "wasm-opt", ] [[package]] name = "subtle" -version = "2.4.1" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subtle-ng" @@ -14417,9 +15433,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -14438,6 +15454,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -14492,6 +15519,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.34", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -14524,7 +15561,7 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -14535,7 +15572,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -14599,9 +15636,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.37" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -14620,33 +15657,14 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.19" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.8", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -14697,27 +15715,27 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] -name = "tokio-retry" -version = "0.3.0" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "pin-project", - "rand 0.8.5", + "rustls 0.21.12", "tokio", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.21.12", + "rustls 0.22.4", + "rustls-pki-types 1.10.0", "tokio", ] @@ -14733,6 +15751,21 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls 0.21.12", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", + "tungstenite", +] + [[package]] name = "tokio-util" version = "0.7.11" @@ -14756,18 +15789,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - [[package]] name = "toml" version = "0.8.16" @@ -14796,8 +15817,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.2.6", - "serde", - "serde_spanned", "toml_datetime", "winnow 0.5.40", ] @@ -14832,6 +15851,10 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite 0.2.14", "tower-layer", "tower-service", "tracing", @@ -14869,9 +15892,9 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite 0.2.14", @@ -14881,20 +15904,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -14912,11 +15935,10 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "coarsetime", - "polkadot-node-jaeger", "polkadot-primitives", "tracing", "tracing-gum-proc-macro", @@ -14924,14 +15946,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "5.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "expander 2.2.1", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -14946,46 +15968,43 @@ dependencies = [ ] [[package]] -name = "tracing-serde" -version = "0.1.3" +name = "tracing-log" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "serde", + "log", + "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.2.25" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ - "ansi_term", - "chrono", - "lazy_static", "matchers", - "parking_lot 0.11.2", + "nu-ansi-term", + "once_cell", + "parking_lot 0.12.3", "regex", - "serde", - "serde_json", "sharded-slab", "smallvec", "thread_local", + "time", "tracing", "tracing-core", - "tracing-log", - "tracing-serde", + "tracing-log 0.2.0", ] [[package]] name = "trie-db" -version = "0.27.1" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "0c992b4f40c234a074d48a757efeabb1a6be88af84c0c23f7ca158950cb0ae7f" dependencies = [ - "hash-db 0.16.0", - "hashbrown 0.13.2", + "hash-db", "log", "rustc-hex", "smallvec", @@ -14997,17 +16016,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ - "hash-db 0.16.0", -] - -[[package]] -name = "triehash" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" -dependencies = [ - "hash-db 0.15.2", - "rlp", + "hash-db", ] [[package]] @@ -15019,7 +16028,7 @@ dependencies = [ "async-trait", "cfg-if", "data-encoding", - "enum-as-inner", + "enum-as-inner 0.5.1", "futures-channel", "futures-io", "futures-util", @@ -15036,6 +16045,31 @@ dependencies = [ "url", ] +[[package]] +name = "trust-dns-proto" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner 0.6.1", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand 0.8.5", + "smallvec", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + [[package]] name = "trust-dns-resolver" version = "0.22.0" @@ -15053,7 +16087,28 @@ dependencies = [ "thiserror", "tokio", "tracing", - "trust-dns-proto", + "trust-dns-proto 0.22.0", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6" +dependencies = [ + "cfg-if", + "futures-util", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot 0.12.3", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", + "trust-dns-proto 0.23.2", ] [[package]] @@ -15062,48 +16117,32 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "try-runtime-cli" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" -dependencies = [ - "async-trait", - "clap", - "frame-remote-externalities", - "frame-try-runtime", - "hex", - "log", - "parity-scale-codec", - "sc-cli", - "sc-executor", - "serde", - "serde_json", - "sp-api", - "sp-consensus-aura", - "sp-consensus-babe", - "sp-core", - "sp-debug-derive", - "sp-externalities", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-rpc", - "sp-runtime", - "sp-state-machine", - "sp-timestamp", - "sp-transaction-storage-proof", - "sp-version", - "sp-weights", - "substrate-rpc-client", - "zstd 0.12.4", -] - [[package]] name = "tt-call" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.21.12", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "twox-hash" version = "1.6.3" @@ -15140,6 +16179,18 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -15154,9 +16205,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] @@ -15186,7 +16237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.6.1", ] [[package]] @@ -15199,8 +16250,15 @@ dependencies = [ "bytes", "futures-io", "futures-util", + "tokio-util", ] +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + [[package]] name = "untrusted" version = "0.7.1" @@ -15224,12 +16282,24 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" + [[package]] name = "valuable" version = "0.1.0" @@ -15254,6 +16324,30 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a3028804c8bbae2a97a15b71ffc0e308c4b01a520994aafa77d56e94e19024" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "waker-fn" version = "1.2.0" @@ -15321,7 +16415,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", "wasm-bindgen-shared", ] @@ -15355,7 +16449,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -15368,18 +16462,18 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-instrument" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" +checksum = "2a47ecb37b9734d1085eaa5ae1a81e60801fd8c28d4cabdd8aedb982021918bc" dependencies = [ "parity-wasm", ] [[package]] name = "wasm-opt" -version = "0.114.2" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" +checksum = "2fd87a4c135535ffed86123b6fb0f0a5a0bc89e50416c942c5f0662c645f679c" dependencies = [ "anyhow", "libc", @@ -15393,9 +16487,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -15405,9 +16499,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -15704,16 +16798,10 @@ dependencies = [ "webpki", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "westend-runtime" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "binary-merkle-tree", "bitvec", @@ -15728,6 +16816,7 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -15736,6 +16825,7 @@ dependencies = [ "pallet-beefy", "pallet-beefy-mmr", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", @@ -15743,7 +16833,6 @@ dependencies = [ "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", - "pallet-im-online", "pallet-indices", "pallet-membership", "pallet-message-queue", @@ -15757,6 +16846,8 @@ dependencies = [ "pallet-preimage", "pallet-proxy", "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", @@ -15772,6 +16863,7 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", @@ -15786,11 +16878,13 @@ dependencies = [ "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", @@ -15799,8 +16893,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-storage", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -15808,12 +16902,13 @@ dependencies = [ "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", + "xcm-fee-payment-runtime-api", ] [[package]] name = "westend-runtime-constants" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "polkadot-primitives", @@ -15822,6 +16917,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", + "staging-xcm-builder", ] [[package]] @@ -15902,6 +16999,21 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -16197,21 +17309,53 @@ dependencies = [ "time", ] +[[package]] +name = "x509-parser" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "xcm-fee-payment-runtime-api" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" +dependencies = [ + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-weights", + "staging-xcm", +] + [[package]] name = "xcm-procedural" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] name = "xcm-simulator" -version = "1.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#8c8edacf8942298c3807a2e192860da9e7e4996a" dependencies = [ "frame-support", "parity-scale-codec", @@ -16220,7 +17364,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "sp-io", - "sp-std", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -16228,39 +17372,39 @@ dependencies = [ [[package]] name = "xous" -version = "0.9.63" +version = "0.9.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ca3a121c4c2f9751469bbf19e777a9aaf15ad46a35d153a5e26d4b382e5171" +checksum = "a70ee183d699fd609d92b17af7a39b60908130af8dc7089095f713bcae85a12b" dependencies = [ "lazy_static", ] [[package]] name = "xous-api-log" -version = "0.1.59" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc03209afc102ee02405cdf80a8bc133a656a2cd5ed92e0194e1008786d5281" +checksum = "ca4b418619005a69b15fbb3832eb974440a3b4d14639d08211af0e307f90440c" dependencies = [ "log", "num-derive", "num-traits", "xous", - "xous-ipc", + "xous-ipc 0.10.2", ] [[package]] name = "xous-api-names" -version = "0.9.61" +version = "0.9.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0029321b0a8b0dde9adee3ee510d288703f3045ab7e23c46cc48f45c16020e88" +checksum = "efe645ec314e1d233a9a97ecd84d3f7b9500b5726eb429af13d7a11f36ec5df7" dependencies = [ "log", "num-derive", "num-traits", - "rkyv", + "rkyv 0.8.9", "xous", "xous-api-log", - "xous-ipc", + "xous-ipc 0.10.2", ] [[package]] @@ -16270,7 +17414,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47c88158f43d35c03454af8eba9d6f85ad140a71c150512cdbe68bf54bd8dc34" dependencies = [ "bitflags 1.3.2", - "rkyv", + "rkyv 0.4.3", + "xous", +] + +[[package]] +name = "xous-ipc" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "696ba6ec9c5cc8218f55d8a04ae7ef9311ed0ec92699f4d509317883ad04769a" +dependencies = [ + "bitflags 1.3.2", + "rkyv 0.8.9", "xous", ] @@ -16314,7 +17469,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] @@ -16334,7 +17489,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.89", ] [[package]] diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index 57f2e7b3db..953e18e2c5 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -36,12 +36,14 @@ members = [ 'precompiles/parachain-staking', 'precompiles/score-staking', 'runtime/litentry', - 'runtime/rococo', 'runtime/paseo', 'runtime/common', ] exclude = [] +[workspace.lints.clippy] +doc_lazy_continuation = "allow" + [profile.release] opt-level = 3 panic = "unwind" @@ -82,7 +84,7 @@ syn = { version = "2" } scale-info = { version = "2.11", default-features = false, features = ["derive"] } parity-scale-codec = { version = "3.6", default-features = false, features = ["derive", "max-encoded-len"] } paste = { version = "1.0" } -serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] } +serde = { version = "=1.0.214", default-features = false, features = ["derive", "alloc"] } serde_json = { version = "=1.0.120", default-features = false } slices = { version = "0.2.0" } hex = { version = "0.4", default-features = false } @@ -90,7 +92,7 @@ hex-literal = { version = "0.4.1", default-features = false } similar-asserts = { version = "1.6.0" } sha3 = { version = "0.10", default-features = false } futures = { version = "0.3.30", features = ["compat"] } -jsonrpsee = { version = "0.16.3", features = ["server"] } +jsonrpsee = { version = "0.22.5", features = ["server"] } tokio = { version = "1.40.0", features = ["macros", "sync"] } strum = { version = "0.26", default-features = false } strum_macros = { version = "0.26", default-features = false } @@ -99,162 +101,163 @@ num_enum = { version = "0.7.3", default-features = false } num-integer = { version = "0.1", default-features = false } rustc-hex = { version = "2.0.1", default-features = false } x509-cert = { version = "0.1.0", default-features = false, features = ["alloc"] } -ring = { version = "0.16.20", default-features = false, features = ["alloc"] } +# ring = { version = "0.16.20", default-features = false, features = ["alloc"] } webpki = { version = "=0.102.0-alpha.3", git = "https://github.com/rustls/webpki", rev = "da923ed", package = "rustls-webpki", default-features = false, features = ["alloc", "ring"] } # cumulus client -cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-client-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } # evm-tracing, use the astar version to use "standard" substrate frame to avoid any conflicts -moonbeam-primitives-ext = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.33.0", default-features = false } -moonbeam-rpc-debug = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.33.0" } -moonbeam-rpc-primitives-debug = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.33.0", default-features = false } -moonbeam-rpc-primitives-txpool = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.33.0", default-features = false } -moonbeam-rpc-trace = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.33.0" } -moonbeam-rpc-txpool = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.33.0" } -moonbeam-evm-tracer = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.33.0", default-features = false } +moonbeam-primitives-ext = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.43.1", default-features = false } +moonbeam-rpc-debug = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.43.1" } +moonbeam-rpc-primitives-debug = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.43.1", default-features = false } +moonbeam-rpc-primitives-txpool = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.43.1", default-features = false } +moonbeam-rpc-trace = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.43.1", default-features = false } +moonbeam-rpc-txpool = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.43.1", default-features = false } +moonbeam-evm-tracer = { git = "https://github.com/AstarNetwork/Astar", tag = "v5.43.1", default-features = false } # polkadot client -polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } # frontier -fc-api = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fc-consensus = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fc-db = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fc-mapping-sync = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fc-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fc-rpc-core = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fc-storage = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fp-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -pallet-ethereum = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false, features = ["forbid-evm-reentrancy"] } -pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false, features = ["forbid-evm-reentrancy"] } -pallet-evm-precompile-blake2 = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-bn128 = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-dispatch = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-ed25519 = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-modexp = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-sha3fips = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-simple = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } -precompile-utils = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } +fc-api = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +fc-consensus = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +fc-db = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +fc-mapping-sync = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +fc-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false, features = ["rpc-binary-search-estimate", "txpool"] } +fc-rpc-core = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +fc-storage = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +fp-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false, features = ["serde"] } +pallet-ethereum = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false, features = ["forbid-evm-reentrancy"] } +pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false, features = ["forbid-evm-reentrancy"] } +pallet-evm-precompile-blake2 = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +pallet-evm-precompile-bn128 = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +pallet-evm-precompile-dispatch = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +pallet-evm-precompile-ed25519 = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } +precompile-utils = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0", default-features = false } # substrate client -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } # wasm -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-core-hashing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-debug-derive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false, features = ["improved_panic_error_reporting"] } -sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -xcm-simulator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-debug-derive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false, features = ["improved_panic_error_reporting"] } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +xcm-simulator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "release-polkadot-v1.1.0", default-features = false } -pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false, features = ["parameterized-consensus-hook"] } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +cumulus-primitives-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "release-polkadot-v1.11.0", default-features = false } +pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", default-features = false } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } -orml-utilities = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } # benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "release-polkadot-v1.1.0", default-features = false } -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/polkadot-sdk', branch = "release-polkadot-v1.11.0", default-features = false } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } # local core-primitives = { path = "../common/primitives/core", default-features = false } @@ -263,7 +266,6 @@ litentry-proc-macros = { path = "../common/primitives/core/proc-macros" } litentry-hex-utils = { path = "../common/utils/hex", default-features = false } runtime-common = { path = "runtime/common", default-features = false } litentry-parachain-runtime = { path = "runtime/litentry", default-features = false } -rococo-parachain-runtime = { path = "runtime/rococo", default-features = false } paseo-parachain-runtime = { path = "runtime/paseo", default-features = false } pallet-account-fix = { path = "pallets/account-fix", default-features = false } pallet-asset-manager = { path = "pallets/xcm-asset-manager", default-features = false } @@ -305,13 +307,14 @@ pallet-investing-pool = { path = "pallets/collab-ai/investing-pool", default-fea [patch.crates-io] ring = { git = "https://github.com/betrusted-io/ring-xous", branch = "0.16.20-cleanup" } +# TODO: investigate further if the overwriting is still valid [patch."https://github.com/AstarNetwork/frontier"] -fc-api = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } -fc-consensus = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } -fc-db = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } -fc-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } -fc-rpc-core = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } -fc-storage = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } -fp-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } -fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } -pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0" } +fc-api = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } +fc-consensus = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } +fc-db = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } +fc-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } +fc-rpc-core = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } +fc-storage = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } +fp-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } +fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } +pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.11.0" } diff --git a/parachain/docker/entrypoint.sh b/parachain/docker/entrypoint.sh index 4f14da0a06..887bc3fcfd 100755 --- a/parachain/docker/entrypoint.sh +++ b/parachain/docker/entrypoint.sh @@ -3,16 +3,15 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PARACHAIN_BASEDIR="/opt/litentry/parachain" REPO_DIR="/code" -# Currently, only chain type rococo is supported. -CHAIN='rococo' +CHAIN='paseo' ZOMBIENET_DIR=$(LC_ALL=C tr -dc A-Za-z0-9 Option { +fn default_parachain_properties() -> Properties { parachain_properties("LIT", 18, 31) } @@ -55,50 +54,41 @@ struct GenesisInfo { } pub fn get_chain_spec_dev() -> ChainSpec { - ChainSpec::from_genesis( - "Litentry-dev", - "litentry-dev", - ChainType::Development, - move || { - generate_genesis( - vec![( - get_account_id_from_seed::("Alice"), - get_collator_keys_from_seed("Alice"), - )], - vec![ - ( - get_account_id_from_seed::("Alice"), - 6 * DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Bob"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Charlie"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Eve"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ], - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - ], - vec![get_account_id_from_seed::("Alice")], - vec![get_account_id_from_seed::("Alice")], - LITENTRY_PARA_ID.into(), - ) - }, - Vec::new(), - None, - Some("litentry"), - None, - default_parachain_properties(), + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not built, please build it!"), Extensions { relay_chain: "rococo-local".into(), para_id: LITENTRY_PARA_ID }, ) + .with_name("Litentry-dev") + .with_id("litentry-dev") + .with_protocol_id("litentry") + .with_chain_type(ChainType::Development) + .with_properties(default_parachain_properties()) + .with_genesis_config(generate_genesis( + vec![( + get_account_id_from_seed::("Alice"), + get_collator_keys_from_seed("Alice"), + )], + vec![ + ( + get_account_id_from_seed::("Alice"), + 6 * DEFAULT_ENDOWED_ACCOUNT_BALANCE, + ), + (get_account_id_from_seed::("Bob"), DEFAULT_ENDOWED_ACCOUNT_BALANCE), + ( + get_account_id_from_seed::("Charlie"), + DEFAULT_ENDOWED_ACCOUNT_BALANCE, + ), + (get_account_id_from_seed::("Eve"), DEFAULT_ENDOWED_ACCOUNT_BALANCE), + ], + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + ], + vec![get_account_id_from_seed::("Alice")], + vec![get_account_id_from_seed::("Alice")], + LITENTRY_PARA_ID.into(), + )) + .build() } pub fn get_chain_spec_staging() -> ChainSpec { @@ -143,45 +133,47 @@ fn get_chain_spec_from_genesis_info( let boot_nodes = genesis_info.boot_nodes.clone(); let telemetry_endpoints = genesis_info.telemetry_endpoints.clone(); + let genesis_info_cloned = genesis_info.clone(); - ChainSpec::from_genesis( - name, - id, - chain_type, - move || { - use std::str::FromStr; - let genesis_info_cloned = genesis_info.clone(); - generate_genesis( - genesis_info_cloned.invulnerables, - genesis_info_cloned - .endowed_accounts - .into_iter() - .map(|(k, b)| (k, u128::from_str(&b).expect("Bad endowed balance; qed."))) - .collect(), - genesis_info_cloned.council, - genesis_info_cloned.technical_committee, - genesis_info_cloned.developer_committee, - para_id, - ) - }, + use std::str::FromStr; + + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not built, please build it!"), + Extensions { relay_chain: relay_chain_name, para_id: para_id.into() }, + ) + .with_name(name) + .with_id(id) + .with_chain_type(chain_type) + .with_protocol_id("litentry") + .with_properties(default_parachain_properties()) + .with_boot_nodes( boot_nodes .into_iter() .map(|k| k.parse().expect("Wrong bootnode format; qed.")) .collect(), - Some( - TelemetryEndpoints::new( - telemetry_endpoints - .into_iter() - .map(|k| (k, 0)) // 0 is verbose level - .collect(), - ) - .expect("Invalid telemetry URL; qed."), - ), - Some("litentry"), - None, - default_parachain_properties(), - Extensions { relay_chain: relay_chain_name, para_id: para_id.into() }, ) + .with_telemetry_endpoints( + TelemetryEndpoints::new( + telemetry_endpoints + .into_iter() + .map(|k| (k, 0)) // 0 is verbose level + .collect(), + ) + .expect("Invalid telemetry URL; qed."), + ) + .with_genesis_config(generate_genesis( + genesis_info_cloned.invulnerables, + genesis_info_cloned + .endowed_accounts + .into_iter() + .map(|(k, b)| (k, u128::from_str(&b).expect("Bad endowed balance; qed."))) + .collect(), + genesis_info_cloned.council, + genesis_info_cloned.technical_committee, + genesis_info_cloned.developer_committee, + para_id, + )) + .build() } fn generate_genesis( @@ -191,12 +183,9 @@ fn generate_genesis( technical_committee_members: Vec, developer_committee_members: Vec, id: ParaId, -) -> RuntimeGenesisConfig { - RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY.expect("WASM binary was not build, please build it!").to_vec(), - ..Default::default() - }, +) -> serde_json::Value { + let config = RuntimeGenesisConfig { + system: Default::default(), balances: BalancesConfig { balances: endowed_accounts }, parachain_info: ParachainInfoConfig { parachain_id: id, ..Default::default() }, parachain_staking: ParachainStakingConfig { @@ -254,5 +243,7 @@ fn generate_genesis( }, bitacross: BitacrossConfig { admin: None }, score_staking: Default::default(), - } + }; + + serde_json::to_value(&config).expect("Could not build genesis config") } diff --git a/parachain/node/src/chain_specs/mod.rs b/parachain/node/src/chain_specs/mod.rs index 9d3f52b007..c4f1e14e9c 100644 --- a/parachain/node/src/chain_specs/mod.rs +++ b/parachain/node/src/chain_specs/mod.rs @@ -16,7 +16,8 @@ #![allow(clippy::derive_partial_eq_without_eq)] -use core_primitives::{AccountId, Signature}; +use core_primitives::{AccountId, Signature, LITENTRY_PARA_ID}; +use runtime_common::currency::UNIT; pub use sc_chain_spec::Properties; use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use serde::{Deserialize, Serialize}; @@ -26,7 +27,6 @@ use sp_runtime::traits::{IdentifyAccount, Verify}; pub mod litentry; pub mod paseo; -pub mod rococo; // This is a default chain spec using litentry genesis config pub type ChainSpec = @@ -74,11 +74,11 @@ where } /// Helper function to generate parachain properties -pub fn parachain_properties(symbol: &str, decimals: u32, ss58format: u32) -> Option { +pub fn parachain_properties(symbol: &str, decimals: u32, ss58format: u32) -> Properties { let mut properties = Properties::new(); properties.insert("tokenSymbol".into(), symbol.into()); properties.insert("tokenDecimals".into(), decimals.into()); properties.insert("ss58Format".into(), ss58format.into()); - Some(properties) + properties } diff --git a/parachain/node/src/chain_specs/paseo.rs b/parachain/node/src/chain_specs/paseo.rs index 0ab53795af..09cbefcff4 100644 --- a/parachain/node/src/chain_specs/paseo.rs +++ b/parachain/node/src/chain_specs/paseo.rs @@ -20,9 +20,9 @@ use cumulus_primitives_core::ParaId; use paseo_parachain_runtime::{ AccountId, AuraId, Balance, BalancesConfig, BitacrossConfig, CouncilMembershipConfig, DeveloperCommitteeMembershipConfig, ParachainInfoConfig, ParachainStakingConfig, - PolkadotXcmConfig, RuntimeGenesisConfig, SessionConfig, SudoConfig, SystemConfig, + PolkadotXcmConfig, RuntimeGenesisConfig, SessionConfig, SudoConfig, TechnicalCommitteeMembershipConfig, TeebagConfig, TeebagOperationalMode, VCManagementConfig, - UNIT, WASM_BINARY, + WASM_BINARY, }; use sc_service::ChainType; use sc_telemetry::TelemetryEndpoints; @@ -36,9 +36,9 @@ pub type ChainSpec = sc_service::GenericChainSpec Option { - parachain_properties("LIT", 18, 131) +/// We use 31 as the SS58Prefix (same as Litentry) +fn default_parachain_properties() -> Properties { + parachain_properties("LIT", 18, 31) } const DEFAULT_ENDOWED_ACCOUNT_BALANCE: Balance = 1000 * UNIT; @@ -59,51 +59,39 @@ struct GenesisInfo { pub fn get_chain_spec_dev(is_standalone: bool) -> ChainSpec { let id = if is_standalone { "standalone" } else { "litentry-paseo-dev" }; - ChainSpec::from_genesis( - "Litentry-paseo-dev", - id, - ChainType::Development, - move || { - generate_genesis( - get_account_id_from_seed::("Alice"), - vec![( - get_account_id_from_seed::("Alice"), - get_collator_keys_from_seed("Alice"), - )], - vec![ - ( - get_account_id_from_seed::("Alice"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Bob"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Charlie"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Eve"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ], - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - ], - vec![get_account_id_from_seed::("Alice")], - vec![get_account_id_from_seed::("Alice")], - PASEO_PARA_ID.into(), - ) - }, - Vec::new(), - None, - Some("litentry-paseo"), - None, - default_parachain_properties(), + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not built, please build it!"), Extensions { relay_chain: "paseo".into(), para_id: PASEO_PARA_ID }, ) + .with_name("Litentry-paseo-dev") + .with_id(id) + .with_protocol_id("litentry-paseo") + .with_chain_type(ChainType::Development) + .with_properties(default_parachain_properties()) + .with_genesis_config(generate_genesis( + get_account_id_from_seed::("Alice"), + vec![( + get_account_id_from_seed::("Alice"), + get_collator_keys_from_seed("Alice"), + )], + vec![ + (get_account_id_from_seed::("Alice"), DEFAULT_ENDOWED_ACCOUNT_BALANCE), + (get_account_id_from_seed::("Bob"), DEFAULT_ENDOWED_ACCOUNT_BALANCE), + ( + get_account_id_from_seed::("Charlie"), + DEFAULT_ENDOWED_ACCOUNT_BALANCE, + ), + (get_account_id_from_seed::("Eve"), DEFAULT_ENDOWED_ACCOUNT_BALANCE), + ], + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + ], + vec![get_account_id_from_seed::("Alice")], + vec![get_account_id_from_seed::("Alice")], + PASEO_PARA_ID.into(), + )) + .build() } pub fn get_chain_spec_prod() -> ChainSpec { @@ -132,46 +120,48 @@ fn get_chain_spec_from_genesis_info( let boot_nodes = genesis_info.boot_nodes.clone(); let telemetry_endpoints = genesis_info.telemetry_endpoints.clone(); + let genesis_info_cloned = genesis_info.clone(); - ChainSpec::from_genesis( - name, - id, - chain_type, - move || { - use std::str::FromStr; - let genesis_info_cloned = genesis_info.clone(); - generate_genesis( - genesis_info_cloned.root_key, - genesis_info_cloned.invulnerables, - genesis_info_cloned - .endowed_accounts - .into_iter() - .map(|(k, b)| (k, u128::from_str(&b).expect("Bad endowed balance; qed."))) - .collect(), - genesis_info_cloned.council, - genesis_info_cloned.technical_committee, - genesis_info_cloned.developer_committee, - para_id, - ) - }, + use std::str::FromStr; + + ChainSpec::builder( + WASM_BINARY.expect("WASM binary was not built, please build it!"), + Extensions { relay_chain: relay_chain_name, para_id: para_id.into() }, + ) + .with_name(name) + .with_id(id) + .with_chain_type(chain_type) + .with_protocol_id("litentry-paseo") + .with_properties(default_parachain_properties()) + .with_boot_nodes( boot_nodes .into_iter() .map(|k| k.parse().expect("Wrong bootnode format; qed.")) .collect(), - Some( - TelemetryEndpoints::new( - telemetry_endpoints - .into_iter() - .map(|k| (k, 0)) // 0 is verbose level - .collect(), - ) - .expect("Invalid telemetry URL; qed."), - ), - Some("litentry-paseo"), - None, - default_parachain_properties(), - Extensions { relay_chain: relay_chain_name, para_id: para_id.into() }, ) + .with_telemetry_endpoints( + TelemetryEndpoints::new( + telemetry_endpoints + .into_iter() + .map(|k| (k, 0)) // 0 is verbose level + .collect(), + ) + .expect("Invalid telemetry URL; qed."), + ) + .with_genesis_config(generate_genesis( + genesis_info_cloned.root_key, + genesis_info_cloned.invulnerables, + genesis_info_cloned + .endowed_accounts + .into_iter() + .map(|(k, b)| (k, u128::from_str(&b).expect("Bad endowed balance; qed."))) + .collect(), + genesis_info_cloned.council, + genesis_info_cloned.technical_committee, + genesis_info_cloned.developer_committee, + para_id, + )) + .build() } fn generate_genesis( @@ -182,12 +172,9 @@ fn generate_genesis( technical_committee_members: Vec, developer_committee_members: Vec, id: ParaId, -) -> RuntimeGenesisConfig { - RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY.expect("WASM binary was not build, please build it!").to_vec(), - ..Default::default() - }, +) -> serde_json::Value { + let config = RuntimeGenesisConfig { + system: Default::default(), balances: BalancesConfig { balances: endowed_accounts }, sudo: SudoConfig { key: Some(root_key.clone()) }, parachain_info: ParachainInfoConfig { parachain_id: id, ..Default::default() }, @@ -245,5 +232,7 @@ fn generate_genesis( }, bitacross: BitacrossConfig { admin: Some(root_key) }, score_staking: Default::default(), - } + }; + + serde_json::to_value(&config).expect("Could not build genesis config") } diff --git a/parachain/node/src/chain_specs/rococo.rs b/parachain/node/src/chain_specs/rococo.rs deleted file mode 100644 index 7cd1466e72..0000000000 --- a/parachain/node/src/chain_specs/rococo.rs +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use super::*; -use cumulus_primitives_core::ParaId; -use rococo_parachain_runtime::{ - AccountId, AuraId, Balance, BalancesConfig, BitacrossConfig, CouncilMembershipConfig, - DeveloperCommitteeMembershipConfig, ParachainInfoConfig, ParachainStakingConfig, - PolkadotXcmConfig, RuntimeGenesisConfig, SessionConfig, SudoConfig, SystemConfig, - TechnicalCommitteeMembershipConfig, TeebagConfig, TeebagOperationalMode, VCManagementConfig, - ROCOCO_PARA_ID, UNIT, WASM_BINARY, -}; -use sc_service::ChainType; -use sc_telemetry::TelemetryEndpoints; -use serde::Deserialize; -use sp_core::sr25519; - -/// Specialized `ChainSpec` for the normal parachain runtime. -pub type ChainSpec = sc_service::GenericChainSpec; - -/// The default XCM version to set in genesis config. -const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; - -/// Get default parachain properties for Rococo which will be filled into chain spec -fn default_parachain_properties() -> Option { - parachain_properties("LIT", 18, 131) -} - -const DEFAULT_ENDOWED_ACCOUNT_BALANCE: Balance = 1000 * UNIT; - -/// GenesisInfo struct to store the parsed genesis_info JSON -#[derive(Deserialize, Debug, Clone)] -#[serde(rename_all = "camelCase")] -struct GenesisInfo { - root_key: AccountId, - invulnerables: Vec<(AccountId, AuraId)>, - endowed_accounts: Vec<(AccountId, String)>, - council: Vec, - technical_committee: Vec, - developer_committee: Vec, - boot_nodes: Vec, - telemetry_endpoints: Vec, -} - -pub fn get_chain_spec_dev(is_standalone: bool) -> ChainSpec { - let id = if is_standalone { "standalone" } else { "litentry-rococo-dev" }; - ChainSpec::from_genesis( - "Litentry-rococo-dev", - id, - ChainType::Development, - move || { - generate_genesis( - get_account_id_from_seed::("Alice"), - vec![( - get_account_id_from_seed::("Alice"), - get_collator_keys_from_seed("Alice"), - )], - vec![ - ( - get_account_id_from_seed::("Alice"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Bob"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Charlie"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ( - get_account_id_from_seed::("Eve"), - DEFAULT_ENDOWED_ACCOUNT_BALANCE, - ), - ], - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - ], - vec![get_account_id_from_seed::("Alice")], - vec![get_account_id_from_seed::("Alice")], - ROCOCO_PARA_ID.into(), - ) - }, - Vec::new(), - None, - Some("litentry-rococo"), - None, - default_parachain_properties(), - Extensions { relay_chain: "rococo-local".into(), para_id: ROCOCO_PARA_ID }, - ) -} - -pub fn get_chain_spec_staging() -> ChainSpec { - // Staging keys are derivative keys based on a single master secret phrase: - // - // root: $SECRET - // account: $SECRET//collator// - // aura: $SECRET//collator////aura - get_chain_spec_from_genesis_info( - include_bytes!("../../res/genesis_info/staging.json"), - "Litentry-rococo-staging", - "litentry-rococo-staging", - ChainType::Local, - "rococo-local".into(), - ROCOCO_PARA_ID.into(), - ) -} - -pub fn get_chain_spec_prod() -> ChainSpec { - get_chain_spec_from_genesis_info( - include_bytes!("../../res/genesis_info/rococo.json"), - "Litentry-rococo", - "litentry-rococo", - ChainType::Live, - "rococo".into(), - ROCOCO_PARA_ID.into(), - ) -} - -/// Private function to get a ChainSpec from a `genesis_info_json_file`, -/// used in both staging and prod env. -fn get_chain_spec_from_genesis_info( - genesis_info_bytes: &[u8], - name: &str, - id: &str, - chain_type: ChainType, - relay_chain_name: String, - para_id: ParaId, -) -> ChainSpec { - let genesis_info: GenesisInfo = - serde_json::from_slice(genesis_info_bytes).expect("Invalid GenesisInfo; qed."); - - let boot_nodes = genesis_info.boot_nodes.clone(); - let telemetry_endpoints = genesis_info.telemetry_endpoints.clone(); - - ChainSpec::from_genesis( - name, - id, - chain_type, - move || { - use std::str::FromStr; - let genesis_info_cloned = genesis_info.clone(); - generate_genesis( - genesis_info_cloned.root_key, - genesis_info_cloned.invulnerables, - genesis_info_cloned - .endowed_accounts - .into_iter() - .map(|(k, b)| (k, u128::from_str(&b).expect("Bad endowed balance; qed."))) - .collect(), - genesis_info_cloned.council, - genesis_info_cloned.technical_committee, - genesis_info_cloned.developer_committee, - para_id, - ) - }, - boot_nodes - .into_iter() - .map(|k| k.parse().expect("Wrong bootnode format; qed.")) - .collect(), - Some( - TelemetryEndpoints::new( - telemetry_endpoints - .into_iter() - .map(|k| (k, 0)) // 0 is verbose level - .collect(), - ) - .expect("Invalid telemetry URL; qed."), - ), - Some("litentry-rococo"), - None, - default_parachain_properties(), - Extensions { relay_chain: relay_chain_name, para_id: para_id.into() }, - ) -} - -fn generate_genesis( - root_key: AccountId, - invulnerables: Vec<(AccountId, AuraId)>, - endowed_accounts: Vec<(AccountId, Balance)>, - council_members: Vec, - technical_committee_members: Vec, - developer_committee_members: Vec, - id: ParaId, -) -> RuntimeGenesisConfig { - RuntimeGenesisConfig { - system: SystemConfig { - code: WASM_BINARY.expect("WASM binary was not build, please build it!").to_vec(), - ..Default::default() - }, - balances: BalancesConfig { balances: endowed_accounts }, - sudo: SudoConfig { key: Some(root_key.clone()) }, - parachain_info: ParachainInfoConfig { parachain_id: id, ..Default::default() }, - parachain_staking: ParachainStakingConfig { - candidates: invulnerables.iter().cloned().map(|(acc, _)| (acc, 50 * UNIT)).collect(), - ..Default::default() - }, - session: SessionConfig { - keys: invulnerables - .iter() - .cloned() - .map(|(acc, aura)| { - ( - acc.clone(), // account id - acc, // validator id - rococo_parachain_runtime::SessionKeys { aura }, // session keys - ) - }) - .collect(), - }, - democracy: Default::default(), - council: Default::default(), - council_membership: CouncilMembershipConfig { - members: council_members.try_into().expect("error convert to BoundedVec"), - phantom: Default::default(), - }, - technical_committee: Default::default(), - technical_committee_membership: TechnicalCommitteeMembershipConfig { - members: technical_committee_members.try_into().expect("error convert to BoundedVec"), - phantom: Default::default(), - }, - developer_committee: Default::default(), - developer_committee_membership: DeveloperCommitteeMembershipConfig { - members: developer_committee_members.try_into().expect("error convert to BoundedVec"), - phantom: Default::default(), - }, - treasury: Default::default(), - vesting: Default::default(), - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - ..Default::default() - }, - vc_management: VCManagementConfig { admin: Some(root_key.clone()) }, - transaction_payment: Default::default(), - assets: Default::default(), - ethereum: Default::default(), - evm: Default::default(), - teebag: TeebagConfig { - allow_sgx_debug_mode: true, - admin: Some(root_key.clone()), - mode: TeebagOperationalMode::Development, - }, - bitacross: BitacrossConfig { admin: Some(root_key) }, - score_staking: Default::default(), - } -} diff --git a/parachain/node/src/cli.rs b/parachain/node/src/cli.rs index 8e375266b4..0ee44acb11 100644 --- a/parachain/node/src/cli.rs +++ b/parachain/node/src/cli.rs @@ -20,14 +20,11 @@ use std::path::PathBuf; /// Sub-commands supported by the collator. #[derive(Debug, clap::Subcommand)] +#[allow(clippy::large_enum_variant)] pub enum Subcommand { - /// Export the genesis state of the parachain. - #[clap(name = "export-genesis-state")] - ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand), - - /// Export the genesis wasm of the parachain. - #[clap(name = "export-genesis-wasm")] - ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand), + /// Key management CLI utilities + #[command(subcommand)] + Key(sc_cli::KeySubcommand), /// Build a chain specification. BuildSpec(sc_cli::BuildSpecCmd), @@ -44,28 +41,23 @@ pub enum Subcommand { /// Import blocks. ImportBlocks(sc_cli::ImportBlocksCmd), + /// Revert the chain to a previous state. + Revert(sc_cli::RevertCmd), + /// Remove the whole chain. PurgeChain(cumulus_client_cli::PurgeChainCmd), - /// Revert the chain to a previous state. - Revert(sc_cli::RevertCmd), + /// Export the genesis state of the parachain. + #[command(alias = "export-genesis-state")] + ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand), - /// Key management cli utilities - #[command(subcommand)] - Key(sc_cli::KeySubcommand), + /// Export the genesis wasm of the parachain. + ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand), /// Sub-commands concerned with benchmarking. /// The pallet benchmarking moved to the `pallet` sub-command. #[command(subcommand)] - Benchmark(Box), - - /// Try some testing command against a specified runtime state. - #[cfg(feature = "try-runtime")] - TryRuntime(try_runtime_cli::TryRuntimeCmd), - - /// Errors since the binary was not build with `--features try-runtime`. - #[cfg(not(feature = "try-runtime"))] - TryRuntime, + Benchmark(frame_benchmarking_cli::BenchmarkCmd), } #[derive(Debug, Parser)] @@ -92,8 +84,8 @@ pub struct Cli { pub no_hardware_benchmarks: bool, /// Relay chain arguments - #[arg(raw = true, conflicts_with = "relay-chain-rpc-url")] - pub relay_chain_args: Vec, + #[arg(raw = true)] + pub relaychain_args: Vec, #[clap(flatten)] pub eth_api_options: EthApiOptions, @@ -102,13 +94,11 @@ pub struct Cli { #[clap(name = "enable-evm-rpc", long)] pub enable_evm_rpc: bool, - /// Proposer's maximum block size limit in bytes - #[clap(long, default_value = sc_basic_authorship::DEFAULT_BLOCK_SIZE_LIMIT.to_string())] - pub proposer_block_size_limit: usize, - - /// Proposer's soft deadline in percents of block size - #[clap(long, default_value = "50")] - pub proposer_soft_deadline_percent: u8, + /// Enable the `delayed best block` import strategy, where only blocks confirmed + /// by relay chain are notified as best blocks + /// see comment in `service.rs` + #[clap(name = "delayed-best-block", long)] + pub delayed_best_block: bool, } #[derive(Debug)] diff --git a/parachain/node/src/command.rs b/parachain/node/src/command.rs index a7f9028899..5f56779120 100644 --- a/parachain/node/src/command.rs +++ b/parachain/node/src/command.rs @@ -21,47 +21,35 @@ use crate::{ cli::{Cli, RelayChainCli, Subcommand}, service::*, }; -use cumulus_client_cli::generate_genesis_block; use cumulus_primitives_core::ParaId; use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; use log::info; use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, - NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli, + NetworkParams, Result, SharedParams, SubstrateCli, }; use sc_service::config::{BasePath, PrometheusConfig}; -use sp_core::{hexdisplay::HexDisplay, Encode}; -use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; -use std::{io::Write, net::SocketAddr}; +use sp_runtime::traits::AccountIdConversion; +use std::net::SocketAddr; const UNSUPPORTED_CHAIN_MESSAGE: &str = "Unsupported chain spec, please use litentry*"; trait IdentifyChain { fn is_litentry(&self) -> bool; - fn is_rococo(&self) -> bool; fn is_paseo(&self) -> bool; - fn is_dev(&self) -> bool; fn is_standalone(&self) -> bool; } impl IdentifyChain for dyn sc_service::ChainSpec { fn is_litentry(&self) -> bool { - // we need the combined condition as the id in our rococo spec starts with `litentry-rococo` - // simply renaming `litentry-rococo` to `rococo` everywhere would have an impact on the - // existing litentry-rococo chain - self.id().starts_with("litentry") - && !self.id().starts_with("litentry-rococo") - && !self.id().starts_with("litentry-paseo") - } - fn is_rococo(&self) -> bool { - self.id().starts_with("litentry-rococo") + // we need the combined condition as the id in our paseo spec starts with `litentry-paseo` + // simply renaming `litentry-paseo` to `paseo` everywhere would have an impact on the + // existing litentry-paseo chain + self.id().starts_with("litentry") && !self.id().starts_with("litentry-paseo") } fn is_paseo(&self) -> bool { self.id().starts_with("litentry-paseo") } - fn is_dev(&self) -> bool { - self.id().ends_with("dev") - } fn is_standalone(&self) -> bool { self.id().eq("standalone") || self.id().eq("dev") } @@ -71,15 +59,9 @@ impl IdentifyChain for T { fn is_litentry(&self) -> bool { ::is_litentry(self) } - fn is_rococo(&self) -> bool { - ::is_rococo(self) - } fn is_paseo(&self) -> bool { ::is_paseo(self) } - fn is_dev(&self) -> bool { - ::is_dev(self) - } fn is_standalone(&self) -> bool { ::is_standalone(self) } @@ -87,21 +69,15 @@ impl IdentifyChain for T { fn load_spec(id: &str) -> std::result::Result, String> { Ok(match id { - // `--chain=standalone or --chain=dev` to start a standalone node with rococo-dev chain spec + // `--chain=standalone or --chain=dev` to start a standalone node with paseo-dev chain spec // mainly based on Acala's `dev` implementation - "dev" | "standalone" => Box::new(chain_specs::rococo::get_chain_spec_dev(true)), + "dev" | "standalone" => Box::new(chain_specs::paseo::get_chain_spec_dev(true)), // Litentry "litentry-dev" => Box::new(chain_specs::litentry::get_chain_spec_dev()), "litentry-staging" => Box::new(chain_specs::litentry::get_chain_spec_staging()), "litentry" => Box::new(chain_specs::litentry::ChainSpec::from_json_bytes( &include_bytes!("../res/chain_specs/litentry.json")[..], )?), - // Rococo - "rococo-dev" => Box::new(chain_specs::rococo::get_chain_spec_dev(false)), - "rococo-staging" => Box::new(chain_specs::rococo::get_chain_spec_staging()), - "rococo" => Box::new(chain_specs::rococo::ChainSpec::from_json_bytes( - &include_bytes!("../res/chain_specs/rococo.json")[..], - )?), // Paseo "paseo-dev" => Box::new(chain_specs::paseo::get_chain_spec_dev(false)), "paseo" => Box::new(chain_specs::paseo::ChainSpec::from_json_bytes( @@ -111,15 +87,9 @@ fn load_spec(id: &str) -> std::result::Result, St "generate-litentry" => Box::new(chain_specs::litentry::get_chain_spec_prod()), // Generate res/chain_specs/paseo.json "generate-paseo" => Box::new(chain_specs::paseo::get_chain_spec_prod()), - // Generate res/chain_specs/rococo.json - // Deprecated: for rococo we are using a new chain spec which was restored from an old state - // see https://github.com/paritytech/subport/issues/337#issuecomment-1137882912 - "generate-rococo" => Box::new(chain_specs::rococo::get_chain_spec_prod()), path => { let chain_spec = chain_specs::ChainSpec::from_json_file(path.into())?; - if chain_spec.is_rococo() { - Box::new(chain_specs::rococo::ChainSpec::from_json_file(path.into())?) - } else if chain_spec.is_paseo() { + if chain_spec.is_paseo() { Box::new(chain_specs::paseo::ChainSpec::from_json_file(path.into())?) } else { // Fallback: use Litentry chain spec @@ -163,19 +133,6 @@ impl SubstrateCli for Cli { } } -impl Cli { - fn runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - if chain_spec.is_rococo() { - &rococo_parachain_runtime::VERSION - } else if chain_spec.is_paseo() { - &paseo_parachain_runtime::VERSION - } else { - // By default litentry is used - &litentry_parachain_runtime::VERSION - } - } -} - impl SubstrateCli for RelayChainCli { fn impl_name() -> String { "Litentry node".into() @@ -214,45 +171,19 @@ impl SubstrateCli for RelayChainCli { macro_rules! construct_benchmark_partials { ($config:expr, |$partials:ident| $code:expr) => { if $config.chain_spec.is_litentry() { - let $partials = new_partial::< - litentry_parachain_runtime::RuntimeApi, - LitentryParachainRuntimeExecutor, - _, - >( - &$config, - false, - crate::service::build_import_queue::< - litentry_parachain_runtime::RuntimeApi, - LitentryParachainRuntimeExecutor, - >, - )?; - $code - } else if $config.chain_spec.is_rococo() { - let $partials = new_partial::< - rococo_parachain_runtime::RuntimeApi, - RococoParachainRuntimeExecutor, - _, - >( + let $partials = new_partial::( &$config, + build_import_queue::, false, - crate::service::build_import_queue::< - rococo_parachain_runtime::RuntimeApi, - RococoParachainRuntimeExecutor, - >, + true, )?; $code } else if $config.chain_spec.is_paseo() { - let $partials = new_partial::< - paseo_parachain_runtime::RuntimeApi, - PaseoParachainRuntimeExecutor, - _, - >( + let $partials = new_partial::( &$config, + build_import_queue::, false, - crate::service::build_import_queue::< - paseo_parachain_runtime::RuntimeApi, - PaseoParachainRuntimeExecutor, - >, + true, )?; $code } else { @@ -269,26 +200,12 @@ macro_rules! construct_async_run { runner.async_run(|$config| { let $components = new_partial::< litentry_parachain_runtime::RuntimeApi, - LitentryParachainRuntimeExecutor, - _ - >( - &$config, - false, - crate::service::build_import_queue::, - )?; - let task_manager = $components.task_manager; - { $( $code )* }.map(|v| (v, task_manager)) - }) - } else if runner.config().chain_spec.is_rococo() { - runner.async_run(|$config| { - let $components = new_partial::< - rococo_parachain_runtime::RuntimeApi, - RococoParachainRuntimeExecutor, _ >( &$config, + build_import_queue::, false, - crate::service::build_import_queue::, + $cli.delayed_best_block, )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) @@ -297,12 +214,12 @@ macro_rules! construct_async_run { runner.async_run(|$config| { let $components = new_partial::< paseo_parachain_runtime::RuntimeApi, - PaseoParachainRuntimeExecutor, _ >( &$config, + build_import_queue::, false, - crate::service::build_import_queue::, + $cli.delayed_best_block, )?; let task_manager = $components.task_manager; { $( $code )* }.map(|v| (v, task_manager)) @@ -344,13 +261,11 @@ pub fn run() -> Result<()> { }, Some(Subcommand::PurgeChain(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.sync_run(|config| { let polkadot_cli = RelayChainCli::new( &config, - [RelayChainCli::executable_name()].iter().chain(cli.relay_chain_args.iter()), + [RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()), ); - let polkadot_config = SubstrateCli::create_configuration( &polkadot_cli, &polkadot_cli, @@ -367,23 +282,33 @@ pub fn run() -> Result<()> { Some(Subcommand::Key(cmd)) => cmd.run(&cli), - Some(Subcommand::ExportGenesisState(cmd)) => { - // TODO: is this the best way? - let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; - let state_version = Cli::runtime_version(&spec).state_version(); - let block: Block = generate_genesis_block(&*spec, state_version)?; - let raw_header = block.header().encode(); - let output_buf = if cmd.raw { - raw_header - } else { - format!("0x{:?}", HexDisplay::from(&block.header().encode())).into_bytes() - }; - if let Some(output) = &cmd.output { - std::fs::write(output, output_buf)?; + Some(Subcommand::ExportGenesisHead(cmd)) => { + let runner = cli.create_runner(cmd)?; + if runner.config().chain_spec.is_litentry() { + runner.sync_run(|config| { + let sc_service::PartialComponents { client, .. } = + new_partial::( + &config, + build_import_queue::, + false, + cli.delayed_best_block, + )?; + cmd.run(client) + }) + } else if runner.config().chain_spec.is_paseo() { + runner.sync_run(|config| { + let sc_service::PartialComponents { client, .. } = + new_partial::( + &config, + build_import_queue::, + false, + cli.delayed_best_block, + )?; + cmd.run(client) + }) } else { - std::io::stdout().write_all(&output_buf)?; + panic!("{}", UNSUPPORTED_CHAIN_MESSAGE) } - Ok(()) }, Some(Subcommand::ExportGenesisWasm(cmd)) => { let runner = cli.create_runner(cmd)?; @@ -393,24 +318,22 @@ pub fn run() -> Result<()> { }) }, Some(Subcommand::Benchmark(cmd)) => { - let cmd = cmd.as_ref(); let runner = cli.create_runner(cmd)?; - // Switch on the concrete benchmark sub-command- match cmd { BenchmarkCmd::Pallet(cmd) => { if cfg!(feature = "runtime-benchmarks") { - if !runner.config().chain_spec.is_dev() { - return Err("Only dev chain should be used in benchmark".into()); - } - - use crate::service::HostFunctions; - - runner.sync_run(|config| cmd.run::(config)) + runner.sync_run(|config| { + cmd.run_with_spec::, ()>( + Some(config.chain_spec), + ) + }) } else { - Err("Benchmarking wasn't enabled when building the node. \ - You can enable it with `--features runtime-benchmarks`." - .into()) + Err(sc_cli::Error::Input( + "Benchmarking wasn't enabled when building the node. \ + You can enable it with `--features runtime-benchmarks`." + .into(), + )) } }, BenchmarkCmd::Block(cmd) => runner.sync_run(|config| { @@ -441,52 +364,7 @@ pub fn run() -> Result<()> { _ => Err("Benchmarking sub-command unsupported".into()), } }, - #[cfg(feature = "try-runtime")] - #[allow(deprecated)] - Some(Subcommand::TryRuntime(cmd)) => { - use core_primitives::MILLISECS_PER_BLOCK; - use try_runtime_cli::block_building_info::timestamp_with_aura_info; - let runner = cli.create_runner(cmd)?; - - // grab the task manager. - 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))?; - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; - type HostFunctionsOf = ExtendedHostFunctions< - sp_io::SubstrateHostFunctions, - ::ExtendHostFunctions, - >; - - let info_provider = timestamp_with_aura_info(MILLISECS_PER_BLOCK); - if runner.config().chain_spec.is_litentry() { - runner.async_run(|_| { - Ok(( - cmd.run::, _>( - Some(info_provider), - ), - task_manager, - )) - }) - } else if runner.config().chain_spec.is_rococo() { - runner.async_run(|_| { - Ok(( - cmd.run::, _>(Some( - info_provider, - )), - task_manager, - )) - }) - } else { - Err(UNSUPPORTED_CHAIN_MESSAGE.into()) - } - }, - #[cfg(not(feature = "try-runtime"))] - Some(Subcommand::TryRuntime) => { - Err("Try-runtime must be enabled by `--features try-runtime`".into()) - }, None => { let runner = cli.create_runner(&cli.run.normalize())?; let collator_options = cli.run.collator_options(); @@ -505,10 +383,10 @@ pub fn run() -> Result<()> { runner.run_node_until_exit(|config| async move { if is_standalone { - return crate::service::start_standalone_node::< - rococo_parachain_runtime::RuntimeApi, - RococoParachainRuntimeExecutor, - >(config, evm_tracing_config) + return start_standalone_node::( + config, + evm_tracing_config, + ) .await .map_err(Into::into); } @@ -530,7 +408,7 @@ pub fn run() -> Result<()> { let polkadot_cli = RelayChainCli::new( &config, - [RelayChainCli::executable_name()].iter().chain(cli.relay_chain_args.iter()), + [RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()), ); let parachain_account = @@ -538,11 +416,6 @@ pub fn run() -> Result<()> { ¶_id, ); - let state_version = Cli::runtime_version(&config.chain_spec).state_version(); - let block: Block = generate_genesis_block(&*config.chain_spec, state_version) - .map_err(|e| format!("{:?}", e))?; - let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header.encode())); - let tokio_handle = config.tokio_handle.clone(); let polkadot_config = SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle) @@ -550,37 +423,34 @@ pub fn run() -> Result<()> { info!("Parachain id: {:?}", para_id); info!("Parachain Account: {}", parachain_account); - info!("Parachain genesis state: {}", genesis_state); info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" }); - let additional_config = AdditionalConfig { - evm_tracing_config, - enable_evm_rpc: cli.enable_evm_rpc, - proposer_block_size_limit: cli.proposer_block_size_limit, - proposer_soft_deadline_percent: cli.proposer_soft_deadline_percent, - }; + let additional_config = + AdditionalConfig { evm_tracing_config, enable_evm_rpc: cli.enable_evm_rpc }; if config.chain_spec.is_litentry() { - crate::service::start_node::< - litentry_parachain_runtime::RuntimeApi, - LitentryParachainRuntimeExecutor, - >(config, polkadot_config, collator_options, para_id, additional_config, hwbench) - .await - .map(|r| r.0) - .map_err(Into::into) - } else if config.chain_spec.is_rococo() { - crate::service::start_node::< - rococo_parachain_runtime::RuntimeApi, - RococoParachainRuntimeExecutor, - >(config, polkadot_config, collator_options, para_id, additional_config, hwbench) + start_node::( + config, + polkadot_config, + collator_options, + para_id, + hwbench, + additional_config, + cli.delayed_best_block, + ) .await .map(|r| r.0) .map_err(Into::into) } else if config.chain_spec.is_paseo() { - crate::service::start_node::< - paseo_parachain_runtime::RuntimeApi, - PaseoParachainRuntimeExecutor, - >(config, polkadot_config, collator_options, para_id, additional_config, hwbench) + start_node::( + config, + polkadot_config, + collator_options, + para_id, + hwbench, + additional_config, + cli.delayed_best_block, + ) .await .map(|r| r.0) .map_err(Into::into) diff --git a/parachain/node/src/rpc.rs b/parachain/node/src/rpc.rs index db84ad2278..d5b0eb752f 100644 --- a/parachain/node/src/rpc.rs +++ b/parachain/node/src/rpc.rs @@ -18,15 +18,15 @@ // This File should be safe to delete once All parachain matrix are EVM impl. #![warn(missing_docs)] -use core_primitives::{AccountId, Balance, Block, Hash, Nonce}; +use core_primitives::{AccountId, Balance, Block, Nonce}; use cumulus_primitives_parachain_inherent::ParachainInherentData; use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; use fc_rpc::{ pending::ConsensusDataProvider, Eth, EthApiServer, EthBlockDataCacheTask, EthFilter, - EthFilterApiServer, EthPubSub, EthPubSubApiServer, Net, NetApiServer, OverrideHandle, Web3, - Web3ApiServer, + EthFilterApiServer, EthPubSub, EthPubSubApiServer, Net, NetApiServer, Web3, Web3ApiServer, }; use fc_rpc_core::types::{FeeHistoryCache, FilterPool}; +use fc_storage::StorageOverride; use moonbeam_rpc_debug::{Debug, DebugServer}; use moonbeam_rpc_trace::{Trace, TraceServer}; use moonbeam_rpc_txpool::{TxPool as MoonbeamTxPool, TxPoolServer}; @@ -34,7 +34,7 @@ use polkadot_primitives::PersistedValidationData; use sc_client_api::{ AuxStore, Backend, BlockchainEvents, StateBackend, StorageProvider, UsageProvider, }; -use sc_network::NetworkService; +use sc_network::service::traits::NetworkService; use sc_network_sync::SyncingService; pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; use sc_transaction_pool::{ChainApi, Pool}; @@ -65,14 +65,14 @@ pub struct EvmTracingConfig { pub fn open_frontier_backend( client: Arc, config: &sc_service::Configuration, -) -> Result>, String> +) -> Result>, String> where C: sp_blockchain::HeaderBackend, { let config_dir = config.base_path.config_dir(config.chain_spec.id()); let path = config_dir.join("frontier").join("db"); - Ok(Arc::new(fc_db::kv::Backend::::new( + Ok(Arc::new(fc_db::kv::Backend::::new( client, &fc_db::kv::DatabaseSettings { source: fc_db::DatabaseSource::RocksDb { path, cache_size: 0 }, @@ -104,7 +104,7 @@ pub struct FullDeps { /// Graph pool instance. pub graph: Arc>, /// Network service - pub network: Arc>, + pub network: Arc, /// Chain syncing service pub sync: Arc>, /// Whether to deny unsafe calls @@ -119,8 +119,8 @@ pub struct FullDeps { pub fee_history_limit: u64, /// Fee history cache. pub fee_history_cache: FeeHistoryCache, - /// Ethereum data access overrides. - pub overrides: Arc>, + /// Ethereum data access storage_override. + pub storage_override: Arc>, /// Cache for Ethereum block data. pub block_data_cache: Arc>, /// Enable EVM RPC servers @@ -182,7 +182,7 @@ where filter_pool, fee_history_limit, fee_history_cache, - overrides, + storage_override, block_data_cache, enable_evm_rpc, } = deps; @@ -239,7 +239,7 @@ where no_tx_converter, sync.clone(), Default::default(), - overrides.clone(), + storage_override.clone(), frontier_backend.clone(), is_authority, block_data_cache.clone(), @@ -280,7 +280,7 @@ where client.clone(), sync, subscription_task_executor, - overrides, + storage_override, pubsub_notification_sinks, ) .into_rpc(), diff --git a/parachain/node/src/service.rs b/parachain/node/src/service.rs index f8712afa72..47a51abd57 100644 --- a/parachain/node/src/service.rs +++ b/parachain/node/src/service.rs @@ -25,141 +25,93 @@ use crate::{ standalone_block_import::StandaloneBlockImport, tracing::{self, RpcRequesters}, }; -pub use core_primitives::{AccountId, Balance, Block, Hash, Nonce}; - +pub use core_primitives::{AccountId, AuraId, Balance, Block, Hash, Nonce}; use cumulus_client_cli::CollatorOptions; +use cumulus_client_collator::service::CollatorService; +use cumulus_client_consensus_aura::collators::lookahead::{self as aura, Params as AuraParams}; #[allow(deprecated)] -use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; -use cumulus_client_consensus_common::{ - ParachainBlockImport as TParachainBlockImport, ParachainConsensus, -}; -#[allow(deprecated)] +use cumulus_client_consensus_aura::SlotProportion; +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, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, + BuildNetworkParams, CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams, }; -use cumulus_primitives_core::ParaId; -use cumulus_primitives_parachain_inherent::{ - MockValidationDataInherentDataProvider, MockXcmConfig, +use cumulus_primitives_core::{ + relay_chain::{CollatorPair, ValidationCode}, + ParaId, }; -use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; -use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; -use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node_with_rpc; -use fc_rpc::{EthBlockDataCacheTask, OverrideHandle}; +use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface}; +use fc_rpc::EthBlockDataCacheTask; use fc_rpc_core::types::{FeeHistoryCache, FilterPool}; +use fc_storage::{StorageOverride, StorageOverrideHandler}; use futures::StreamExt; use jsonrpsee::RpcModule; -use polkadot_service::CollatorPair; use sc_client_api::BlockchainEvents; +use sc_client_api::HeaderBackend; use sc_consensus::{ImportQueue, LongestChain}; use sc_consensus_aura::StartAuraParams; -use sc_executor::{ - HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY, -}; -use sc_network::NetworkBlock; +use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; +use sc_network::{config::FullNetworkConfiguration, service::traits::NetworkBackend, NetworkBlock}; use sc_network_sync::SyncingService; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_api::ConstructRuntimeApi; -use sp_blockchain::HeaderBackend; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_keystore::KeystorePtr; -use sp_runtime::traits::BlakeTwo256; -use std::{collections::BTreeMap, sync::Arc, time::Duration}; +use sp_runtime::app_crypto::AppCrypto; +use sp_std::{collections::btree_map::BTreeMap, sync::Arc, time::Duration}; use substrate_prometheus_endpoint::Registry; -type ParachainBackend = TFullBackend; - -type MaybeSelectChain = Option>; - #[cfg(not(feature = "runtime-benchmarks"))] -pub type HostFunctions = - (sp_io::SubstrateHostFunctions, moonbeam_primitives_ext::moonbeam_ext::HostFunctions); +pub type HostFunctions = ( + cumulus_client_service::ParachainHostFunctions, + moonbeam_primitives_ext::moonbeam_ext::HostFunctions, +); #[cfg(feature = "runtime-benchmarks")] pub type HostFunctions = ( - sp_io::SubstrateHostFunctions, + cumulus_client_service::ParachainHostFunctions, frame_benchmarking::benchmarking::HostFunctions, moonbeam_primitives_ext::moonbeam_ext::HostFunctions, ); -// Native executor instance. -pub struct LitentryParachainRuntimeExecutor; +type ParachainClient = TFullClient>; -impl sc_executor::NativeExecutionDispatch for LitentryParachainRuntimeExecutor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - litentry_parachain_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - litentry_parachain_runtime::native_version() - } -} - -// Native executor instance. -pub struct RococoParachainRuntimeExecutor; - -impl sc_executor::NativeExecutionDispatch for RococoParachainRuntimeExecutor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - rococo_parachain_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - rococo_parachain_runtime::native_version() - } -} - -// Native executor instance. -pub struct PaseoParachainRuntimeExecutor; - -impl sc_executor::NativeExecutionDispatch for PaseoParachainRuntimeExecutor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - paseo_parachain_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - paseo_parachain_runtime::native_version() - } -} +type ParachainBackend = TFullBackend; -type ParachainClient = - TFullClient>; +type ParachainBlockImport = + TParachainBlockImport>, ParachainBackend>; -type ParachainBlockImport = - TParachainBlockImport>, ParachainBackend>; +type MaybeSelectChain = Option>; /// 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 /// be able to perform chain operations. -pub fn new_partial( +pub fn new_partial( config: &Configuration, - is_standalone: bool, build_import_queue: BIQ, + is_standalone: bool, + delayed_best_block: bool, ) -> Result< PartialComponents< - ParachainClient, + ParachainClient, ParachainBackend, MaybeSelectChain, sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool>, + sc_transaction_pool::FullPool>, ( - ParachainBlockImport, + ParachainBlockImport, Option, Option, - Arc>, + Arc>>, ), >, sc_service::Error, > where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys @@ -167,11 +119,9 @@ where + sp_offchain::OffchainWorkerApi + sp_block_builder::BlockBuilder + fp_rpc::EthereumRuntimeRPCApi, - sc_client_api::StateBackendFor: sp_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, BIQ: FnOnce( - Arc>, - ParachainBlockImport, + Arc>, + ParachainBlockImport, &Configuration, Option, &TaskManager, @@ -189,30 +139,24 @@ where }) .transpose()?; - let executor = WasmExecutor::builder() + let heap_pages = config.default_heap_pages.map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h: u64| { + HeapAllocStrategy::Static { extra_pages: h as _ } + }); + + let executor = sc_executor::WasmExecutor::::builder() .with_execution_method(config.wasm_method) - .with_onchain_heap_alloc_strategy( - config.default_heap_pages.map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| { - HeapAllocStrategy::Static { extra_pages: h as _ } - }), - ) - .with_offchain_heap_alloc_strategy( - config.default_heap_pages.map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| { - HeapAllocStrategy::Static { extra_pages: h as _ } - }), - ) .with_max_runtime_instances(config.max_runtime_instances) .with_runtime_cache_size(config.runtime_cache_size) + .with_onchain_heap_alloc_strategy(heap_pages) + .with_offchain_heap_alloc_strategy(heap_pages) .build(); - let executor = - sc_executor::NativeElseWasmExecutor::::new_with_wasm_executor(executor); - let (client, backend, keystore_container, task_manager) = - sc_service::new_full_parts::( + sc_service::new_full_parts_record_import::( config, telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), executor, + true, )?; let client = Arc::new(client); @@ -232,10 +176,24 @@ where ); let select_chain = if is_standalone { Some(LongestChain::new(backend.clone())) } else { None }; - let frontier_backend = crate::rpc::open_frontier_backend(client.clone(), config)?; - - let block_import = ParachainBlockImport::new(client.clone(), backend.clone()); + // Note: `new_with_delayed_best_block` will cause less `Retracted`/`Invalid` tx, + // especially for rococo-local where the epoch duration is 1m. However, it + // also means the imported block will not be notified as best blocks, instead, + // it waits for the best block from relay chain + // see https://github.com/paritytech/polkadot-sdk/issues/1202 + // https://github.com/paritytech/polkadot-sdk/pull/2001 + // https://github.com/moonbeam-foundation/moonbeam/issues/3040 + // + // my suggestion: + // use `new_with_delayed_best_block` in CI, use `new` in prod + // + // TODO: re-investigate this after async backing is supported + let block_import = if delayed_best_block { + ParachainBlockImport::new_with_delayed_best_block(client.clone(), backend.clone()) + } else { + ParachainBlockImport::new(client.clone(), backend.clone()) + }; let import_queue = build_import_queue( client.clone(), @@ -246,7 +204,7 @@ where is_standalone, )?; - let params = PartialComponents { + Ok(PartialComponents { backend, client, import_queue, @@ -255,9 +213,7 @@ where transaction_pool, select_chain, other: (block_import, telemetry, telemetry_worker_handle, frontier_backend), - }; - - Ok(params) + }) } /// To add additional config to start_xyz_node functions @@ -268,79 +224,84 @@ pub struct AdditionalConfig { /// Whether EVM RPC be enabled pub enable_evm_rpc: bool, - - /// Maxium allowed block size limit to propose - pub proposer_block_size_limit: usize, - - /// Soft deadline limit used by `Proposer` - pub proposer_soft_deadline_percent: u8, } /// Start a node with the given parachain `Configuration` and relay chain `Configuration`. /// /// 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( +async fn start_node_impl( parachain_config: Configuration, polkadot_config: Configuration, collator_options: CollatorOptions, - id: ParaId, - additional_config: AdditionalConfig, + sybil_resistance_level: CollatorSybilResistance, + para_id: ParaId, _rpc_ext_builder: RB, build_import_queue: BIQ, - build_consensus: BIC, + start_consensus: SC, hwbench: Option, -) -> sc_service::error::Result<(TaskManager, Arc>)> + additional_config: AdditionalConfig, + delayed_best_block: bool, +) -> sc_service::error::Result<(TaskManager, Arc>)> where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys + sp_api::ApiExt + sp_offchain::OffchainWorkerApi + sp_block_builder::BlockBuilder - + sp_consensus_aura::AuraApi - + cumulus_primitives_core::CollectCollationInfo - + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + + cumulus_primitives_aura::AuraUnincludedSegmentApi + substrate_frame_rpc_system::AccountNonceApi - + moonbeam_rpc_primitives_debug::DebugRuntimeApi - + moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi + + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + fp_rpc::EthereumRuntimeRPCApi - + fp_rpc::ConvertTransactionRuntimeApi, - sc_client_api::StateBackendFor: sp_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, + + fp_rpc::ConvertTransactionRuntimeApi + + cumulus_primitives_core::CollectCollationInfo + + sp_consensus_aura::AuraApi + + moonbeam_rpc_primitives_debug::DebugRuntimeApi + + moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi, RB: Fn( - Arc>, + sc_rpc::DenyUnsafe, + Arc>, + Arc, + Arc>>, ) -> Result, sc_service::Error> - + Send + 'static, BIQ: FnOnce( - Arc>, - ParachainBlockImport, - &Configuration, - Option, - &TaskManager, - bool, - ) -> Result, sc_service::Error> - + 'static, - BIC: FnOnce( - Arc>, - ParachainBlockImport, + Arc>, + ParachainBlockImport, + &Configuration, + Option, + &TaskManager, + bool, + ) -> Result, sc_service::Error>, + SC: FnOnce( + Arc>, + ParachainBlockImport, Option<&Registry>, Option, &TaskManager, Arc, - Arc>>, + Arc>>, Arc>, KeystorePtr, - bool, - ) -> Result>, sc_service::Error>, + Duration, + ParaId, + CollatorPair, + OverseerHandle, + Arc>) + Send + Sync>, + Arc, + ) -> Result<(), sc_service::Error>, + Net: NetworkBackend, { let parachain_config = prepare_node_config(parachain_config); - let params = - new_partial::(¶chain_config, false, build_import_queue)?; + let params = new_partial::( + ¶chain_config, + build_import_queue, + false, + delayed_best_block, + )?; let (block_import, mut telemetry, telemetry_worker_handle, frontier_backend) = params.other; let client = params.client.clone(); @@ -356,29 +317,25 @@ where hwbench.clone(), ) .await - .map_err(|e| match e { - RelayChainError::Application(x) => sc_service::Error::Application(x), - s => s.to_string().into(), - })?; + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; - let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); - let net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); + let net_config = FullNetworkConfiguration::<_, _, Net>::new(¶chain_config.network); let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = - cumulus_client_service::build_network(cumulus_client_service::BuildNetworkParams { + build_network(BuildNetworkParams { parachain_config: ¶chain_config, net_config, - para_id: id, client: client.clone(), transaction_pool: transaction_pool.clone(), + para_id, spawn_handle: task_manager.spawn_handle(), relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, - sybil_resistance_level: cumulus_client_service::CollatorSybilResistance::Resistant, + sybil_resistance_level, }) .await?; @@ -398,10 +355,10 @@ where fee_history_limit, fee_history_cache, block_data_cache, - overrides, + storage_override, tracing_requesters, ethapi_cmd, - ) = start_node_evm_impl::( + ) = start_node_evm_impl::( client.clone(), backend.clone(), frontier_backend.clone(), @@ -439,7 +396,7 @@ where fee_history_limit, fee_history_cache: fee_history_cache.clone(), block_data_cache: block_data_cache.clone(), - overrides: overrides.clone(), + storage_override: storage_override.clone(), enable_evm_rpc: additional_config.enable_evm_rpc, }; @@ -467,14 +424,17 @@ where keystore: params.keystore_container.keystore(), backend: backend.clone(), network: network.clone(), + sync_service: sync_service.clone(), system_rpc_tx, tx_handler_controller, - sync_service: sync_service.clone(), telemetry: telemetry.as_mut(), })?; if let Some(hwbench) = hwbench { sc_sysinfo::print_hwbench(&hwbench); + if validator { + warn_if_slow_hardware(&hwbench); + } if let Some(ref mut telemetry) = telemetry { let telemetry_handle = telemetry.handle(); @@ -497,8 +457,25 @@ where .overseer_handle() .map_err(|e| sc_service::Error::Application(Box::new(e)))?; + start_relay_chain_tasks(StartRelayChainTasksParams { + client: client.clone(), + announce_block: announce_block.clone(), + para_id, + relay_chain_interface: relay_chain_interface.clone(), + task_manager: &mut task_manager, + da_recovery_profile: if validator { + DARecoveryProfile::Collator + } else { + DARecoveryProfile::FullNode + }, + import_queue: import_queue_service, + relay_chain_slot_duration, + recovery_handle: Box::new(overseer_handle.clone()), + sync_service: sync_service.clone(), + })?; + if validator { - let parachain_consensus = build_consensus( + start_consensus( client.clone(), block_import, prometheus_registry.as_ref(), @@ -508,42 +485,13 @@ where transaction_pool, sync_service.clone(), params.keystore_container.keystore(), - force_authoring, - )?; - - let spawner = task_manager.spawn_handle(); - - let params = StartCollatorParams { - para_id: id, - block_status: client.clone(), - announce_block, - client: client.clone(), - task_manager: &mut task_manager, - relay_chain_interface: relay_chain_interface.clone(), - spawner, - parachain_consensus, - import_queue: import_queue_service, - 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, - }; - #[allow(deprecated)] - start_collator(params).await?; - } else { - let params = StartFullNodeParams { - client: client.clone(), + para_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, - relay_chain_slot_duration, - import_queue: import_queue_service, - recovery_handle: Box::new(overseer_handle), - sync_service, - }; - #[allow(deprecated)] - start_full_node(params)?; + backend.clone(), + )?; } start_network.start_network(); @@ -552,138 +500,68 @@ where } /// Start a litentry/rococo node. -pub async fn start_node( +pub async fn start_node( parachain_config: Configuration, polkadot_config: Configuration, collator_options: CollatorOptions, - id: ParaId, - additional_config: AdditionalConfig, + para_id: ParaId, hwbench: Option, -) -> sc_service::error::Result<(TaskManager, Arc>)> + additional_config: AdditionalConfig, + delayed_best_block: bool, +) -> sc_service::error::Result<(TaskManager, Arc>)> where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys + sp_api::ApiExt + sp_offchain::OffchainWorkerApi + sp_block_builder::BlockBuilder + + cumulus_primitives_aura::AuraUnincludedSegmentApi + + substrate_frame_rpc_system::AccountNonceApi + + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + + fp_rpc::EthereumRuntimeRPCApi + + fp_rpc::ConvertTransactionRuntimeApi + cumulus_primitives_core::CollectCollationInfo + sp_consensus_aura::AuraApi - + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi - + substrate_frame_rpc_system::AccountNonceApi + moonbeam_rpc_primitives_debug::DebugRuntimeApi - + moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi - + fp_rpc::EthereumRuntimeRPCApi - + fp_rpc::ConvertTransactionRuntimeApi, - Executor: sc_executor::NativeExecutionDispatch + 'static, - sc_client_api::StateBackendFor: sp_api::StateBackend, + + moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi, { - start_node_impl::( + start_node_impl::>( parachain_config, polkadot_config, collator_options, - id, - additional_config.clone(), - |_| Ok(RpcModule::new(())), - build_import_queue::, - |client, - block_import, - prometheus_registry, - telemetry, - task_manager, - relay_chain_interface, - transaction_pool, - sync_oracle, - keystore, - force_authoring| { - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - - let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry, - telemetry.clone(), - ); - #[allow(deprecated)] - Ok(AuraConsensus::build::( - BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - 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 timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - - Ok((slot, timestamp, parachain_inherent)) - } - }, - block_import, - para_client: client, - backoff_authoring_blocks: Option::<()>::None, - sync_oracle, - keystore, - force_authoring, - slot_duration, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - telemetry, - }, - )) - }, + CollatorSybilResistance::Resistant, // Aura + para_id, + |_, _, _, _| Ok(RpcModule::new(())), + build_import_queue::, + start_lookahead_aura_consensus::, hwbench, + additional_config.clone(), + delayed_best_block, ) .await } /// Build the import queue for the litentry/rococo runtime. -pub fn build_import_queue( - client: Arc>, - block_import: ParachainBlockImport, +pub fn build_import_queue( + client: Arc>, + block_import: ParachainBlockImport, config: &Configuration, telemetry: Option, task_manager: &TaskManager, is_standalone: bool, ) -> Result, sc_service::Error> where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys + sp_api::ApiExt + sp_offchain::OffchainWorkerApi + sp_block_builder::BlockBuilder - + cumulus_primitives_core::CollectCollationInfo - + sp_consensus_aura::AuraApi - + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi - + substrate_frame_rpc_system::AccountNonceApi - + fp_rpc::EthereumRuntimeRPCApi, - sc_client_api::StateBackendFor: sp_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, + + fp_rpc::EthereumRuntimeRPCApi + + sp_consensus_aura::AuraApi, { if is_standalone { // aura import queue @@ -724,6 +602,7 @@ where ), raw_downward_messages: vec![], raw_horizontal_messages: vec![], + additional_key_values: None, }; Ok((slot, timestamp, mocked_parachain)) @@ -749,7 +628,7 @@ where _, >(cumulus_client_consensus_aura::ImportQueueParams { block_import, - client, + client: client.clone(), create_inherent_data_providers: move |_, _| async move { let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); @@ -770,29 +649,27 @@ where } // start a standalone node which doesn't need to connect to relaychain -pub async fn start_standalone_node( - parachain_config: Configuration, +pub async fn start_standalone_node( + config: Configuration, evm_tracing_config: crate::evm_tracing_types::EvmTracingConfig, ) -> Result where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys + sp_api::ApiExt + sp_offchain::OffchainWorkerApi + sp_block_builder::BlockBuilder + + cumulus_primitives_aura::AuraUnincludedSegmentApi + + substrate_frame_rpc_system::AccountNonceApi + + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + + fp_rpc::EthereumRuntimeRPCApi + + fp_rpc::ConvertTransactionRuntimeApi + cumulus_primitives_core::CollectCollationInfo + sp_consensus_aura::AuraApi - + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi - + substrate_frame_rpc_system::AccountNonceApi + moonbeam_rpc_primitives_debug::DebugRuntimeApi - + moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi - + fp_rpc::EthereumRuntimeRPCApi - + fp_rpc::ConvertTransactionRuntimeApi, - sc_client_api::StateBackendFor: sp_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, + + moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi, { let sc_service::PartialComponents { client, @@ -803,11 +680,7 @@ where select_chain: maybe_select_chain, transaction_pool, other: (_, _, _, frontier_backend), - } = new_partial::( - ¶chain_config, - true, - build_import_queue::, - )?; + } = new_partial::(&config, build_import_queue::, true, true)?; // Sinks for pubsub notifications. // Everytime a new subscription is created, a new mpsc channel is added to the sink pool. @@ -820,22 +693,25 @@ where > = Default::default(); let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks); - let net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); + let net_config = + FullNetworkConfiguration::<_, _, sc_network::NetworkWorker<_, _>>::new(&config.network); - let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = + let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { - config: ¶chain_config, + config: &config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), import_queue, block_announce_validator_builder: None, warp_sync_params: None, - net_config, + block_relay: None, + metrics: sc_network::NotificationMetrics::new(None), })?; - let role = parachain_config.role.clone(); - let force_authoring = parachain_config.force_authoring; + let role = config.role.clone(); + let force_authoring = config.force_authoring; let backoff_authoring_blocks: Option<()> = None; let ( @@ -843,15 +719,15 @@ where fee_history_limit, fee_history_cache, block_data_cache, - overrides, + storage_override, tracing_requesters, ethapi_cmd, - ) = start_node_evm_impl::( + ) = start_node_evm_impl::( client.clone(), backend.clone(), frontier_backend.clone(), &mut task_manager, - ¶chain_config, + &config, evm_tracing_config.clone(), sync_service.clone(), pubsub_notification_sinks.clone(), @@ -919,6 +795,7 @@ where ), raw_downward_messages: vec![], raw_horizontal_messages: vec![], + additional_key_values: None, }; Ok((slot, timestamp, mocked_parachain)) @@ -970,7 +847,7 @@ where fee_history_limit, fee_history_cache: fee_history_cache.clone(), block_data_cache: block_data_cache.clone(), - overrides: overrides.clone(), + storage_override: storage_override.clone(), // enable EVM RPC for dev node by default enable_evm_rpc: true, }; @@ -994,7 +871,7 @@ where client, transaction_pool, task_manager: &mut task_manager, - config: parachain_config, + config, keystore: keystore_container.keystore(), backend, network, @@ -1004,15 +881,14 @@ where telemetry: None, })?; - start_network.start_network(); - + network_starter.start_network(); Ok(task_manager) } -pub fn start_node_evm_impl( - client: Arc>, +pub fn start_node_evm_impl( + client: Arc>, backend: Arc, - frontier_backend: Arc>, + frontier_backend: Arc>>, task_manager: &mut TaskManager, config: &Configuration, evm_tracing_config: crate::evm_tracing_types::EvmTracingConfig, @@ -1027,13 +903,12 @@ pub fn start_node_evm_impl( u64, FeeHistoryCache, Arc>, - Arc>, + Arc>, RpcRequesters, Vec, ) where - RuntimeApi: - ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::Metadata + sp_session::SessionKeys @@ -1043,29 +918,29 @@ where + cumulus_primitives_core::CollectCollationInfo + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + substrate_frame_rpc_system::AccountNonceApi - + moonbeam_rpc_primitives_debug::DebugRuntimeApi - + moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi + fp_rpc::EthereumRuntimeRPCApi - + fp_rpc::ConvertTransactionRuntimeApi, - Executor: sc_executor::NativeExecutionDispatch + 'static, + + fp_rpc::ConvertTransactionRuntimeApi + + moonbeam_rpc_primitives_debug::DebugRuntimeApi + + moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi, { let prometheus_registry = config.prometheus_registry().cloned(); let filter_pool: FilterPool = Arc::new(std::sync::Mutex::new(BTreeMap::new())); let fee_history_cache: FeeHistoryCache = Arc::new(std::sync::Mutex::new(BTreeMap::new())); - let overrides = fc_storage::overrides_handle(client.clone()); + let storage_override = Arc::new(StorageOverrideHandler::new(client.clone())); let ethapi_cmd = evm_tracing_config.ethapi.clone(); let tracing_requesters = if ethapi_cmd.contains(&EthApiCmd::Debug) || ethapi_cmd.contains(&EthApiCmd::Trace) { tracing::spawn_tracing_tasks( &evm_tracing_config, + prometheus_registry.clone(), tracing::SpawnTasksParams { task_manager, client: client.clone(), substrate_backend: backend.clone(), frontier_backend: frontier_backend.clone(), filter_pool: Some(filter_pool.clone()), - overrides: overrides.clone(), + storage_override: storage_override.clone(), }, ) } else { @@ -1082,7 +957,7 @@ where Duration::new(6, 0), client.clone(), backend, - overrides.clone(), + storage_override.clone(), frontier_backend, 3, 0, @@ -1112,7 +987,7 @@ where Some("frontier"), fc_rpc::EthTask::fee_history_task( client, - overrides.clone(), + storage_override.clone(), fee_history_cache.clone(), FEE_HISTORY_LIMIT, ), @@ -1120,7 +995,7 @@ where let block_data_cache = Arc::new(fc_rpc::EthBlockDataCacheTask::new( task_manager.spawn_handle(), - overrides.clone(), + storage_override.clone(), 50, 50, prometheus_registry, @@ -1131,32 +1006,94 @@ where FEE_HISTORY_LIMIT, fee_history_cache, block_data_cache, - overrides, + storage_override, tracing_requesters, ethapi_cmd, ) } -pub async fn build_relay_chain_interface( - polkadot_config: Configuration, - parachain_config: &Configuration, - telemetry_worker_handle: Option, - task_manager: &mut TaskManager, - collator_options: CollatorOptions, - hwbench: Option, -) -> RelayChainResult<(Arc<(dyn RelayChainInterface + 'static)>, Option)> { - if let cumulus_client_cli::RelayChainMode::ExternalRpc(rpc_target_urls) = - collator_options.relay_chain_mode - { - build_minimal_relay_chain_node_with_rpc(polkadot_config, task_manager, rpc_target_urls) - .await - } else { - build_inprocess_relay_chain( - polkadot_config, - parachain_config, - telemetry_worker_handle, - task_manager, - hwbench, - ) +/// Start consensus using the lookahead aura collator. +fn start_lookahead_aura_consensus( + client: Arc>, + block_import: ParachainBlockImport, + prometheus_registry: Option<&Registry>, + telemetry: Option, + task_manager: &TaskManager, + relay_chain_interface: Arc, + transaction_pool: Arc>>, + sync_oracle: Arc>, + keystore: KeystorePtr, + relay_chain_slot_duration: Duration, + para_id: ParaId, + collator_key: CollatorPair, + overseer_handle: OverseerHandle, + announce_block: Arc>) + Send + Sync>, + backend: Arc, +) -> Result<(), sc_service::Error> +where + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue + + sp_api::Metadata + + sp_session::SessionKeys + + sp_api::ApiExt + + sp_offchain::OffchainWorkerApi + + sp_block_builder::BlockBuilder + + fp_rpc::EthereumRuntimeRPCApi + + sp_consensus_aura::AuraApi + + cumulus_primitives_aura::AuraUnincludedSegmentApi + + cumulus_primitives_core::CollectCollationInfo, +{ + let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( + task_manager.spawn_handle(), + client.clone(), + transaction_pool, + prometheus_registry, + telemetry.clone(), + ); + + let collator_service = CollatorService::new( + client.clone(), + Arc::new(task_manager.spawn_handle()), + announce_block, + client.clone(), + ); + + let params = AuraParams { + create_inherent_data_providers: move |_, ()| async move { Ok(()) }, + block_import, + para_client: client.clone(), + para_backend: backend, + relay_client: relay_chain_interface, + code_hash_provider: move |block_hash| { + client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash()) + }, + sync_oracle, + keystore, + collator_key, + para_id, + overseer_handle, + relay_chain_slot_duration, + proposer: Proposer::new(proposer_factory), + collator_service, + authoring_duration: Duration::from_millis(1500), + reinitialize: false, + }; + + let fut = aura::run::::Pair, _, _, _, _, _, _, _, _, _>(params); + task_manager.spawn_essential_handle().spawn("aura", None, fut); + + Ok(()) +} + +/// Checks that the hardware meets the requirements and print a warning otherwise. +fn warn_if_slow_hardware(hwbench: &sc_sysinfo::HwBench) { + // Polkadot para-chains should generally use these requirements to ensure that the relay-chain + // will not take longer than expected to import its blocks. + if let Err(err) = frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE.check_hardware(hwbench) { + log::warn!( + "⚠️ The hardware does not meet the minimal requirements {} for role 'Authority' find out more at:\n\ + https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware", + err + ); } } diff --git a/parachain/node/src/tracing.rs b/parachain/node/src/tracing.rs index 306252e557..1ce593e78f 100644 --- a/parachain/node/src/tracing.rs +++ b/parachain/node/src/tracing.rs @@ -14,11 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -//! EVM tracing RPC support. use crate::evm_tracing_types::{EthApi as EthApiCmd, EvmTracingConfig}; -use fc_rpc::OverrideHandle; use fc_rpc_core::types::FilterPool; +use fc_storage::StorageOverride; use fp_rpc::EthereumRuntimeRPCApi; use moonbeam_rpc_debug::{DebugHandler, DebugRequester}; use moonbeam_rpc_trace::{CacheRequester as TraceFilterCacheRequester, CacheTask}; @@ -26,12 +25,13 @@ use sc_client_api::{ Backend, BlockOf, BlockchainEvents, HeaderBackend, StateBackend, StorageProvider, }; use sc_service::TaskManager; -use sp_api::{BlockT, HeaderT, ProvideRuntimeApi}; +use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderMetadata}; use sp_core::H256; -use sp_runtime::traits::BlakeTwo256; +use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Header as HeaderT}; use std::sync::Arc; +use substrate_prometheus_endpoint::Registry as PrometheusRegistry; use tokio::sync::Semaphore; #[derive(Clone)] @@ -40,18 +40,19 @@ pub struct RpcRequesters { pub trace: Option, } +#[allow(dead_code)] pub struct SpawnTasksParams<'a, B: BlockT, C, BE> { pub task_manager: &'a TaskManager, pub client: Arc, pub substrate_backend: Arc, - pub frontier_backend: Arc>, + pub frontier_backend: Arc + Send + Sync>, pub filter_pool: Option, - pub overrides: Arc>, + pub storage_override: Arc>, } -/// Spawn the tasks that are required to run a EVM tracing. pub fn spawn_tracing_tasks( rpc_config: &EvmTracingConfig, + prometheus: Option, params: SpawnTasksParams, ) -> RpcRequesters where @@ -76,7 +77,8 @@ where Arc::clone(¶ms.substrate_backend), core::time::Duration::from_secs(rpc_config.ethapi_trace_cache_duration), Arc::clone(&permit_pool), - Arc::clone(¶ms.overrides), + Arc::clone(¶ms.storage_override), + prometheus, ); (Some(trace_filter_task), Some(trace_filter_requester)) } else { @@ -89,7 +91,7 @@ where Arc::clone(¶ms.substrate_backend), Arc::clone(¶ms.frontier_backend), Arc::clone(&permit_pool), - Arc::clone(¶ms.overrides), + Arc::clone(¶ms.storage_override), rpc_config.tracing_raw_max_memory_usage, ); (Some(debug_task), Some(debug_requester)) diff --git a/parachain/pallets/account-fix/Cargo.toml b/parachain/pallets/account-fix/Cargo.toml index f94c305501..cb35a4898e 100644 --- a/parachain/pallets/account-fix/Cargo.toml +++ b/parachain/pallets/account-fix/Cargo.toml @@ -25,12 +25,12 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", "frame-support/std", "frame-system/std", "pallet-balances/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/bitacross/Cargo.toml b/parachain/pallets/bitacross/Cargo.toml index 9eaa20ae93..e6f3fb674d 100644 --- a/parachain/pallets/bitacross/Cargo.toml +++ b/parachain/pallets/bitacross/Cargo.toml @@ -31,13 +31,15 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", ] std = [ + "core-primitives/std", + "frame-benchmarking?/std", + "frame-support/std", + "frame-system/std", + "pallet-balances/std", + "pallet-timestamp/std", "parity-scale-codec/std", "scale-info/std", "sp-io/std", "sp-runtime/std", - "frame-support/std", - "frame-system/std", - "frame-benchmarking?/std", - "core-primitives/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/bridge/assets-handler/Cargo.toml b/parachain/pallets/bridge/assets-handler/Cargo.toml index 7415a47c27..259cca292a 100644 --- a/parachain/pallets/bridge/assets-handler/Cargo.toml +++ b/parachain/pallets/bridge/assets-handler/Cargo.toml @@ -34,23 +34,24 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-assets/runtime-benchmarks", - "pallet-chain-bridge/runtime-benchmarks", "pallet-bridge-common/runtime-benchmarks", + "pallet-chain-bridge/runtime-benchmarks", "pallet-parachain-staking/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", - "sp-io/std", - "sp-core/std", "frame-support/std", "frame-system/std", "pallet-assets/std", "pallet-balances/std", - "pallet-chain-bridge/std", "pallet-bridge-common/std", + "pallet-bridge-transfer/std", + "pallet-chain-bridge/std", "pallet-parachain-staking/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/bridge/assets-handler/src/lib.rs b/parachain/pallets/bridge/assets-handler/src/lib.rs index 1956408f31..d7c06bc012 100644 --- a/parachain/pallets/bridge/assets-handler/src/lib.rs +++ b/parachain/pallets/bridge/assets-handler/src/lib.rs @@ -217,7 +217,7 @@ where + Debug + FullCodec + 'static, - A: Clone, + A: Clone + Eq, { fn prepare_token_bridge_in( resource_id: ResourceId, diff --git a/parachain/pallets/bridge/assets-handler/src/mock.rs b/parachain/pallets/bridge/assets-handler/src/mock.rs index e22aaed547..03d53e9220 100644 --- a/parachain/pallets/bridge/assets-handler/src/mock.rs +++ b/parachain/pallets/bridge/assets-handler/src/mock.rs @@ -18,18 +18,14 @@ use super::*; use crate::{self as pallet_assets_handler}; use frame_support::{ - assert_ok, ord_parameter_types, parameter_types, + assert_ok, derive_impl, ord_parameter_types, parameter_types, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64, SortedMembers}, PalletId, }; use frame_system::EnsureSignedBy; use hex_literal::hex; use pallet_bridge_common::AssetInfo; -use sp_core::H256; -use sp_runtime::{ - traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, - BuildStorage, -}; +use sp_runtime::{traits::AccountIdConversion, BuildStorage}; type Balance = u64; pub const TEST_THRESHOLD: u32 = 2; @@ -47,54 +43,21 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } -ord_parameter_types! { - pub const One: u64 = 1; +parameter_types! { + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU64<1>; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { diff --git a/parachain/pallets/bridge/bridge-transfer/Cargo.toml b/parachain/pallets/bridge/bridge-transfer/Cargo.toml index 36d7723b23..50ccdb7c7d 100644 --- a/parachain/pallets/bridge/bridge-transfer/Cargo.toml +++ b/parachain/pallets/bridge/bridge-transfer/Cargo.toml @@ -37,22 +37,25 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-assets/runtime-benchmarks", - "pallet-chain-bridge/runtime-benchmarks", "pallet-bridge-common/runtime-benchmarks", + "pallet-chain-bridge/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", - "sp-io/std", - "sp-core/std", - "sp-arithmetic/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "frame-benchmarking?/std", + "pallet-assets-handler/std", "pallet-assets/std", - "pallet-chain-bridge/std", + "pallet-balances/std", "pallet-bridge-common/std", + "pallet-chain-bridge/std", + "pallet-timestamp/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-arithmetic/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/bridge/bridge-transfer/src/mock.rs b/parachain/pallets/bridge/bridge-transfer/src/mock.rs index f96857b24d..5768b8846e 100644 --- a/parachain/pallets/bridge/bridge-transfer/src/mock.rs +++ b/parachain/pallets/bridge/bridge-transfer/src/mock.rs @@ -16,7 +16,7 @@ use crate::{self as bridge_transfer, Config}; use frame_support::{ - assert_ok, ord_parameter_types, parameter_types, + assert_ok, derive_impl, ord_parameter_types, parameter_types, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64, SortedMembers}, PalletId, }; @@ -26,14 +26,9 @@ use hex_literal::hex; pub use pallet_balances as balances; use pallet_bridge_common::AssetInfo; use pallet_chain_bridge::{self as bridge, ResourceId}; -use sp_core::H256; -use sp_runtime::{ - traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, - BuildStorage, -}; +use sp_runtime::{traits::AccountIdConversion, BuildStorage}; pub const TEST_THRESHOLD: u32 = 2; -type AccountId = u64; type Balance = u64; frame_support::construct_runtime!( @@ -48,54 +43,21 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } -ord_parameter_types! { - pub const One: u64 = 1; +parameter_types! { + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU64<1>; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { diff --git a/parachain/pallets/bridge/chain-bridge/Cargo.toml b/parachain/pallets/bridge/chain-bridge/Cargo.toml index b747c4b206..6856441286 100644 --- a/parachain/pallets/bridge/chain-bridge/Cargo.toml +++ b/parachain/pallets/bridge/chain-bridge/Cargo.toml @@ -11,7 +11,6 @@ parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } -sp-core-hashing = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -29,16 +28,15 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", - "sp-io/std", - "sp-core/std", - "sp-core-hashing/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "frame-benchmarking?/std", "pallet-balances/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/bridge/chain-bridge/src/hashing.rs b/parachain/pallets/bridge/chain-bridge/src/hashing.rs index b9da4679a9..e8915527c4 100644 --- a/parachain/pallets/bridge/chain-bridge/src/hashing.rs +++ b/parachain/pallets/bridge/chain-bridge/src/hashing.rs @@ -14,9 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -use sp_core_hashing::blake2_128 as impl_blake2_128; - -/// Do a Blake2 128-bit hash and return result. pub fn blake2_128(data: &[u8]) -> [u8; 16] { - impl_blake2_128(data) + sp_core::hashing::blake2_128(data) } diff --git a/parachain/pallets/bridge/chain-bridge/src/mock.rs b/parachain/pallets/bridge/chain-bridge/src/mock.rs index 81b83464f3..4cbe5980d0 100644 --- a/parachain/pallets/bridge/chain-bridge/src/mock.rs +++ b/parachain/pallets/bridge/chain-bridge/src/mock.rs @@ -16,13 +16,9 @@ use super::*; -use frame_support::{assert_ok, parameter_types}; +use frame_support::{assert_ok, derive_impl, parameter_types}; use frame_system::{self as system}; -use sp_core::H256; -use sp_runtime::{ - traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, - BuildStorage, -}; +use sp_runtime::{traits::AccountIdConversion, BuildStorage}; use crate::{self as bridge, Config}; @@ -38,54 +34,21 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { diff --git a/parachain/pallets/bridge/common/Cargo.toml b/parachain/pallets/bridge/common/Cargo.toml index 30dfc2b45e..ecf4398111 100644 --- a/parachain/pallets/bridge/common/Cargo.toml +++ b/parachain/pallets/bridge/common/Cargo.toml @@ -20,8 +20,8 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", ] std = [ - "scale-info/std", - "parity-scale-codec/std", "frame-support?/std", + "parity-scale-codec/std", + "scale-info/std", "sp-runtime/std", ] diff --git a/parachain/pallets/collab-ai/aiusd-convertor/Cargo.toml b/parachain/pallets/collab-ai/aiusd-convertor/Cargo.toml index c061e8823e..90fdbe5337 100644 --- a/parachain/pallets/collab-ai/aiusd-convertor/Cargo.toml +++ b/parachain/pallets/collab-ai/aiusd-convertor/Cargo.toml @@ -29,17 +29,24 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", - "sp-io/std", - "sp-core/std", "frame-support/std", "frame-system/std", "pallet-assets/std", "pallet-balances/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-assets/try-runtime", + "pallet-balances/try-runtime", + "sp-runtime/try-runtime", ] -try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/collab-ai/aiusd-convertor/src/mock.rs b/parachain/pallets/collab-ai/aiusd-convertor/src/mock.rs index 9f6b077f50..f1ce8085ee 100644 --- a/parachain/pallets/collab-ai/aiusd-convertor/src/mock.rs +++ b/parachain/pallets/collab-ai/aiusd-convertor/src/mock.rs @@ -16,15 +16,15 @@ use crate as pallet_aiusd; use frame_support::{ - assert_ok, construct_runtime, parameter_types, + assert_ok, construct_runtime, derive_impl, parameter_types, traits::{ tokens::fungibles::{Inspect, Mutate}, - AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, Everything, + AsEnsureOriginWithArg, ConstU128, ConstU32, }, }; -use sp_core::{Get, H256}; +use sp_core::Get; use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, + traits::{IdentifyAccount, IdentityLookup, Verify}, AccountId32, BuildStorage, }; @@ -44,34 +44,26 @@ construct_runtime!( ); parameter_types! { - pub const BlockHashCount: u64 = 250; pub const AIUSDAssetId: u32 = 1; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; + type Lookup = IdentityLookup; +} + +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] +impl pallet_balances::Config for Test { + type Balance = Balance; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; } impl pallet_assets::Config for Test { @@ -97,22 +89,6 @@ impl pallet_assets::Config for Test { type BenchmarkHelper = (); } -impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<1>; - type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); -} - pub struct ConvertingPool; impl Get for ConvertingPool { fn get() -> AccountId32 { diff --git a/parachain/pallets/collab-ai/common/Cargo.toml b/parachain/pallets/collab-ai/common/Cargo.toml index ee6e02883d..87d0cbeab6 100644 --- a/parachain/pallets/collab-ai/common/Cargo.toml +++ b/parachain/pallets/collab-ai/common/Cargo.toml @@ -21,14 +21,19 @@ default = ["std"] runtime-benchmarks = [ "frame-support/runtime-benchmarks", "sp-runtime/runtime-benchmarks", + "frame-system/runtime-benchmarks", ] std = [ - "scale-info/std", - "parity-scale-codec/std", "frame-support/std", "frame-system/std", + "parity-scale-codec/std", + "scale-info/std", "sp-core/std", "sp-runtime/std", "sp-std/std", ] -try-runtime = ["frame-support/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime", +] diff --git a/parachain/pallets/collab-ai/curator/Cargo.toml b/parachain/pallets/collab-ai/curator/Cargo.toml index a05b731fe6..afdce8488a 100644 --- a/parachain/pallets/collab-ai/curator/Cargo.toml +++ b/parachain/pallets/collab-ai/curator/Cargo.toml @@ -30,15 +30,25 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-collab-ai-common/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", "frame-support/std", "frame-system/std", - "pallet-collab-ai-common/std", "pallet-balances/std", + "pallet-collab-ai-common/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-runtime/std", + "sp-std/std", + "sp-core/std", + "sp-io/std", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-balances/try-runtime", + "pallet-collab-ai-common/try-runtime", + "sp-runtime/try-runtime", ] -try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/collab-ai/curator/src/mock.rs b/parachain/pallets/collab-ai/curator/src/mock.rs index d13eac3d76..82f3847751 100644 --- a/parachain/pallets/collab-ai/curator/src/mock.rs +++ b/parachain/pallets/collab-ai/curator/src/mock.rs @@ -15,17 +15,9 @@ // along with Litentry. If not, see . use crate as pallet_curator; -use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU16, ConstU32, Everything}, -}; -use sp_core::H256; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - AccountId32, -}; +use frame_support::{construct_runtime, derive_impl, parameter_types}; +use sp_runtime::{traits::IdentityLookup, AccountId32}; // use sp_io::TestExternalities; -use frame_support::traits::ConstU128; use sp_runtime::BuildStorage; // Define mock runtime types @@ -42,54 +34,26 @@ construct_runtime!( ); parameter_types! { - pub const BlockHashCount: u64 = 250; pub const MinimumCuratorDeposit: Balance = 10; } -// Implement frame_system config trait for mock runtime. +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - // type BlockNumber = u64; // Add this - type Hash = H256; - type Block = frame_system::mocking::MockBlock; // Add this - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - // type Header = sp_runtime::generic::Header; // Add this - type BlockHashCount = BlockHashCount; - type Version = (); // Add this - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); // Add this - type MaxConsumers = ConstU32<16>; // Add this + type Lookup = IdentityLookup; } -// Implement pallet_balances config trait for mock runtime. +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<1>; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } // Implement pallet_curator config trait for mock runtime. diff --git a/parachain/pallets/collab-ai/guardian/Cargo.toml b/parachain/pallets/collab-ai/guardian/Cargo.toml index 5b6f11e88a..bc76035f0b 100644 --- a/parachain/pallets/collab-ai/guardian/Cargo.toml +++ b/parachain/pallets/collab-ai/guardian/Cargo.toml @@ -28,15 +28,25 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-collab-ai-common/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", "frame-support/std", "frame-system/std", - "pallet-collab-ai-common/std", "pallet-balances/std", + "pallet-collab-ai-common/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-runtime/std", + "sp-std/std", + "sp-core/std", + "sp-io/std", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-balances/try-runtime", + "pallet-collab-ai-common/try-runtime", + "sp-runtime/try-runtime", ] -try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/collab-ai/guardian/src/mock.rs b/parachain/pallets/collab-ai/guardian/src/mock.rs index aba4e9bbff..8dbf91a431 100644 --- a/parachain/pallets/collab-ai/guardian/src/mock.rs +++ b/parachain/pallets/collab-ai/guardian/src/mock.rs @@ -15,17 +15,9 @@ // along with Litentry. If not, see . use crate as pallet_guardian; -use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU16, ConstU32, Everything}, -}; -use sp_core::H256; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - AccountId32, -}; +use frame_support::{construct_runtime, derive_impl, parameter_types}; +use sp_runtime::{traits::IdentityLookup, AccountId32}; // use sp_io::TestExternalities; -use frame_support::traits::ConstU128; use sp_runtime::BuildStorage; // Define mock runtime types @@ -42,54 +34,26 @@ construct_runtime!( ); parameter_types! { - pub const BlockHashCount: u64 = 250; pub const MinimumGuardianDeposit: Balance = 10; } -// Implement frame_system config trait for mock runtime. +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - // type BlockNumber = u64; // Add this - type Hash = H256; - type Block = frame_system::mocking::MockBlock; // Add this - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - // type Header = sp_runtime::generic::Header; // Add this - type BlockHashCount = BlockHashCount; - type Version = (); // Add this - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); // Add this - type MaxConsumers = ConstU32<16>; // Add this + type Lookup = IdentityLookup; } -// Implement pallet_balances config trait for mock runtime. +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<1>; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxLocks = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } // Implement pallet_guardian config trait for mock runtime. diff --git a/parachain/pallets/collab-ai/investing-pool/Cargo.toml b/parachain/pallets/collab-ai/investing-pool/Cargo.toml index fe3aab37ee..ede94b8be9 100644 --- a/parachain/pallets/collab-ai/investing-pool/Cargo.toml +++ b/parachain/pallets/collab-ai/investing-pool/Cargo.toml @@ -33,28 +33,34 @@ pallet-balances = { workspace = true } [features] default = ["std"] std = [ - "parity-scale-codec/std", - "serde/std", "frame-benchmarking?/std", "frame-support/std", "frame-system/std", + "pallet-balances/std", + "pallet-collab-ai-common/std", + "parity-scale-codec/std", "scale-info/std", + "serde/std", "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", - "pallet-balances/std", - "pallet-collab-ai-common/std", + "pallet-assets/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", "pallet-collab-ai-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "sp-runtime/try-runtime", + "pallet-assets/try-runtime", + "pallet-balances/try-runtime", + "pallet-collab-ai-common/try-runtime", ] diff --git a/parachain/pallets/collab-ai/pool-proposal/Cargo.toml b/parachain/pallets/collab-ai/pool-proposal/Cargo.toml index ca1ab5a31b..432dac1ca6 100644 --- a/parachain/pallets/collab-ai/pool-proposal/Cargo.toml +++ b/parachain/pallets/collab-ai/pool-proposal/Cargo.toml @@ -15,7 +15,6 @@ scale-info = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } -orml-utilities = { workspace = true } pallet-multisig = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -34,16 +33,31 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-collab-ai-common/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", "frame-support/std", "frame-system/std", - "orml-utilities/std", "pallet-collab-ai-common/std", "pallet-multisig/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-runtime/std", + "sp-std/std", + "pallet-assets/std", + "pallet-balances/std", + "sp-core/std", + "sp-io/std", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-assets/try-runtime", + "pallet-balances/try-runtime", + "pallet-collab-ai-common/try-runtime", + "pallet-multisig/try-runtime", + "sp-runtime/try-runtime", ] -try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/collab-ai/pool-proposal/src/lib.rs b/parachain/pallets/collab-ai/pool-proposal/src/lib.rs index 99ebdd09f6..b67f809f9a 100644 --- a/parachain/pallets/collab-ai/pool-proposal/src/lib.rs +++ b/parachain/pallets/collab-ai/pool-proposal/src/lib.rs @@ -24,6 +24,7 @@ //! The Pool Proposal handles the administration of proposed investing pool and pre-investing. #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::type_complexity)] +mod ordered_set; pub mod types; use frame_support::{ @@ -45,7 +46,7 @@ use frame_system::{ pallet_prelude::{BlockNumberFor, OriginFor}, RawOrigin, }; -use orml_utilities::OrderedSet; +use ordered_set::OrderedSet; pub use pallet::*; use pallet_collab_ai_common::*; use sp_runtime::{ diff --git a/parachain/pallets/collab-ai/pool-proposal/src/mock.rs b/parachain/pallets/collab-ai/pool-proposal/src/mock.rs index 709862f087..d3ad162816 100644 --- a/parachain/pallets/collab-ai/pool-proposal/src/mock.rs +++ b/parachain/pallets/collab-ai/pool-proposal/src/mock.rs @@ -16,14 +16,12 @@ use crate as pallet_pool_proposal; use frame_support::{ - assert_ok, construct_runtime, parameter_types, - traits::{ - AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, Everything, OnFinalize, OnInitialize, - }, + assert_ok, construct_runtime, derive_impl, parameter_types, + traits::{AsEnsureOriginWithArg, ConstU128, ConstU32, OnFinalize, OnInitialize}, }; -use sp_core::{Get, H256}; +use sp_core::Get; use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, + traits::{IdentifyAccount, IdentityLookup, Verify}, AccountId32, BuildStorage, DispatchResult, }; @@ -46,7 +44,6 @@ construct_runtime!( ); parameter_types! { - pub const BlockHashCount: u64 = 250; pub const AIUSDAssetId: u32 = 1; pub const OfficialGapPeriod: u32 = 10; pub const MinimumProposalLastTime: u32 = 10; @@ -62,6 +59,25 @@ parameter_types! { pub const StandardEpoch: u32 = 10; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] +impl frame_system::Config for Test { + type AccountId = AccountId; + type Block = frame_system::mocking::MockBlock; + type AccountData = pallet_balances::AccountData; + type Lookup = IdentityLookup; +} + +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] +impl pallet_balances::Config for Test { + type Balance = Balance; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; +} + impl pallet_multisig::Config for Test { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; @@ -72,32 +88,6 @@ impl pallet_multisig::Config for Test { type WeightInfo = (); } -impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; -} - impl pallet_assets::Config for Test { type RuntimeEvent = RuntimeEvent; type Balance = Balance; @@ -121,22 +111,6 @@ impl pallet_assets::Config for Test { type BenchmarkHelper = (); } -impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<1>; - type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); -} - pub struct PreInvestingPool; impl Get for PreInvestingPool { fn get() -> AccountId32 { diff --git a/parachain/pallets/collab-ai/pool-proposal/src/ordered_set.rs b/parachain/pallets/collab-ai/pool-proposal/src/ordered_set.rs new file mode 100644 index 0000000000..0b9eb5d7c6 --- /dev/null +++ b/parachain/pallets/collab-ai/pool-proposal/src/ordered_set.rs @@ -0,0 +1,93 @@ +// Copied from ORML: https://github.com/open-web3-stack/open-runtime-module-library + +use frame_support::{traits::Get, BoundedVec, CloneNoBound, DefaultNoBound, PartialEqNoBound}; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; +#[cfg(feature = "std")] +use sp_std::{fmt, prelude::*}; + +/// An ordered set backed by `BoundedVec` +#[derive( + PartialEqNoBound, Eq, Encode, Decode, DefaultNoBound, CloneNoBound, TypeInfo, MaxEncodedLen, +)] +#[codec(mel_bound())] +#[scale_info(skip_type_params(S))] +pub struct OrderedSet< + T: Ord + Encode + Decode + MaxEncodedLen + Clone + Eq + PartialEq, + S: Get, +>(pub BoundedVec); + +impl> + OrderedSet +{ + /// Create a new empty set + pub fn new() -> Self { + Self(BoundedVec::default()) + } + + /// Create a set from a `Vec`. + /// `v` will be sorted and dedup first. + pub fn from(bv: BoundedVec) -> Self { + let mut v = bv.into_inner(); + v.sort(); + v.dedup(); + + Self::from_sorted_set(v.try_into().map_err(|_| ()).expect("Did not add any values")) + } + + /// Create a set from a `Vec`. + /// Assume `v` is sorted and contain unique elements. + pub fn from_sorted_set(bv: BoundedVec) -> Self { + Self(bv) + } + + /// Insert an element. + /// Return true if insertion happened. + pub fn insert(&mut self, value: T) -> bool { + match self.0.binary_search(&value) { + Ok(_) => false, + Err(loc) => self.0.try_insert(loc, value).is_ok(), + } + } + + /// Remove an element. + /// Return true if removal happened. + pub fn remove(&mut self, value: &T) -> bool { + match self.0.binary_search(value) { + Ok(loc) => { + self.0.remove(loc); + true + }, + Err(_) => false, + } + } + + /// Return if the set contains `value` + pub fn contains(&self, value: &T) -> bool { + self.0.binary_search(value).is_ok() + } + + /// Clear the set + pub fn clear(&mut self) { + self.0 = BoundedVec::default(); + } +} + +impl> + From> for OrderedSet +{ + fn from(v: BoundedVec) -> Self { + Self::from(v) + } +} + +#[cfg(feature = "std")] +impl fmt::Debug for OrderedSet +where + T: Ord + Encode + Decode + MaxEncodedLen + Clone + Eq + PartialEq + fmt::Debug, + S: Get, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_tuple("OrderedSet").field(&self.0).finish() + } +} diff --git a/parachain/pallets/evm-address/Cargo.toml b/parachain/pallets/evm-address/Cargo.toml index 6fd0db9840..adf6ebb352 100644 --- a/parachain/pallets/evm-address/Cargo.toml +++ b/parachain/pallets/evm-address/Cargo.toml @@ -35,20 +35,18 @@ runtime-benchmarks = [ "pallet-ethereum/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-core/std", - "sp-io/std", - "sp-std/std", - "sp-io/std", - "sp-core/std", - "sp-runtime/std", + "fp-evm/std", "frame-support/std", "frame-system/std", "pallet-balances/std", - "pallet-timestamp/std", "pallet-ethereum/std", "pallet-evm/std", - "fp-evm/std", + "pallet-timestamp/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/evm-address/src/mock.rs b/parachain/pallets/evm-address/src/mock.rs index ca2b1a10f4..0a016927be 100644 --- a/parachain/pallets/evm-address/src/mock.rs +++ b/parachain/pallets/evm-address/src/mock.rs @@ -14,11 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -#![cfg(test)] use crate as pallet_evm_address; use fp_evm::GenesisAccount; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::{ConstU32, FindAuthor}, weights::Weight, ConsensusEngineId, @@ -26,9 +25,9 @@ use frame_support::{ use frame_system::RawOrigin; use hex_literal::hex; use parity_scale_codec::Encode; -use sp_core::{H160, H256, U256}; +use sp_core::{H160, U256}; use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, + traits::{IdentifyAccount, IdentityLookup, Verify}, BuildStorage, MultiSignature, }; use sp_std::vec; @@ -38,7 +37,6 @@ pub type Balance = u128; pub type Signature = MultiSignature; pub type AccountId = <::Signer as IdentifyAccount>::AccountId; -// Configure a mock runtime to test the pallet. frame_support::construct_runtime!( pub enum Test { @@ -51,53 +49,23 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { @@ -221,6 +189,7 @@ impl pallet_evm::Config for Test { type FindAuthor = FindAuthorTruncated; type GasLimitPovSizeRatio = GasLimitPovSizeRatio; type WeightInfo = (); + type SuicideQuickClearLimit = ConstU32<0>; } use pallet_ethereum::PostLogContent; diff --git a/parachain/pallets/evm-address/src/tests.rs b/parachain/pallets/evm-address/src/tests.rs index f54bd0a5db..c937951b07 100644 --- a/parachain/pallets/evm-address/src/tests.rs +++ b/parachain/pallets/evm-address/src/tests.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -#![cfg(test)] use super::mock::*; use frame_support::assert_ok; use hex_literal::hex; diff --git a/parachain/pallets/evm-assertions/Cargo.toml b/parachain/pallets/evm-assertions/Cargo.toml index 23eea55867..a859bcac7f 100644 --- a/parachain/pallets/evm-assertions/Cargo.toml +++ b/parachain/pallets/evm-assertions/Cargo.toml @@ -28,15 +28,14 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", ] std = [ + "frame-support/std", + "frame-system/std", + "pallet-balances/std", "parity-scale-codec/std", "scale-info/std", - "sp-std/std", - "sp-io/std", - "sp-core/std", - "sp-runtime/std", "sp-core/std", "sp-io/std", - "frame-support/std", - "frame-system/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/evm-assertions/src/mock.rs b/parachain/pallets/evm-assertions/src/mock.rs index 7c92848169..4b09c34283 100644 --- a/parachain/pallets/evm-assertions/src/mock.rs +++ b/parachain/pallets/evm-assertions/src/mock.rs @@ -14,12 +14,11 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -#![cfg(test)] use crate as pallet_evm_assertions; -use frame_support::{parameter_types, weights::Weight}; -use sp_core::{H160, H256, U256}; +use frame_support::{derive_impl, parameter_types, weights::Weight}; +use sp_core::{H160, U256}; use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, + traits::{IdentifyAccount, IdentityLookup, Verify}, BuildStorage, MultiSignature, }; @@ -37,33 +36,12 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } parameter_types! { diff --git a/parachain/pallets/extrinsic-filter/Cargo.toml b/parachain/pallets/extrinsic-filter/Cargo.toml index 0a4c0b9cd8..8edf24029b 100644 --- a/parachain/pallets/extrinsic-filter/Cargo.toml +++ b/parachain/pallets/extrinsic-filter/Cargo.toml @@ -8,6 +8,9 @@ name = 'pallet-extrinsic-filter' repository = 'https://github.com/litentry/litentry-parachain' version = '0.1.0' +[lints] +workspace = true + [dependencies] parity-scale-codec = { workspace = true } scale-info = { workspace = true } @@ -32,16 +35,16 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", ] std = [ + "frame-benchmarking?/std", + "frame-support/std", + "frame-system/std", + "pallet-balances/std", + "pallet-timestamp/std", "parity-scale-codec/std", "scale-info/std", "sp-core/std", "sp-io/std", - "sp-std/std", "sp-runtime/std", - "sp-io/std", - "sp-core/std", - "frame-support/std", - "frame-system/std", - "frame-benchmarking?/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/extrinsic-filter/src/lib.rs b/parachain/pallets/extrinsic-filter/src/lib.rs index 3193820da0..b5615772d7 100644 --- a/parachain/pallets/extrinsic-filter/src/lib.rs +++ b/parachain/pallets/extrinsic-filter/src/lib.rs @@ -19,7 +19,6 @@ //! Inspired by: //! - Acala `transaction-pause` //! - Moonbeam `maintenance-mode` -//! implementations. //! //! This pallet is used to bind to frame_system::BaseCallFilter in runtime, //! aiming to provide 3 modes: @@ -50,7 +49,7 @@ //! 1. block_extrinsics(pallet_A, fn_A) //! and then //! 2. unlock_extrinsics(pallet_A, None) -//! will not work, and vice versa. +//! will not work, and vice versa. //! //! The reasons: //! - simplicity diff --git a/parachain/pallets/extrinsic-filter/src/mock.rs b/parachain/pallets/extrinsic-filter/src/mock.rs index 035224b850..8ad500474d 100644 --- a/parachain/pallets/extrinsic-filter/src/mock.rs +++ b/parachain/pallets/extrinsic-filter/src/mock.rs @@ -16,15 +16,11 @@ use crate as pallet_extrinsic_filter; use frame_support::{ - parameter_types, + derive_impl, parameter_types, traits::{ConstU64, Contains, Everything}, }; use frame_system::EnsureRoot; -use sp_core::H256; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, -}; +use sp_runtime::BuildStorage; pub type Balance = u128; @@ -39,61 +35,22 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { type BaseCallFilter = ExtrinsicFilter; - type BlockWeights = (); - type BlockLength = (); type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -impl pallet_timestamp::Config for Test { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<10000>; - type WeightInfo = (); } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } pub struct SafeModeFilter; @@ -103,6 +60,13 @@ impl Contains for SafeModeFilter { } } +impl pallet_timestamp::Config for Test { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = ConstU64<10000>; + type WeightInfo = (); +} + pub struct NormalModeFilter; impl Contains for NormalModeFilter { fn contains(call: &RuntimeCall) -> bool { diff --git a/parachain/pallets/extrinsic-filter/src/tests.rs b/parachain/pallets/extrinsic-filter/src/tests.rs index 109dd8e711..76e85006ca 100644 --- a/parachain/pallets/extrinsic-filter/src/tests.rs +++ b/parachain/pallets/extrinsic-filter/src/tests.rs @@ -51,10 +51,13 @@ fn set_mode_should_not_clear_blocked_extrinsics() { assert_ok!(ExtrinsicFilter::block_extrinsics( RuntimeOrigin::root(), b"Balances".to_vec(), - Some(b"transfer".to_vec()) + Some(b"transfer_keep_alive".to_vec()) )); assert_eq!( - ExtrinsicFilter::blocked_extrinsics((b"Balances".to_vec(), b"transfer".to_vec())), + ExtrinsicFilter::blocked_extrinsics(( + b"Balances".to_vec(), + b"transfer_keep_alive".to_vec() + )), Some(()) ); @@ -62,7 +65,10 @@ fn set_mode_should_not_clear_blocked_extrinsics() { assert_eq!(ExtrinsicFilter::mode(), crate::OperationalMode::Test); // previously blocked extrinsics are still there assert_eq!( - ExtrinsicFilter::blocked_extrinsics((b"Balances".to_vec(), b"transfer".to_vec())), + ExtrinsicFilter::blocked_extrinsics(( + b"Balances".to_vec(), + b"transfer_keep_alive".to_vec() + )), Some(()) ); }); @@ -84,7 +90,8 @@ fn safe_mode_works() { ); // SafeModeFilter disallows balance calls - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered @@ -108,7 +115,8 @@ fn normal_mode_works() { assert_ok!(call.dispatch(RuntimeOrigin::none())); // NormalModeFilter disallows balance calls - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered @@ -129,7 +137,8 @@ fn test_mode_works() { assert_ok!(call.dispatch(RuntimeOrigin::none())); // TestModeFilter allows balance calls - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_ok!(call.dispatch(RuntimeOrigin::signed(1))); assert_eq!(Balances::free_balance(2), 10); }); @@ -145,28 +154,26 @@ fn block_single_extrinsic_works() { assert_ok!(ExtrinsicFilter::block_extrinsics( RuntimeOrigin::root(), b"Balances".to_vec(), - Some(b"transfer".to_vec()) + Some(b"transfer_keep_alive".to_vec()) )); System::assert_last_event(RuntimeEvent::ExtrinsicFilter(crate::Event::ExtrinsicsBlocked { pallet_name_bytes: b"Balances".to_vec(), - function_name_bytes: Some(b"transfer".to_vec()), + function_name_bytes: Some(b"transfer_keep_alive".to_vec()), })); assert_eq!( - ExtrinsicFilter::blocked_extrinsics((b"Balances".to_vec(), b"transfer".to_vec())), + ExtrinsicFilter::blocked_extrinsics(( + b"Balances".to_vec(), + b"transfer_keep_alive".to_vec() + )), Some(()) ); // try to dispatch Balances.transfer should fail - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered ); - - // however, Balances.transfer_keep_alive should work - let call: RuntimeCall = - pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); - assert_ok!(call.dispatch(RuntimeOrigin::signed(1))); - assert_eq!(Balances::free_balance(2), 10); }); } @@ -191,7 +198,8 @@ fn block_whole_pallet_works() { Some(()) ); // try to dispatch Balances.transfer should fail - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered @@ -218,18 +226,22 @@ fn unblock_single_extrinsic_works() { assert_ok!(ExtrinsicFilter::block_extrinsics( RuntimeOrigin::root(), b"Balances".to_vec(), - Some(b"transfer".to_vec()) + Some(b"transfer_keep_alive".to_vec()) )); System::assert_last_event(RuntimeEvent::ExtrinsicFilter(crate::Event::ExtrinsicsBlocked { pallet_name_bytes: b"Balances".to_vec(), - function_name_bytes: Some(b"transfer".to_vec()), + function_name_bytes: Some(b"transfer_keep_alive".to_vec()), })); assert_eq!( - ExtrinsicFilter::blocked_extrinsics((b"Balances".to_vec(), b"transfer".to_vec())), + ExtrinsicFilter::blocked_extrinsics(( + b"Balances".to_vec(), + b"transfer_keep_alive".to_vec() + )), Some(()) ); // try to dispatch Balances.transfer should fail - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered @@ -239,20 +251,24 @@ fn unblock_single_extrinsic_works() { assert_ok!(ExtrinsicFilter::unblock_extrinsics( RuntimeOrigin::root(), b"Balances".to_vec(), - Some(b"transfer".to_vec()) + Some(b"transfer_keep_alive".to_vec()) )); System::assert_last_event(RuntimeEvent::ExtrinsicFilter( crate::Event::ExtrinsicsUnblocked { pallet_name_bytes: b"Balances".to_vec(), - function_name_bytes: Some(b"transfer".to_vec()), + function_name_bytes: Some(b"transfer_keep_alive".to_vec()), }, )); assert_eq!( - ExtrinsicFilter::blocked_extrinsics((b"Balances".to_vec(), b"transfer".to_vec())), + ExtrinsicFilter::blocked_extrinsics(( + b"Balances".to_vec(), + b"transfer_keep_alive".to_vec() + )), None ); - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_ok!(call.dispatch(RuntimeOrigin::signed(1))); assert_eq!(Balances::free_balance(2), 10); }); @@ -279,7 +295,8 @@ fn unblock_whole_pallet_works() { Some(()) ); // try to dispatch Balances.transfer should fail - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered @@ -311,7 +328,8 @@ fn unblock_whole_pallet_works() { None ); // try to dispatch Balances.transfer should work - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_ok!(call.dispatch(RuntimeOrigin::signed(1))); assert_eq!(Balances::free_balance(2), 10); @@ -336,11 +354,12 @@ fn whitelisting_fails() { ExtrinsicFilter::unblock_extrinsics( RuntimeOrigin::root(), b"Balances".to_vec(), - Some(b"transfer".to_vec()) + Some(b"transfer_keep_alive".to_vec()) ), Error::::ExtrinsicNotBlocked ); - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered @@ -380,20 +399,21 @@ fn block_more_than_once_fails() { assert_ok!(ExtrinsicFilter::block_extrinsics( RuntimeOrigin::root(), b"Balances".to_vec(), - Some(b"transfer".to_vec()), + Some(b"transfer_keep_alive".to_vec()), )); assert_noop!( ExtrinsicFilter::block_extrinsics( RuntimeOrigin::root(), b"Balances".to_vec(), - Some(b"transfer".to_vec()), + Some(b"transfer_keep_alive".to_vec()), ), Error::::ExtrinsicAlreadyBlocked ); // Balances.transfer should be blocked though - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered @@ -410,7 +430,7 @@ fn unpaired_block_unblock_fails() { assert_ok!(ExtrinsicFilter::block_extrinsics( RuntimeOrigin::root(), b"Balances".to_vec(), - Some(b"transfer".to_vec()), + Some(b"transfer_keep_alive".to_vec()), )); assert_noop!( ExtrinsicFilter::unblock_extrinsics(RuntimeOrigin::root(), b"Balances".to_vec(), None), @@ -418,14 +438,15 @@ fn unpaired_block_unblock_fails() { ); // Balances.transfer should still be blocked - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered ); // clear the storage - let _ = crate::BlockedExtrinsics::::clear(u32::max_value(), None); + let _ = crate::BlockedExtrinsics::::clear(u32::MAX, None); // block the whole pallet and unblock a single extrinsic should fail assert_ok!(ExtrinsicFilter::block_extrinsics( @@ -443,7 +464,8 @@ fn unpaired_block_unblock_fails() { ); // Balances.transfer should still be blocked - let call: RuntimeCall = pallet_balances::Call::transfer { dest: 2, value: 10 }.into(); + let call: RuntimeCall = + pallet_balances::Call::transfer_keep_alive { dest: 2, value: 10 }.into(); assert_noop!( call.dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered diff --git a/parachain/pallets/group/Cargo.toml b/parachain/pallets/group/Cargo.toml index 3c3800cccc..0fc7fd1787 100644 --- a/parachain/pallets/group/Cargo.toml +++ b/parachain/pallets/group/Cargo.toml @@ -27,15 +27,15 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", - "sp-io/std", - "sp-core/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "frame-benchmarking?/std", "pallet-balances/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/group/src/mock.rs b/parachain/pallets/group/src/mock.rs index 8ee433f002..47b808d84e 100644 --- a/parachain/pallets/group/src/mock.rs +++ b/parachain/pallets/group/src/mock.rs @@ -14,14 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -#![cfg(test)] - -use frame_support::{ord_parameter_types, parameter_types}; -use sp_core::H256; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, -}; +use frame_support::{derive_impl, parameter_types}; +use sp_runtime::BuildStorage; use crate::{self as pallet_group, Config}; @@ -37,57 +31,21 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u32 = 250; -} +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -ord_parameter_types! { - pub const One: u64 = 1; } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } impl Config for Test { diff --git a/parachain/pallets/group/src/tests.rs b/parachain/pallets/group/src/tests.rs index 50645d825c..6b05914930 100644 --- a/parachain/pallets/group/src/tests.rs +++ b/parachain/pallets/group/src/tests.rs @@ -14,8 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -#![cfg(test)] - use super::{ mock::{ assert_events, new_test_ext, RuntimeEvent, RuntimeOrigin, Test, Whitelist, ACCOUNT_A, diff --git a/parachain/pallets/identity-management/Cargo.toml b/parachain/pallets/identity-management/Cargo.toml index 82917f6882..8f81228741 100644 --- a/parachain/pallets/identity-management/Cargo.toml +++ b/parachain/pallets/identity-management/Cargo.toml @@ -34,20 +34,24 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", "pallet-teebag/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "scale-info/std", - "sp-std/std", - "sp-runtime/std", - "sp-io/std", - "sp-core/std", + "core-primitives/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "frame-benchmarking?/std", - "core-primitives/std", + "pallet-balances/std", + "pallet-group/std", "pallet-teebag/std", + "pallet-timestamp/std", + "pallet-utility/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/identity-management/src/mock.rs b/parachain/pallets/identity-management/src/mock.rs index 48cfa41cfd..e642753d22 100644 --- a/parachain/pallets/identity-management/src/mock.rs +++ b/parachain/pallets/identity-management/src/mock.rs @@ -14,19 +14,16 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -#![cfg(test)] - use crate as pallet_identity_management; use frame_support::{ - assert_ok, + assert_ok, derive_impl, pallet_prelude::EnsureOrigin, parameter_types, - traits::{ConstU128, ConstU16, ConstU32, ConstU64, Everything}, + traits::{ConstU32, ConstU64}, }; use frame_system::EnsureRoot; -use sp_core::H256; use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, + traits::{IdentifyAccount, IdentityLookup, Verify}, BuildStorage, }; use sp_std::marker::PhantomData; @@ -87,57 +84,30 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } -impl pallet_timestamp::Config for Test { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<10000>; - type WeightInfo = (); +parameter_types! { + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = ConstU32<50>; - type MaxReserves = (); - type ReserveIdentifier = [u8; 8]; - type Balance = Balance; // the type that is relevant to us - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ConstU128<1>; + type Balance = Balance; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; +} + +impl pallet_timestamp::Config for Test { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = ConstU64<10000>; type WeightInfo = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { diff --git a/parachain/pallets/omni-account/Cargo.toml b/parachain/pallets/omni-account/Cargo.toml index fb5c35df7e..5250fdd584 100644 --- a/parachain/pallets/omni-account/Cargo.toml +++ b/parachain/pallets/omni-account/Cargo.toml @@ -32,21 +32,22 @@ default = ["std"] runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", "pallet-teebag/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", ] std = [ + "core-primitives/std", + "frame-support/std", + "frame-system/std", + "pallet-teebag/std", + "pallet-timestamp/std", + "pallet-utility/std", "parity-scale-codec/std", "scale-info/std", - "sp-std/std", - "sp-io/std", - "sp-core/std", - "sp-runtime/std", "sp-core/std", "sp-io/std", - "frame-support/std", - "frame-system/std", - "pallet-teebag/std", - "core-primitives/std", + "sp-keyring/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/omni-account/runtime-api/Cargo.toml b/parachain/pallets/omni-account/runtime-api/Cargo.toml index 2b3a8f43a6..95549b442a 100644 --- a/parachain/pallets/omni-account/runtime-api/Cargo.toml +++ b/parachain/pallets/omni-account/runtime-api/Cargo.toml @@ -16,8 +16,8 @@ pallet-omni-account = { workspace = true } [features] default = ["std"] std = [ - "parity-scale-codec/std", - "sp-api/std", "core-primitives/std", "pallet-omni-account/std", + "parity-scale-codec/std", + "sp-api/std", ] diff --git a/parachain/pallets/omni-account/src/mock.rs b/parachain/pallets/omni-account/src/mock.rs index 12f1a8791b..b7ab3f457c 100644 --- a/parachain/pallets/omni-account/src/mock.rs +++ b/parachain/pallets/omni-account/src/mock.rs @@ -17,17 +17,17 @@ use crate::{self as pallet_omni_account, Encode, EnsureOmniAccount}; use core_primitives::{DefaultOmniAccountConverter, Identity, MemberAccount}; use frame_support::{ - assert_ok, + assert_ok, derive_impl, pallet_prelude::EnsureOrigin, - traits::{ConstU16, ConstU32, ConstU64, Everything}, + parameter_types, + traits::{ConstU32, ConstU64}, }; use frame_system::EnsureRoot; pub use pallet_teebag::test_util::get_signer; use pallet_teebag::test_util::{TEST8_CERT, TEST8_SIGNER_PUB, TEST8_TIMESTAMP, URL}; -use sp_core::H256; use sp_keyring::AccountKeyring; use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, + traits::{IdentifyAccount, IdentityLookup, Verify}, BuildStorage, }; use sp_std::marker::PhantomData; @@ -35,7 +35,7 @@ use sp_std::marker::PhantomData; pub type Signature = sp_runtime::MultiSignature; pub type AccountId = <::Signer as IdentifyAccount>::AccountId; pub type Balance = u64; -pub type SystemAccountId = ::AccountId; +pub type SystemAccountId = ::AccountId; pub struct EnsureEnclaveSigner(PhantomData); impl EnsureOrigin for EnsureEnclaveSigner @@ -105,7 +105,7 @@ pub fn private_member_account(accounts: Accounts) -> MemberAccount { } frame_support::construct_runtime!( - pub enum TestRuntime + pub enum Test { System: frame_system, Balances: pallet_balances, @@ -116,63 +116,40 @@ frame_support::construct_runtime!( } ); -impl frame_system::Config for TestRuntime { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Hashing = BlakeTwo256; +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] +impl frame_system::Config for Test { type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -impl pallet_balances::Config for TestRuntime { - type MaxLocks = ConstU32<50>; - type MaxReserves = (); - type ReserveIdentifier = [u8; 8]; + type Lookup = IdentityLookup; +} + +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] +impl pallet_balances::Config for Test { type Balance = Balance; - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ConstU64<1>; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } -impl pallet_timestamp::Config for TestRuntime { +impl pallet_timestamp::Config for Test { type Moment = u64; type OnTimestampSet = (); type MinimumPeriod = ConstU64<10000>; type WeightInfo = (); } -impl pallet_utility::Config for TestRuntime { +impl pallet_utility::Config for Test { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = (); } -impl pallet_teebag::Config for TestRuntime { +impl pallet_teebag::Config for Test { type RuntimeEvent = RuntimeEvent; type MomentsPerDay = ConstU64<86_400_000>; // [ms/d] type SetAdminOrigin = EnsureRoot; @@ -181,7 +158,7 @@ impl pallet_teebag::Config for TestRuntime { type WeightInfo = (); } -impl pallet_omni_account::Config for TestRuntime { +impl pallet_omni_account::Config for Test { type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; @@ -196,8 +173,8 @@ pub fn get_tee_signer() -> SystemAccountId { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - pallet_balances::GenesisConfig:: { balances: vec![(alice().native_account, 10)] } + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); + pallet_balances::GenesisConfig:: { balances: vec![(alice().native_account, 10)] } .assimilate_storage(&mut t) .unwrap(); @@ -212,7 +189,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { )); Timestamp::set_timestamp(TEST8_TIMESTAMP); - if !pallet_teebag::EnclaveRegistry::::contains_key(signer.clone()) { + if !pallet_teebag::EnclaveRegistry::::contains_key(signer.clone()) { assert_ok!(Teebag::register_enclave( RuntimeOrigin::signed(signer), core_primitives::WorkerType::Identity, diff --git a/parachain/pallets/omni-account/src/tests.rs b/parachain/pallets/omni-account/src/tests.rs index 6494fd9e63..bddfa5e51b 100644 --- a/parachain/pallets/omni-account/src/tests.rs +++ b/parachain/pallets/omni-account/src/tests.rs @@ -43,7 +43,7 @@ fn request_intent_call(intent: Intent) -> Box { } fn make_balance_transfer_call(dest: AccountId, value: Balance) -> Box { - let call = RuntimeCall::Balances(pallet_balances::Call::transfer { dest, value }); + let call = RuntimeCall::Balances(pallet_balances::Call::transfer_keep_alive { dest, value }); Box::new(call) } @@ -57,7 +57,7 @@ fn create_account_store_works() { alice().identity, )); - let member_accounts: MemberAccounts = + let member_accounts: MemberAccounts = vec![public_member_account(alice())].try_into().unwrap(); System::assert_has_event(Event::AccountStoreCreated { who: alice().omni_account }.into()); @@ -72,7 +72,7 @@ fn create_account_store_works() { // create it the second time will fail assert_noop!( OmniAccount::create_account_store(RuntimeOrigin::signed(tee_signer), alice().identity), - Error::::AccountAlreadyAdded + Error::::AccountAlreadyAdded ); }); } @@ -89,7 +89,7 @@ fn add_account_without_creating_store_fails() { alice().identity.hash(), call, ), - Error::::AccountNotFound + Error::::AccountNotFound ); }); } @@ -102,7 +102,7 @@ fn add_account_works() { let bob = private_member_account(bob()); let charlie = public_member_account(charlie()); - let expected_member_accounts: MemberAccounts = + let expected_member_accounts: MemberAccounts = vec![public_member_account(alice()), bob.clone()].try_into().unwrap(); assert_ok!(OmniAccount::create_account_store( @@ -133,7 +133,7 @@ fn add_account_works() { ); assert_eq!( - AccountStore::::get(alice().omni_account).unwrap(), + AccountStore::::get(alice().omni_account).unwrap(), expected_member_accounts ); @@ -143,12 +143,11 @@ fn add_account_works() { alice().identity.hash(), call, )); - let expected_member_accounts: MemberAccounts = - BoundedVec::truncate_from(vec![ - public_member_account(alice()), - bob.clone(), - charlie.clone(), - ]); + let expected_member_accounts: MemberAccounts = BoundedVec::truncate_from(vec![ + public_member_account(alice()), + bob.clone(), + charlie.clone(), + ]); System::assert_has_event( Event::AccountAdded { who: alice().omni_account, member_account_hash: charlie.hash() } @@ -162,8 +161,8 @@ fn add_account_works() { .into(), ); - assert!(MemberAccountHash::::contains_key(bob.hash())); - assert!(MemberAccountHash::::contains_key(charlie.hash())); + assert!(MemberAccountHash::::contains_key(bob.hash())); + assert!(MemberAccountHash::::contains_key(charlie.hash())); }); } @@ -258,7 +257,7 @@ fn add_account_store_len_limit_reached_works() { alice().identity, )); - let member_accounts: MemberAccounts = vec![ + let member_accounts: MemberAccounts = vec![ public_member_account(alice()), private_member_account(bob()), private_member_account(charlie()), @@ -266,7 +265,7 @@ fn add_account_store_len_limit_reached_works() { .try_into() .unwrap(); - AccountStore::::insert(alice().omni_account, member_accounts); + AccountStore::::insert(alice().omni_account, member_accounts); let call = add_account_call(MemberAccount::Private( vec![7, 8, 9], @@ -344,7 +343,7 @@ fn remove_account_works() { .into(), ); - let expected_member_accounts: MemberAccounts = + let expected_member_accounts: MemberAccounts = BoundedVec::truncate_from(vec![public_member_account(alice())]); System::assert_has_event( @@ -363,10 +362,10 @@ fn remove_account_works() { ); assert_eq!( - AccountStore::::get(alice().omni_account).unwrap(), + AccountStore::::get(alice().omni_account).unwrap(), expected_member_accounts ); - assert!(!MemberAccountHash::::contains_key(bob.hash())); + assert!(!MemberAccountHash::::contains_key(bob.hash())); let call = remove_accounts_call(vec![alice().identity.hash()]); assert_ok!(OmniAccount::dispatch_as_omni_account( @@ -375,7 +374,7 @@ fn remove_account_works() { call, )); - assert!(!AccountStore::::contains_key(alice().omni_account)); + assert!(!AccountStore::::contains_key(alice().omni_account)); }); } @@ -437,10 +436,10 @@ fn publicize_account_works() { call, )); - let expected_member_accounts: MemberAccounts = + let expected_member_accounts: MemberAccounts = vec![public_member_account(alice()), private_bob.clone()].try_into().unwrap(); assert_eq!( - AccountStore::::get(alice().omni_account).unwrap(), + AccountStore::::get(alice().omni_account).unwrap(), expected_member_accounts ); @@ -459,7 +458,7 @@ fn publicize_account_works() { .into(), ); - let expected_member_accounts: MemberAccounts = + let expected_member_accounts: MemberAccounts = BoundedVec::truncate_from(vec![public_member_account(alice()), public_bob]); System::assert_has_event( @@ -478,7 +477,7 @@ fn publicize_account_works() { ); assert_eq!( - AccountStore::::get(alice().omni_account).unwrap(), + AccountStore::::get(alice().omni_account).unwrap(), expected_member_accounts ); }); @@ -497,7 +496,7 @@ fn publicize_account_identity_not_found_works() { alice().identity.hash(), call, ), - Error::::AccountNotFound + Error::::AccountNotFound ); assert_ok!(OmniAccount::create_account_store( @@ -579,7 +578,7 @@ fn dispatch_as_signed_works() { new_test_ext().execute_with(|| { let tee_signer = get_tee_signer(); - assert_ok!(Balances::transfer( + assert_ok!(Balances::transfer_keep_alive( RuntimeOrigin::signed(alice().native_account), alice().omni_account, 6 @@ -641,7 +640,7 @@ fn dispatch_as_signed_account_increments_omni_account_nonce() { new_test_ext().execute_with(|| { let tee_signer = get_tee_signer(); - assert_ok!(Balances::transfer( + assert_ok!(Balances::transfer_keep_alive( RuntimeOrigin::signed(alice().native_account), alice().omni_account, 6 diff --git a/parachain/pallets/parachain-staking/Cargo.toml b/parachain/pallets/parachain-staking/Cargo.toml index 8267625ddf..849eb168d5 100644 --- a/parachain/pallets/parachain-staking/Cargo.toml +++ b/parachain/pallets/parachain-staking/Cargo.toml @@ -8,6 +8,9 @@ name = "pallet-parachain-staking" repository = 'https://github.com/litentry/litentry-parachain' version = "0.1.0" +[lints] +workspace = true + [dependencies] log = { workspace = true } parity-scale-codec = { workspace = true } @@ -37,20 +40,22 @@ sp-io = { workspace = true, features = ["std"] } default = ["std"] runtime-benchmarks = ["frame-benchmarking"] std = [ + "core-primitives/std", "frame-benchmarking?/std", "frame-support/std", "frame-system/std", + "log/std", "pallet-authorship/std", "pallet-balances/std", "pallet-session/std", "parity-scale-codec/std", "scale-info/std", "serde/std", - "core-primitives/std", - "sp-runtime/std", - "sp-std/std", - "sp-staking/std", "sp-core/std", "sp-io/std", + "sp-runtime/std", + "sp-staking/std", + "sp-std/std", + "substrate-fixed/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/parachain-staking/src/lib.rs b/parachain/pallets/parachain-staking/src/lib.rs index bd32efbc79..3e3f0cbe07 100644 --- a/parachain/pallets/parachain-staking/src/lib.rs +++ b/parachain/pallets/parachain-staking/src/lib.rs @@ -57,6 +57,8 @@ #![allow(clippy::useless_conversion)] #![allow(clippy::needless_borrow)] #![allow(clippy::needless_borrows_for_generic_args)] +#![allow(clippy::explicit_counter_loop)] +#![allow(clippy::bool_assert_comparison)] mod auto_compound; pub mod delegation_requests; diff --git a/parachain/pallets/parachain-staking/src/mock.rs b/parachain/pallets/parachain-staking/src/mock.rs index 90becaf1fb..b5dd836a08 100644 --- a/parachain/pallets/parachain-staking/src/mock.rs +++ b/parachain/pallets/parachain-staking/src/mock.rs @@ -16,21 +16,14 @@ //! Inspired by: //! - Moonbeam `pallet_parachain_staking` -//! implementations. -//! Test utilities use crate as pallet_parachain_staking; use crate::{pallet, AwardedPts, Config, InflationInfo, Points, Range}; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, derive_impl, parameter_types, traits::{OnFinalize, OnInitialize}, - weights::Weight, -}; -use sp_core::H256; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, Perbill, Percent, }; +use sp_runtime::{BuildStorage, Perbill, Percent}; pub type AccountId = u64; pub type Balance = u128; @@ -45,57 +38,23 @@ construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); - pub const SS58Prefix: u8 = 42; -} +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxReserves = (); - type ReserveIdentifier = [u8; 4]; - type MaxLocks = (); type Balance = Balance; - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } + parameter_types! { pub const MinBlocksPerRound: u32 = 3; pub const DefaultBlocksPerRound: u32 = 5; @@ -115,6 +74,7 @@ parameter_types! { pub const MinDelegatorStk: u128 = 5; pub const MinDelegation: u128 = 3; } + impl Config for Test { type RuntimeEvent = RuntimeEvent; type Currency = Balances; diff --git a/parachain/pallets/parachain-staking/src/tests.rs b/parachain/pallets/parachain-staking/src/tests.rs index 605b24cf97..22d084b03e 100644 --- a/parachain/pallets/parachain-staking/src/tests.rs +++ b/parachain/pallets/parachain-staking/src/tests.rs @@ -16,7 +16,6 @@ //! Inspired by: //! - Moonbeam `pallet_parachain_staking` -//! implementations. //! # Staking Pallet Unit Tests //! The unit tests are organized by the call they test. The order matches the order @@ -25,8 +24,6 @@ //! 2. Monetary Governance //! 3. Public (Collator, Nominator) //! 4. Miscellaneous Property-Based Tests -#![allow(clippy::explicit_counter_loop)] -#![allow(clippy::bool_assert_comparison)] use crate::{ assert_eq_events, assert_eq_last_events, assert_event_emitted, assert_last_event, diff --git a/parachain/pallets/score-staking/Cargo.toml b/parachain/pallets/score-staking/Cargo.toml index a4869ecd19..0be98e1ba7 100644 --- a/parachain/pallets/score-staking/Cargo.toml +++ b/parachain/pallets/score-staking/Cargo.toml @@ -28,20 +28,21 @@ sp-keyring = { workspace = true } [features] default = ["std"] std = [ - "parity-scale-codec/std", - "serde/std", - "num-integer/std", + "core-primitives/std", "frame-benchmarking?/std", "frame-support/std", "frame-system/std", + "num-integer/std", + "pallet-balances/std", + "pallet-parachain-staking/std", + "parity-scale-codec/std", "scale-info/std", + "serde/std", "sp-core/std", "sp-io/std", + "sp-keyring/std", "sp-runtime/std", "sp-std/std", - "pallet-balances/std", - "core-primitives/std", - "pallet-parachain-staking/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/parachain/pallets/score-staking/src/lib.rs b/parachain/pallets/score-staking/src/lib.rs index ce5f0f813a..a2619c9e77 100644 --- a/parachain/pallets/score-staking/src/lib.rs +++ b/parachain/pallets/score-staking/src/lib.rs @@ -249,7 +249,8 @@ pub mod pallet { // 2. calculate payout let round_reward: BalanceOf = (T::YearlyInflation::get() * T::YearlyIssuance::get() - / YEARS.into()) * Self::round_config().interval.into(); + / YEARS.into()) + * Self::round_config().interval.into(); let round_reward_u128 = round_reward.saturated_into::(); let total_stake_u128 = ParaStaking::Pallet::::total().saturated_into::(); diff --git a/parachain/pallets/score-staking/src/mock.rs b/parachain/pallets/score-staking/src/mock.rs index 2463ac0540..d23f91461c 100644 --- a/parachain/pallets/score-staking/src/mock.rs +++ b/parachain/pallets/score-staking/src/mock.rs @@ -19,7 +19,7 @@ use crate::{ self as pallet_score_staking, AccountIdConvert, Config, Perbill, PoolState, RoundSetting, }; use frame_support::{ - assert_ok, construct_runtime, ord_parameter_types, parameter_types, + assert_ok, construct_runtime, derive_impl, ord_parameter_types, parameter_types, traits::{OnFinalize, OnInitialize}, }; use frame_system::{EnsureRoot, EnsureSignedBy}; @@ -35,6 +35,9 @@ pub type Signature = sp_runtime::MultiSignature; pub type AccountId = <::Signer as IdentifyAccount>::AccountId; pub type Address = sp_runtime::MultiAddress; +pub type Balance = u128; +pub const UNIT: Balance = 1_000_000_000_000; + pub type SignedExtra = ( frame_system::CheckSpecVersion, frame_system::CheckTxVersion, @@ -54,56 +57,23 @@ construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u32 = 250; -} +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } -pub type Balance = u128; -pub const UNIT: Balance = 1_000_000_000_000; - parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { diff --git a/parachain/pallets/teebag/Cargo.toml b/parachain/pallets/teebag/Cargo.toml index 3fc4cf3815..647fc67a2b 100644 --- a/parachain/pallets/teebag/Cargo.toml +++ b/parachain/pallets/teebag/Cargo.toml @@ -16,7 +16,6 @@ hex = { workspace = true } hex-literal = { workspace = true } log = { workspace = true } parity-scale-codec = { workspace = true } -ring = { workspace = true } scale-info = { workspace = true } serde = { workspace = true } serde_json = { workspace = true, features = ["alloc"] } @@ -47,29 +46,31 @@ default = ["std"] std = [ "base64/std", "chrono/std", + "core-primitives/std", "der/std", + "frame-benchmarking?/std", + "frame-support/std", + "frame-system/std", "hex/std", - "serde/std", - "serde_json/std", - "ring/std", - "x509-cert/std", - "parity-scale-codec/std", "log/std", + "pallet-balances?/std", + "pallet-timestamp/std", + "pallet-utility/std", + "parity-scale-codec/std", "scale-info/std", - "webpki/std", - "frame-support/std", - "frame-system/std", + "serde/std", + "serde_json/std", "sp-core/std", "sp-io/std", + "sp-keyring/std", "sp-runtime/std", "sp-std/std", - "pallet-timestamp/std", - "pallet-balances?/std", - "pallet-utility/std", + "webpki/std", + "x509-cert/std", ] runtime-benchmarks = [ - "frame-support/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", "pallet-balances?/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-utility/runtime-benchmarks", diff --git a/parachain/pallets/teebag/src/mock.rs b/parachain/pallets/teebag/src/mock.rs index 6c81c47ecb..4471a4c71a 100644 --- a/parachain/pallets/teebag/src/mock.rs +++ b/parachain/pallets/teebag/src/mock.rs @@ -17,7 +17,7 @@ #![allow(dead_code, unused_imports, const_item_mutation)] use crate::{self as pallet_teebag, OperationalMode}; use frame_support::{ - assert_ok, construct_runtime, parameter_types, + assert_ok, construct_runtime, derive_impl, parameter_types, traits::{OnFinalize, OnInitialize}, }; use frame_system::EnsureRoot; @@ -53,57 +53,27 @@ construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u32 = 250; -} +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } -pub type Balance = u64; - parameter_types! { - pub const ExistentialDeposit: u64 = 1; + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u64; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } +pub type Balance = u64; + parameter_types! { pub const MinimumPeriod: u64 = 6000 / 2; } diff --git a/parachain/pallets/vc-management/Cargo.toml b/parachain/pallets/vc-management/Cargo.toml index 423d323f61..54bd61a4bf 100644 --- a/parachain/pallets/vc-management/Cargo.toml +++ b/parachain/pallets/vc-management/Cargo.toml @@ -40,18 +40,20 @@ runtime-benchmarks = [ "pallet-teebag/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "sp-std/std", - "sp-runtime/std", - "sp-io/std", - "sp-core/std", + "core-primitives/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "frame-benchmarking?/std", - "core-primitives/std", - "pallet-teebag/std", "pallet-balances/std", "pallet-group/std", + "pallet-teebag/std", + "pallet-timestamp/std", "pallet-utility/std", + "parity-scale-codec/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", ] try-runtime = ["frame-support/try-runtime"] diff --git a/parachain/pallets/vc-management/src/mock.rs b/parachain/pallets/vc-management/src/mock.rs index a44105f0a5..ca9ed0de98 100644 --- a/parachain/pallets/vc-management/src/mock.rs +++ b/parachain/pallets/vc-management/src/mock.rs @@ -14,19 +14,16 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -#![cfg(test)] - use crate as pallet_vc_management; use frame_support::{ - assert_ok, + assert_ok, derive_impl, pallet_prelude::EnsureOrigin, parameter_types, - traits::{ConstU128, ConstU16, ConstU32, ConstU64, Everything}, + traits::{ConstU32, ConstU64}, }; use frame_system::EnsureRoot; -use sp_core::H256; use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, + traits::{IdentifyAccount, IdentityLookup, Verify}, BuildStorage, }; use sp_std::marker::PhantomData; @@ -86,57 +83,30 @@ frame_support::construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } -impl pallet_timestamp::Config for Test { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<10000>; - type WeightInfo = (); +parameter_types! { + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<1>; + type Balance = Balance; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; +} + +impl pallet_timestamp::Config for Test { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = ConstU64<10000>; type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } impl pallet_vc_management::Config for Test { diff --git a/parachain/pallets/xcm-asset-manager/Cargo.toml b/parachain/pallets/xcm-asset-manager/Cargo.toml index e3b82ee97c..6550d9c006 100644 --- a/parachain/pallets/xcm-asset-manager/Cargo.toml +++ b/parachain/pallets/xcm-asset-manager/Cargo.toml @@ -4,6 +4,9 @@ edition = "2021" name = "pallet-asset-manager" version = "0.1.0" +[lints] +workspace = true + [dependencies] parity-scale-codec = { workspace = true } scale-info = { workspace = true } @@ -11,7 +14,6 @@ scale-info = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } -orml-traits = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -24,16 +26,17 @@ sp-core = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", + "pallet-balances/std", "parity-scale-codec/std", - "orml-traits/std", "scale-info/std", + "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", "xcm/std", - "frame-benchmarking?/std", ] runtime-benchmarks = [ diff --git a/parachain/pallets/xcm-asset-manager/src/lib.rs b/parachain/pallets/xcm-asset-manager/src/lib.rs index 100420e2bf..9444c5ee9e 100644 --- a/parachain/pallets/xcm-asset-manager/src/lib.rs +++ b/parachain/pallets/xcm-asset-manager/src/lib.rs @@ -19,12 +19,12 @@ //! implementations. // (1) The local asset support is removed. This pallet is for managing Xcm foreign asset -// specifically. (2) The mapping of AssetId and AssetType is now capable of manual choosen -// (3) Compatibility to orml_token instead of pallet_assets +// specifically. +// (2) The mapping of AssetId and AssetType is now capable of manual choosen +// (3) Compatibility to orml_token instead of pallet_assets => TODO: to be reviewed // (4) Code for destroy asset is removed //! TODO Doc comments for the pallet -//! # Asset Manager Pallet //! //! This pallet allows to register new assets if certain conditions are met //! The main goal of this pallet is to allow Litentry to register XCM assets @@ -53,8 +53,10 @@ #![allow(clippy::needless_borrow)] #![allow(clippy::needless_borrows_for_generic_args)] -#[cfg(feature = "runtime-benchmarks")] -mod benchmarking; +// TODO: fix benchmarking +// #[cfg(feature = "runtime-benchmarks")] +// mod benchmarking; + #[cfg(test)] pub mod mock; #[cfg(test)] @@ -68,7 +70,6 @@ use frame_support::{ transactional, PalletId, }; use frame_system::pallet_prelude::*; -use orml_traits::GetByKey; pub use pallet::*; use parity_scale_codec::HasCompact; use sp_runtime::traits::{AccountIdConversion, AtLeast32BitUnsigned, CheckedAdd, One}; @@ -366,13 +367,13 @@ pub mod pallet { } } - impl GetByKey> for Pallet { - fn get(asset_id: &T::AssetId) -> BalanceOf { - let metadata: AssetMetadata> = - AssetIdMetadata::::get(asset_id).unwrap_or_default(); - metadata.minimal_balance - } - } + // impl GetByKey> for Pallet { + // fn get(asset_id: &T::AssetId) -> BalanceOf { + // let metadata: AssetMetadata> = + // AssetIdMetadata::::get(asset_id).unwrap_or_default(); + // metadata.minimal_balance + // } + // } // AssetManager or other FeeToWeight source should implement this trait // Defines the trait to obtain the units per second of a give asset_type for local execution diff --git a/parachain/pallets/xcm-asset-manager/src/mock.rs b/parachain/pallets/xcm-asset-manager/src/mock.rs index b2f291e841..2581b7b31b 100644 --- a/parachain/pallets/xcm-asset-manager/src/mock.rs +++ b/parachain/pallets/xcm-asset-manager/src/mock.rs @@ -18,14 +18,11 @@ use super::*; use crate as pallet_asset_manager; use parity_scale_codec::{Decode, Encode}; -use frame_support::{construct_runtime, parameter_types}; +use frame_support::{construct_runtime, derive_impl, parameter_types}; use frame_system::EnsureRoot; use scale_info::TypeInfo; use sp_core::{RuntimeDebug, H256}; -use sp_runtime::{ - traits::{BlakeTwo256, Hash as THash, IdentityLookup}, - BuildStorage, -}; +use sp_runtime::{traits::Hash as THash, BuildStorage}; use xcm::latest::prelude::*; pub type AccountId = u64; @@ -40,54 +37,21 @@ construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } pub type AssetId = u32; @@ -96,7 +60,7 @@ pub enum MockAssetType { #[codec(index = 0)] MockAsset(AssetId), #[codec(index = 1)] - Xcm(Box), + Xcm(Box), } impl Default for MockAssetType { @@ -119,8 +83,8 @@ impl From for AssetId { } } -impl From> for MockAssetType { - fn from(location: Option) -> Self { +impl From> for MockAssetType { + fn from(location: Option) -> Self { match location { None => Self::Xcm(Box::default()), Some(multi) => Self::Xcm(Box::new(multi)), @@ -128,8 +92,8 @@ impl From> for MockAssetType { } } -impl From for Option { - fn from(asset: MockAssetType) -> Option { +impl From for Option { + fn from(asset: MockAssetType) -> Option { match asset { MockAssetType::Xcm(location) => Some(*location), _ => None, diff --git a/parachain/precompiles/assets-erc20/Cargo.toml b/parachain/precompiles/assets-erc20/Cargo.toml index b96777d653..49ad876f43 100644 --- a/parachain/precompiles/assets-erc20/Cargo.toml +++ b/parachain/precompiles/assets-erc20/Cargo.toml @@ -34,18 +34,22 @@ std = [ "frame-support/std", "frame-system/std", "pallet-assets/std", - "pallet-evm/std", "pallet-balances/std", + "pallet-evm/std", + "pallet-timestamp/std", + "parity-scale-codec/std", "precompile-utils/std", + "scale-info/std", + "serde/std", + "sha3/std", "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", - "parity-scale-codec/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", "pallet-assets/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", ] diff --git a/parachain/precompiles/assets-erc20/src/mock.rs b/parachain/precompiles/assets-erc20/src/mock.rs index 90ed7b762d..11af7483c1 100644 --- a/parachain/precompiles/assets-erc20/src/mock.rs +++ b/parachain/precompiles/assets-erc20/src/mock.rs @@ -36,9 +36,7 @@ use super::*; use frame_support::{ - construct_runtime, parameter_types, - traits::{AsEnsureOriginWithArg, ConstU64}, - weights::Weight, + construct_runtime, derive_impl, parameter_types, traits::AsEnsureOriginWithArg, weights::Weight, }; use frame_system::EnsureRoot; @@ -48,11 +46,9 @@ use precompile_utils::{ testing::{AddressInPrefixedSet, MockAccount}, }; -use sp_core::{ConstU32, H160, H256}; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, -}; +use sp_core::{ConstU32, ConstU64, H160}; +use sp_runtime::traits::IdentityLookup; +use sp_runtime::BuildStorage; pub type AccountId = MockAccount; pub type AssetId = u128; @@ -84,65 +80,34 @@ impl AddressToAssetId for Runtime { } } -parameter_types! { - pub const BlockHashCount: u64 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } parameter_types! { - pub const MinimumPeriod: u64 = 5; + pub const ExistentialDeposit: Balance = 1; } -impl pallet_timestamp::Config for Runtime { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = MinimumPeriod; - type WeightInfo = (); +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] +impl pallet_balances::Config for Runtime { + type Balance = Balance; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const MinimumPeriod: u64 = 5; } -impl pallet_balances::Config for Runtime { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; +impl pallet_timestamp::Config for Runtime { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = MinimumPeriod; type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { @@ -174,6 +139,7 @@ impl pallet_evm::Config for Runtime { type OnCreate = (); type WeightInfo = (); type GasLimitPovSizeRatio = ConstU64<4>; + type SuicideQuickClearLimit = ConstU32<0>; } // These parameters dont matter much as this will only be called by root with the forced arguments diff --git a/parachain/precompiles/assets-erc20/src/tests.rs b/parachain/precompiles/assets-erc20/src/tests.rs index a52b613ed7..c19313c66b 100644 --- a/parachain/precompiles/assets-erc20/src/tests.rs +++ b/parachain/precompiles/assets-erc20/src/tests.rs @@ -232,7 +232,7 @@ fn mint_is_ok() { LocalAssetId(asset_id), PrecompileCall::mint { to: Address(Bob.into()), value: mint_amount.into() }, ) - .expect_cost(27261756) // 1 weight => 1 gas in mock + .expect_cost(23274756) // 1 weight => 1 gas in mock .expect_log(log3( LocalAssetId(0u128), SELECTOR_LOG_TRANSFER, @@ -315,7 +315,7 @@ fn burn_is_ok() { LocalAssetId(asset_id), PrecompileCall::burn { from: Address(Bob.into()), value: burn_amount.into() }, ) - .expect_cost(34475756) // 1 weight => 1 gas in mock + .expect_cost(31801756) // 1 weight => 1 gas in mock .expect_log(log3( LocalAssetId(0u128), SELECTOR_LOG_TRANSFER, diff --git a/parachain/precompiles/bridge-transfer/Cargo.toml b/parachain/precompiles/bridge-transfer/Cargo.toml index 2b859039c8..d6cabc6a41 100644 --- a/parachain/precompiles/bridge-transfer/Cargo.toml +++ b/parachain/precompiles/bridge-transfer/Cargo.toml @@ -7,30 +7,27 @@ version = '0.1.0' [dependencies] precompile-utils = { workspace = true } -# Substrate frame-support = { workspace = true } frame-system = { workspace = true } pallet-bridge-transfer = { workspace = true } -parity-scale-codec = { workspace = true, features = ["max-encoded-len"] } +parity-scale-codec = { workspace = true } scale-info = { workspace = true, features = ["derive"] } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -# Frontier fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm = { workspace = true } [dev-dependencies] derive_more = { workspace = true } hex-literal = { workspace = true } -libsecp256k1 = { workspace = true } +libsecp256k1 = { workspace = true, features = ["std"] } serde = { workspace = true } sha3 = { workspace = true } precompile-utils = { workspace = true, features = ["std", "testing"] } pallet-timestamp = { workspace = true, features = ["std"] } -parity-scale-codec = { workspace = true, features = ["max-encoded-len", "std"] } -scale-info = { workspace = true, features = ["derive"] } +parity-scale-codec = { workspace = true, features = ["std"] } sp-runtime = { workspace = true, features = ["std"] } [features] @@ -39,10 +36,15 @@ std = [ "fp-evm/std", "frame-support/std", "frame-system/std", + "libsecp256k1/std", "pallet-bridge-transfer/std", "pallet-evm/std", "pallet-timestamp/std", + "parity-scale-codec/std", "precompile-utils/std", + "scale-info/std", + "serde/std", + "sha3/std", "sp-core/std", "sp-runtime/std", "sp-std/std", diff --git a/parachain/precompiles/collab-ai/aiusd-convertor/src/mock.rs b/parachain/precompiles/collab-ai/aiusd-convertor/src/mock.rs index 579b9a374c..c61e507199 100644 --- a/parachain/precompiles/collab-ai/aiusd-convertor/src/mock.rs +++ b/parachain/precompiles/collab-ai/aiusd-convertor/src/mock.rs @@ -16,20 +16,20 @@ use crate::*; use frame_support::{ - assert_ok, construct_runtime, + assert_ok, construct_runtime, derive_impl, pallet_prelude::Weight, parameter_types, traits::{ tokens::fungibles::{Inspect, Mutate}, - AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, ConstU64, Everything, + AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64, }, }; use pallet_aiusd_convertor as pallet_aiusd; use pallet_evm::{EnsureAddressNever, EnsureAddressRoot}; use precompile_utils::precompile_set::{AddressU64, PrecompileAt, PrecompileSetBuilder}; -use sp_core::{Get, H160, H256}; +use sp_core::{Get, H160}; use sp_runtime::{ - traits::{BlakeTwo256, IdentifyAccount, IdentityLookup, Verify}, + traits::{IdentifyAccount, IdentityLookup, Verify}, AccountId32, BuildStorage, }; @@ -51,34 +51,26 @@ construct_runtime!( ); parameter_types! { - pub const BlockHashCount: u64 = 250; pub const AIUSDAssetId: u32 = 1; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; + type Lookup = IdentityLookup; +} + +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] +impl pallet_balances::Config for Test { + type Balance = Balance; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; } impl pallet_assets::Config for Test { @@ -104,21 +96,6 @@ impl pallet_assets::Config for Test { type BenchmarkHelper = (); } -impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<1>; - type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); -} pub struct ConvertingPool; impl Get for ConvertingPool { fn get() -> AccountId32 { @@ -178,6 +155,7 @@ impl pallet_evm::Config for Test { type OnCreate = (); type WeightInfo = (); type GasLimitPovSizeRatio = ConstU64<4>; + type SuicideQuickClearLimit = ConstU32<0>; } parameter_types! { diff --git a/parachain/precompiles/collab-ai/curator/Cargo.toml b/parachain/precompiles/collab-ai/curator/Cargo.toml index 6d35244ddf..10c8a5457a 100644 --- a/parachain/precompiles/collab-ai/curator/Cargo.toml +++ b/parachain/precompiles/collab-ai/curator/Cargo.toml @@ -42,11 +42,11 @@ std = [ "fp-evm/std", "frame-support/std", "frame-system/std", + "pallet-balances/std", "pallet-collab-ai-common/std", "pallet-curator/std", "pallet-evm/std", "pallet-timestamp/std", - "pallet-balances/std", "precompile-utils/std", "sp-core/std", "sp-runtime/std", diff --git a/parachain/precompiles/collab-ai/curator/src/mock.rs b/parachain/precompiles/collab-ai/curator/src/mock.rs index c0688b648a..c2bd1a7a63 100644 --- a/parachain/precompiles/collab-ai/curator/src/mock.rs +++ b/parachain/precompiles/collab-ai/curator/src/mock.rs @@ -16,16 +16,13 @@ use crate::*; use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU128, ConstU16, ConstU32, ConstU64, Everything}, + construct_runtime, derive_impl, parameter_types, + traits::{ConstU32, ConstU64}, }; use pallet_evm::{EnsureAddressNever, EnsureAddressRoot}; use precompile_utils::precompile_set::{AddressU64, PrecompileAt, PrecompileSetBuilder}; -use sp_core::{H160, H256}; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - AccountId32, BuildStorage, -}; +use sp_core::H160; +use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}; pub type Balance = u128; pub type AccountId = AccountId32; @@ -42,50 +39,26 @@ construct_runtime!( ); parameter_types! { - pub const BlockHashCount: u64 = 250; pub const MinimumCuratorDeposit: Balance = 10; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Block = frame_system::mocking::MockBlock; // Add this - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; + type Lookup = IdentityLookup; } +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<1>; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } // Implement pallet_curator config trait for mock runtime. @@ -122,6 +95,7 @@ impl pallet_evm::Config for Test { type OnCreate = (); type WeightInfo = (); type GasLimitPovSizeRatio = ConstU64<4>; + type SuicideQuickClearLimit = ConstU32<0>; } impl pallet_timestamp::Config for Test { diff --git a/parachain/precompiles/collab-ai/guardian/Cargo.toml b/parachain/precompiles/collab-ai/guardian/Cargo.toml index 9c58050c68..340517fc73 100644 --- a/parachain/precompiles/collab-ai/guardian/Cargo.toml +++ b/parachain/precompiles/collab-ai/guardian/Cargo.toml @@ -42,10 +42,10 @@ std = [ "fp-evm/std", "frame-support/std", "frame-system/std", - "pallet-collab-ai-common/std", "pallet-balances/std", - "pallet-guardian/std", + "pallet-collab-ai-common/std", "pallet-evm/std", + "pallet-guardian/std", "pallet-timestamp/std", "precompile-utils/std", "sp-core/std", diff --git a/parachain/precompiles/collab-ai/guardian/src/mock.rs b/parachain/precompiles/collab-ai/guardian/src/mock.rs index 8ba5ee44b9..ca212bdee7 100644 --- a/parachain/precompiles/collab-ai/guardian/src/mock.rs +++ b/parachain/precompiles/collab-ai/guardian/src/mock.rs @@ -16,16 +16,13 @@ use crate::*; use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU128, ConstU16, ConstU32, ConstU64, Everything}, + construct_runtime, derive_impl, parameter_types, + traits::{ConstU32, ConstU64}, }; use pallet_evm::{EnsureAddressNever, EnsureAddressRoot}; use precompile_utils::precompile_set::{AddressU64, PrecompileAt, PrecompileSetBuilder}; -use sp_core::{H160, H256}; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - AccountId32, BuildStorage, -}; +use sp_core::H160; +use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}; pub type Balance = u128; pub type AccountId = AccountId32; @@ -42,50 +39,26 @@ construct_runtime!( ); parameter_types! { - pub const BlockHashCount: u64 = 250; pub const MinimumGuardianDeposit: Balance = 10; } +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = Everything; - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Block = frame_system::mocking::MockBlock; // Add this - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<31>; - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; + type Lookup = IdentityLookup; } +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<1>; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } // Implement pallet_guardian config trait for mock runtime. @@ -122,6 +95,7 @@ impl pallet_evm::Config for Test { type OnCreate = (); type WeightInfo = (); type GasLimitPovSizeRatio = ConstU64<4>; + type SuicideQuickClearLimit = ConstU32<0>; } impl pallet_timestamp::Config for Test { diff --git a/parachain/precompiles/collab-ai/investing-pool/Cargo.toml b/parachain/precompiles/collab-ai/investing-pool/Cargo.toml index df315bc4b9..0ea9cc7830 100644 --- a/parachain/precompiles/collab-ai/investing-pool/Cargo.toml +++ b/parachain/precompiles/collab-ai/investing-pool/Cargo.toml @@ -41,8 +41,8 @@ std = [ "frame-support/std", "frame-system/std", "pallet-collab-ai-common/std", - "pallet-investing-pool/std", "pallet-evm/std", + "pallet-investing-pool/std", "pallet-timestamp/std", "precompile-utils/std", "sp-core/std", diff --git a/parachain/precompiles/collab-ai/pool-proposal/Cargo.toml b/parachain/precompiles/collab-ai/pool-proposal/Cargo.toml index 915be20b27..c430377434 100644 --- a/parachain/precompiles/collab-ai/pool-proposal/Cargo.toml +++ b/parachain/precompiles/collab-ai/pool-proposal/Cargo.toml @@ -41,8 +41,8 @@ std = [ "frame-support/std", "frame-system/std", "pallet-collab-ai-common/std", - "pallet-pool-proposal/std", "pallet-evm/std", + "pallet-pool-proposal/std", "pallet-timestamp/std", "precompile-utils/std", "sp-core/std", diff --git a/parachain/precompiles/collab-ai/pool-proposal/src/lib.rs b/parachain/precompiles/collab-ai/pool-proposal/src/lib.rs index bd0c31e037..98b3cff5da 100644 --- a/parachain/precompiles/collab-ai/pool-proposal/src/lib.rs +++ b/parachain/precompiles/collab-ai/pool-proposal/src/lib.rs @@ -201,11 +201,7 @@ where Ok(result .0 .into_iter() - .enumerate() - .map(|(_index, bond)| DepositBond { - owner: bond.owner.into(), - amount: bond.amount.into(), - }) + .map(|bond| DepositBond { owner: bond.owner.into(), amount: bond.amount.into() }) .collect()) } else { Ok(Vec::new()) @@ -226,8 +222,7 @@ where let result = pallet_pool_proposal::Pallet::::pending_pool_proposal_status() .into_iter() - .enumerate() - .map(|(_index, status)| PoolProposalStatus { + .map(|status| PoolProposalStatus { index: status.pool_proposal_index.into(), expiry_time: status.proposal_expire_time.into(), }) @@ -376,8 +371,7 @@ where let bond_vec: Vec = result .pre_investings .into_iter() - .enumerate() - .map(|(_index, bond)| { + .map(|bond| { let owner: [u8; 32] = bond.owner.into(); let owner = owner.into(); StakingBond { pool_index: n.into(), owner, amount: bond.amount.into() } @@ -417,8 +411,7 @@ where let bond_vec: Vec = result .queued_pre_investings .into_iter() - .enumerate() - .map(|(_index, bond)| { + .map(|bond| { let owner: [u8; 32] = bond.0.owner.into(); let owner = owner.into(); QueuedStakingBond { @@ -459,8 +452,7 @@ where let guardian_vec = result .0 .into_iter() - .enumerate() - .map(|(_index, guardian)| { + .map(|guardian| { let guardian: [u8; 32] = guardian.into(); guardian.into() }) diff --git a/parachain/precompiles/parachain-staking/Cargo.toml b/parachain/precompiles/parachain-staking/Cargo.toml index 76f6e9e742..15c7a2095d 100644 --- a/parachain/precompiles/parachain-staking/Cargo.toml +++ b/parachain/precompiles/parachain-staking/Cargo.toml @@ -34,9 +34,15 @@ std = [ "fp-evm/std", "frame-support/std", "frame-system/std", + "pallet-balances/std", "pallet-evm/std", "pallet-parachain-staking/std", + "pallet-timestamp/std", + "parity-scale-codec/std", "precompile-utils/std", + "scale-info/std", + "serde/std", + "sha3/std", "sp-core/std", "sp-io/std", "sp-runtime/std", diff --git a/parachain/precompiles/parachain-staking/src/mock.rs b/parachain/precompiles/parachain-staking/src/mock.rs index a9957e3688..d329cfb683 100644 --- a/parachain/precompiles/parachain-staking/src/mock.rs +++ b/parachain/precompiles/parachain-staking/src/mock.rs @@ -16,18 +16,15 @@ use super::*; use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU64, OnFinalize, OnInitialize}, + construct_runtime, derive_impl, parameter_types, + traits::{OnFinalize, OnInitialize}, weights::Weight, }; use pallet_evm::{AddressMapping, EnsureAddressNever, EnsureAddressRoot}; use pallet_parachain_staking::{InflationInfo, Range}; use precompile_utils::precompile_set::{AddressU64, PrecompileAt, PrecompileSetBuilder}; -use sp_core::{H160, H256}; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - AccountId32, BuildStorage, Perbill, Percent, -}; +use sp_core::{ConstU32, ConstU64, H160, H256}; +use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage, Perbill, Percent}; pub type AccountId = AccountId32; pub type Balance = u128; @@ -44,55 +41,23 @@ construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); -} +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } + +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { @@ -114,6 +79,7 @@ parameter_types! { pub const MinDelegatorStk: u128 = 5; pub const MinDelegation: u128 = 3; } + impl pallet_parachain_staking::Config for Test { type RuntimeEvent = RuntimeEvent; type Currency = Balances; @@ -217,6 +183,7 @@ impl pallet_evm::Config for Test { type OnCreate = (); type WeightInfo = (); type GasLimitPovSizeRatio = ConstU64<4>; + type SuicideQuickClearLimit = ConstU32<0>; } parameter_types! { diff --git a/parachain/precompiles/score-staking/Cargo.toml b/parachain/precompiles/score-staking/Cargo.toml index e9bc95f33d..5669aff517 100644 --- a/parachain/precompiles/score-staking/Cargo.toml +++ b/parachain/precompiles/score-staking/Cargo.toml @@ -32,13 +32,20 @@ parity-scale-codec = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ + "core-primitives/std", "fp-evm/std", - "pallet-evm/std", "frame-support/std", "frame-system/std", + "pallet-balances/std", "pallet-evm/std", + "pallet-parachain-staking/std", "pallet-score-staking/std", + "pallet-timestamp/std", + "parity-scale-codec/std", "precompile-utils/std", + "scale-info/std", + "serde/std", + "sha3/std", "sp-core/std", "sp-io/std", "sp-runtime/std", diff --git a/parachain/precompiles/score-staking/src/mock.rs b/parachain/precompiles/score-staking/src/mock.rs index 6c5cbb288c..056e5168c9 100644 --- a/parachain/precompiles/score-staking/src/mock.rs +++ b/parachain/precompiles/score-staking/src/mock.rs @@ -16,7 +16,7 @@ use super::*; use frame_support::{ - assert_ok, construct_runtime, parameter_types, + assert_ok, construct_runtime, derive_impl, parameter_types, traits::{OnFinalize, OnInitialize}, weights::Weight, }; @@ -25,10 +25,7 @@ use pallet_evm::{AddressMapping, EnsureAddressNever, EnsureAddressRoot}; use pallet_score_staking::{AccountIdConvert, PoolState, RoundSetting}; use precompile_utils::precompile_set::{AddressU64, PrecompileAt, PrecompileSetBuilder}; use sp_core::{ConstU128, ConstU32, ConstU64, H160, H256}; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, Perbill, Percent, -}; +use sp_runtime::{traits::IdentityLookup, BuildStorage, Perbill, Percent}; pub type Balance = u128; pub const UNIT: Balance = 1_000_000_000_000; @@ -46,54 +43,23 @@ construct_runtime!( } ); -parameter_types! { - pub const BlockHashCount: u32 = 250; -} - +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type Block = frame_system::mocking::MockBlock; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; + type Block = frame_system::mocking::MockBlock; type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type Lookup = IdentityLookup; } parameter_types! { - pub const ExistentialDeposit: u128 = 1; + pub const ExistentialDeposit: Balance = 1; } +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] impl pallet_balances::Config for Test { - type MaxLocks = (); - type Balance = u128; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; + type Balance = Balance; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); } parameter_types! { @@ -231,6 +197,7 @@ impl pallet_evm::Config for Test { type OnCreate = (); type WeightInfo = (); type GasLimitPovSizeRatio = ConstU64<4>; + type SuicideQuickClearLimit = ConstU32<0>; } parameter_types! { diff --git a/parachain/runtime/common/Cargo.toml b/parachain/runtime/common/Cargo.toml index ffd75db923..d77a81b179 100644 --- a/parachain/runtime/common/Cargo.toml +++ b/parachain/runtime/common/Cargo.toml @@ -28,7 +28,6 @@ pallet-transaction-payment = { workspace = true } pallet-treasury = { workspace = true } pallet-vesting = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } cumulus-primitives-core = { workspace = true } cumulus-primitives-parachain-inherent = { workspace = true } parachain-info = { workspace = true } @@ -39,8 +38,7 @@ xcm-builder = { workspace = true } xcm-executor = { workspace = true } xcm-simulator = { workspace = true, optional = true } -orml-xtokens = { workspace = true } - +polkadot-core-primitives = { workspace = true } polkadot-parachain-primitives = { workspace = true } polkadot-primitives = { workspace = true } polkadot-runtime-parachains = { workspace = true } @@ -56,66 +54,92 @@ pallet-teebag = { workspace = true } [features] default = ["std"] std = [ - "parity-scale-codec/std", - "log/std", - "sp-core/std", - "sp-io/std", - "sp-std/std", - "sp-runtime/std", - "sp-state-machine/std", + "core-primitives/std", + "cumulus-primitives-core/std", + "cumulus-primitives-parachain-inherent/std", + "cumulus-test-relay-sproof-builder/std", "frame-support/std", "frame-system/std", + "log/std", + "pallet-asset-manager/std", "pallet-assets/std", "pallet-authorship/std", "pallet-balances/std", "pallet-collective/std", + "pallet-extrinsic-filter/std", "pallet-group/std", - "pallet-multisig/std", "pallet-membership/std", "pallet-message-queue/std", + "pallet-multisig/std", + "pallet-omni-account/std", + "pallet-teebag/std", "pallet-transaction-payment/std", "pallet-treasury/std", "pallet-vesting/std", + "pallet-xcm/std", + "parachain-info/std", + "parity-scale-codec/std", + "polkadot-core-primitives/std", "polkadot-primitives/std", "polkadot-runtime-parachains/std", - "cumulus-primitives-parachain-inherent/std", - "cumulus-pallet-parachain-system/std", - "cumulus-primitives-core/std", - "cumulus-test-relay-sproof-builder/std", - "pallet-xcm/std", - "xcm/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-state-machine/std", + "sp-std/std", "xcm-builder/std", "xcm-executor/std", - "parachain-info/std", - "core-primitives/std", - "pallet-asset-manager/std", - "pallet-extrinsic-filter/std", - "pallet-omni-account/std", - "pallet-teebag/std", - "orml-xtokens/std", + "xcm/std", ] runtime-benchmarks = [ + "cumulus-primitives-core/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-extrinsic-filter/runtime-benchmarks", "pallet-group/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-omni-account/runtime-benchmarks", "pallet-teebag/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-vesting/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "polkadot-runtime-parachains/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", ] try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-asset-manager/try-runtime", "pallet-assets/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-extrinsic-filter/try-runtime", "pallet-group/try-runtime", + "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-multisig/try-runtime", + "pallet-omni-account/try-runtime", "pallet-teebag/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-treasury/try-runtime", - "frame-support/try-runtime", + "pallet-vesting/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", + "polkadot-runtime-parachains/try-runtime", + "sp-runtime/try-runtime", ] -tests = [ - "std", - "xcm-simulator", -] +tests = ["std", "xcm-simulator"] diff --git a/parachain/runtime/common/src/lib.rs b/parachain/runtime/common/src/lib.rs index 1ef34bc35f..e7f498b08e 100644 --- a/parachain/runtime/common/src/lib.rs +++ b/parachain/runtime/common/src/lib.rs @@ -24,8 +24,6 @@ extern crate core; #[cfg(feature = "tests")] pub mod tests; -pub mod xcm_impl; - #[cfg(feature = "runtime-benchmarks")] use frame_support::assert_ok; @@ -76,6 +74,15 @@ pub const WEIGHT_PER_GAS: u64 = WEIGHT_REF_TIME_PER_SECOND / GAS_PER_SECOND; // Cosnt ratio of 1 weight = n fee pub const WEIGHT_TO_FEE_FACTOR: u128 = 1_000_000u128; +/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included into the +/// relay chain. +pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; +/// How many parachain blocks are processed by the relay chain per parent. Limits the number of +/// blocks authored per slot. +pub const BLOCK_PROCESSING_VELOCITY: u32 = 1; +/// Relay chain slot duration, in milliseconds. +pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000; + pub mod currency { use core_primitives::Balance; @@ -160,45 +167,6 @@ where } } -/// This macro expects the passed runtime constants to contain a `currency` module. -#[macro_export] -macro_rules! impl_runtime_transaction_payment_fees { - ($runtime:ident) => { - use frame_support::traits::{Currency, Imbalance, OnUnbalanced}; - use runtime_common::ToAuthor; - - // Do i need to extract these constants to the common module? - use $runtime::currency::{AUTHOR_PROPORTION, BURNED_PROPORTION, TREASURY_PROPORTION}; - - // important !! The struct is used externally - pub struct DealWithFees(sp_std::marker::PhantomData); - - impl OnUnbalanced> for DealWithFees - where - R: pallet_balances::Config + pallet_treasury::Config + pallet_authorship::Config, - pallet_treasury::Pallet: OnUnbalanced>, - ::RuntimeEvent: From>, - { - fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { - if let Some(fees) = fees_then_tips.next() { - // for fees, (1) to treasury, (2) to author and (3) burned - let (unburned, _) = - fees.ration(TREASURY_PROPORTION + AUTHOR_PROPORTION, BURNED_PROPORTION); - let mut split = unburned.ration(TREASURY_PROPORTION, AUTHOR_PROPORTION); - - if let Some(tips) = fees_then_tips.next() { - // for tips, if any, 100% to author - tips.merge_into(&mut split.1); - } - use pallet_treasury::Pallet as Treasury; - as OnUnbalanced<_>>::on_unbalanced(split.0); - as OnUnbalanced<_>>::on_unbalanced(split.1); - } - } - } - }; -} - /// See https://github.com/paritytech/polkadot/blob/7096430edd116b1dc6d8337ab35b149e213cbfe9/runtime/common/src/lib.rs#L218 /// /// Macro to set a value (e.g. when using the `parameter_types` macro) to either a production value @@ -283,10 +251,10 @@ pub trait BaseRuntimeRequirements: + pallet_balances::Config + pallet_extrinsic_filter::Config + pallet_multisig::Config - + parachain_info::Config + pallet_xcm::Config + pallet_treasury::Config + pallet_transaction_payment::Config + + parachain_info::Config { } diff --git a/parachain/runtime/common/src/tests/base_call_filter.rs b/parachain/runtime/common/src/tests/base_call_filter.rs index bf8c92882b..68a1f6d803 100644 --- a/parachain/runtime/common/src/tests/base_call_filter.rs +++ b/parachain/runtime/common/src/tests/base_call_filter.rs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . +use frame_support::traits::Currency; use frame_support::{assert_noop, assert_ok, pallet_prelude::Weight, traits::VestingSchedule}; use frame_system::RawOrigin; use parity_scale_codec::{Decode, Encode}; @@ -23,7 +24,7 @@ use core_primitives::AccountId; use crate::{ currency::UNIT, - tests::setup::{alice, bob, charlie, ExtBuilder}, + tests::setup::{alice, bob, charlie, para_ext}, BaseRuntimeRequirements, }; @@ -34,7 +35,7 @@ type Vesting = pallet_vesting::Pallet; type Multisig = pallet_multisig::Pallet; pub fn default_mode() { - ExtBuilder::::default().build().execute_with(|| { + para_ext(1).execute_with(|| { assert_eq!(ExtrinsicFilter::::mode(), pallet_extrinsic_filter::OperationalMode::Normal); }); } @@ -54,24 +55,22 @@ where From, ::PostInfo: sp_std::fmt::Debug + Default, { - ExtBuilder::::default() - .balances(vec![(alice(), 10 * UNIT)]) - .build() - .execute_with(|| { - let _ = Multisig::::multi_account_id(&[alice(), bob(), charlie()][..], 2); - let remark_call = frame_system::Call::remark { remark: vec![] }.into(); - // let data = remark_call.encode(); - let call = Box::new(remark_call); - let multisig_call: Call = pallet_multisig::Call::as_multi { - threshold: 2, - other_signatories: vec![bob(), charlie()], - maybe_timepoint: None, - call, - max_weight: Weight::zero(), - } - .into(); - assert_ok!(multisig_call.dispatch(Origin::signed(alice()))); - }) + para_ext(1).execute_with(|| { + let _ = Balances::::deposit_creating(&bob(), 10 * UNIT); + let _ = Balances::::deposit_creating(&charlie(), 10 * UNIT); + let _ = Multisig::::multi_account_id(&[alice(), bob(), charlie()][..], 2); + let remark_call = frame_system::Call::remark { remark: vec![] }.into(); + let call = Box::new(remark_call); + let multisig_call: Call = pallet_multisig::Call::as_multi { + threshold: 2, + other_signatories: vec![bob(), charlie()], + maybe_timepoint: None, + call, + max_weight: Weight::zero(), + } + .into(); + assert_ok!(multisig_call.dispatch(Origin::signed(alice()))); + }) } pub fn balance_transfer_works< @@ -84,15 +83,12 @@ where From, ::PostInfo: sp_std::fmt::Debug + Default, { - ExtBuilder::::default() - .balances(vec![(alice(), 10 * UNIT)]) - .build() - .execute_with(|| { - let call: Call = - pallet_balances::Call::transfer { dest: bob().into(), value: UNIT }.into(); - assert_ok!(call.dispatch(Origin::signed(alice()))); - assert_eq!(Balances::::free_balance(&bob()), UNIT); - }) + para_ext(1).execute_with(|| { + let call: Call = + pallet_balances::Call::transfer_keep_alive { dest: bob().into(), value: UNIT }.into(); + assert_ok!(call.dispatch(Origin::signed(alice()))); + assert_eq!(Balances::::free_balance(&bob()), UNIT); + }) } pub fn balance_transfer_disabled< @@ -105,17 +101,14 @@ where From, ::PostInfo: sp_std::fmt::Debug + Default, { - ExtBuilder::::default() - .balances(vec![(alice(), 10 * UNIT)]) - .build() - .execute_with(|| { - let call: Call = - pallet_balances::Call::transfer { dest: bob().into(), value: UNIT }.into(); - assert_noop!( - call.dispatch(Origin::signed(alice())), - frame_system::Error::::CallFiltered - ); - }) + para_ext(1).execute_with(|| { + let call: Call = + pallet_balances::Call::transfer_keep_alive { dest: bob().into(), value: UNIT }.into(); + assert_noop!( + call.dispatch(Origin::signed(alice())), + frame_system::Error::::CallFiltered + ); + }) } pub fn balance_transfer_with_sudo_works< @@ -128,20 +121,17 @@ where From, ::PostInfo: sp_std::fmt::Debug + Default, { - ExtBuilder::::default() - .balances(vec![(alice(), 10 * UNIT)]) - .build() - .execute_with(|| { - let call: Call = pallet_balances::Call::force_transfer { - source: alice().into(), - dest: bob().into(), - value: UNIT, - } - .into(); - assert_ok!(call.dispatch(Origin::root()),); - assert_eq!(Balances::::free_balance(&alice()), 9 * UNIT); - assert_eq!(Balances::::free_balance(&bob()), UNIT); - }) + para_ext(1).execute_with(|| { + let call: Call = pallet_balances::Call::force_transfer { + source: alice().into(), + dest: bob().into(), + value: UNIT, + } + .into(); + assert_ok!(call.dispatch(Origin::root()),); + assert_eq!(Balances::::free_balance(&alice()), 9 * UNIT); + assert_eq!(Balances::::free_balance(&bob()), UNIT); + }) } pub fn block_core_call_has_no_effect< @@ -154,29 +144,23 @@ where From, ::PostInfo: sp_std::fmt::Debug + Default, { - ExtBuilder::::default() - .balances(vec![(alice(), 10 * UNIT)]) - .build() - .execute_with(|| { - let call: Call = frame_system::Call::remark { remark: vec![] }.into(); - assert_ok!(call.clone().dispatch(Origin::signed(alice()))); - - // try to block System call, which is a core call - assert_ok!(ExtrinsicFilter::::block_extrinsics( - Origin::root(), - b"System".to_vec(), - None - )); // it's stored in the storage - assert_eq!( - ExtrinsicFilter::::blocked_extrinsics(( - b"System".to_vec(), - Vec::::default() - )), - Some(()) - ); - // ...however, no effect in the actual call dispatching - assert_ok!(call.dispatch(Origin::signed(alice()))); - }) + para_ext(1).execute_with(|| { + let call: Call = frame_system::Call::remark { remark: vec![] }.into(); + assert_ok!(call.clone().dispatch(Origin::signed(alice()))); + + // try to block System call, which is a core call + assert_ok!(ExtrinsicFilter::::block_extrinsics( + Origin::root(), + b"System".to_vec(), + None + )); // it's stored in the storage + assert_eq!( + ExtrinsicFilter::::blocked_extrinsics((b"System".to_vec(), Vec::::default())), + Some(()) + ); + // ...however, no effect in the actual call dispatching + assert_ok!(call.dispatch(Origin::signed(alice()))); + }) } pub fn block_non_core_call_works< @@ -191,45 +175,36 @@ where From, ::PostInfo: sp_std::fmt::Debug + Default, { - ExtBuilder::::default() - .balances(vec![(alice(), 100 * UNIT)]) - .build() - .execute_with(|| { - assert_ok!(Vesting::::vested_transfer( - Origin::signed(alice()), - bob().into(), - pallet_vesting::VestingInfo::new(10 * UNIT, UNIT, 0u32.into()), - )); - let call: Call = pallet_vesting::Call::vest {}.into(); - assert_ok!(call.clone().dispatch(Origin::signed(bob()))); - assert_eq!(Balances::::free_balance(&bob()), 10 * UNIT); - assert_eq!(Balances::::usable_balance(&bob()), UNIT); - - System::::set_block_number(2u32.into()); - assert_eq!(Vesting::::vesting_balance(&bob()), Some(8 * UNIT)); - - // try to block Vesting call, which is a non-core call - assert_ok!(ExtrinsicFilter::::block_extrinsics( - Origin::root(), - b"Vesting".to_vec(), - None - )); - // it's stored in the storage - assert_eq!( - ExtrinsicFilter::::blocked_extrinsics(( - b"Vesting".to_vec(), - Vec::::default() - )), - Some(()) - ); - // ...and it will take effect - assert_noop!( - call.dispatch(Origin::signed(bob())), - frame_system::Error::::CallFiltered - ); - // usable balance is unchanged - assert_eq!(Balances::::usable_balance(&bob()), UNIT); - }) + para_ext(1).execute_with(|| { + assert_ok!(Vesting::::vested_transfer( + Origin::signed(alice()), + bob().into(), + pallet_vesting::VestingInfo::new(10 * UNIT, UNIT, 0u32.into()), + )); + let call: Call = pallet_vesting::Call::vest {}.into(); + assert_ok!(call.clone().dispatch(Origin::signed(bob()))); + assert_eq!(Balances::::free_balance(&bob()), 10 * UNIT); + assert_eq!(Balances::::usable_balance(&bob()), UNIT); + + System::::set_block_number(2u32.into()); + assert_eq!(Vesting::::vesting_balance(&bob()), Some(8 * UNIT)); + + // try to block Vesting call, which is a non-core call + assert_ok!(ExtrinsicFilter::::block_extrinsics( + Origin::root(), + b"Vesting".to_vec(), + None + )); + // it's stored in the storage + assert_eq!( + ExtrinsicFilter::::blocked_extrinsics((b"Vesting".to_vec(), Vec::::default())), + Some(()) + ); + // ...and it will take effect + assert_noop!(call.dispatch(Origin::signed(bob())), frame_system::Error::::CallFiltered); + // usable balance is unchanged + assert_eq!(Balances::::usable_balance(&bob()), UNIT); + }) } #[macro_export] diff --git a/parachain/runtime/common/src/tests/mod.rs b/parachain/runtime/common/src/tests/mod.rs index f8b0e180e2..23ad6e254a 100644 --- a/parachain/runtime/common/src/tests/mod.rs +++ b/parachain/runtime/common/src/tests/mod.rs @@ -15,6 +15,6 @@ // along with Litentry. If not, see . pub mod base_call_filter; +// TODO: use separate runtimes pub mod setup; pub mod transaction_payment; -pub mod xcm_parachain; diff --git a/parachain/runtime/common/src/tests/setup/mod.rs b/parachain/runtime/common/src/tests/setup/mod.rs index 00500a9444..068bbdca8b 100644 --- a/parachain/runtime/common/src/tests/setup/mod.rs +++ b/parachain/runtime/common/src/tests/setup/mod.rs @@ -14,103 +14,32 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -use frame_support::{dispatch::*, weights::Weight}; -pub use pallet_balances::Call as BalancesCall; -use parity_scale_codec::Decode; -use sp_runtime::{BuildStorage, SaturatedConversion}; -pub use sp_std::cell::RefCell; +mod parachain; +mod relay_chain; -use core_primitives::{AccountId, Balance, BlockNumber}; +use crate::{self as runtime_common, currency::UNIT, BaseRuntimeRequirements}; +use core_primitives::AccountId; -use crate::{currency::UNIT, BaseRuntimeRequirements}; - -pub const ALICE: [u8; 32] = [1u8; 32]; -pub const BOB: [u8; 32] = [2u8; 32]; -pub const CHARLIE: [u8; 32] = [3u8; 32]; - -pub mod relay; +use frame_support::dispatch::{DispatchInfo, PostDispatchInfo}; +use sp_runtime::BuildStorage; +use xcm::latest::prelude::*; +use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt}; pub fn alice() -> AccountId { - AccountId::from(ALICE) + AccountId::from([1u8; 32]) } pub fn bob() -> AccountId { - AccountId::from(BOB) + AccountId::from([2u8; 32]) } pub fn charlie() -> AccountId { - AccountId::from(CHARLIE) + AccountId::from([3u8; 32]) } pub const PARA_A_USER_INITIAL_BALANCE: u128 = 500_000_000_000 * UNIT; pub const PARA_B_USER_INITIAL_BALANCE: u128 = 600_000_000_000 * UNIT; -pub struct ExtBuilder { - phantom: sp_std::marker::PhantomData, - balances: Vec<(AccountId, Balance)>, - parachain_id: u32, -} - -impl Default for ExtBuilder { - fn default() -> Self { - Self { phantom: Default::default(), balances: vec![], parachain_id: 1 } - } -} - -impl ExtBuilder -where - R: BaseRuntimeRequirements, -{ - pub fn balances(mut self, balances: Vec<(AccountId, Balance)>) -> Self { - self.balances = balances; - self - } - - #[allow(dead_code)] - pub fn parachain_id(mut self, parachain_id: u32) -> Self { - self.parachain_id = parachain_id; - self - } - - pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - - pallet_balances::GenesisConfig:: { - balances: self - .balances - .into_iter() - .map(|(account_id, initial_balance)| { - ( - ::AccountId::decode(&mut account_id.as_ref()) - .unwrap(), - // >::Balance::from(initial_balance) - initial_balance.saturated_into(), - ) - }) - .collect::>(), - } - .assimilate_storage(&mut t) - .unwrap(); - - parachain_info::GenesisConfig:: { - parachain_id: self.parachain_id.into(), - ..Default::default() - } - .assimilate_storage(&mut t) - .unwrap(); - - pallet_xcm::GenesisConfig:: { safe_xcm_version: Some(2), ..Default::default() } - .assimilate_storage(&mut t) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - let block: BlockNumber = 1; - // let block = ::BlockNumber::from(block_number); - ext.execute_with(|| frame_system::Pallet::::set_block_number(block.into())); - ext - } -} - /// create a transaction info struct from weight. Handy to avoid building the whole struct. pub fn info_from_weight(w: Weight) -> DispatchInfo { // pays_fee: Pays::Yes -- class: DispatchClass::Normal @@ -134,83 +63,79 @@ where }); } -/// This macro expects the passed runtime(litentry rococo) to contain -/// `cumulus_pallet_xcmp_queue` and `cumulus_pallet_dmp_queue`. -#[macro_export] -macro_rules! decl_test_chain { - ($runtime:ident) => { - use core_primitives::Weight; - use frame_support::{construct_runtime, match_types, parameter_types}; - use runtime_common::tests::setup::{ - alice, bob, - relay::{LocalOriginConverter, OnlyParachains, UniversalLocation}, - ExtBuilder, PARA_A_USER_INITIAL_BALANCE, PARA_B_USER_INITIAL_BALANCE, - }; - use xcm::prelude::Parent; - use xcm_simulator::{ - decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt, - }; - pub mod relay_chain { - // declared by `decl_test_network` - use super::RelayChainXcmRouter; - runtime_common::decl_test_relay_chain_runtime!(); - } - use sp_runtime::BuildStorage; - - pub fn relay_ext() -> sp_io::TestExternalities { - use relay_chain::{Runtime, System}; - let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| { - System::set_block_number(1); - }); - ext - } - - decl_test_parachain! { - pub struct ParaA { - Runtime = $runtime, - XcmpMessageHandler = cumulus_pallet_xcmp_queue::Pallet::<$runtime>, - DmpMessageHandler = cumulus_pallet_dmp_queue::Pallet::<$runtime>, - new_ext = ExtBuilder::<$runtime>::default() - .balances(vec![ - (alice(), PARA_A_USER_INITIAL_BALANCE), - ]).parachain_id(1).build(), - } - } - - decl_test_parachain! { - pub struct ParaB { - Runtime = $runtime, - XcmpMessageHandler = cumulus_pallet_xcmp_queue::Pallet::<$runtime>, - DmpMessageHandler = cumulus_pallet_dmp_queue::Pallet::<$runtime>, - new_ext = ExtBuilder::<$runtime>::default() - .balances(vec![ - (bob(), PARA_B_USER_INITIAL_BALANCE), - ]).parachain_id(2).build(), - } - } - - decl_test_relay_chain! { - pub struct Relay { - Runtime = relay_chain::Runtime, - RuntimeCall = relay_chain::RuntimeCall, - RuntimeEvent = relay_chain::RuntimeEvent, - XcmConfig = relay_chain::XcmConfig, - MessageQueue = relay_chain::MessageQueue, - System = relay_chain::System, - new_ext = relay_ext(), - } - } - - decl_test_network! { - pub struct TestNet { - relay_chain = Relay, - parachains = vec![ - (1, ParaA), - (2, ParaB), - ], - } - } - }; +decl_test_parachain! { + pub struct ParaA { + Runtime = parachain::Runtime, + XcmpMessageHandler = parachain::MsgQueue, + DmpMessageHandler = parachain::MsgQueue, + new_ext = para_ext(1), + } } + +decl_test_parachain! { + pub struct ParaB { + Runtime = parachain::Runtime, + XcmpMessageHandler = parachain::MsgQueue, + DmpMessageHandler = parachain::MsgQueue, + new_ext = para_ext(2), + } +} + +decl_test_relay_chain! { + pub struct Relay { + Runtime = relay_chain::Runtime, + RuntimeCall = relay_chain::RuntimeCall, + RuntimeEvent = relay_chain::RuntimeEvent, + XcmConfig = relay_chain::XcmConfig, + MessageQueue = relay_chain::MessageQueue, + System = relay_chain::System, + new_ext = relay_ext(), + } +} + +decl_test_network! { + pub struct MockNet { + relay_chain = Relay, + parachains = vec![ + (1, ParaA), + (2, ParaB), + ], + } +} + +pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { + use runtime_common::tests::setup::parachain::{MsgQueue, Runtime, System}; + + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); + + pallet_balances::GenesisConfig:: { balances: vec![(alice(), 10 * UNIT)] } + .assimilate_storage(&mut t) + .unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| { + System::set_block_number(1); + MsgQueue::set_para_id(para_id.into()); + }); + ext +} + +pub fn relay_ext() -> sp_io::TestExternalities { + use runtime_common::tests::setup::relay_chain::{Runtime, System}; + + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); + + pallet_balances::GenesisConfig:: { balances: vec![(alice(), 10 * UNIT)] } + .assimilate_storage(&mut t) + .unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| System::set_block_number(1)); + ext +} + +pub type RelayChainPalletXcm = pallet_xcm::Pallet; + +pub type ParachainPalletXcm = pallet_xcm::Pallet; +pub type ParachainAssets = pallet_assets::Pallet; +pub type ParachainBalances = pallet_balances::Pallet; diff --git a/parachain/runtime/common/src/tests/setup/parachain.rs b/parachain/runtime/common/src/tests/setup/parachain.rs new file mode 100644 index 0000000000..ac45f71893 --- /dev/null +++ b/parachain/runtime/common/src/tests/setup/parachain.rs @@ -0,0 +1,417 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Parachain runtime mock. + +// TODO: use Litentry primitives + +use core::marker::PhantomData; +use frame_support::{ + construct_runtime, derive_impl, parameter_types, + traits::{ContainsPair, EnsureOrigin, EnsureOriginWithArg, Everything, Nothing}, + weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, +}; +use parity_scale_codec::{Decode, Encode}; + +use frame_system::EnsureRoot; +use sp_core::{ConstU32, H256}; +use sp_runtime::{ + traits::{Get, Hash, IdentityLookup}, + AccountId32, +}; +use sp_std::prelude::*; + +use pallet_xcm::XcmPassthrough; +use polkadot_core_primitives::BlockNumber as RelayBlockNumber; +use polkadot_parachain_primitives::primitives::{ + DmpMessageHandler, Id as ParaId, Sibling, XcmpMessageFormat, XcmpMessageHandler, +}; +use xcm::{latest::prelude::*, VersionedXcm}; +use xcm_builder::{ + Account32Hash, AccountId32Aliases, AllowUnpaidExecutionFrom, EnsureDecodableXcm, + EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FrameTransactionalProcessor, + FungibleAdapter, IsConcrete, ParentIsPreset, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, +}; +use xcm_executor::{traits::ConvertLocation, Config, XcmExecutor}; + +pub type SovereignAccountOf = ( + SiblingParachainConvertsVia, + AccountId32Aliases, + ParentIsPreset, +); + +pub type AccountId = AccountId32; +pub type Balance = u128; + +parameter_types! { + pub const BlockHashCount: u64 = 250; +} + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] +impl frame_system::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Nonce = u64; + type Hash = H256; + type Hashing = ::sp_runtime::traits::BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type Block = Block; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = BlockHashCount; + type BlockWeights = (); + type BlockLength = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type DbWeight = (); + type BaseCallFilter = Everything; + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; +} + +parameter_types! { + pub ExistentialDeposit: Balance = 1; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = MaxLocks; + type Balance = Balance; + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = (); + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; +} + +// `EnsureOriginWithArg` impl for `CreateOrigin` which allows only XCM origins +// which are locations containing the class location. +pub struct ForeignCreators; +impl EnsureOriginWithArg for ForeignCreators { + type Success = AccountId; + + fn try_origin( + o: RuntimeOrigin, + a: &Location, + ) -> sp_std::result::Result { + let origin_location = pallet_xcm::EnsureXcm::::try_origin(o.clone())?; + if !a.starts_with(&origin_location) { + return Err(o); + } + SovereignAccountOf::convert_location(&origin_location).ok_or(o) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(a: &Location) -> Result { + Ok(pallet_xcm::Origin::Xcm(a.clone()).into()) + } +} + +parameter_types! { + pub const ReservedXcmpWeight: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_div(4), 0); + pub const ReservedDmpWeight: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_div(4), 0); +} + +parameter_types! { + pub const KsmLocation: Location = Location::parent(); + pub const RelayNetwork: NetworkId = NetworkId::Kusama; + pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Parachain(MsgQueue::parachain_id().into())].into(); +} + +pub type LocationToAccountId = ( + ParentIsPreset, + SiblingParachainConvertsVia, + AccountId32Aliases, + Account32Hash<(), AccountId>, +); + +pub type XcmOriginToCallOrigin = ( + SovereignSignedViaLocation, + SignedAccountId32AsNative, + XcmPassthrough, +); + +parameter_types! { + pub const UnitWeightCost: Weight = Weight::from_parts(1, 1); + pub KsmPerSecondPerByte: (AssetId, u128, u128) = (AssetId(Parent.into()), 1, 1); + pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; + pub ForeignPrefix: Location = (Parent,).into(); +} + +pub type LocalAssetTransactor = + FungibleAdapter, LocationToAccountId, AccountId, ()>; + +pub type XcmRouter = EnsureDecodableXcm>; +pub type Barrier = AllowUnpaidExecutionFrom; + +pub struct XcmConfig; +impl Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type AssetTransactor = LocalAssetTransactor; + type OriginConverter = XcmOriginToCallOrigin; + type IsReserve = (); + type IsTeleporter = (); + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = FixedWeightBounds; + type Trader = FixedRateOfFungible; + type ResponseHandler = (); + type AssetTrap = (); + type AssetLocker = PolkadotXcm; + type AssetExchanger = (); + type AssetClaims = (); + type SubscriptionService = (); + type PalletInstancesInfo = (); + type FeeManager = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); +} + +#[frame_support::pallet] +pub mod mock_msg_queue { + use super::*; + use frame_support::pallet_prelude::*; + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type XcmExecutor: ExecuteXcm; + } + + #[pallet::call] + impl Pallet {} + + #[pallet::pallet] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::storage] + #[pallet::getter(fn parachain_id)] + pub(super) type ParachainId = StorageValue<_, ParaId, ValueQuery>; + + #[pallet::storage] + #[pallet::getter(fn received_dmp)] + /// A queue of received DMP messages + pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; + + impl Get for Pallet { + fn get() -> ParaId { + Self::parachain_id() + } + } + + pub type MessageId = [u8; 32]; + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + // XCMP + /// Some XCM was executed OK. + Success(Option), + /// Some XCM failed. + Fail(Option, XcmError), + /// Bad XCM version used. + BadVersion(Option), + /// Bad XCM format used. + BadFormat(Option), + + // DMP + /// Downward message is invalid XCM. + InvalidFormat(MessageId), + /// Downward message is unsupported version of XCM. + UnsupportedVersion(MessageId), + /// Downward message executed with the given outcome. + ExecutedDownward(MessageId, Outcome), + } + + impl Pallet { + pub fn set_para_id(para_id: ParaId) { + ParachainId::::put(para_id); + } + + fn handle_xcmp_message( + sender: ParaId, + _sent_at: RelayBlockNumber, + xcm: VersionedXcm, + max_weight: Weight, + ) -> Result { + let hash = Encode::using_encoded(&xcm, T::Hashing::hash); + let mut message_hash = Encode::using_encoded(&xcm, sp_io::hashing::blake2_256); + let (result, event) = match Xcm::::try_from(xcm) { + Ok(xcm) => { + let location = (Parent, Parachain(sender.into())); + match T::XcmExecutor::prepare_and_execute( + location, + xcm, + &mut message_hash, + max_weight, + Weight::zero(), + ) { + Outcome::Error { error } => (Err(error), Event::Fail(Some(hash), error)), + Outcome::Complete { used } => (Ok(used), Event::Success(Some(hash))), + // As far as the caller is concerned, this was dispatched without error, so + // we just report the weight used. + Outcome::Incomplete { used, error } => { + (Ok(used), Event::Fail(Some(hash), error)) + }, + } + }, + Err(()) => (Err(XcmError::UnhandledXcmVersion), Event::BadVersion(Some(hash))), + }; + Self::deposit_event(event); + result + } + } + + impl XcmpMessageHandler for Pallet { + fn handle_xcmp_messages<'a, I: Iterator>( + iter: I, + max_weight: Weight, + ) -> Weight { + for (sender, sent_at, data) in iter { + let mut data_ref = data; + let _ = XcmpMessageFormat::decode(&mut data_ref) + .expect("Simulator encodes with versioned xcm format; qed"); + + let mut remaining_fragments = data_ref; + while !remaining_fragments.is_empty() { + if let Ok(xcm) = + VersionedXcm::::decode(&mut remaining_fragments) + { + let _ = Self::handle_xcmp_message(sender, sent_at, xcm, max_weight); + } else { + debug_assert!(false, "Invalid incoming XCMP message data"); + } + } + } + max_weight + } + } + + impl DmpMessageHandler for Pallet { + fn handle_dmp_messages( + iter: impl Iterator)>, + limit: Weight, + ) -> Weight { + for (_sent_at, data) in iter { + let mut id = sp_io::hashing::blake2_256(&data[..]); + let maybe_versioned = VersionedXcm::::decode(&mut &data[..]); + match maybe_versioned { + Err(_) => { + Self::deposit_event(Event::InvalidFormat(id)); + }, + Ok(versioned) => match Xcm::try_from(versioned) { + Err(()) => Self::deposit_event(Event::UnsupportedVersion(id)), + Ok(x) => { + let outcome = T::XcmExecutor::prepare_and_execute( + Parent, + x.clone(), + &mut id, + limit, + Weight::zero(), + ); + >::append(x); + Self::deposit_event(Event::ExecutedDownward(id, outcome)); + }, + }, + } + } + limit + } + } +} + +impl mock_msg_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; +} + +pub type LocalOriginToLocation = SignedToAccountId32; + +pub struct TrustedLockerCase(PhantomData); +impl> ContainsPair for TrustedLockerCase { + fn contains(origin: &Location, asset: &Asset) -> bool { + let (o, a) = T::get(); + a.matches(asset) && &o == origin + } +} + +parameter_types! { + pub RelayTokenForRelay: (Location, AssetFilter) = (Parent.into(), Wild(AllOf { id: AssetId(Parent.into()), fun: WildFungible })); +} + +pub type TrustedLockers = TrustedLockerCase; + +impl pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = XcmRouter; + type ExecuteXcmOrigin = EnsureXcmOrigin; + type XcmExecuteFilter = Everything; + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Nothing; + type XcmReserveTransferFilter = Everything; + type Weigher = FixedWeightBounds; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = TrustedLockers; + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); + type WeightInfo = pallet_xcm::TestWeightInfo; + type AdminOrigin = EnsureRoot; +} + +type Block = frame_system::mocking::MockBlock; + +construct_runtime!( + pub enum Runtime + { + System: frame_system, + Balances: pallet_balances, + MsgQueue: mock_msg_queue, + PolkadotXcm: pallet_xcm, + } +); diff --git a/parachain/runtime/common/src/tests/setup/relay.rs b/parachain/runtime/common/src/tests/setup/relay.rs deleted file mode 100644 index 64b5dcdc92..0000000000 --- a/parachain/runtime/common/src/tests/setup/relay.rs +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use core_primitives::AccountId; -use cumulus_primitives_core::{InteriorMultiLocation, ParaId}; -use frame_support::{match_types, parameter_types}; -use polkadot_runtime_parachains::origin; -use xcm::latest::prelude::{Here, MultiLocation, NetworkId, Parachain, X1}; -use xcm_builder::{ - AccountId32Aliases, ChildParachainAsNative, ChildParachainConvertsVia, - CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, SignedAccountId32AsNative, - SovereignSignedViaLocation, -}; - -parameter_types! { - pub KsmLocation: MultiLocation = Here.into(); - pub const KusamaNetwork: Option = Some(NetworkId::Kusama); - pub UniversalLocation: InteriorMultiLocation = Here; -} - -match_types! { - pub type OnlyParachains: impl Contains = { - MultiLocation { parents: 0, interior: X1(Parachain(_)) } - }; -} - -pub type SovereignAccountOf = - (ChildParachainConvertsVia, AccountId32Aliases); - -pub type LocalAssetTransactor = XcmCurrencyAdapter< - pallet_balances::Pallet, - IsConcrete, - SovereignAccountOf, - AccountId, - (), ->; - -pub type LocalOriginConverter = ( - SovereignSignedViaLocation, - ChildParachainAsNative, - SignedAccountId32AsNative, -); - -#[macro_export] -macro_rules! decl_test_relay_chain_runtime { - () => { - use frame_support::{ - traits::{ConstU128, ConstU32, ConstU64, Everything, Nothing}, - weights::{Weight, IdentityFee, WeightMeter}, - construct_runtime, parameter_types, - }; - use frame_system::EnsureRoot; - use cumulus_primitives_core::ParaId; - use core_primitives::{Balance, AccountId}; - use xcm_executor::XcmExecutor; - use polkadot_runtime_parachains::{configuration, origin, shared}; - use xcm::latest::prelude::{NetworkId, MultiLocation, Here, Junction, Parachain, X1}; - use sp_core::H256; - use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; - use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, - IsChildSystemParachain, IsConcrete, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - }; - use xcm_simulator::{ProcessMessage, AggregateMessageOrigin, UmpQueueId, ProcessMessageError}; - use runtime_common::BlockHashCount; - use runtime_common::tests::setup::relay::{SovereignAccountOf,LocalAssetTransactor,KsmLocation,KusamaNetwork}; - use runtime_common::tests::setup::relay::{OnlyParachains, LocalOriginConverter, UniversalLocation}; - // created by `decl_test_network!` - type XcmRouter = RelayChainXcmRouter; - - impl frame_system::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Block = frame_system::mocking::MockBlock; - type Hash = H256; - type Hashing = ::sp_runtime::traits::BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type BlockWeights = (); - type BlockLength = (); - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type DbWeight = (); - type BaseCallFilter = Everything; - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = ConstU32<16>; - } - - impl pallet_balances::Config for Runtime { - type MaxLocks = ConstU32<50>; - type Balance = Balance; - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ConstU128<1>; - type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeHoldReason = (); - } - - impl shared::Config for Runtime {} - - impl configuration::Config for Runtime { - type WeightInfo = configuration::TestWeightInfo; - } - - /// The barriers one of which must be passed for an XCM message to be executed. - pub type Barrier = ( - // Weight that is paid for may be consumed. - TakeWeightCredit, - // If the message is one that immediately attemps to pay for execution, then allow it. - AllowTopLevelPaidExecutionFrom, - // Messages coming from system parachains need not pay for execution. - AllowUnpaidExecutionFrom>, - // Expected responses are OK. - AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - ); - - parameter_types! { - pub const MaxAssetsIntoHolding: u32 = 64; - /// The amount of weight an XCM operation takes. This is a safe overestimate. - pub const BaseXcmWeight: Weight = Weight::from_parts(10, 0); - /// Maximum number of instructions in a single XCM fragment. A sanity check against weight - /// calculations getting too crazy. - pub const MaxInstructions: u32 = 100; - } - - pub struct XcmConfig; - impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = XcmRouter; - type AssetTransactor = LocalAssetTransactor; - type OriginConverter = LocalOriginConverter; - type IsReserve = (); - type IsTeleporter = (); - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; // This is the setting should be same from Kusama - type Weigher = FixedWeightBounds; - type Trader = UsingComponents, KsmLocation, AccountId, Balances, ()>; - type ResponseHandler = (); - type AssetTrap = (); - type AssetLocker = (); - type AssetExchanger = (); - type AssetClaims = (); - type SubscriptionService = XcmPallet; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type FeeManager = (); - type MessageExporter = (); - type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; - type SafeCallFilter = Everything; - type Aliasers = Nothing; - } - - pub type LocalOriginToLocation = SignedToAccountId32; - - #[cfg(feature = "runtime-benchmarks")] - parameter_types! { - pub ReachableDest: Option = Some(MultiLocation::parent()); - } - - impl pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; - type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = - xcm_builder::EnsureXcmOrigin; - type XcmExecuteFilter = Everything; - type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Everything; - type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = IsConcrete; - type TrustedLockers = (); - type SovereignAccountOf = SovereignAccountOf; - type MaxLockers = ConstU32<8>; - type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; - type AdminOrigin = EnsureRoot; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); - } - - impl origin::Config for Runtime {} - - parameter_types! { - /// Amount of weight that can be spent per block to service messages. - pub MessageQueueServiceWeight: Weight = Weight::from_parts(1_000_000_000, 1_000_000); - pub const MessageQueueHeapSize: u32 = 65_536; - pub const MessageQueueMaxStale: u32 = 16; - } - - /// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. - pub struct MessageProcessor; - impl ProcessMessage for MessageProcessor { - type Origin = AggregateMessageOrigin; - - fn process_message( - message: &[u8], - origin: Self::Origin, - meter: &mut WeightMeter, - id: &mut [u8; 32], - ) -> Result { - let para = match origin { - AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, - }; - xcm_builder::ProcessXcmMessage::< - Junction, - xcm_executor::XcmExecutor, - RuntimeCall, - >::process_message(message, Junction::Parachain(para.into()), meter, id) - } - } - - impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Size = u32; - type HeapSize = MessageQueueHeapSize; - type MaxStale = MessageQueueMaxStale; - type ServiceWeight = MessageQueueServiceWeight; - type MessageProcessor = MessageProcessor; - type QueueChangeHandler = (); - type QueuePausedQuery = (); - type WeightInfo = (); - } - - construct_runtime!( - pub enum Runtime - { - System: frame_system, - Balances: pallet_balances, - ParasOrigin: origin, - XcmPallet: pallet_xcm, - MessageQueue: pallet_message_queue, - Configuration: configuration, - } - ); - }; -} diff --git a/parachain/runtime/common/src/tests/setup/relay_chain.rs b/parachain/runtime/common/src/tests/setup/relay_chain.rs new file mode 100644 index 0000000000..10263b191e --- /dev/null +++ b/parachain/runtime/common/src/tests/setup/relay_chain.rs @@ -0,0 +1,263 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Relay chain runtime mock. + +use frame_support::{ + construct_runtime, derive_impl, parameter_types, + traits::{Everything, Nothing, ProcessMessage, ProcessMessageError}, + weights::{Weight, WeightMeter}, +}; + +use frame_system::EnsureRoot; +use sp_core::{ConstU32, H256}; +use sp_runtime::{traits::IdentityLookup, AccountId32}; + +use polkadot_parachain_primitives::primitives::Id as ParaId; +use polkadot_runtime_parachains::{ + configuration, + inclusion::{AggregateMessageOrigin, UmpQueueId}, + origin, shared, +}; +use xcm::latest::prelude::*; +use xcm_builder::{ + Account32Hash, AccountId32Aliases, AllowUnpaidExecutionFrom, ChildParachainAsNative, + ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, EnsureDecodableXcm, + FixedRateOfFungible, FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, + IsConcrete, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, +}; +use xcm_executor::{Config, XcmExecutor}; + +pub type AccountId = AccountId32; +pub type Balance = u128; + +parameter_types! { + pub const BlockHashCount: u64 = 250; +} + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] +impl frame_system::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Nonce = u64; + type Hash = H256; + type Hashing = ::sp_runtime::traits::BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type Block = Block; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = BlockHashCount; + type BlockWeights = (); + type BlockLength = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type DbWeight = (); + type BaseCallFilter = Everything; + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; +} + +parameter_types! { + pub ExistentialDeposit: Balance = 1; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = MaxLocks; + type Balance = Balance; + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = (); + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; +} + +impl shared::Config for Runtime { + type DisabledValidators = (); +} + +impl configuration::Config for Runtime { + type WeightInfo = configuration::TestWeightInfo; +} + +parameter_types! { + pub const TokenLocation: Location = Here.into_location(); + pub RelayNetwork: NetworkId = ByGenesis([0; 32]); + pub const AnyNetwork: Option = None; + pub UniversalLocation: InteriorLocation = RelayNetwork::get().into(); + pub UnitWeightCost: u64 = 1_000; +} + +pub type LocationToAccountId = ( + ChildParachainConvertsVia, + AccountId32Aliases, + Account32Hash<(), AccountId>, +); + +pub type LocalAssetTransactor = + FungibleAdapter, LocationToAccountId, AccountId, ()>; + +type LocalOriginConverter = ( + SovereignSignedViaLocation, + ChildParachainAsNative, + SignedAccountId32AsNative, + ChildSystemParachainAsSuperuser, +); + +parameter_types! { + pub const BaseXcmWeight: Weight = Weight::from_parts(1_000, 1_000); + pub TokensPerSecondPerByte: (AssetId, u128, u128) = + (AssetId(TokenLocation::get()), 1_000_000_000_000, 1024 * 1024); + pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; +} + +pub type XcmRouter = EnsureDecodableXcm; +pub type Barrier = AllowUnpaidExecutionFrom; + +pub struct XcmConfig; +impl Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type AssetTransactor = LocalAssetTransactor; + type OriginConverter = LocalOriginConverter; + type IsReserve = (); + type IsTeleporter = (); + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = FixedWeightBounds; + type Trader = FixedRateOfFungible; + type ResponseHandler = (); + type AssetTrap = (); + type AssetLocker = XcmPallet; + type AssetExchanger = (); + type AssetClaims = (); + type SubscriptionService = (); + type PalletInstancesInfo = (); + type FeeManager = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); +} + +pub type LocalOriginToLocation = SignedToAccountId32; + +impl pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type XcmRouter = XcmRouter; + // Anyone can execute XCM messages locally... + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type XcmExecuteFilter = Nothing; + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Everything; + type Weigher = FixedWeightBounds; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = IsConcrete; + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); + type WeightInfo = pallet_xcm::TestWeightInfo; + type AdminOrigin = EnsureRoot; +} + +parameter_types! { + pub const FirstMessageFactorPercent: u64 = 100; +} + +impl origin::Config for Runtime {} + +type Block = frame_system::mocking::MockBlock; + +parameter_types! { + /// Amount of weight that can be spent per block to service messages. + pub MessageQueueServiceWeight: Weight = Weight::from_parts(1_000_000_000, 1_000_000); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 16; +} + +/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. +pub struct MessageProcessor; +impl ProcessMessage for MessageProcessor { + type Origin = AggregateMessageOrigin; + + fn process_message( + message: &[u8], + origin: Self::Origin, + meter: &mut WeightMeter, + id: &mut [u8; 32], + ) -> Result { + let para = match origin { + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, + }; + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + >::process_message(message, Junction::Parachain(para.into()), meter, id) + } +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = (); + type MessageProcessor = MessageProcessor; + type QueueChangeHandler = (); + type QueuePausedQuery = (); + type WeightInfo = (); +} + +construct_runtime!( + pub enum Runtime + { + System: frame_system, + Balances: pallet_balances, + ParasOrigin: origin, + XcmPallet: pallet_xcm, + MessageQueue: pallet_message_queue, + } +); diff --git a/parachain/runtime/common/src/tests/transaction_payment.rs b/parachain/runtime/common/src/tests/transaction_payment.rs index 90b4cb55a1..e6a1e647fc 100644 --- a/parachain/runtime/common/src/tests/transaction_payment.rs +++ b/parachain/runtime/common/src/tests/transaction_payment.rs @@ -19,6 +19,7 @@ use frame_support::{ assert_ok, dispatch::{DispatchClass, DispatchInfo, PostDispatchInfo, RawOrigin}, parameter_types, + traits::{fungible::Credit, Currency}, weights::{constants::ExtrinsicBaseWeight, ConstantMultiplier, Weight, WeightToFee}, }; use pallet_balances::Call as BalancesCall; @@ -28,10 +29,10 @@ use sp_runtime::traits::{Convert, Dispatchable, SignedExtension}; use crate::{ currency::UNIT, tests::setup::{ - alice, bob, info_from_weight, post_info_from_weight, run_with_system_weight, ExtBuilder, + alice, bob, info_from_weight, para_ext, post_info_from_weight, run_with_system_weight, }, - BaseRuntimeRequirements, MinimumMultiplier, NegativeImbalance, RuntimeBlockWeights, - SlowAdjustingFeeUpdate, TargetBlockFullness, WEIGHT_TO_FEE_FACTOR, + BaseRuntimeRequirements, MinimumMultiplier, RuntimeBlockWeights, SlowAdjustingFeeUpdate, + TargetBlockFullness, WEIGHT_TO_FEE_FACTOR, }; type Balances = pallet_balances::Pallet; @@ -72,86 +73,76 @@ where From, ::RuntimeCall: Dispatchable, - ::OnChargeTransaction: - OnChargeTransaction>>, + ::OnChargeTransaction: OnChargeTransaction< + R, + Balance = Balance, + LiquidityInfo = Option>>, + >, { - ExtBuilder::::default() - .balances(vec![ - (alice(), 100_000_000 * UNIT), - (Treasury::::account_id(), 100_000_000 * UNIT), - ]) - .build() - .execute_with(|| { - assert_eq!(Balances::::free_balance(&alice()), 100_000_000 * UNIT); - assert_eq!( - Balances::::free_balance(Treasury::::account_id()), - 100_000_000 * UNIT - ); - let initial_total_issuance = Balances::::total_issuance(); - assert_eq!(initial_total_issuance, 200_000_000 * UNIT); - - let dispatch_info: u128 = 50; - let post_dispatch_info: u128 = 35; - let len = 10; - - // let tranfer_call: Call = - // Call::Balances(BalancesCall::transfer { dest: bob().into(), value: 69 }); - let tranfer_call: Call = - BalancesCall::transfer { dest: bob().into(), value: 69 }.into(); - let mut old_sender_balance = Balances::::free_balance(&alice()); - let mut old_treasury_balance = Balances::::free_balance(Treasury::::account_id()); - let fee: Balance = 0; - let pre = pallet_transaction_payment::ChargeTransactionPayment::::from(fee) - .pre_dispatch( - &alice(), - &tranfer_call, - &info_from_weight(Weight::from_parts(dispatch_info as u64, 0)), - len as usize, - ) - .unwrap(); - parameter_types! { - pub const WeightToFeeFactor: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 - } - // This test here already assume that we use ConstantMultiplier - let total_payment: Balance = - ConstantMultiplier::::weight_to_fee( - &ExtrinsicBaseWeight::get(), - ) + ConstantMultiplier::::weight_to_fee( - &Weight::from_parts(dispatch_info as u64, 0), - ) + (len as Balance) * TransactionByteFee::get(); - assert_eq!(old_sender_balance - Balances::::free_balance(&alice()), total_payment); - assert_eq!( - Balances::::free_balance(Treasury::::account_id()), - old_treasury_balance - ); - - old_sender_balance = Balances::::free_balance(&alice()); - old_treasury_balance = Balances::::free_balance(Treasury::::account_id()); - assert_ok!(>::post_dispatch( - Some(pre), + para_ext(1).execute_with(|| { + let _ = Balances::::deposit_creating(&alice(), (100_000_000 - 10) * UNIT); + let _ = Balances::::deposit_creating(&Treasury::::account_id(), 100_000_000 * UNIT); + + let initial_total_issuance = Balances::::total_issuance(); + assert_eq!(initial_total_issuance, 200_000_000 * UNIT); + + let dispatch_info: u128 = 50; + let post_dispatch_info: u128 = 35; + let len = 10; + + let tranfer_call: Call = + BalancesCall::transfer_keep_alive { dest: bob().into(), value: 69 }.into(); + let mut old_sender_balance = Balances::::free_balance(&alice()); + let mut old_treasury_balance = Balances::::free_balance(Treasury::::account_id()); + let fee: Balance = 0; + let pre = pallet_transaction_payment::ChargeTransactionPayment::::from(fee) + .pre_dispatch( + &alice(), + &tranfer_call, &info_from_weight(Weight::from_parts(dispatch_info as u64, 0)), - &post_info_from_weight(Weight::from_parts(post_dispatch_info as u64, 0)), len as usize, - &Ok(()) - )); - // (dispatch_info - post_dispatch_info) weights (toFee) are refunded - let refunded = (dispatch_info - post_dispatch_info) * WEIGHT_TO_FEE_FACTOR; - assert_eq!(Balances::::free_balance(&alice()) - old_sender_balance, refunded); - - // treasury gets 40% of actual payment - let actual_payment = total_payment - refunded; - assert_eq!( - Balances::::free_balance(Treasury::::account_id()) - old_treasury_balance, - actual_payment * 40 / (40 + 60) - ); - - // ... and the rest (= 60% of actual payment) is burnt - assert_eq!( - initial_total_issuance - Balances::::total_issuance(), - actual_payment * 60 / (40 + 60) - ); - }) + ) + .unwrap(); + parameter_types! { + pub const WeightToFeeFactor: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 + } + // This test here already assume that we use ConstantMultiplier + let total_payment: Balance = + ConstantMultiplier::::weight_to_fee( + &ExtrinsicBaseWeight::get(), + ) + ConstantMultiplier::::weight_to_fee( + &Weight::from_parts(dispatch_info as u64, 0), + ) + (len as Balance) * TransactionByteFee::get(); + assert_eq!(old_sender_balance - Balances::::free_balance(&alice()), total_payment); + assert_eq!(Balances::::free_balance(Treasury::::account_id()), old_treasury_balance); + + old_sender_balance = Balances::::free_balance(&alice()); + old_treasury_balance = Balances::::free_balance(Treasury::::account_id()); + assert_ok!(>::post_dispatch( + Some(pre), + &info_from_weight(Weight::from_parts(dispatch_info as u64, 0)), + &post_info_from_weight(Weight::from_parts(post_dispatch_info as u64, 0)), + len as usize, + &Ok(()) + )); + // (dispatch_info - post_dispatch_info) weights (toFee) are refunded + let refunded = (dispatch_info - post_dispatch_info) * WEIGHT_TO_FEE_FACTOR; + assert_eq!(Balances::::free_balance(&alice()) - old_sender_balance, refunded); + + // treasury gets 40% of actual payment + let actual_payment = total_payment - refunded; + assert_eq!( + Balances::::free_balance(Treasury::::account_id()) - old_treasury_balance, + actual_payment * 40 / (40 + 60) + ); + + // ... and the rest (= 60% of actual payment) is burnt + assert_eq!( + initial_total_issuance - Balances::::total_issuance(), + actual_payment * 60 / (40 + 60) + ); + }) } #[macro_export] diff --git a/parachain/runtime/common/src/tests/xcm_parachain/mod.rs b/parachain/runtime/common/src/tests/xcm_parachain/mod.rs deleted file mode 100644 index 273374e19c..0000000000 --- a/parachain/runtime/common/src/tests/xcm_parachain/mod.rs +++ /dev/null @@ -1,1513 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use crate::{ - currency::{CENTS, MILLICENTS, UNIT}, - tests::setup::{alice, bob, relay::SovereignAccountOf, BOB, PARA_A_USER_INITIAL_BALANCE}, - xcm_impl::{CurrencyId, CurrencyIdMultiLocationConvert}, - ParaRuntimeRequirements, WEIGHT_TO_FEE_FACTOR, -}; - -use cumulus_primitives_core::{AbridgedHrmpChannel, ParaId, PersistedValidationData}; -use cumulus_primitives_parachain_inherent::ParachainInherentData; -use frame_support::{ - assert_noop, assert_ok, - traits::{Currency, Get, OriginTrait, PalletInfoAccess}, -}; -use frame_system::RawOrigin; -use parity_scale_codec::Encode; -use polkadot_parachain_primitives::primitives::{HrmpChannelId, RelayChainBlockNumber}; -use sp_runtime::traits::StaticLookup; -use sp_runtime::{ - traits::{Convert, Dispatchable}, - AccountId32, -}; -use sp_std::convert::TryInto; -use std::marker::PhantomData; -use xcm::prelude::{ - All, AssetId as XCMAssetId, Fungibility, Here, Instruction, Junction, MultiAsset, - MultiLocation, OriginKind, Outcome, PalletInstance, Parachain, Parent, WeightLimit, Xcm, - XcmError, -}; -use xcm_executor::traits::ConvertLocation; -use xcm_simulator::TestExt; - -use core_primitives::{AccountId, AssetId, Balance, Weight}; - -pub const RELAY_UNIT: u128 = 1; - -type XTokens = orml_xtokens::Pallet; -type ExtrinsicFilter = pallet_extrinsic_filter::Pallet; -type Balances = pallet_balances::Pallet; -type Assets = pallet_assets::Pallet; -type AssetManager = pallet_asset_manager::Pallet; -type ParachainSystem = cumulus_pallet_parachain_system::Pallet; -type PolkadotXcm = pallet_xcm::Pallet; -type System = frame_system::Pallet; - -fn para_account(x: u32) -> AccountId32 { - >::convert_location(&MultiLocation::new( - 0, - Parachain(x), - )) - .unwrap() -} - -fn sibling_account>(x: u32) -> AccountId32 { - let location = (Parent, Parachain(x)); - >::convert_location(&location.into()) - .unwrap() -} - -fn relay_account>() -> AccountId32 { - >::convert_location(&MultiLocation::parent()).unwrap() -} - -fn para_native_token_multilocation(x: u32) -> MultiLocation { - let location = - (Parent, Parachain(x), PalletInstance( as PalletInfoAccess>::index() as u8)); - location.into() -} - -pub trait TestXCMRequirements { - type ParaOrigin: frame_support::traits::OriginTrait - + From>; - type ParaCall: Clone - + Dispatchable - + From> - + Encode; - type ParaRuntime: ParaRuntimeRequirements - + frame_system::Config - + orml_xtokens::Config> - + pallet_assets::Config - + pallet_asset_manager::Config> - + pallet_treasury::Config - + cumulus_pallet_parachain_system::Config; - type ParaA: xcm_simulator::TestExt; - type ParaB: xcm_simulator::TestExt; - type Relay: xcm_simulator::TestExt; - type RelayOrigin: frame_support::traits::OriginTrait - + From>; - type RelayCall: Clone - + Dispatchable - + From> - + Encode; - type RelayRuntime: frame_system::Config - + pallet_xcm::Config - + pallet_balances::Config; - type UnitWeightCost: frame_support::traits::Get; - type LocationToAccountId: ConvertLocation; - - fn reset(); -} - -pub fn test_xtokens_recognize_multilocation() { - relaychain_parachains_set_up::(); - let xcm_fees_account = pallet_treasury::Pallet::::account_id(); - R::ParaA::execute_with(|| { - // Wrong Multilocation does not pass - assert_noop!( - XTokens::::transfer( - R::ParaOrigin::signed(alice()), - CurrencyId::::SelfReserve(PhantomData), - WEIGHT_TO_FEE_FACTOR * UNIT, - Box::new((Parent, Parachain(2)).into()), - // 1 Foreign aseet = 1 Weight Fee, 4 XCM execution - xcm_simulator::Limited((R::UnitWeightCost::get().ref_time() * 4).into()) - ), - orml_xtokens::Error::::NotSupportedMultiLocation - ); - - assert_ok!(XTokens::::transfer( - R::ParaOrigin::signed(alice()), - CurrencyId::::SelfReserve(PhantomData), - WEIGHT_TO_FEE_FACTOR * UNIT, - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - xcm_simulator::Limited((R::UnitWeightCost::get().ref_time() * 4).into()) - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - WEIGHT_TO_FEE_FACTOR * UNIT - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - WEIGHT_TO_FEE_FACTOR * UNIT /* Notice this is interesting, as it suggest local - * preserve XCM fee belongs - * to remote chain, not local chain */ - ); - }); - - R::ParaB::execute_with(|| { - assert_eq!( - Assets::::balance( - 0, // Asset_id=0. The first registered Token in Para B - &bob() - ), - WEIGHT_TO_FEE_FACTOR * UNIT - u128::from(R::UnitWeightCost::get().ref_time() * 4) - ); - // Check the treasury of remote chain's asset XCM - assert_eq!( - Assets::::balance(0, &xcm_fees_account), - u128::from(R::UnitWeightCost::get().ref_time() * 4) - ); - - // Send ParaA token back to ParachainA's BOB - assert_ok!(XTokens::::transfer( - R::ParaOrigin::signed(bob()), - CurrencyId::ParachainReserve(Box::new( - para_native_token_multilocation::(1) - )), - WEIGHT_TO_FEE_FACTOR * UNIT * 4 / 10, - Box::new( - (Parent, Parachain(1), Junction::AccountId32 { network: None, id: BOB }).into() - ), - xcm_simulator::Limited((R::UnitWeightCost::get().ref_time() * 4).into()) - )); - }); - - R::ParaA::execute_with(|| { - assert_eq!( - Balances::::free_balance(&bob()), - WEIGHT_TO_FEE_FACTOR * UNIT * 4 / 10 - - u128::from(R::UnitWeightCost::get().ref_time() * 4) * WEIGHT_TO_FEE_FACTOR - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - WEIGHT_TO_FEE_FACTOR * UNIT * 6 / 10 /* When non-native assets transferred, the xcm - * fee is moved to - * XcmFeesAccount, which is Treasury, but - * native token just - * burned */ - ); - assert_eq!(Balances::::free_balance(&xcm_fees_account), 0); - }); -} - -// If this test fail, at least some part of XCM fee rule changes -pub fn test_xtokens_weight_parameter() { - relaychain_parachains_set_up::(); - let xcm_fees_account = pallet_treasury::Pallet::::account_id(); - R::ParaA::execute_with(|| { - // Insufficient weight still pass, but has no effect on remote chain - assert_ok!(XTokens::::transfer( - R::ParaOrigin::signed(alice()), - CurrencyId::::SelfReserve(PhantomData), - WEIGHT_TO_FEE_FACTOR * UNIT, - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - xcm_simulator::Limited((R::UnitWeightCost::get().ref_time()).into()) - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - WEIGHT_TO_FEE_FACTOR * UNIT - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - WEIGHT_TO_FEE_FACTOR * UNIT /* Notice this is interesting, as it suggest local - * preserve XCM fee belongs - * to remote chain, not local chain */ - ); - }); - R::ParaB::execute_with(|| { - assert_eq!( - Assets::::balance( - 0, // Asset_id=0. The first registered Token in Para B - &bob() - ), - 0 - ); - // Check the treasury of remote chain's asset XCM - assert_eq!(Assets::::balance(0, &xcm_fees_account), 0); - }); - - R::ParaA::execute_with(|| { - // Redundant weight pass but remote the chain charges its own rule and returns the surplus - assert_ok!(XTokens::::transfer( - R::ParaOrigin::signed(alice()), - CurrencyId::::SelfReserve(PhantomData), - WEIGHT_TO_FEE_FACTOR * UNIT, - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - // R::UnitWeightCost::get().ref_time() * 5 - xcm_simulator::Limited((R::UnitWeightCost::get().ref_time() * 5).into()) - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - 2 * WEIGHT_TO_FEE_FACTOR * UNIT - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - 2 * WEIGHT_TO_FEE_FACTOR * UNIT /* Notice this is interesting, as it suggest local - * preserve XCM - * fee belongs to remote chain, not local chain */ - ); - }); - - R::ParaB::execute_with(|| { - assert_eq!( - Assets::::balance( - 0, // Asset_id=0. The first registered Token in Para B - &bob() - ), - WEIGHT_TO_FEE_FACTOR * UNIT - u128::from(R::UnitWeightCost::get().ref_time() * 4) - ); - // Check the treasury of remote chain's asset XCM - assert_eq!( - Assets::::balance(0, &xcm_fees_account), - u128::from(R::UnitWeightCost::get().ref_time() * 4) - ); - }); -} - -pub fn test_pallet_xcm_recognize_multilocation() -where - ::RuntimeEvent: From>, -{ - relaychain_parachains_set_up::(); - R::ParaA::execute_with(|| { - assert_eq!(Balances::::free_balance(&alice()), PARA_A_USER_INITIAL_BALANCE); - // It is sent but with XCM execution failed as Parachain is not exist. - // Unregistereed Parachain Multilocation does not pass - let dest: MultiLocation = Junction::AccountId32 { network: None, id: BOB }.into(); - assert_ok!(PolkadotXcm::::reserve_transfer_assets( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(4)).into()), - Box::new(dest.into()), - Box::new( - vec![MultiAsset { - id: XCMAssetId::Concrete( - CurrencyIdMultiLocationConvert::::convert(CurrencyId::< - R::ParaRuntime, - >::SelfReserve( - PhantomData - )) - .unwrap(), - ), - fun: Fungibility::Fungible(WEIGHT_TO_FEE_FACTOR * UNIT), - }] - .into() - ), - 0 - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - WEIGHT_TO_FEE_FACTOR * UNIT - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - 0 - ); - // Not XCMP_QUEUE in production environment - // This is the error of mimic XcmRouter: decl_test_network - System::::assert_last_event( - pallet_xcm::Event::::Attempted { - outcome: Outcome::Incomplete(R::UnitWeightCost::get() * 2, XcmError::Unroutable), - } - .into(), - ); - - let dest: MultiLocation = Junction::AccountId32 { network: None, id: BOB }.into(); - assert_ok!(PolkadotXcm::::reserve_transfer_assets( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(2)).into()), - Box::new(dest.into()), - Box::new( - vec![MultiAsset { - id: XCMAssetId::Concrete( - CurrencyIdMultiLocationConvert::::convert(CurrencyId::< - R::ParaRuntime, - >::SelfReserve( - PhantomData - )) - .unwrap(), - ), - fun: Fungibility::Fungible(2 * WEIGHT_TO_FEE_FACTOR * UNIT), - }] - .into() - ), - 0 - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - 3 * WEIGHT_TO_FEE_FACTOR * UNIT - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - 2 * WEIGHT_TO_FEE_FACTOR * UNIT // Only non trpped asset is in sovereign account - ); - System::::assert_last_event( - pallet_xcm::Event::::Attempted { - outcome: Outcome::Complete(R::UnitWeightCost::get() * 2), - } - .into(), - ); - }); - - R::ParaB::execute_with(|| { - assert_eq!( - Assets::::balance( - 0, // Asset_id=0. The first registered Token in Para B - &bob() - ), - 2 * WEIGHT_TO_FEE_FACTOR * UNIT - u128::from(R::UnitWeightCost::get().ref_time() * 4) - ); - }); - // Notice so far pallet_xcm does not handle the asset transfer back - 0.9.23 -} - -pub fn test_methods_xtokens_expected_succeed() { - relaychain_parachains_set_up::(); - R::ParaA::execute_with(|| { - // Solve the DustLost first - let _ = pallet_balances::Pallet::::deposit_creating( - &sibling_account::(2), - UNIT, - ); - - // Sending 10 ParaA token after xcm fee to BOB by XTokens::transfer_multiasset - assert_ok!(XTokens::::transfer_multiasset( - R::ParaOrigin::signed(alice()), - Box::new( - MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + CENTS - ) - } - .into() - ), - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - xcm_simulator::Limited(R::UnitWeightCost::get().saturating_mul(4)) - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - - u128::from(R::UnitWeightCost::get().ref_time() * 4) - - CENTS - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - UNIT + u128::from(R::UnitWeightCost::get().ref_time() * 4) + CENTS - ); - - // Sending 100 ParaA token after xcm fee to BOB by XTokens::transfer_with_fee - assert_ok!(XTokens::::transfer_with_fee( - R::ParaOrigin::signed(alice()), - CurrencyId::::SelfReserve(PhantomData), - 10 * CENTS, - (R::UnitWeightCost::get().ref_time() * 4).into(), - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - xcm_simulator::Limited(R::UnitWeightCost::get().saturating_mul(4)) - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - - u128::from(R::UnitWeightCost::get().ref_time() * 8) - - 11 * CENTS - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - UNIT + u128::from(R::UnitWeightCost::get().ref_time() * 8) + 11 * CENTS - ); - - // Sending 1 UNIT ParaA token after xcm fee to BOB by XTokens::transfer_multiasset_with_fee - assert_ok!(XTokens::::transfer_multiasset_with_fee( - R::ParaOrigin::signed(alice()), - Box::new( - MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible(UNIT) - } - .into() - ), - Box::new( - MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible((R::UnitWeightCost::get().ref_time() * 4).into()) - } - .into() - ), - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - xcm_simulator::Limited(R::UnitWeightCost::get().saturating_mul(4)) - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - - u128::from(R::UnitWeightCost::get().ref_time() * 12) - - 111 * CENTS - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - UNIT + u128::from(R::UnitWeightCost::get().ref_time() * 12) + 111 * CENTS - ); - - // Sending 10 UNIT ParaA token after xcm fee to BOB by XTokens::transfer_multicurrencies - assert_ok!(XTokens::::transfer_multicurrencies( - R::ParaOrigin::signed(alice()), - vec![( - CurrencyId::::SelfReserve(PhantomData), - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 10 * UNIT - )], - 0, - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - xcm_simulator::Limited(R::UnitWeightCost::get().saturating_mul(4)) - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - - u128::from(R::UnitWeightCost::get().ref_time() * 16) - - 1111 * CENTS - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - UNIT + u128::from(R::UnitWeightCost::get().ref_time() * 16) + 1111 * CENTS - ); - - // Sending 100 UNIT ParaA token after xcm fee to BOB by XTokens::transfer_multiassets - assert_ok!(XTokens::::transfer_multiassets( - R::ParaOrigin::signed(alice()), - Box::new( - vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 100 * UNIT - ) - }] - .into() - ), - 0, - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - xcm_simulator::Limited(R::UnitWeightCost::get().saturating_mul(4)) - )); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - - u128::from(R::UnitWeightCost::get().ref_time() * 20) - - 11111 * CENTS - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - UNIT + u128::from(R::UnitWeightCost::get().ref_time() * 20) + 11111 * CENTS - ); - }); - - R::ParaB::execute_with(|| { - assert_eq!( - Assets::::balance( - 0, // Asset_id=0. The first registered Token: ParaA Token in Para B - &bob() - ), - 11111 * CENTS - ); - }); -} - -pub fn test_methods_xtokens_expected_fail() { - relaychain_parachains_set_up::(); - // Sending 1 ParaA token after xcm fee to BOB by XTokens::transfer - R::ParaA::execute_with(|| { - // Dust Lost make transaction failed - assert_noop!( - XTokens::::transfer( - R::ParaOrigin::signed(alice()), - CurrencyId::::SelfReserve(PhantomData), - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 100 * MILLICENTS, - Box::new( - (Parent, Parachain(2), Junction::AccountId32 { network: None, id: BOB }).into() - ), - // R::UnitWeightCost::get() * 4 - xcm_simulator::Limited(R::UnitWeightCost::get().saturating_mul(4)) - ), - orml_xtokens::Error::::XcmExecutionFailed - ); - assert_eq!(Balances::::free_balance(&alice()), PARA_A_USER_INITIAL_BALANCE); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - // This is caused by DustLost of pallet_balances - // We keep this single weird test implementation to see if - // omrl_xtoken changes way of handling such. - // The issue is minor: We should fund/test real token - // transfer with amount more than DustLost - 0 - ); - }); -} - -pub fn test_methods_pallet_xcm_expected_succeed() -where - ::RuntimeEvent: From>, -{ - relaychain_parachains_set_up::(); - - R::ParaA::execute_with(|| { - assert_eq!(Balances::::free_balance(&alice()), PARA_A_USER_INITIAL_BALANCE); - let dest: MultiLocation = Junction::AccountId32 { network: None, id: BOB }.into(); - assert_ok!(PolkadotXcm::::reserve_transfer_assets( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(2)).into()), - Box::new(dest.into()), - Box::new( - vec![MultiAsset { - id: XCMAssetId::Concrete( - CurrencyIdMultiLocationConvert::::convert(CurrencyId::< - R::ParaRuntime, - >::SelfReserve( - PhantomData - )) - .unwrap(), - ), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 100 * MILLICENTS - ), - }] - .into() - ), - 0 - )); - assert_eq!(Balances::::free_balance(&alice()), PARA_A_USER_INITIAL_BALANCE); - // Unlike orml_xtoken, pallet_xcm fails with event when DustLost issue happens - System::::assert_last_event( - pallet_xcm::Event::Attempted { - outcome: Outcome::Incomplete( - R::UnitWeightCost::get() * 2, - XcmError::FailedToTransactAsset(""), - ), - } - .into(), - ); - // Solve the DustLost - let _ = pallet_balances::Pallet::::deposit_creating( - &sibling_account::(2), - UNIT, - ); - let dest: MultiLocation = Junction::AccountId32 { network: None, id: BOB }.into(); - assert_ok!(PolkadotXcm::::reserve_transfer_assets( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(2)).into()), - Box::new(dest.into()), - Box::new( - vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + CENTS - ) - }] - .into() - ), - 0 - )); - System::::assert_last_event( - pallet_xcm::Event::Attempted { - outcome: Outcome::Complete(R::UnitWeightCost::get() * 2), - } - .into(), - ); - - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - - u128::from(R::UnitWeightCost::get().ref_time() * 4) - - CENTS - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - UNIT + u128::from(R::UnitWeightCost::get().ref_time() * 4) + CENTS - ); - let dest: MultiLocation = Junction::AccountId32 { network: None, id: BOB }.into(); - assert_ok!(PolkadotXcm::::limited_reserve_transfer_assets( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(2)).into()), - Box::new(dest.into()), - Box::new( - vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 10 * CENTS - ) - }] - .into() - ), - 0, - WeightLimit::Limited(R::UnitWeightCost::get().saturating_mul(4)) - )); - System::::assert_last_event( - pallet_xcm::Event::Attempted { - outcome: Outcome::Complete(R::UnitWeightCost::get() * 2), - } - .into(), - ); - assert_eq!( - Balances::::free_balance(&alice()), - PARA_A_USER_INITIAL_BALANCE - - u128::from(R::UnitWeightCost::get().ref_time() * 8) - - 11 * CENTS - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - UNIT + u128::from(R::UnitWeightCost::get().ref_time() * 8) + 11 * CENTS - ); - }); - - R::ParaB::execute_with(|| { - assert_eq!( - Assets::::balance( - 0, // Asset_id=0. The first registered Token: ParaA Token in Para B - &bob() - ), - 11 * CENTS - ); - }); -} - -pub fn test_methods_pallet_xcm_expected_fail() { - relaychain_parachains_set_up::(); - R::ParaA::execute_with(|| { - // Mimic the Xcm message sending - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 10 * CENTS, - ), - }] - .into(); - let dest = (Parent, Parachain(2)).into(); - let xcm = Xcm(vec![ - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible((R::UnitWeightCost::get().ref_time() * 4).into()), - }, - weight_limit: WeightLimit::Limited(R::UnitWeightCost::get().saturating_mul(4)), - }, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); - let message = Xcm(vec![Instruction::TransferReserveAsset { assets, dest, xcm }]); - // Stopped by filter, nothing passed by execute, pallet_xcm::XcmExecuteFilter - // If there is no pallet_xcm filter protection, then we should test XcmExexutor::Barrier - // setting here in future - assert_noop!( - PolkadotXcm::::execute( - R::ParaOrigin::signed(alice()), - Box::new(xcm::VersionedXcm::V3(message)), - R::UnitWeightCost::get().saturating_mul(4) - ), - pallet_xcm::Error::::Filtered - ); - let dest: MultiLocation = Junction::AccountId32 { network: None, id: BOB }.into(); - // Stopped by filter, nothing passed by execute, pallet_xcm::XcmTeleportFilter - assert_noop!( - PolkadotXcm::::teleport_assets( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(2)).into()), - Box::new(dest.into()), - Box::new( - vec![MultiAsset { - id: XCMAssetId::Concrete( - para_native_token_multilocation::(1) - ), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + CENTS - ) - }] - .into() - ), - 0 - ), - pallet_xcm::Error::::Filtered - ); - let dest: MultiLocation = Junction::AccountId32 { network: None, id: BOB }.into(); - assert_noop!( - PolkadotXcm::::limited_teleport_assets( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(2)).into()), - Box::new(dest.into()), - Box::new( - vec![MultiAsset { - id: XCMAssetId::Concrete( - para_native_token_multilocation::(1) - ), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 10 * CENTS - ) - }] - .into() - ), - 0, - WeightLimit::Limited(R::UnitWeightCost::get().saturating_mul(4)) - ), - pallet_xcm::Error::::Filtered - ); - }) -} - -// Send Xcm by root/individual on sibling to maniplulate XCM parachain soverign accounts -pub fn test_pallet_xcm_send_capacity_between_sibling() { - relaychain_parachains_set_up::(); - // Send result Xcm of pallet_xcm::reserve_transfer_assets by user - R::ParaA::execute_with(|| { - // Mimic the Xcm message sending - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 10 * UNIT, - ), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::ReserveAssetDeposited(assets), - Instruction::ClearOrigin, - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible((R::UnitWeightCost::get().ref_time() * 4).into()), - }, - weight_limit: WeightLimit::Limited(R::UnitWeightCost::get().saturating_mul(4)), - }, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); - // User sending the raw Xcm works successfully - assert_ok!(PolkadotXcm::::send( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(2)).into()), - Box::new(xcm::VersionedXcm::V3(xcm)), - )); - }); - R::ParaB::execute_with(|| { - // The remote received and ignored - assert_eq!( - Assets::::balance( - 0, // Asset_id=0. The first registered Token in Para B - &bob() - ), - 0 - ); - }); - - // Send result Xcm of pallet_xcm::reserve_transfer_assets by root - R::ParaA::execute_with(|| { - // Mimic the Xcm message sending - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) + 10 * UNIT, - ), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::ReserveAssetDeposited(assets), - Instruction::ClearOrigin, - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible((R::UnitWeightCost::get().ref_time() * 4).into()), - }, - weight_limit: WeightLimit::Limited(R::UnitWeightCost::get().saturating_mul(4)), - }, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); - // Root sending the raw Xcm works successfully - assert_ok!(PolkadotXcm::::send( - RawOrigin::Root.into(), - Box::new((Parent, Parachain(2)).into()), - Box::new(xcm::VersionedXcm::V3(xcm)), - )); - }); - R::ParaB::execute_with(|| { - // The remote received and handled exactly same result as normal transaction - assert_eq!( - Assets::::balance( - 0, // Asset_id=0. The first registered Token in Para B - &bob() - ), - 10 * UNIT - ); - }); - R::ParaA::execute_with(|| { - // Fill up the missing assets - let _ = pallet_balances::Pallet::::deposit_creating( - &sibling_account::(2), - u128::from(R::UnitWeightCost::get().ref_time() * 4) * WEIGHT_TO_FEE_FACTOR + 10 * UNIT, - ); - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - u128::from(R::UnitWeightCost::get().ref_time() * 4) * WEIGHT_TO_FEE_FACTOR + 10 * UNIT - ); - }); - - // Users on Parachain B want to manipulate the soveregin account of Parachain B on Parachain A - R::ParaB::execute_with(|| { - // Mimic the Xcm message sending - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) * WEIGHT_TO_FEE_FACTOR - + 7 * UNIT, - ), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::WithdrawAsset(assets), - Instruction::ClearOrigin, - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) * WEIGHT_TO_FEE_FACTOR, - ), - }, - weight_limit: WeightLimit::Limited(R::UnitWeightCost::get().saturating_mul(4)), - }, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); - // User sending the raw Xcm works successfully - assert_ok!(PolkadotXcm::::send( - R::ParaOrigin::signed(alice()), - Box::new((Parent, Parachain(1)).into()), - Box::new(xcm::VersionedXcm::V3(xcm)), - )); - }); - R::ParaA::execute_with(|| { - // The remote received and ignored - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - u128::from(R::UnitWeightCost::get().ref_time() * 4) * WEIGHT_TO_FEE_FACTOR + 10 * UNIT - ); - assert_eq!(Balances::::free_balance(&bob()), 0); - }); - - // Root on Parachain B want to manipulate the soveregin account of Parachain B on Parachain A - R::ParaB::execute_with(|| { - // Mimic the Xcm message sending - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) * WEIGHT_TO_FEE_FACTOR - + 7 * UNIT, - ), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::WithdrawAsset(assets), - Instruction::ClearOrigin, - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 4) * WEIGHT_TO_FEE_FACTOR, - ), - }, - weight_limit: WeightLimit::Limited(R::UnitWeightCost::get().saturating_mul(4)), - }, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); - // Root sending the raw Xcm works successfully - assert_ok!(PolkadotXcm::::send( - RawOrigin::Root.into(), - Box::new((Parent, Parachain(1)).into()), - Box::new(xcm::VersionedXcm::V3(xcm)), - )); - }); - R::ParaA::execute_with(|| { - // The remote received and handled; So we trust root power no matter. - assert_eq!( - Balances::::free_balance(&sibling_account::(2)), - 3 * UNIT - ); - assert_eq!(Balances::::free_balance(&bob()), 7 * UNIT); - }); -} - -// Send Xcm by root/individual on relay to maniplulate xcm parachain soverign accounts -pub fn test_pallet_xcm_send_capacity_without_transact() { - relaychain_parachains_set_up::(); - R::ParaA::execute_with(|| { - // normal create is wrong - // need to set asset is_frozen to True, otherwise no existing account (i.e. no native token) - // is not allowed to proccessing assets token - assert_ok!(Assets::::force_create( - RawOrigin::Root.into(), - 1.into(), - ::Lookup::unlookup(alice()), - true, - 1 - )); - assert_ok!(AssetManager::::register_foreign_asset_type( - RawOrigin::Root.into(), - CurrencyId::ParachainReserve(Box::new((Parent, Here).into())), - Default::default() - )); - assert_ok!(AssetManager::::set_asset_units_per_second( - RawOrigin::Root.into(), - 1, - 50_000 * RELAY_UNIT /* Although does not matter here - *1_000_000_000_000 / 20_000_000; Since Para UnitWeightCost : - * Relay UnitWeightCost = 200_000_000 : 10 */ - )); - }); - - // Relay users manipulate the soveregin account of Relay on Parachain A fail - R::Relay::execute_with(|| { - // Mimic the Xcm message sending - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete((Parent, Here).into()), - fun: Fungibility::Fungible(10 * 4 * RELAY_UNIT + 10_000 * RELAY_UNIT), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::ReserveAssetDeposited(assets), - Instruction::ClearOrigin, - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete((Parent, Here).into()), - fun: Fungibility::Fungible(10 * 4), - }, - weight_limit: WeightLimit::Limited(R::UnitWeightCost::get().saturating_mul(4)), - }, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); - let dest: MultiLocation = Junction::Parachain(1).into(); - // User sending the raw Xcm works successfully - assert_ok!(pallet_xcm::Pallet::::send( - R::RelayOrigin::signed(alice()), - Box::new(dest.into()), - Box::new(xcm::VersionedXcm::V3(xcm)), - )); - }); - R::ParaA::execute_with(|| { - // Message ignored - assert_eq!(Assets::::balance(1, &bob()), 0); - }); - - // Relay root manipulate the soveregin account of Relay on Parachain A succeed - R::Relay::execute_with(|| { - // Mimic the Xcm message sending - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete((Parent, Here).into()), - fun: Fungibility::Fungible(10 * 4 * RELAY_UNIT + 10_000 * RELAY_UNIT), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::ReserveAssetDeposited(assets), - Instruction::ClearOrigin, - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete((Parent, Here).into()), - fun: Fungibility::Fungible(10 * 4), - }, - weight_limit: WeightLimit::Limited(Weight::from_parts( - 200_000_000u64 * 4u64 * >::try_into(RELAY_UNIT).unwrap(), - 0, - )), - }, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); // Root sending the raw Xcm works successfully - let dest: MultiLocation = Parachain(1).into(); - assert_ok!(pallet_xcm::Pallet::::send( - RawOrigin::Root.into(), - Box::new(dest.into()), - Box::new(xcm::VersionedXcm::V3(xcm)), - )); - }); - R::ParaA::execute_with(|| { - // Relay root is similar Sibling root - assert_eq!(Assets::::balance(1, &bob()), 10_000 * RELAY_UNIT); - }); - - // But as relay, Xcm without Buy execution is also fine - // Relay root manipulate the soveregin account of Relay on Parachain A succeed - R::Relay::execute_with(|| { - // Mimic the Xcm message sending - // It should fail since XcmExecutor::IsReserve setting - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete((Parent, Here).into()), - fun: Fungibility::Fungible(20_000 * RELAY_UNIT), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::ReserveAssetDeposited(assets), - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); - let dest: MultiLocation = Parachain(1).into(); - // Root sending the raw Xcm works successfully - assert_ok!(pallet_xcm::Pallet::::send( - RawOrigin::Root.into(), - Box::new(dest.into()), - Box::new(xcm::VersionedXcm::V3(xcm)), - )); - }); - R::ParaA::execute_with(|| { - // We trust Relay root with even more power than Sibling root. They can easily manipulate - // thei R::ParaRuntime asset on our chain - assert_eq!(Assets::::balance(1, &bob()), 30_000 * RELAY_UNIT); - }); - - // Relay root manipulate LIT on Parachain A failed - R::Relay::execute_with(|| { - // Mimic the Xcm message sending, Here we even try to manipulate local parachainA token LIT - // It should fail since XcmExecutor::IsReserve setting - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible(2 * UNIT), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::ReserveAssetDeposited(assets), - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: BOB }.into(), - }, - ]); - // Root sending the raw Xcm works successfully - let dest: MultiLocation = Parachain(1).into(); - assert_ok!(pallet_xcm::Pallet::::send( - RawOrigin::Root.into(), - Box::new(dest.into()), - Box::new(xcm::VersionedXcm::V3(xcm)), - )); - }); - R::ParaA::execute_with(|| { - // We trust Relay root with even more power than Sibling root. They can easily manipulate - // ou R::ParaRuntime asset But extra XcmExecutor::IsReserve filter stop chain root handle - // non-"self reserve" asset - assert_eq!(Balances::::free_balance(&bob()), 0); - }); -} - -// Relay root manipulate its own sovereign account on Parachain A by Xcm::Transact (Flawed) -pub fn test_pallet_xcm_send_capacity_relay_manipulation() -where - ::RuntimeEvent: - From>, - <::Lookup as sp_runtime::traits::StaticLookup>::Source: - From, -{ - relaychain_parachains_set_up::(); - R::ParaA::execute_with(|| { - let _ = pallet_balances::Pallet::::deposit_creating( - &relay_account::(), - 10 * WEIGHT_TO_FEE_FACTOR * UNIT, - ); - assert_eq!( - Balances::::free_balance(&relay_account::()), - 10 * WEIGHT_TO_FEE_FACTOR * UNIT - ); - assert_eq!(Balances::::free_balance(&bob()), 0); - assert_ok!(ExtrinsicFilter::::set_mode( - RawOrigin::Root.into(), - pallet_extrinsic_filter::OperationalMode::Test - )); - }); - R::Relay::execute_with(|| { - let call_message: R::ParaCall = pallet_balances::Call::transfer { - dest: bob().into(), - value: 2 * WEIGHT_TO_FEE_FACTOR * UNIT, - } - .into(); - - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - /* Assets used for fee */ - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 5) * WEIGHT_TO_FEE_FACTOR - + 100 * MILLICENTS, - ), - }] - .into(); - let xcm = Xcm(vec![ - Instruction::WithdrawAsset(assets), - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete(para_native_token_multilocation::(1)), - fun: Fungibility::Fungible( - u128::from(R::UnitWeightCost::get().ref_time() * 5) * WEIGHT_TO_FEE_FACTOR - + 100 * MILLICENTS, - ), - }, - weight_limit: WeightLimit::Limited( - R::UnitWeightCost::get() - .saturating_mul(5) - .saturating_add(Weight::from_parts(1_000_000_000u64, 0)), - ), - }, - Instruction::Transact { - origin_kind: OriginKind::SovereignAccount, - require_weight_at_most: 1_000_000_000.into(), - call: call_message.encode().into(), - }, - Instruction::RefundSurplus, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { - network: None, - id: relay_account::().into(), - } - .into(), - }, - ]); - let dest: MultiLocation = Junction::Parachain(1).into(); - // Root sending the raw Xcm works successfully - assert_ok!(pallet_xcm::Pallet::::send( - RawOrigin::Root.into(), - Box::new(dest.into()), - Box::new(xcm::VersionedXcm::V3(xcm.clone())), - )); - System::::assert_last_event( - pallet_xcm::Event::Sent { - origin: Here.into(), - destination: dest, - message: xcm, - message_id: Default::default(), - } - .into(), - ); - }); - R::ParaA::execute_with(|| { - // assert_eq!( - // System::events().into_iter().map(|evt| evt.event).collect::>(), - // vec![] - // ); - // The whole Xcm get Executed but fee paid without Transact executed ?????????? - // TODO:: Some very detials need to be checked - // We leave it here for now. As neither do we have to consider Relay root attack Parachain - assert_eq!( - Balances::::free_balance(&bob()), - 2 * WEIGHT_TO_FEE_FACTOR * UNIT - ); - assert_eq!(pallet_balances::Pallet::::free_balance(&bob()), 0); - let xcm_fee = u128::from(R::UnitWeightCost::get().ref_time() * 5) * WEIGHT_TO_FEE_FACTOR - + 100 * MILLICENTS; - assert_eq!( - Balances::::free_balance(&relay_account::()), - 10 * WEIGHT_TO_FEE_FACTOR * UNIT - xcm_fee - 2 * WEIGHT_TO_FEE_FACTOR * UNIT - ); - // restore normal mode? - assert_ok!(ExtrinsicFilter::::set_mode( - RawOrigin::Root.into(), - pallet_extrinsic_filter::OperationalMode::Normal - )); - }); -} - -// Parachain root manipulate its own sovereign account on Relay by Xcm::Transact succeed -pub fn test_pallet_xcm_send_capacity_parachain_manipulation() -where - ::RuntimeEvent: From>, - <::Lookup as sp_runtime::traits::StaticLookup>::Source: - From, -{ - relaychain_parachains_set_up::(); - R::ParaA::execute_with(|| { - let call_message: R::RelayCall = - pallet_balances::Call::transfer { dest: bob().into(), value: 2 * RELAY_UNIT }.into(); - let assets = vec![MultiAsset { - id: XCMAssetId::Concrete(Here.into()), - fun: Fungibility::Fungible(2_000_000_000 * RELAY_UNIT), // Assets used for fee - }] - .into(); - let xcm = Xcm(vec![ - Instruction::WithdrawAsset(assets), - Instruction::BuyExecution { - fees: MultiAsset { - id: XCMAssetId::Concrete(Here.into()), - fun: Fungibility::Fungible(2_000_000_000 * RELAY_UNIT), - }, - weight_limit: WeightLimit::Limited(2_000_000_000.into()), - }, - Instruction::Transact { - origin_kind: OriginKind::SovereignAccount, - require_weight_at_most: 1_000_000_000.into(), - call: call_message.encode().into(), - }, - Instruction::RefundSurplus, - Instruction::DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { network: None, id: para_account(1).into() } - .into(), - }, - ]); - // Root sending the raw Xcm works successfully - assert_ok!(PolkadotXcm::::send( - RawOrigin::Root.into(), - Box::new(Parent.into()), - Box::new(xcm::VersionedXcm::V3(xcm.clone())), - )); - System::::assert_last_event( - pallet_xcm::Event::Sent { - origin: Here.into(), - destination: Parent.into(), - message: xcm, - message_id: Default::default(), - } - .into(), - ); - }); - R::Relay::execute_with(|| { - // Manipulation successful - assert_eq!( - pallet_balances::Pallet::::free_balance(&bob()), - 2 * RELAY_UNIT - ); - let xcm_fee = 1_000_000_000 * RELAY_UNIT + 5 * 10 * RELAY_UNIT; - // So Transact simply consume all "require_weight_at_most" as long as qualified for dispatch - // weight. - assert_eq!( - pallet_balances::Pallet::::free_balance(¶_account(1)), - RELAY_SOVEREIGN_ACCOUNT_INITIAL_BALANCE - 2 * RELAY_UNIT - xcm_fee - ); - }); -} - -fn register_channel_info( - sender: ParaId, - recipient: ParaId, -) { - let mut sproof_builder = cumulus_test_relay_sproof_builder::RelayStateSproofBuilder { - para_id: sender, - hrmp_egress_channel_index: Some(vec![recipient]), - ..Default::default() - }; - - sproof_builder.hrmp_channels.insert( - HrmpChannelId { sender, recipient }, - AbridgedHrmpChannel { - max_capacity: 10, - max_total_size: 10_000_000_u32, - max_message_size: 10_000_000_u32, - msg_count: 0, - total_size: 0_u32, - mqc_head: None, - }, - ); - - let (relay_parent_storage_root, relay_chain_state) = sproof_builder.into_state_root_and_proof(); - let n = 1u32; - let vfp = PersistedValidationData { - relay_parent_number: n as RelayChainBlockNumber, - relay_parent_storage_root, - ..Default::default() - }; - let system_inherent_data = ParachainInherentData { - validation_data: vfp, - relay_chain_state, - downward_messages: Default::default(), - horizontal_messages: Default::default(), - }; - - assert_ok!(ParachainSystem::::set_validation_data( - RawOrigin::None.into(), - system_inherent_data - )); -} - -pub const RELAY_SOVEREIGN_ACCOUNT_INITIAL_BALANCE: u128 = 100_000_000_000_000 * RELAY_UNIT; - -fn relaychain_parachains_set_up() { - R::reset(); - R::Relay::execute_with(|| { - let _ = Balances::::deposit_creating( - ¶_account(1), - RELAY_SOVEREIGN_ACCOUNT_INITIAL_BALANCE, - ); - let _ = Balances::::deposit_creating( - ¶_account(2), - RELAY_SOVEREIGN_ACCOUNT_INITIAL_BALANCE, - ); - }); - R::ParaA::execute_with(|| { - register_channel_info::(1.into(), 2.into()); - }); - R::ParaB::execute_with(|| { - register_channel_info::(2.into(), 1.into()); - }); - R::ParaA::execute_with(|| { - // normal create is wrong - // need to set asset is_frozen to True, otherwise no existing account (i.e. no native token) - // is not allowed to proccessing assets token - assert_ok!(Assets::::force_create( - RawOrigin::Root.into(), - 0.into(), - ::Lookup::unlookup(alice()), - true, - 1 - )); - assert_ok!(AssetManager::::register_foreign_asset_type( - RawOrigin::Root.into(), - CurrencyId::::ParachainReserve(Box::new( - para_native_token_multilocation::(2) - )), - Default::default() - )); - assert_ok!(AssetManager::::set_asset_units_per_second( - RawOrigin::Root.into(), - 0, - 1_000_000_000_000 // 1 weight = 1 foreign token - )); - }); - R::ParaB::execute_with(|| { - // normal create is wrong - // need to set asset is_frozen to True, otherwise no existing account (i.e. no native token) - // is not allowed to proccessing assets token - assert_ok!(Assets::::force_create( - RawOrigin::Root.into(), - 0.into(), - ::Lookup::unlookup(alice()), - true, - 1 - )); - assert_ok!(AssetManager::::register_foreign_asset_type( - RawOrigin::Root.into(), - CurrencyId::::ParachainReserve(Box::new( - para_native_token_multilocation::(1) - )), - Default::default() - )); - assert_ok!(AssetManager::::set_asset_units_per_second( - RawOrigin::Root.into(), - 0, - 1_000_000_000_000 - )); - }); -} -// TODO::figure out the other OriginKind scenario - -#[macro_export] -macro_rules! run_xcm_tests { - () => { - use runtime_common::tests::{xcm_parachain, xcm_parachain::TestXCMRequirements}; - - struct XCMRequirements; - - impl TestXCMRequirements for XCMRequirements { - type ParaOrigin = RuntimeOrigin; - type ParaCall = RuntimeCall; - type ParaRuntime = Runtime; - type ParaA = ParaA; - type ParaB = ParaB; - type Relay = Relay; - type RelayOrigin = RelayOrigin; - type RelayCall = RelayCall; - type RelayRuntime = RelayChainRuntime; - type UnitWeightCost = UnitWeightCost; - type LocationToAccountId = LocationToAccountId; - - fn reset() { - TestNet::reset() - } - } - - #[test] - fn test_xtokens_recognize_multilocation() { - xcm_parachain::test_xtokens_recognize_multilocation::(); - } - - // If this test fail, at least some part of XCM fee rule changes - #[test] - fn test_xtokens_weight_parameter() { - xcm_parachain::test_xtokens_weight_parameter::(); - } - - #[test] - fn test_pallet_xcm_recognize_multilocation() { - xcm_parachain::test_pallet_xcm_recognize_multilocation::(); - } - - #[test] - fn test_methods_xtokens_expected_succeed() { - xcm_parachain::test_methods_xtokens_expected_succeed::(); - } - - #[test] - fn test_methods_xtokens_expected_fail() { - xcm_parachain::test_methods_xtokens_expected_fail::(); - } - - #[test] - fn test_methods_pallet_xcm_expected_succeed() { - xcm_parachain::test_methods_pallet_xcm_expected_succeed::(); - } - - #[test] - fn test_methods_pallet_xcm_expected_fail() { - xcm_parachain::test_methods_pallet_xcm_expected_fail::(); - } - - // Send Xcm by root/individual on sibling to maniplulate XCM parachain soverign accounts - #[test] - fn test_pallet_xcm_send_capacity_between_sibling() { - xcm_parachain::test_pallet_xcm_send_capacity_between_sibling::(); - } - - // Send Xcm by root/individual on relay to maniplulate xcm parachain soverign accounts - #[test] - fn test_pallet_xcm_send_capacity_without_transact() { - xcm_parachain::test_pallet_xcm_send_capacity_without_transact::(); - } - - // TODO - /* - // Relay root manipulate its own sovereign account on Parachain A by Xcm::Transact (Flawed) - #[test] - fn test_pallet_xcm_send_capacity_relay_manipulation() { - xcm_parachain::test_pallet_xcm_send_capacity_relay_manipulation::(); - } - - // Parachain root manipulate its own sovereign account on Relay by Xcm::Transact succeed - #[test] - fn test_pallet_xcm_send_capacity_parachain_manipulation() { - xcm_parachain::test_pallet_xcm_send_capacity_parachain_manipulation::( - ); - } - */ - }; -} diff --git a/parachain/runtime/common/src/xcm_impl.rs b/parachain/runtime/common/src/xcm_impl.rs deleted file mode 100644 index e36c98a5c8..0000000000 --- a/parachain/runtime/common/src/xcm_impl.rs +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use frame_support::traits::{tokens::fungibles::Mutate, ContainsPair, Get, PalletInfoAccess}; -use pallet_balances::pallet::Pallet as RuntimeBalances; -use parachain_info::pallet::Pallet as ParachainInfo; -use parity_scale_codec::{Decode, Encode}; -use scale_info::TypeInfo; -use sp_runtime::traits::{Convert, MaybeEquivalence, Zero}; -use sp_std::{boxed::Box, cmp::Ordering, marker::PhantomData, prelude::*}; -use xcm::{ - latest::{ - prelude::{Fungibility, Junction, Junctions, MultiAsset, MultiLocation, XcmError}, - AssetId as xcmAssetId, Weight, XcmContext, - }, - prelude::{Parachain, X1}, -}; -use xcm_builder::TakeRevenue; -use xcm_executor::traits::{ConvertLocation, MatchesFungibles, WeightTrader}; - -use crate::{BaseRuntimeRequirements, ParaRuntimeRequirements}; -use core_primitives::{AccountId, AssetId}; -use pallet_asset_manager::{AssetTypeGetter, Pallet as AssetManager, UnitsToWeightRatio}; - -use super::WEIGHT_REF_TIME_PER_SECOND; - -// We need to know how to charge for incoming assets -// This takes the first fungible asset, and takes whatever UnitPerSecondGetter establishes -// UnitsToWeightRatio trait, which needs to be implemented by AssetIdInfoGetter -pub struct FirstAssetTrader< - AssetType: From + Clone, - AssetIdInfoGetter: UnitsToWeightRatio, - R: TakeRevenue, ->(u64, Option<(MultiLocation, u128, u128)>, PhantomData<(AssetType, AssetIdInfoGetter, R)>); -impl< - AssetType: From + Clone, - AssetIdInfoGetter: UnitsToWeightRatio, - R: TakeRevenue, - > WeightTrader for FirstAssetTrader -{ - fn new() -> Self { - FirstAssetTrader(0, None, PhantomData) - } - fn buy_weight( - &mut self, - weight: Weight, - payment: xcm_executor::Assets, - _context: &XcmContext, - ) -> Result { - let first_asset = payment.fungible_assets_iter().next().ok_or(XcmError::TooExpensive)?; - - // We are only going to check first asset for now. This should be sufficient for simple - // token transfers. We will see later if we change this. - match (first_asset.id, first_asset.fun) { - (xcmAssetId::Concrete(id), Fungibility::Fungible(_)) => { - let asset_type: AssetType = id.into(); - // Shortcut if we know the asset is not supported - // This involves the same db read per block, mitigating any attack based on - // non-supported assets - if !AssetIdInfoGetter::payment_is_supported(asset_type.clone()) { - return Err(XcmError::TooExpensive); - } - if let Some(units_per_second) = AssetIdInfoGetter::get_units_per_second(asset_type) - { - let amount = units_per_second.saturating_mul(weight.ref_time() as u128) - / (WEIGHT_REF_TIME_PER_SECOND as u128); - - // We dont need to proceed if the amount is 0 - // For cases (specially tests) where the asset is very cheap with respect - // to the weight needed - if amount.is_zero() { - return Ok(payment); - } - - let required = MultiAsset { - fun: Fungibility::Fungible(amount), - id: xcmAssetId::Concrete(id), - }; - let unused = - payment.checked_sub(required).map_err(|_| XcmError::TooExpensive)?; - self.0 = self.0.saturating_add(weight.ref_time() as u64); - - // In case the asset matches the one the trader already stored before, add - // to later refund - - // Else we are always going to substract the weight if we can, but we latter do - // not refund it - - // In short, we only refund on the asset the trader first succesfully was able - // to pay for an execution - let new_asset = match self.1 { - Some((prev_id, prev_amount, units_per_second)) => { - if prev_id == id { - Some((id, prev_amount.saturating_add(amount), units_per_second)) - } else { - None - } - }, - None => Some((id, amount, units_per_second)), - }; - - // Due to the trait bound, we can only refund one asset. - if let Some(new_asset) = new_asset { - self.0 = self.0.saturating_add(weight.ref_time() as u64); - self.1 = Some(new_asset); - }; - Ok(unused) - } else { - Err(XcmError::TooExpensive) - } - }, - _ => Err(XcmError::TooExpensive), - } - } - - fn refund_weight(&mut self, weight: Weight, _context: &XcmContext) -> Option { - if let Some((id, prev_amount, units_per_second)) = self.1 { - let ref_time = weight.ref_time().min(self.0); - self.0 -= ref_time; - let amount = - units_per_second * (ref_time as u128) / (WEIGHT_REF_TIME_PER_SECOND as u128); - self.1 = Some((id, prev_amount.saturating_sub(amount), units_per_second)); - Some(MultiAsset { fun: Fungibility::Fungible(amount), id: xcmAssetId::Concrete(id) }) - } else { - None - } - } -} - -/// Deal with spent fees, deposit them as dictated by R -impl< - AssetType: From + Clone, - AssetIdInfoGetter: UnitsToWeightRatio, - R: TakeRevenue, - > Drop for FirstAssetTrader -{ - fn drop(&mut self) { - if let Some((id, amount, _)) = self.1 { - R::take_revenue((id, amount).into()); - } - } -} - -/// XCM fee depositor to which we implement the TakeRevenue trait -/// It receives a fungibles::Mutate implemented argument, a matcher to convert MultiAsset into -/// AssetId and amount, and the fee receiver account -pub struct XcmFeesToAccount( - PhantomData<(Assets, Matcher, AccountId, ReceiverAccount)>, -); -impl< - Assets: Mutate, - Matcher: MatchesFungibles, - AccountId: Clone, - ReceiverAccount: Get, - > TakeRevenue for XcmFeesToAccount -{ - fn take_revenue(revenue: MultiAsset) { - match Matcher::matches_fungibles(&revenue) { - Ok((asset_id, amount)) => { - if !amount.is_zero() { - let ok = Assets::mint_into(asset_id, &ReceiverAccount::get(), amount).is_ok(); - debug_assert!(ok, "`mint_into` cannot generally fail; qed"); - } - }, - Err(_) => log::debug!( - target: "xcm", - "take revenue failed matching fungible" - ), - } - } -} - -pub trait Reserve { - /// Returns assets reserve location. - fn reserve(&self) -> Option; -} - -// Takes the chain part of a MultiAsset -impl Reserve for MultiAsset { - fn reserve(&self) -> Option { - if let xcmAssetId::Concrete(location) = self.id { - let first_interior = location.first_interior(); - let parents = location.parent_count(); - match (parents, first_interior) { - // The only case for non-relay chain will be the chain itself. - (0, Some(Parachain(id))) => Some(MultiLocation::new(0, X1(Parachain(*id)))), - // Only Sibling parachain is recognized. - (1, Some(Parachain(id))) => Some(MultiLocation::new(1, X1(Parachain(*id)))), - // The Relay chain. - (1, _) => Some(MultiLocation::parent()), - // No other case is allowed for now. - _ => None, - } - } else { - None - } - } -} - -/// A `FilterAssetLocation` implementation. Filters multi native assets whose -/// reserve is same with `origin`. -pub struct MultiNativeAsset; - -impl ContainsPair for MultiNativeAsset { - fn contains(asset: &MultiAsset, origin: &MultiLocation) -> bool { - if let Some(ref reserve) = asset.reserve() { - if reserve == origin { - return true; - } - } - false - } -} - -#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] -pub enum CurrencyId4Compare { - #[codec(index = 0)] - SelfReserve, - #[codec(index = 1)] - ParachainReserve(Box), -} - -// Our currencyId. We distinguish for now between SelfReserve, and Others, defined by their Id. -#[derive(Clone, Eq, Debug, PartialEq, Encode, Decode, TypeInfo)] -pub enum CurrencyId { - // The only parachain native token: LIT - SelfReserve(PhantomData), - - // Any parachain based asset, including local native minted ones. - ParachainReserve(Box), -} - -fn convert_currency(s: &CurrencyId) -> CurrencyId4Compare { - match s { - CurrencyId::::SelfReserve(_) => CurrencyId4Compare::SelfReserve, - CurrencyId::::ParachainReserve(multi) => { - CurrencyId4Compare::ParachainReserve(multi.clone()) - }, - } -} - -impl Ord for CurrencyId { - fn cmp(&self, other: &Self) -> Ordering { - convert_currency(self).cmp(&convert_currency(other)) - } -} - -impl PartialOrd for CurrencyId { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl Default for CurrencyId { - fn default() -> Self { - CurrencyId::ParachainReserve(Box::new(MultiLocation::here())) - } -} - -/// Instructs how to convert a 32 byte accountId into a MultiLocation -pub struct AccountIdToMultiLocation; -impl Convert for AccountIdToMultiLocation { - fn convert(account: AccountId) -> MultiLocation { - MultiLocation { - parents: 0, - interior: X1(Junction::AccountId32 { network: None, id: account.into() }), - } - } -} - -pub struct OldAnchoringSelfReserve(PhantomData); -impl OldAnchoringSelfReserve { - /// Returns the value of this parameter type. - pub fn get() -> MultiLocation { - MultiLocation { - parents: 1, - interior: Junctions::X2( - Parachain(ParachainInfo::::parachain_id().into()), - Junction::PalletInstance( as PalletInfoAccess>::index() as u8), - ), - } - } -} - -impl, R: BaseRuntimeRequirements> Get for OldAnchoringSelfReserve { - fn get() -> I { - I::from(Self::get()) - } -} - -pub struct NewAnchoringSelfReserve(PhantomData); - -impl NewAnchoringSelfReserve { - /// Returns the value of this parameter type. - pub fn get() -> MultiLocation { - MultiLocation { - parents: 0, - interior: Junctions::X1(Junction::PalletInstance( - as PalletInfoAccess>::index() as u8, - )), - } - } -} - -impl, R: BaseRuntimeRequirements> Get for NewAnchoringSelfReserve { - fn get() -> I { - I::from(Self::get()) - } -} - -impl From for CurrencyId { - fn from(location: MultiLocation) -> Self { - match location { - a if (a == (OldAnchoringSelfReserve::::get())) - | (a == (NewAnchoringSelfReserve::::get())) => - { - CurrencyId::::SelfReserve(PhantomData) - }, - _ => CurrencyId::::ParachainReserve(Box::new(location)), - } - } -} - -impl From> for CurrencyId { - fn from(location: Option) -> Self { - match location { - Some(multi) => Self::from(multi), - None => CurrencyId::ParachainReserve(Box::default()), - } - } -} - -impl From> for Option { - fn from(currency_id: CurrencyId) -> Self { - match currency_id { - // For now and until Xtokens is adapted to handle 0.9.16 version we use - // the old anchoring here - // This is not a problem in either cases, since the view of the destination - // chain does not change - // TODO! change this to NewAnchoringSelfReserve once xtokens is adapted for it - CurrencyId::::SelfReserve(_) => { - let multi: MultiLocation = OldAnchoringSelfReserve::::get(); - Some(multi) - }, - CurrencyId::::ParachainReserve(multi) => Some(*multi), - } - } -} - -// How to convert from CurrencyId to MultiLocation: for orml convert sp_runtime Convert -// trait -pub struct CurrencyIdMultiLocationConvert(PhantomData); -impl Convert, Option> - for CurrencyIdMultiLocationConvert -{ - fn convert(currency: CurrencyId) -> Option { - currency.into() - } -} - -impl Convert>> - for CurrencyIdMultiLocationConvert -{ - fn convert(multi: MultiLocation) -> Option> { - match multi { - a if (a == OldAnchoringSelfReserve::::get()) - | (a == NewAnchoringSelfReserve::::get()) => - { - Some(CurrencyId::::SelfReserve(PhantomData)) - }, - _ => Some(CurrencyId::::ParachainReserve(Box::new(multi))), - } - } -} - -/// Converter struct implementing `AssetIdConversion` converting a numeric asset ID -/// (must be `TryFrom/TryInto`) into a MultiLocation Value and Viceversa through -/// an intermediate generic type AssetType. -/// The trait bounds enforce is that the AssetTypeGetter trait is also implemented -pub struct AssetIdMultiLocationConvert(PhantomData); - -impl MaybeEquivalence - for AssetIdMultiLocationConvert -where - R: pallet_asset_manager::Config>, -{ - fn convert(multi: &MultiLocation) -> Option { - >::convert_location(multi) - } - - fn convert_back(id: &AssetId) -> Option { - if let Some(currency_id) = - as AssetTypeGetter>>::get_asset_type(*id) - { - as Convert< - CurrencyId, - Option, - >>::convert(currency_id) - } else { - None - } - } -} - -impl ConvertLocation for AssetIdMultiLocationConvert -where - R: pallet_asset_manager::Config>, -{ - fn convert_location(multi: &MultiLocation) -> Option { - if let Some(currency_id) = as Convert< - MultiLocation, - Option>, - >>::convert(*multi) - { - as AssetTypeGetter>>::get_asset_id(currency_id) - } else { - None - } - } -} diff --git a/parachain/runtime/litentry/Cargo.toml b/parachain/runtime/litentry/Cargo.toml index 50f801b63f..945fad61a4 100644 --- a/parachain/runtime/litentry/Cargo.toml +++ b/parachain/runtime/litentry/Cargo.toml @@ -17,6 +17,7 @@ sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } sp-debug-derive = { workspace = true, features = ["force-debug"], optional = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } @@ -42,6 +43,7 @@ pallet-collective = { workspace = true } pallet-democracy = { workspace = true } pallet-identity = { workspace = true } pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } pallet-preimage = { workspace = true } pallet-proxy = { workspace = true } @@ -59,20 +61,20 @@ cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } parachain-info = { workspace = true } +parachains-common = { workspace = true } pallet-xcm = { workspace = true } polkadot-parachain-primitives = { workspace = true } +polkadot-runtime-common = { workspace = true } xcm = { workspace = true } xcm-builder = { workspace = true } xcm-executor = { workspace = true } -orml-traits = { workspace = true } -orml-xtokens = { workspace = true } - cumulus-pallet-session-benchmarking = { workspace = true, optional = true } frame-benchmarking = { workspace = true, optional = true } frame-system-benchmarking = { workspace = true, optional = true } @@ -97,7 +99,7 @@ runtime-common = { workspace = true } fp-evm = { workspace = true } fp-rpc = { workspace = true } -fp-self-contained = { workspace = true, features = ["serde"] } +fp-self-contained = { workspace = true } pallet-ethereum = { workspace = true } pallet-evm = { workspace = true } pallet-evm-precompile-assets-erc20 = { workspace = true } @@ -134,7 +136,12 @@ substrate-wasm-builder = { workspace = true } default = ["std"] fast-runtime = [] runtime-benchmarks = [ + "cumulus-pallet-dmp-queue/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", @@ -142,172 +149,199 @@ runtime-benchmarks = [ "pallet-account-fix/runtime-benchmarks", "pallet-asset-manager/runtime-benchmarks", "pallet-assets-handler/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-bitacross/runtime-benchmarks", "pallet-bounties/runtime-benchmarks", + "pallet-bridge-transfer/runtime-benchmarks", + "pallet-chain-bridge/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", + "pallet-evm-assertions/runtime-benchmarks", + "pallet-evm-precompile-assets-erc20/runtime-benchmarks", "pallet-evm/runtime-benchmarks", + "pallet-extrinsic-filter/runtime-benchmarks", + "pallet-group/runtime-benchmarks", + "pallet-identity-management/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", + "pallet-omni-account/runtime-benchmarks", "pallet-parachain-staking/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", - "pallet-identity-management/runtime-benchmarks", + "pallet-score-staking/runtime-benchmarks", "pallet-teebag/runtime-benchmarks", - "pallet-vc-management/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", + "pallet-vc-management/runtime-benchmarks", + "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "polkadot-runtime-parachains/runtime-benchmarks", "runtime-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", - "pallet-chain-bridge/runtime-benchmarks", - "pallet-bridge-transfer/runtime-benchmarks", - "pallet-extrinsic-filter/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "pallet-score-staking/runtime-benchmarks", - "pallet-omni-account/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "log/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", + "core-primitives/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking?/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-aura/std", + "cumulus-primitives-core/std", + "cumulus-primitives-parachain-inherent/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "fp-evm/std", + "fp-rpc/std", + "fp-self-contained/std", + "frame-benchmarking?/std", "frame-executive/std", "frame-support/std", + "frame-system-benchmarking?/std", + "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime?/std", - "frame-system-rpc-runtime-api/std", - "orml-traits/std", - "orml-xtokens/std", + "hex?/std", + "log/std", + "moonbeam-evm-tracer/std", + "moonbeam-rpc-primitives-debug/std", + "moonbeam-rpc-primitives-txpool/std", + "num_enum/std", "pallet-account-fix/std", "pallet-asset-manager/std", - "pallet-assets/std", "pallet-assets-handler/std", + "pallet-assets/std", "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", + "pallet-bitacross/std", "pallet-bounties/std", + "pallet-bridge-transfer/std", + "pallet-chain-bridge/std", "pallet-collective/std", "pallet-democracy/std", "pallet-ethereum/std", - "pallet-evm/std", + "pallet-evm-assertions/std", "pallet-evm-precompile-assets-erc20/std", "pallet-evm-precompile-blake2/std", - "pallet-evm-precompile-simple/std", "pallet-evm-precompile-bn128/std", + "pallet-evm-precompile-bridge-transfer/std", "pallet-evm-precompile-dispatch/std", "pallet-evm-precompile-ed25519/std", "pallet-evm-precompile-modexp/std", - "pallet-evm-precompile-sha3fips/std", - "pallet-evm-precompile-bridge-transfer/std", "pallet-evm-precompile-parachain-staking/std", "pallet-evm-precompile-score-staking/std", + "pallet-evm-precompile-sha3fips/std", + "pallet-evm-precompile-simple/std", + "pallet-evm/std", + "pallet-extrinsic-filter/std", + "pallet-group/std", + "pallet-identity-management/std", "pallet-identity/std", "pallet-membership/std", + "pallet-message-queue/std", "pallet-multisig/std", + "pallet-omni-account-runtime-api/std", + "pallet-omni-account/std", "pallet-parachain-staking/std", "pallet-preimage/std", "pallet-proxy/std", "pallet-scheduler/std", + "pallet-score-staking/std", "pallet-session/std", + "pallet-teebag/std", "pallet-timestamp/std", - "pallet-transaction-payment/std", "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", "pallet-treasury/std", "pallet-utility/std", + "pallet-vc-management/std", "pallet-vesting/std", - "core-primitives/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-utility/std", - "cumulus-primitives-timestamp/std", - "parachain-info/std", "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "parity-scale-codec/std", "polkadot-parachain-primitives/std", - "xcm/std", + "polkadot-primitives/std", + "polkadot-runtime-common/std", + "polkadot-runtime-parachains/std", + "precompile-utils/std", + 'runtime-common/std', + "scale-info/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-debug-derive?/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-state-machine/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", "xcm-builder/std", "xcm-executor/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking?/std", - "frame-system-benchmarking?/std", - 'runtime-common/std', - "pallet-chain-bridge/std", - "pallet-bridge-transfer/std", - "pallet-extrinsic-filter/std", - "pallet-bitacross/std", - "pallet-omni-account/std", - "pallet-omni-account-runtime-api/std", - "pallet-identity-management/std", - "pallet-score-staking/std", - "pallet-teebag/std", - "pallet-vc-management/std", - "moonbeam-evm-tracer/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "precompile-utils/std", + "xcm/std", ] try-runtime = [ - "hex", - "sp-debug-derive/std", "cumulus-pallet-aura-ext/try-runtime", "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", + "fp-self-contained/try-runtime", "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime", - "fp-self-contained/try-runtime", - "orml-xtokens/try-runtime", + "frame-try-runtime?/try-runtime", + "hex", "pallet-account-fix/try-runtime", "pallet-asset-manager/try-runtime", - "pallet-assets/try-runtime", "pallet-assets-handler/try-runtime", + "pallet-assets/try-runtime", "pallet-aura/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", "pallet-bitacross/try-runtime", "pallet-bounties/try-runtime", - "pallet-chain-bridge/try-runtime", "pallet-bridge-transfer/try-runtime", + "pallet-chain-bridge/try-runtime", "pallet-collective/try-runtime", "pallet-democracy/try-runtime", "pallet-ethereum/try-runtime", - "pallet-evm/try-runtime", "pallet-evm-assertions/try-runtime", - "pallet-identity/try-runtime", + "pallet-evm/try-runtime", + "pallet-extrinsic-filter/try-runtime", "pallet-group/try-runtime", "pallet-identity-management/try-runtime", - "pallet-extrinsic-filter/try-runtime", + "pallet-identity/try-runtime", "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", + "pallet-omni-account/try-runtime", "pallet-parachain-staking/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", "pallet-scheduler/try-runtime", + "pallet-score-staking/try-runtime", "pallet-session/try-runtime", "pallet-teebag/try-runtime", "pallet-timestamp/try-runtime", @@ -318,6 +352,9 @@ try-runtime = [ "pallet-vesting/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", - "pallet-score-staking/try-runtime", - "pallet-omni-account/try-runtime", + "polkadot-runtime-common/try-runtime", + "polkadot-runtime-parachains/try-runtime", + "runtime-common/try-runtime", + "sp-debug-derive/std", + "sp-runtime/try-runtime", ] diff --git a/parachain/runtime/litentry/src/asset_config.rs b/parachain/runtime/litentry/src/asset_config.rs index 1b0f263b87..535a05c253 100644 --- a/parachain/runtime/litentry/src/asset_config.rs +++ b/parachain/runtime/litentry/src/asset_config.rs @@ -1,7 +1,25 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry 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. +// +// Litentry 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 Litentry. If not, see . + use super::{ weights, AccountId, AssetId, Balance, Balances, Runtime, RuntimeEvent, TreasuryPalletId, }; -use crate::{constants::currency::deposit, precompiles::ASSET_PRECOMPILE_ADDRESS_PREFIX}; +use crate::{ + constants::currency::deposit, precompiles::ASSET_PRECOMPILE_ADDRESS_PREFIX, Decode, Encode, +}; use frame_support::{ parameter_types, traits::{AsEnsureOriginWithArg, ConstU32, NeverEnsureOrigin}, @@ -11,9 +29,9 @@ use pallet_evm_precompile_assets_erc20::AddressToAssetId; use parity_scale_codec::Compact; use runtime_common::{ currency::{DOLLARS, EXISTENTIAL_DEPOSIT}, - xcm_impl::CurrencyId, EnsureRootOrHalfCouncil, }; +use scale_info::TypeInfo; use sp_core::{ConstU128, H160}; use sp_runtime::traits::AccountIdConversion; use sp_std::prelude::*; @@ -23,6 +41,16 @@ pub fn get_all_module_accounts() -> Vec { vec![] } +pub struct AssetsBenchmarkHelper; +#[cfg(feature = "runtime-benchmarks")] +impl> pallet_assets::BenchmarkHelper + for AssetsBenchmarkHelper +{ + fn create_asset_id_parameter(id: u32) -> AssetIdParameter { + AssetId::from(id).into() + } +} + parameter_types! { pub LitTreasuryAccount: AccountId = TreasuryPalletId::get().into_account_truncating(); } @@ -57,16 +85,6 @@ impl AddressToAssetId for Runtime { } } -pub struct AssetsBenchmarkHelper; -#[cfg(feature = "runtime-benchmarks")] -impl> pallet_assets::BenchmarkHelper - for AssetsBenchmarkHelper -{ - fn create_asset_id_parameter(id: u32) -> AssetIdParameter { - AssetId::from(id).into() - } -} - impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; @@ -92,11 +110,16 @@ impl pallet_assets::Config for Runtime { type BenchmarkHelper = AssetsBenchmarkHelper; } +#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] +pub enum ForeignAssetType { + Xcm(xcm::v4::Location), +} + impl pallet_asset_manager::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = AssetId; - type ForeignAssetType = CurrencyId; + type ForeignAssetType = ForeignAssetType; // TODO type ForeignAssetModifierOrigin = EnsureRootOrHalfCouncil; type Currency = Balances; type WeightInfo = weights::pallet_asset_manager::WeightInfo; diff --git a/parachain/runtime/litentry/src/lib.rs b/parachain/runtime/litentry/src/lib.rs index 2d1748507f..49d19ac733 100644 --- a/parachain/runtime/litentry/src/lib.rs +++ b/parachain/runtime/litentry/src/lib.rs @@ -25,17 +25,29 @@ extern crate frame_benchmarking; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + genesis_builder_helper::{build_state, get_preset}, + parameter_types, traits::{ + fungible::{Balanced, Credit, HoldConsideration}, + tokens::imbalance::ResolveTo, + tokens::{PayFromAccount, UnityAssetBalanceConversion}, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, Contains, EnsureOrigin, Everything, - FindAuthor, InstanceFilter, OnFinalize, SortedMembers, WithdrawReasons, + FindAuthor, Imbalance, InstanceFilter, LinearStoragePrice, OnFinalize, OnUnbalanced, + SortedMembers, WithdrawReasons, }, weights::{constants::RocksDbWeight, ConstantMultiplier, Weight}, ConsensusEngineId, PalletId, }; use frame_system::EnsureRoot; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; + +// for TEE +pub use pallet_balances::Call as BalancesCall; + +use parachains_common::message_queue::NarrowOriginToSibling; use sp_api::impl_runtime_apis; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, RuntimeDebug, H160, H256, U256}; @@ -44,48 +56,41 @@ pub use sp_runtime::BuildStorage; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ - AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, - DispatchInfoOf, Dispatchable, PostDispatchInfoOf, UniqueSaturatedInto, + AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, DispatchInfoOf, Dispatchable, + PostDispatchInfoOf, UniqueSaturatedInto, }, transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, }; -pub use sp_runtime::{MultiAddress, Perbill, Percent, Permill}; +pub use sp_runtime::{traits::IdentityLookup, MultiAddress, Perbill, Percent, Permill}; use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -use xcm_executor::XcmExecutor; -pub use constants::currency::deposit; +pub use constants::currency::*; pub use core_primitives::{ opaque, teebag::OperationalMode as TeebagOperationalMode, AccountId, Amount, AssetId, Balance, BlockNumber, DefaultOmniAccountConverter, Hash, Header, Identity, Nonce, Signature, DAYS, - HOURS, LITENTRY_PARA_ID, MINUTES, SLOT_DURATION, -}; -pub use runtime_common::currency::*; -use runtime_common::{ - impl_runtime_transaction_payment_fees, prod_or_fast, BlockHashCount, BlockLength, - CouncilInstance, CouncilMembershipInstance, DeveloperCommitteeInstance, - DeveloperCommitteeMembershipInstance, EnsureEnclaveSigner, EnsureOmniAccount, - EnsureRootOrAllCouncil, EnsureRootOrAllTechnicalCommittee, EnsureRootOrHalfCouncil, - EnsureRootOrHalfTechnicalCommittee, EnsureRootOrTwoThirdsCouncil, - EnsureRootOrTwoThirdsTechnicalCommittee, IMPExtrinsicWhitelistInstance, NegativeImbalance, - RuntimeBlockWeights, SlowAdjustingFeeUpdate, TechnicalCommitteeInstance, - TechnicalCommitteeMembershipInstance, VCMPExtrinsicWhitelistInstance, MAXIMUM_BLOCK_WEIGHT, - NORMAL_DISPATCH_RATIO, WEIGHT_PER_GAS, WEIGHT_TO_FEE_FACTOR, + HOURS, MINUTES, SLOT_DURATION, }; -use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; - use pallet_ethereum::{Call::transact, PostLogContent, TransactionStatus}; -use pallet_evm::{ - EVMCurrencyAdapter, FeeCalculator, GasWeightMapping, - OnChargeEVMTransaction as OnChargeEVMTransactionT, Runner, +use pallet_evm::{FeeCalculator, GasWeightMapping, Runner}; +use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; +use pallet_treasury::TreasuryAccountId; +use runtime_common::{ + currency::*, prod_or_fast, BlockHashCount, BlockLength, CouncilInstance, + CouncilMembershipInstance, DeveloperCommitteeInstance, DeveloperCommitteeMembershipInstance, + EnsureEnclaveSigner, EnsureOmniAccount, EnsureRootOrAllCouncil, + EnsureRootOrAllTechnicalCommittee, EnsureRootOrHalfCouncil, EnsureRootOrHalfTechnicalCommittee, + EnsureRootOrTwoThirdsCouncil, EnsureRootOrTwoThirdsTechnicalCommittee, + IMPExtrinsicWhitelistInstance, RuntimeBlockWeights, SlowAdjustingFeeUpdate, + TechnicalCommitteeInstance, TechnicalCommitteeMembershipInstance, + VCMPExtrinsicWhitelistInstance, BLOCK_PROCESSING_VELOCITY, MAXIMUM_BLOCK_WEIGHT, + NORMAL_DISPATCH_RATIO, RELAY_CHAIN_SLOT_DURATION_MILLIS, UNINCLUDED_SEGMENT_CAPACITY, + WEIGHT_PER_GAS, WEIGHT_TO_FEE_FACTOR, }; -// for TEE -pub use pallet_balances::Call as BalancesCall; - // Make the WASM binary available. #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); @@ -130,10 +135,14 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = fp_self_contained::UncheckedExtrinsic; + /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic; +/// The payload being signed in transactions. +pub type SignedPayload = generic::SignedPayload; + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -221,7 +230,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("litentry-parachain"), authoring_version: 1, // same versioning-mechanism as polkadot: use last digit for minor updates - spec_version: 9202, + spec_version: 9210, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -236,7 +245,6 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const Version: RuntimeVersion = VERSION; - pub const SS58Prefix: u16 = 31; } @@ -250,6 +258,7 @@ impl frame_system::Config for Runtime { type Hashing = BlakeTwo256; type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type BlockHashCount = BlockHashCount; type Version = Version; type PalletInfo = PalletInfo; @@ -258,12 +267,17 @@ impl frame_system::Config for Runtime { type OnKilledAccount = (); type DbWeight = RocksDbWeight; type BaseCallFilter = BaseCallFilter; - type SystemWeightInfo = weights::frame_system::WeightInfo; + type SystemWeightInfo = (); type BlockWeights = RuntimeBlockWeights; type BlockLength = BlockLength; type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } parameter_types! { @@ -387,7 +401,6 @@ impl pallet_proxy::Config for Runtime { } impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = (); type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; @@ -412,23 +425,28 @@ impl pallet_scheduler::Config for Runtime { type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRootOrAllCouncil; type MaxScheduledPerBlock = ConstU32<50>; - type WeightInfo = weights::pallet_scheduler::WeightInfo; + type WeightInfo = (); type OriginPrivilegeCmp = frame_support::traits::EqualPrivilegeOnly; type Preimages = Preimage; } parameter_types! { - pub const PreimageMaxSize: u32 = 4096 * 1024; - pub const PreimageBaseDeposit: Balance = 1 * DOLLARS; + pub const PreimageBaseDeposit: Balance = deposit(1, 0); + pub const PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { - type WeightInfo = weights::pallet_preimage::WeightInfo; + type WeightInfo = (); type RuntimeEvent = RuntimeEvent; type Currency = Balances; - type ManagerOrigin = EnsureRootOrAllCouncil; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type ManagerOrigin = EnsureRootOrHalfCouncil; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } parameter_types! { @@ -441,13 +459,13 @@ impl pallet_balances::Config for Runtime { type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = weights::pallet_balances::WeightInfo; + type WeightInfo = (); type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); } @@ -462,12 +480,41 @@ parameter_types! { pub const TransactionByteFee: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 pub const WeightToFeeFactor: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 } -impl_runtime_transaction_payment_fees!(constants); + +pub struct ToAuthor; +impl OnUnbalanced> for ToAuthor { + fn on_nonzero_unbalanced(credit: Credit) { + if let Some(author) = Authorship::author() { + let _ = Balances::resolve(&author, credit); + } + } +} + +pub struct DealWithFees; +impl OnUnbalanced> for DealWithFees { + fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { + if let Some(fees) = fees_then_tips.next() { + // for fees, (1) to treasury, (2) to author and (3) burned + let (unburned, to_burn) = + fees.ration(TREASURY_PROPORTION + AUTHOR_PROPORTION, BURNED_PROPORTION); + + // burn `to_burn` + drop(to_burn); + + let mut split = unburned.ration(TREASURY_PROPORTION, AUTHOR_PROPORTION); + if let Some(tips) = fees_then_tips.next() { + // for tips, if any, 100% to author + tips.merge_into(&mut split.1); + } + ResolveTo::, Balances>::on_unbalanced(split.0); + >::on_unbalanced(split.1); + } + } +} impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter; type WeightToFee = ConstantMultiplier; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; @@ -482,7 +529,6 @@ parameter_types! { pub const MinimumDeposit: Balance = 100 * DOLLARS; pub EnactmentPeriod: BlockNumber = prod_or_fast!(1 * DAYS, 2 * MINUTES, "LITENTRY_ENACTMENTPERIOD"); pub CooloffPeriod: BlockNumber = prod_or_fast!(5 * DAYS, 2 * MINUTES, "LITENTRY_COOLOFFPERIOD"); - pub const PreimageByteDeposit: Balance = deposit(0, 1); } impl pallet_democracy::Config for Runtime { @@ -557,7 +603,7 @@ impl pallet_membership::Config for Runtime { type MembershipInitialized = Council; type MembershipChanged = Council; type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; + type WeightInfo = (); } parameter_types! { @@ -587,7 +633,7 @@ impl pallet_membership::Config for Runtime type MembershipInitialized = TechnicalCommittee; type MembershipChanged = TechnicalCommittee; type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; + type WeightInfo = (); } impl pallet_collective::Config for Runtime { @@ -613,16 +659,17 @@ impl pallet_membership::Config for Runtime type MembershipInitialized = DeveloperCommittee; type MembershipChanged = DeveloperCommittee; type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; + type WeightInfo = (); } parameter_types! { + pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 1 * DOLLARS; pub const ProposalBondMaximum: Balance = 20 * DOLLARS; pub SpendPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "LITENTRY_SPENDPERIOD"); - pub const Burn: Permill = Permill::from_percent(0); - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub PayoutPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "LITENTRY_PAYOUTPERIOD"); pub BountyDepositBase: Balance = deposit(1, 0); pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; @@ -640,7 +687,7 @@ impl EnsureOrigin for EnsureRootOrTwoThirdsCouncilWrapper { type Success = Balance; fn try_origin(o: RuntimeOrigin) -> Result { match EnsureRootOrTwoThirdsCouncil::try_origin(o) { - Ok(_) => Ok(Balance::max_value()), + Ok(_) => Ok(Balance::MAX), Err(o) => Err(o), } } @@ -653,22 +700,28 @@ impl EnsureOrigin for EnsureRootOrTwoThirdsCouncilWrapper { impl pallet_treasury::Config for Runtime { type PalletId = TreasuryPalletId; type Currency = Balances; - type ApproveOrigin = EnsureRootOrTwoThirdsCouncil; + type ApproveOrigin = EnsureRootOrHalfCouncil; type RejectOrigin = EnsureRootOrHalfCouncil; type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; type ProposalBondMaximum = ProposalBondMaximum; - // Once passed, at most all is allowed to be spent - type SpendOrigin = EnsureRootOrTwoThirdsCouncilWrapper; + type SpendOrigin = EnsureRootOrTwoThirdsCouncilWrapper; // TODO: is it related to OpenGov only? type SpendPeriod = SpendPeriod; - type Burn = Burn; + type PayoutPeriod = PayoutPeriod; + type Burn = (); type BurnDestination = (); - // Bounties is enabled now type SpendFunds = Bounties; - type WeightInfo = weights::pallet_treasury::WeightInfo; - type MaxApprovals = ConstU32<100>; + type MaxApprovals = ConstU32<64>; + type AssetKind = (); // Only native asset is supported + type Beneficiary = AccountId; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayFromAccount; + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type WeightInfo = (); } impl pallet_bounties::Config for Runtime { @@ -686,22 +739,34 @@ impl pallet_bounties::Config for Runtime { type ChildBountyManager = (); } +parameter_types! { + pub const BasicDeposit: Balance = deposit(1, 258); // 258 bytes on-chain + pub const ByteDeposit: Balance = deposit(0, 1); + pub const SubAccountDeposit: Balance = deposit(1, 53); // 53 bytes on-chain + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; +} + impl pallet_identity::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; - // Add one item in storage and take 258 bytes - type BasicDeposit = ConstU128<{ deposit(1, 258) }>; - // Not add any item to the storage but takes 66 bytes - type FieldDeposit = ConstU128<{ deposit(0, 66) }>; - // Add one item in storage and take 53 bytes - type SubAccountDeposit = ConstU128<{ deposit(1, 53) }>; - type MaxSubAccounts = ConstU32<100>; - type MaxAdditionalFields = ConstU32<100>; - type MaxRegistrars = ConstU32<20>; + type BasicDeposit = BasicDeposit; + type ByteDeposit = ByteDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = MaxSubAccounts; + type IdentityInformation = pallet_identity::legacy::IdentityInfo; + type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; type ForceOrigin = EnsureRootOrHalfCouncil; type RegistrarOrigin = EnsureRootOrHalfCouncil; - type WeightInfo = weights::pallet_identity::WeightInfo; + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRootOrHalfCouncil; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type WeightInfo = (); } impl pallet_account_fix::Config for Runtime { @@ -714,43 +779,34 @@ impl pallet_account_fix::Config for Runtime { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } +type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< + Runtime, + RELAY_CHAIN_SLOT_DURATION_MILLIS, + BLOCK_PROCESSING_VELOCITY, + UNINCLUDED_SEGMENT_CAPACITY, +>; + impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; - type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; + type ConsensusHook = ConsensusHook; + type WeightInfo = (); } impl parachain_info::Config for Runtime {} impl cumulus_pallet_aura_ext::Config for Runtime {} -impl cumulus_pallet_xcmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ChannelInfo = ParachainSystem; - // We use pallet_xcm to confirm the version of xcm - type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRootOrAllCouncil; - type ControllerOrigin = EnsureRootOrAllCouncil; - type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type PriceForSiblingDelivery = (); -} - -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRootOrAllCouncil; -} - parameter_types! { pub const Offset: u32 = 0; } @@ -772,8 +828,132 @@ impl pallet_session::Config for Runtime { impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); - type MaxAuthorities = ConstU32<100_000>; + type MaxAuthorities = ConstU32<250>; type AllowMultipleBlocksPerSlot = ConstBool; + type SlotDuration = ConstU64; +} + +parameter_types! { + pub const MinVestedTransfer: Balance = 10 * CENTS; + pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = + WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); +} + +impl pallet_vesting::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BlockNumberToBalance = ConvertInto; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = (); + type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; + type BlockNumberProvider = System; + // `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the + // highest number of schedules that encodes less than 2^10. + const MAX_VESTING_SCHEDULES: u32 = 28; +} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = + Perbill::from_percent(25) * 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; + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = ConstU32<{ 128 * 1048 }>; + type MaxStale = ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueServiceWeight; +} + +pub struct TransactionPaymentAsGasPrice; +impl FeeCalculator for TransactionPaymentAsGasPrice { + fn min_gas_price() -> (U256, Weight) { + // We do not want to involve Transaction Payment Multiplier here + // It will biased normal transfer (base weight is not biased by Multiplier) too much for + // Ethereum tx + // This is hardcoded ConstantMultiplier, WeightToFeeFactor = + // MILLICENTS / 10 + let weight_to_fee: u128 = WEIGHT_TO_FEE_FACTOR; + let min_gas_price = weight_to_fee.saturating_mul(WEIGHT_PER_GAS as u128); + (min_gas_price.into(), ::DbWeight::get().reads(1)) + } +} + +parameter_types! { + pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); + pub ChainId: u64 = 212013; // LIT deployment year (21) + paraID (2013) + pub BlockGasLimit: U256 = U256::from( + NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS + ); + pub PrecompilesValue: Precompiles = LitentryNetworkPrecompiles::<_>::new(); + // BlockGasLimit / MAX_POV_SIZE + pub GasLimitPovSizeRatio: u64 = 4; +} + +pub struct FindAuthorTruncated(sp_std::marker::PhantomData); +impl> FindAuthor for FindAuthorTruncated { + fn find_author<'a, I>(digests: I) -> Option + where + I: 'a + IntoIterator, + { + if let Some(author_index) = F::find_author(digests) { + let authority_id = + pallet_aura::Authorities::::get()[author_index as usize].clone(); + return Some(H160::from_slice(&authority_id.encode()[4..24])); + } + + None + } +} + +impl pallet_evm::Config for Runtime { + type FeeCalculator = TransactionPaymentAsGasPrice; + type GasWeightMapping = pallet_evm::FixedGasWeightMapping; + type WeightPerGas = WeightPerGas; + type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; + type CallOrigin = pallet_evm::EnsureAddressTruncated; + type WithdrawOrigin = pallet_evm::EnsureAddressTruncated; + type AddressMapping = pallet_evm::HashedAddressMapping; + type Currency = Balances; + type RuntimeEvent = RuntimeEvent; + type Runner = pallet_evm::runner::stack::Runner; + type PrecompilesType = Precompiles; + type PrecompilesValue = PrecompilesValue; + type ChainId = ChainId; + type OnChargeTransaction = pallet_evm::EVMFungibleAdapter; + type BlockGasLimit = BlockGasLimit; + type Timestamp = Timestamp; + type OnCreate = (); + type FindAuthor = FindAuthorTruncated; + type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type SuicideQuickClearLimit = ConstU32<0>; + type WeightInfo = (); +} + +parameter_types! { + pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; +} + +impl pallet_ethereum::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type StateRoot = pallet_ethereum::IntermediateStateRoot; + type PostLogContent = PostBlockAndTxnHashes; + // Maximum length (in bytes) of revert message to include in Executed event + type ExtraDataLength = ConstU32<256>; } parameter_types! { @@ -846,28 +1026,9 @@ impl pallet_parachain_staking::Config for Runtime { type OnAllDelegationRemoved = ScoreStaking; } -parameter_types! { - pub const MinVestedTransfer: Balance = 10 * CENTS; - pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = - WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); -} - -impl pallet_vesting::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = (); - // `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the - // highest number of schedules that encodes less than 2^10. - const MAX_VESTING_SCHEDULES: u32 = 28; - type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; -} - parameter_types! { pub const BridgeChainId: u8 = 2; pub const ProposalLifetime: BlockNumber = 50400; // ~7 days - pub TreasuryAccount: AccountId = TreasuryPalletId::get().into_account_truncating(); } impl pallet_chain_bridge::Config for Runtime { @@ -912,6 +1073,10 @@ impl pallet_bridge_transfer::Config for Runtime { type WeightInfo = weights::pallet_bridge_transfer::WeightInfo; } +parameter_types! { + pub TreasuryAccount: AccountId = Treasury::account_id(); +} + impl pallet_assets_handler::Config for Runtime { type RuntimeEvent = RuntimeEvent; type TreasuryAccount = TreasuryAccount; @@ -993,129 +1158,6 @@ impl pallet_group::Config for Runtime { type GroupManagerOrigin = EnsureRootOrAllCouncil; } -// For OnChargeEVMTransaction implementation -type CurrencyAccountId = ::AccountId; -type BalanceFor = - <::Currency as Currency>>::Balance; -type PositiveImbalanceFor = - <::Currency as Currency>>::PositiveImbalance; -type NegativeImbalanceFor = - <::Currency as Currency>>::NegativeImbalance; -pub struct OnChargeEVMTransaction(sp_std::marker::PhantomData); -impl OnChargeEVMTransactionT for OnChargeEVMTransaction -where - T: pallet_evm::Config, - PositiveImbalanceFor: Imbalance, Opposite = NegativeImbalanceFor>, - NegativeImbalanceFor: Imbalance, Opposite = PositiveImbalanceFor>, - OU: OnUnbalanced>, - U256: UniqueSaturatedInto>, -{ - type LiquidityInfo = Option>; - - fn withdraw_fee(who: &H160, fee: U256) -> Result> { - EVMCurrencyAdapter::<::Currency, ()>::withdraw_fee(who, fee) - } - - fn correct_and_deposit_fee( - who: &H160, - corrected_fee: U256, - base_fee: U256, - already_withdrawn: Self::LiquidityInfo, - ) -> Self::LiquidityInfo { - ::Currency, OU> as OnChargeEVMTransactionT< - T, - >>::correct_and_deposit_fee(who, corrected_fee, base_fee, already_withdrawn) - } - // This is the only difference of OnChargeEVMTransaction regarding EVMCurrencyAdapter - // We can use parachain TransactionPayment logic to handle evm tip - fn pay_priority_fee(tip: Self::LiquidityInfo) { - if let Some(tip) = tip { - OU::on_unbalanced(tip); - } - } -} - -pub struct TransactionPaymentAsGasPrice; -impl FeeCalculator for TransactionPaymentAsGasPrice { - fn min_gas_price() -> (U256, Weight) { - // We do not want to involve Transaction Payment Multiplier here - // It will biased normal transfer (base weight is not biased by Multiplier) too much for - // Ethereum tx - // This is hardcoded ConstantMultiplier, WeightToFeeFactor = - // MILLICENTS / 10 - let weight_to_fee: u128 = WEIGHT_TO_FEE_FACTOR; - let min_gas_price = weight_to_fee.saturating_mul(WEIGHT_PER_GAS as u128); - (min_gas_price.into(), ::DbWeight::get().reads(1)) - } -} - -parameter_types! { - pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); - pub ChainId: u64 = 212013; // LIT deployment year (21) + paraID (2013) - pub BlockGasLimit: U256 = U256::from( - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS - ); - pub PrecompilesValue: Precompiles = LitentryNetworkPrecompiles::<_>::new(); - // BlockGasLimit / MAX_POV_SIZE - pub GasLimitPovSizeRatio: u64 = 4; -} - -pub struct FindAuthorTruncated(sp_std::marker::PhantomData); -impl FindAuthor for FindAuthorTruncated -where - pallet_aura::Pallet: FindAuthor, -{ - fn find_author<'a, I>(digests: I) -> Option - where - I: 'a + IntoIterator, - { - if let Some(author_index) = pallet_aura::Pallet::::find_author(digests) { - let authority_id = - >::authorities()[author_index as usize].clone(); - return Some(H160::from_slice(&authority_id.encode()[4..24])); - } - - None - } -} - -impl pallet_evm::Config for Runtime { - type FeeCalculator = TransactionPaymentAsGasPrice; - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type WeightPerGas = WeightPerGas; - type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; - type CallOrigin = pallet_evm::EnsureAddressTruncated; - type WithdrawOrigin = pallet_evm::EnsureAddressTruncated; - // From evm address to parachain address - type AddressMapping = pallet_evm::HashedAddressMapping; - type Currency = Balances; - type RuntimeEvent = RuntimeEvent; - type Runner = pallet_evm::runner::stack::Runner; - type PrecompilesType = Precompiles; - type PrecompilesValue = PrecompilesValue; - type ChainId = ChainId; - type OnChargeTransaction = OnChargeEVMTransaction>; - type BlockGasLimit = BlockGasLimit; - type Timestamp = Timestamp; - type OnCreate = (); - type FindAuthor = FindAuthorTruncated; - // BlockGasLimit / MAX_POV_SIZE - type GasLimitPovSizeRatio = GasLimitPovSizeRatio; - type WeightInfo = weights::pallet_evm::WeightInfo; -} - -parameter_types! { - pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; -} - -impl pallet_ethereum::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type StateRoot = pallet_ethereum::IntermediateStateRoot; - type PostLogContent = PostBlockAndTxnHashes; - // Maximum length (in bytes) of revert message to include in Executed event - type ExtraDataLength = ConstU32<256>; -} - parameter_types! { pub const DefaultYearlyInflation: Perbill = Perbill::from_perthousand(5); } @@ -1196,10 +1238,11 @@ construct_runtime! { XcmpQueue: cumulus_pallet_xcmp_queue = 50, PolkadotXcm: pallet_xcm = 51, CumulusXcm: cumulus_pallet_xcm = 52, - DmpQueue: cumulus_pallet_dmp_queue = 53, - XTokens: orml_xtokens = 54, - // 55 is saved for old pallet: Tokens: orml_tokens + // 53 was: cumulus_pallet_dmp_queue + // 54 was: orml_xtokens + // 55 was: orml_tokens Assets: pallet_assets = 56, + MessageQueue: pallet_message_queue = 57, // Litentry pallets ChainBridge: pallet_chain_bridge= 60, @@ -1321,7 +1364,7 @@ impl Contains for NormalModeFilter { mod benches { define_benchmarks!( [frame_system, SystemBench::] - [pallet_asset_manager, AssetManager] + // [pallet_asset_manager, AssetManager] [pallet_balances, Balances] [pallet_timestamp, Timestamp] [pallet_utility, Utility] @@ -1337,7 +1380,6 @@ mod benches { [pallet_preimage, Preimage] [pallet_session, SessionBench::] [pallet_parachain_staking, ParachainStaking] - [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_identity_management, IdentityManagement] [pallet_vc_management, VCManagement] [pallet_chain_bridge,ChainBridge] @@ -1353,10 +1395,10 @@ impl_runtime_apis! { } fn execute_block(block: Block) { - Executive::execute_block(block); + Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -1425,11 +1467,35 @@ impl_runtime_apis! { impl sp_consensus_aura::AuraApi for Runtime { fn slot_duration() -> sp_consensus_aura::SlotDuration { - sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) + sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION) } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() + } + } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) + } + + fn preset_names() -> Vec { + vec![] + } + } + + impl cumulus_primitives_aura::AuraUnincludedSegmentApi for Runtime { + fn can_build_upon( + included_hash: ::Hash, + slot: cumulus_primitives_aura::Slot, + ) -> bool { + ConsensusHook::can_build_upon(included_hash, slot) } } @@ -1439,22 +1505,43 @@ impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< + Block, + Balance, + > for Runtime { + fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { TransactionPayment::query_info(uxt, len) } - fn query_fee_details( - uxt: ::Extrinsic, + fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details( + call: RuntimeCall, len: u32, ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_fee_details(uxt, len) + TransactionPayment::query_call_fee_details(call, len) } fn query_weight_to_fee(weight: Weight) -> Balance { TransactionPayment::weight_to_fee(weight) } + fn query_length_to_fee(length: u32) -> Balance { TransactionPayment::length_to_fee(length) } @@ -1719,12 +1806,17 @@ impl_runtime_apis! { fn trace_transaction( extrinsics: Vec<::Extrinsic>, traced_transaction: &pallet_ethereum::Transaction, + header: &::Header, ) -> Result< (), sp_runtime::DispatchError, > { use moonbeam_evm_tracer::tracer::EvmTracer; + // We need to follow the order when replaying the transactions. + // Block initialize happens first then apply_extrinsic. + Executive::initialize_block(header); + // Apply the a subset of extrinsics: all the substrate-specific or ethereum // transactions that preceded the requested transaction. for ext in extrinsics.into_iter() { @@ -1748,14 +1840,16 @@ impl_runtime_apis! { fn trace_block( extrinsics: Vec<::Extrinsic>, known_transactions: Vec, + header: &::Header, ) -> Result< (), sp_runtime::DispatchError, > { use moonbeam_evm_tracer::tracer::EvmTracer; - let mut config = ::config().clone(); - config.estimate = true; + // We need to follow the order when replaying the transactions. + // Block initialize happens first then apply_extrinsic. + Executive::initialize_block(header); // Apply all extrinsics. Ethereum extrinsics are traced. for ext in extrinsics.into_iter() { @@ -1777,6 +1871,84 @@ impl_runtime_apis! { Ok(()) } + + fn trace_call( + header: &::Header, + from: H160, + to: H160, + data: Vec, + value: U256, + gas_limit: U256, + max_fee_per_gas: Option, + max_priority_fee_per_gas: Option, + nonce: Option, + access_list: Option)>>, + ) -> Result<(), sp_runtime::DispatchError> { + use moonbeam_evm_tracer::tracer::EvmTracer; + + // Initialize block: calls the "on_initialize" hook on every pallet + // in AllPalletsWithSystem. + Executive::initialize_block(header); + + EvmTracer::new().trace(|| { + let is_transactional = false; + let validate = true; + let without_base_extrinsic_weight = true; + + + // Estimated encoded transaction size must be based on the heaviest transaction + // type (EIP1559Transaction) to be compatible with all transaction types. + let mut estimated_transaction_len = data.len() + + // pallet ethereum index: 1 + // transact call index: 1 + // Transaction enum variant: 1 + // chain_id 8 bytes + // nonce: 32 + // max_priority_fee_per_gas: 32 + // max_fee_per_gas: 32 + // gas_limit: 32 + // action: 21 (enum varianrt + call address) + // value: 32 + // access_list: 1 (empty vec size) + // 65 bytes signature + 258; + + if access_list.is_some() { + estimated_transaction_len += access_list.encoded_size(); + } + + let gas_limit = gas_limit.min(u64::MAX.into()).low_u64(); + + let (weight_limit, proof_size_base_cost) = + match ::GasWeightMapping::gas_to_weight( + gas_limit, + without_base_extrinsic_weight + ) { + weight_limit if weight_limit.proof_size() > 0 => { + (Some(weight_limit), Some(estimated_transaction_len as u64)) + } + _ => (None, None), + }; + + let _ = ::Runner::call( + from, + to, + data, + value, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + access_list.unwrap_or_default(), + is_transactional, + validate, + weight_limit, + proof_size_base_cost, + ::config(), + ); + }); + Ok(()) + } } impl moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi for Runtime { @@ -1812,23 +1984,25 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to - // have a backtrace here. If any of the pre/post migration checks fail, we shall stop - // right here and right now. - log::info!("try-runtime::on_runtime_upgrade Lientry."); + log::info!("try-runtime::on_runtime_upgrade"); let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block(block: Block, state_root_check: bool, signature_check: bool,select: frame_try_runtime::TryStateSelect) -> Weight { + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { log::info!( - target: "runtime::Litentry", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", + "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", block.header.number, block.header.hash(), state_root_check, select, ); - Executive::try_execute_block(block, state_root_check,signature_check, select).expect("try_execute_block failed") + Executive::try_execute_block(block, state_root_check, signature_check, select).expect("execute-block failed") } } @@ -1883,32 +2057,7 @@ impl_runtime_apis! { } } -#[allow(dead_code)] -struct CheckInherents; - -impl cumulus_pallet_parachain_system::CheckInherents for CheckInherents { - fn check_inherents( - block: &Block, - relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof, - ) -> sp_inherents::CheckInherentsResult { - let relay_chain_slot = relay_state_proof - .read_slot() - .expect("Could not read the relay chain slot from the proof"); - - let inherent_data = - cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration( - relay_chain_slot, - sp_std::time::Duration::from_secs(6), - ) - .create_inherent_data() - .expect("Could not create the timestamp inherent data"); - - inherent_data.check_extrinsics(block) - } -} - cumulus_pallet_parachain_system::register_validate_block! { Runtime = Runtime, BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, - CheckInherents = CheckInherents, } diff --git a/parachain/runtime/litentry/src/tests/base_call_filter.rs b/parachain/runtime/litentry/src/tests/base_call_filter.rs deleted file mode 100644 index 03523bab00..0000000000 --- a/parachain/runtime/litentry/src/tests/base_call_filter.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use crate::{Runtime, RuntimeCall, RuntimeOrigin}; - -runtime_common::run_call_filter_tests!(); - -#[test] -fn balance_transfer_works() { - base_call_filter::balance_transfer_works::(); -} diff --git a/parachain/runtime/litentry/src/tests/mod.rs b/parachain/runtime/litentry/src/tests/mod.rs index 0ec9b4b42c..ab5ccaf419 100644 --- a/parachain/runtime/litentry/src/tests/mod.rs +++ b/parachain/runtime/litentry/src/tests/mod.rs @@ -14,31 +14,22 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -mod base_call_filter; -pub mod setup { - use crate::Runtime; - #[cfg(test)] - runtime_common::decl_test_chain!(Runtime); +// TODO: enable tests for litentry-runtime, it requires that the `setup/mod.rs` to be +// parameterized (or generalized) with Runtime + +/* +mod base_call_filter { + use crate::{Runtime, RuntimeCall, RuntimeOrigin}; + runtime_common::run_call_filter_tests!(); + + #[test] + fn balance_transfer_works() { + base_call_filter::balance_transfer_works::(); + } } mod transaction_payment { use crate::{Runtime, RuntimeCall, RuntimeOrigin, TransactionByteFee}; - runtime_common::run_transaction_payment_tests!(); } - -mod xcm_parachain { - use crate::{ - tests::setup::{ - relay_chain::{ - Runtime as RelayChainRuntime, RuntimeCall as RelayCall, - RuntimeOrigin as RelayOrigin, - }, - ParaA, ParaB, Relay, TestNet, - }, - xcm_config::{LocationToAccountId, UnitWeightCost}, - Runtime, RuntimeCall, RuntimeOrigin, - }; - - runtime_common::run_xcm_tests!(); -} +*/ diff --git a/parachain/runtime/litentry/src/tests/transaction_payment.rs b/parachain/runtime/litentry/src/tests/transaction_payment.rs deleted file mode 100644 index 1466d95e06..0000000000 --- a/parachain/runtime/litentry/src/tests/transaction_payment.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use runtime_common::tests::transaction_payment; - -use crate::{RuntimeCall, RuntimeOrigin, Runtime, TransactionByteFee}; - -#[test] -fn multiplier_can_grow_from_zero() { - transaction_payment::multiplier_can_grow_from_zero::(); -} - -#[test] -fn transaction_payment_works() { - transaction_payment::transaction_payment_works::(); -} diff --git a/parachain/runtime/litentry/src/weights/mod.rs b/parachain/runtime/litentry/src/weights/mod.rs index b75428447f..a92269089f 100644 --- a/parachain/runtime/litentry/src/weights/mod.rs +++ b/parachain/runtime/litentry/src/weights/mod.rs @@ -16,27 +16,27 @@ #![allow(clippy::unnecessary_cast)] -pub mod cumulus_pallet_xcmp_queue; -pub mod frame_system; +// pub mod cumulus_pallet_xcmp_queue; +// pub mod frame_system; pub mod pallet_asset_manager; -pub mod pallet_balances; +// pub mod pallet_balances; pub mod pallet_bridge_transfer; pub mod pallet_chain_bridge; pub mod pallet_collective; pub mod pallet_democracy; pub mod pallet_evm; pub mod pallet_extrinsic_filter; -pub mod pallet_identity; +// pub mod pallet_identity; pub mod pallet_identity_management; -pub mod pallet_membership; +// pub mod pallet_membership; pub mod pallet_multisig; pub mod pallet_parachain_staking; -pub mod pallet_preimage; +// pub mod pallet_preimage; pub mod pallet_proxy; -pub mod pallet_scheduler; +// pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_teebag; pub mod pallet_timestamp; -pub mod pallet_treasury; +// pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_vc_management; diff --git a/parachain/runtime/litentry/src/xcm_config.rs b/parachain/runtime/litentry/src/xcm_config.rs index 1ae780cb34..a376104a7f 100644 --- a/parachain/runtime/litentry/src/xcm_config.rs +++ b/parachain/runtime/litentry/src/xcm_config.rs @@ -13,64 +13,50 @@ // // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . + #![allow(clippy::clone_on_copy)] #![allow(clippy::useless_conversion)] +use super::{ + AllPalletsWithSystem, AssetId, Assets, Balance, Balances, MessageQueue, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, XcmpQueue, +}; +use core_primitives::{AccountId, Weight}; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ - match_types, pallet_prelude::ConstU32, parameter_types, - traits::{Everything, Nothing}, - weights::ConstantMultiplier, - PalletId, + traits::{Contains, Everything, Nothing, TransformOrigin}, + weights::IdentityFee, }; use frame_system::EnsureRoot; -use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; use pallet_xcm::XcmPassthrough; +use parachains_common::message_queue::ParaIdToSibling; use polkadot_parachain_primitives::primitives::Sibling; -use xcm_builder::{ConvertedConcreteId, NoChecking}; - -// Litentry: The CheckAccount implementation is forced by the bug of FungiblesAdapter. -// We should replace () regarding fake_pallet_id account after our PR passed. -use sp_runtime::traits::AccountIdConversion; +use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; +use runtime_common::EnsureRootOrHalfCouncil; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowHrmpNotificationsFromRelayChain, + AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, + ConvertedConcreteId, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, + FungibleAdapter, FungiblesAdapter, IsConcrete, NativeAsset, NoChecking, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + TrailingSetTopicAsId, UsingComponents, }; use xcm_executor::{traits::JustTry, XcmExecutor}; -use core_primitives::{AccountId, Weight}; -use runtime_common::{ - xcm_impl::{ - AccountIdToMultiLocation, AssetIdMultiLocationConvert, CurrencyId, - CurrencyIdMultiLocationConvert, FirstAssetTrader, MultiNativeAsset, - NewAnchoringSelfReserve, OldAnchoringSelfReserve, XcmFeesToAccount, - }, - WEIGHT_TO_FEE_FACTOR, -}; - -#[cfg(test)] -use crate::tests::setup::ParachainXcmRouter; - -use super::{ - AllPalletsWithSystem, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - ParachainInfo, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, -}; -#[cfg(not(test))] -use super::{ParachainSystem, XcmpQueue}; - parameter_types! { - pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: Option = None; + pub const RelayLocation: Location = Location::parent(); + pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); + pub SelfLocation: Location = Here.into_location(); + pub DummyCheckingAccount: AccountId = PolkadotXcm::check_account(); } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -82,152 +68,103 @@ pub type LocationToAccountId = ( AccountId32Aliases, ); -/// Means for transacting self reserve assets on this chain. -pub type LocalAssetTransactor = CurrencyAdapter< +/// Means for transacting assets on this chain. +pub type AssetTransactors = (FungibleTransactor, FungiblesTransactor); + +/// Means for transacting the native currency on this chain. +pub type FungibleTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: - (IsConcrete>, IsConcrete>), - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: + IsConcrete, + // Do a simple punn to convert an `AccountId32` `Location` into a native chain + // `AccountId`: LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): + // Our chain's `AccountId` type (we can't get away without mentioning it explicitly): AccountId, - // We don't track any teleports. + // We don't track any teleports of `Balances`. (), >; -parameter_types! { - pub const TempPalletId: PalletId = PalletId(*b"py/tempA"); - pub TempAccount: AccountId = TempPalletId::get().into_account_truncating(); -} -// The non-reserve fungible transactor type -// It will use orml_tokens, and the Id will be CurrencyId::ParachainReserve(MultiLocation) -pub type ForeignFungiblesTransactor = FungiblesAdapter< - // Use this fungibles implementation +/// Means for transacting assets besides the native currency on this chain. +pub type FungiblesTransactor = FungiblesAdapter< + // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId, JustTry>, - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: + ConvertedConcreteId, // TODO + // Convert an XCM Location into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, - // We dont allow teleports. + // We don't support teleport so no need to check any assets. NoChecking, - // We dont track any teleports - TempAccount, + // We don't support teleport so this is just a dummy account. + DummyCheckingAccount, >; -// The XCM transaction handlers for different type of assets. -pub type AssetTransactors = ( - // SelfReserve asset, both pre and post 0.9.16 - LocalAssetTransactor, - // // Foreign assets (non native minted token crossed from remote chain) - ForeignFungiblesTransactor, -); - -/// Litentry: As our current XcmRouter (which used for receiving remote XCM message and call -/// XcmExecutor to handle) will force the origin to remoteChain sovereign account, this -/// XcmOriginToTransactDispatchOrigin implementation is not that useful. This is the type we use to -/// convert an (incoming) XCM origin into a local `Origin` instance, ready for dispatching a -/// transaction with Xcm's `Transact`. There is an `OriginKind` which can biases the kind of local -/// `Origin` it will become. +/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, +/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can +/// biases the kind of local `Origin` it will become. pub type XcmOriginToTransactDispatchOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. SovereignSignedViaLocation, - // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when - // recognized. + // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when + // recognised. RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognized. + // recognised. SiblingParachainAsNative, + // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a + // transaction from the Root origin. + ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal - // `Origin::Signed` origin of the same 32-byte value. + // `RuntimeOrigin::Signed` origin of the same 32-byte value. SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. XcmPassthrough, ); -parameter_types! { - // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - // How much we charge for XCM from remote chain per XCM command. - pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, 0); - pub const MaxInstructions: u32 = 100; +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } } -match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } - }; -} - -pub type Barriers = ( +pub type Barrier = TrailingSetTopicAsId<( TakeWeightCredit, AllowTopLevelPaidExecutionFrom, - AllowUnpaidExecutionFrom, - // ^^^ Parent and its exec plurality get free execution -); + // Parent & its unit plurality gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Expected responses are OK. + AllowKnownQueryResponses, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + // HRMP notifications from the relay chain are OK. + AllowHrmpNotificationsFromRelayChain, +)>; parameter_types! { - /// Xcm fees will go to the treasury account - pub XcmFeesAccount: AccountId = Treasury::account_id(); + // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); pub const MaxAssetsIntoHolding: u32 = 64; - pub const WeightToFeeFactor: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 + pub const MaxInstructions: u32 = 100; } -pub type Traders = ( - UsingComponents< - ConstantMultiplier, - NewAnchoringSelfReserve, - AccountId, - Balances, - DealWithFees, - >, - UsingComponents< - ConstantMultiplier, - OldAnchoringSelfReserve, - AccountId, - Balances, - DealWithFees, - >, - // TODO::Implement foreign asset fee to weight rule from AssetManager Setting; Need more test - FirstAssetTrader< - CurrencyId, - AssetManager, - XcmFeesToAccount< - Assets, - ConvertedConcreteId, JustTry>, - AccountId, - XcmFeesAccount, - >, - >, -); - -/// Xcm Weigher shared between multiple Xcm-related configs. -pub type XcmWeigher = FixedWeightBounds; - pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; - // How to withdraw and deposit an asset. type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; - // Only Allow chains to handle their own reserve assets crossed on local chain whatever way they - // want. - type IsReserve = MultiNativeAsset; - type IsTeleporter = (); // Teleporting is disabled. + type IsReserve = NativeAsset; // TODO + type IsTeleporter = (); type UniversalLocation = UniversalLocation; - type Barrier = Barriers; - type Weigher = XcmWeigher; - // Litentry: This is the tool used for calculating that inside XcmExecutor vm, how to transfer - // asset into weight fee. Usually this is in order to fulfull Barrier - // AllowTopLevelPaidExecutionFrom requirement. Currently we have not implement the asset to fee - // rule for Foreign Asset, so pure cross chain transfer from XCM parachain will be rejected no - // matter. - type Trader = Traders; + type Barrier = Barrier; + type Weigher = FixedWeightBounds; + type Trader = UsingComponents, SelfLocation, AccountId, Balances, ()>; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; @@ -241,91 +178,47 @@ impl xcm_executor::Config for XcmConfig { type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; - type Aliasers = (); + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } -/// No local origins on this chain are allowed to dispatch XCM sends/executions. +/// Local origins on this chain are allowed to dispatch XCM sends/executions. pub type LocalOriginToLocation = SignedToAccountId32; -#[cfg(test)] -/// The mimic XcmRouter which only change storage locally for Xcm to digest. -/// XCM router for parachain. -pub type XcmRouter = ParachainXcmRouter; -#[cfg(not(test))] /// The means for routing XCM messages which are not for local execution into the right message /// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - // We use PolkadotXcm to confirm the XCM Version; Use () instead if pass anyway cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); -match_types! { - pub type ParentOrParachains: impl Contains = { - // Local account: Litentry - MultiLocation { parents: 0, interior: X1(Junction::AccountId32 { .. }) } | - // Relay-chain account: Polkadot - MultiLocation { parents: 1, interior: X1(Junction::AccountId32 { .. }) } | - // AccountKey20 based parachain: Moonriver - MultiLocation { parents: 1, interior: X2(Parachain( .. ), Junction::AccountKey20 { .. }) } | - // AccountId 32 based parachain: Statemint - MultiLocation { parents: 1, interior: X2(Parachain( .. ), Junction::AccountId32 { .. }) } - }; -} - -parameter_type_with_key! { - pub ParachainMinFee: |_location: MultiLocation| -> Option { - // Always return `None` to disallow using fee asset and target asset with different reserve chains - None - }; -} - -parameter_types! { - pub SelfLocation: MultiLocation = MultiLocation { - parents:1, - interior: Junctions::X1( - Parachain(ParachainInfo::parachain_id().into()) - ) - }; - pub const BaseXcmWeight: Weight = Weight::from_parts(100_000_000u64, 0); - pub const MaxAssetsForTransfer: usize = 3; -} - -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - +// TODO: currently all set to `Nothing` impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; - // ^ Disable dispatchable execute on the XCM pallet. - // Needs to be `Everything` for local testing. type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; - // This filter here defines what is allowed for XcmExecutor to handle with TransferReserveAsset - // Rule. - type XcmReserveTransferFilter = Everything; - type Weigher = XcmWeigher; + type XcmReserveTransferFilter = Nothing; + type Weigher = FixedWeightBounds; type UniversalLocation = UniversalLocation; type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type Currency = Balances; type CurrencyMatcher = (); type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; - type MaxLockers = ConstU32<8>; + type MaxLockers = ConstU32<0>; type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); @@ -336,19 +229,15 @@ impl cumulus_pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; } -impl orml_xtokens::Config for Runtime { +impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdConvert = CurrencyIdMultiLocationConvert; - type XcmExecutor = XcmExecutor; - type SelfLocation = SelfLocation; - type MultiLocationsFilter = ParentOrParachains; - type MinXcmFee = ParachainMinFee; - type Weigher = XcmWeigher; - type BaseXcmWeight = BaseXcmWeight; - type UniversalLocation = UniversalLocation; - type MaxAssetsForTransfer = MaxAssetsForTransfer; - type ReserveProvider = AbsoluteReserveProvider; + type ChannelInfo = ParachainSystem; + type VersionWrapper = (); + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type ControllerOrigin = EnsureRootOrHalfCouncil; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; + type PriceForSiblingDelivery = NoPriceForMessageDelivery; } diff --git a/parachain/runtime/paseo/Cargo.toml b/parachain/runtime/paseo/Cargo.toml index eebb95261f..b08d5db88f 100644 --- a/parachain/runtime/paseo/Cargo.toml +++ b/parachain/runtime/paseo/Cargo.toml @@ -15,6 +15,7 @@ sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } +sp-genesis-builder = { workspace = true } sp-inherents = { workspace = true } sp-io = { workspace = true } sp-offchain = { workspace = true } @@ -38,6 +39,7 @@ pallet-collective = { workspace = true } pallet-democracy = { workspace = true } pallet-identity = { workspace = true } pallet-membership = { workspace = true } +pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } pallet-preimage = { workspace = true } pallet-proxy = { workspace = true } @@ -57,20 +59,20 @@ cumulus-pallet-dmp-queue = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } parachain-info = { workspace = true } +parachains-common = { workspace = true } pallet-xcm = { workspace = true } polkadot-parachain-primitives = { workspace = true } +polkadot-runtime-common = { workspace = true } xcm = { workspace = true } xcm-builder = { workspace = true } xcm-executor = { workspace = true } -orml-traits = { workspace = true } -orml-xtokens = { workspace = true } - cumulus-pallet-session-benchmarking = { workspace = true, optional = true } frame-benchmarking = { workspace = true, optional = true } frame-system-benchmarking = { workspace = true, optional = true } @@ -104,7 +106,7 @@ pallet-pool-proposal = { workspace = true } fp-evm = { workspace = true } fp-rpc = { workspace = true } -fp-self-contained = { workspace = true, features = ["serde"] } +fp-self-contained = { workspace = true } pallet-ethereum = { workspace = true } pallet-evm = { workspace = true } pallet-evm-precompile-assets-erc20 = { workspace = true } @@ -147,167 +149,189 @@ substrate-wasm-builder = { workspace = true } default = ["std"] fast-runtime = [] runtime-benchmarks = [ + "cumulus-pallet-dmp-queue/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", + "pallet-account-fix/runtime-benchmarks", "pallet-asset-manager/runtime-benchmarks", "pallet-assets-handler/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-bitacross/runtime-benchmarks", "pallet-bounties/runtime-benchmarks", + "pallet-bridge-transfer/runtime-benchmarks", + "pallet-chain-bridge/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", + "pallet-evm-assertions/runtime-benchmarks", + "pallet-evm-precompile-assets-erc20/runtime-benchmarks", "pallet-evm/runtime-benchmarks", + "pallet-extrinsic-filter/runtime-benchmarks", + "pallet-group/runtime-benchmarks", + "pallet-identity-management/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", + "pallet-omni-account/runtime-benchmarks", "pallet-parachain-staking/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", + "pallet-score-staking/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-teebag/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-tips/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", + "pallet-vc-management/runtime-benchmarks", + "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "polkadot-runtime-parachains/runtime-benchmarks", "runtime-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", - "pallet-chain-bridge/runtime-benchmarks", - "pallet-bridge-transfer/runtime-benchmarks", - "pallet-extrinsic-filter/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "pallet-group/runtime-benchmarks", - "pallet-identity-management/runtime-benchmarks", - "pallet-teebag/runtime-benchmarks", - "pallet-vc-management/runtime-benchmarks", - "pallet-account-fix/runtime-benchmarks", - "pallet-score-staking/runtime-benchmarks", - "pallet-omni-account/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", "pallet-aiusd-convertor/runtime-benchmarks", "pallet-collab-ai-common/runtime-benchmarks", "pallet-curator/runtime-benchmarks", + "pallet-evm-precompile-aiusd-convertor/runtime-benchmarks", "pallet-guardian/runtime-benchmarks", - "pallet-pool-proposal/runtime-benchmarks", "pallet-investing-pool/runtime-benchmarks", + "pallet-pool-proposal/runtime-benchmarks", ] std = [ - "parity-scale-codec/std", - "log/std", - "num_enum/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", + "core-primitives/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking?/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-aura/std", + "cumulus-primitives-core/std", + "cumulus-primitives-parachain-inherent/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "fp-evm/std", + "fp-rpc/std", + "fp-self-contained/std", + "frame-benchmarking?/std", "frame-executive/std", "frame-support/std", + "frame-system-benchmarking?/std", + "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime?/std", - "frame-system-rpc-runtime-api/std", - "orml-traits/std", - "orml-xtokens/std", + "log/std", + "moonbeam-evm-tracer/std", + "moonbeam-rpc-primitives-debug/std", + "moonbeam-rpc-primitives-txpool/std", + "num_enum/std", + "pallet-account-fix/std", "pallet-asset-manager/std", - "pallet-assets/std", "pallet-assets-handler/std", + "pallet-assets/std", "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", + "pallet-bitacross/std", "pallet-bounties/std", + "pallet-bridge-transfer/std", + "pallet-chain-bridge/std", "pallet-collective/std", "pallet-democracy/std", "pallet-ethereum/std", - "pallet-evm/std", + "pallet-evm-assertions/std", "pallet-evm-precompile-assets-erc20/std", "pallet-evm-precompile-blake2/std", - "pallet-evm-precompile-simple/std", "pallet-evm-precompile-bn128/std", + "pallet-evm-precompile-bridge-transfer/std", "pallet-evm-precompile-dispatch/std", "pallet-evm-precompile-ed25519/std", "pallet-evm-precompile-modexp/std", - "pallet-evm-precompile-sha3fips/std", - "pallet-evm-precompile-bridge-transfer/std", "pallet-evm-precompile-parachain-staking/std", "pallet-evm-precompile-score-staking/std", - "pallet-evm-precompile-aiusd-convertor/std", - "pallet-evm-precompile-curator/std", - "pallet-evm-precompile-guardian/std", - "pallet-evm-precompile-pool-proposal/std", - "pallet-evm-precompile-investing-pool/std", + "pallet-evm-precompile-sha3fips/std", + "pallet-evm-precompile-simple/std", + "pallet-evm/std", + "pallet-extrinsic-filter/std", + "pallet-group/std", + "pallet-identity-management/std", "pallet-identity/std", "pallet-membership/std", "pallet-message-queue/std", "pallet-multisig/std", + "pallet-omni-account-runtime-api/std", + "pallet-omni-account/std", "pallet-parachain-staking/std", "pallet-preimage/std", "pallet-proxy/std", "pallet-scheduler/std", + "pallet-score-staking/std", "pallet-session/std", "pallet-sudo/std", + "pallet-teebag/std", "pallet-timestamp/std", "pallet-tips/std", - "pallet-transaction-payment/std", "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", "pallet-treasury/std", "pallet-utility/std", + "pallet-vc-management/std", "pallet-vesting/std", - "core-primitives/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-utility/std", - "cumulus-primitives-timestamp/std", - "parachain-info/std", "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "parity-scale-codec/std", "polkadot-parachain-primitives/std", - "xcm/std", + "polkadot-primitives/std", + "polkadot-runtime-common/std", + "polkadot-runtime-parachains/std", + "precompile-utils/std", + 'runtime-common/std', + "scale-info/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-state-machine/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", "xcm-builder/std", "xcm-executor/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking?/std", - "frame-system-benchmarking?/std", - 'runtime-common/std', - "pallet-account-fix/std", - "pallet-bitacross/std", - "pallet-chain-bridge/std", - "pallet-bridge-transfer/std", - "pallet-evm-assertions/std", - "pallet-extrinsic-filter/std", - "pallet-group/std", - "pallet-identity-management/std", - "pallet-omni-account/std", - "pallet-omni-account-runtime-api/std", - "pallet-score-staking/std", - "pallet-teebag/std", - "pallet-vc-management/std", - "moonbeam-evm-tracer/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "pallet-bitacross/std", - "precompile-utils/std", + "xcm/std", "pallet-aiusd-convertor/std", "pallet-collab-ai-common/std", "pallet-curator/std", + "pallet-evm-precompile-aiusd-convertor/std", + "pallet-evm-precompile-curator/std", + "pallet-evm-precompile-guardian/std", + "pallet-evm-precompile-investing-pool/std", + "pallet-evm-precompile-pool-proposal/std", "pallet-guardian/std", - "pallet-pool-proposal/std", "pallet-investing-pool/std", + "pallet-pool-proposal/std", ] try-runtime = [ "cumulus-pallet-aura-ext/try-runtime", @@ -320,30 +344,31 @@ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime", - "orml-xtokens/try-runtime", + "frame-try-runtime?/try-runtime", "pallet-account-fix/try-runtime", "pallet-asset-manager/try-runtime", - "pallet-assets/try-runtime", "pallet-assets-handler/try-runtime", + "pallet-assets/try-runtime", "pallet-aura/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", "pallet-bitacross/try-runtime", "pallet-bounties/try-runtime", - "pallet-chain-bridge/try-runtime", "pallet-bridge-transfer/try-runtime", + "pallet-chain-bridge/try-runtime", "pallet-collective/try-runtime", "pallet-democracy/try-runtime", "pallet-ethereum/try-runtime", - "pallet-evm/try-runtime", "pallet-evm-assertions/try-runtime", - "pallet-identity/try-runtime", + "pallet-evm/try-runtime", "pallet-extrinsic-filter/try-runtime", - "pallet-identity/try-runtime", "pallet-group/try-runtime", "pallet-identity-management/try-runtime", + "pallet-identity/try-runtime", "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", + "pallet-omni-account/try-runtime", "pallet-parachain-staking/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", @@ -361,11 +386,14 @@ try-runtime = [ "pallet-vesting/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", - "pallet-omni-account/try-runtime", + "polkadot-runtime-common/try-runtime", + "polkadot-runtime-parachains/try-runtime", + "runtime-common/try-runtime", + "sp-runtime/try-runtime", "pallet-aiusd-convertor/try-runtime", "pallet-collab-ai-common/try-runtime", "pallet-curator/try-runtime", "pallet-guardian/try-runtime", - "pallet-pool-proposal/try-runtime", "pallet-investing-pool/try-runtime", + "pallet-pool-proposal/try-runtime", ] diff --git a/parachain/runtime/paseo/build.rs b/parachain/runtime/paseo/build.rs index 3ccbec6b26..ea8a4e6508 100644 --- a/parachain/runtime/paseo/build.rs +++ b/parachain/runtime/paseo/build.rs @@ -14,12 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -use substrate_wasm_builder::WasmBuilder; - +#[cfg(feature = "std")] fn main() { - WasmBuilder::new() + substrate_wasm_builder::WasmBuilder::new() .with_current_project() .export_heap_base() .import_memory() - .build() + .build(); } + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/parachain/runtime/paseo/src/asset_config.rs b/parachain/runtime/paseo/src/asset_config.rs index 436071d20c..535a05c253 100644 --- a/parachain/runtime/paseo/src/asset_config.rs +++ b/parachain/runtime/paseo/src/asset_config.rs @@ -1,7 +1,25 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry 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. +// +// Litentry 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 Litentry. If not, see . + use super::{ weights, AccountId, AssetId, Balance, Balances, Runtime, RuntimeEvent, TreasuryPalletId, }; -use crate::{constants::currency::deposit, precompiles::ASSET_PRECOMPILE_ADDRESS_PREFIX}; +use crate::{ + constants::currency::deposit, precompiles::ASSET_PRECOMPILE_ADDRESS_PREFIX, Decode, Encode, +}; use frame_support::{ parameter_types, traits::{AsEnsureOriginWithArg, ConstU32, NeverEnsureOrigin}, @@ -11,9 +29,9 @@ use pallet_evm_precompile_assets_erc20::AddressToAssetId; use parity_scale_codec::Compact; use runtime_common::{ currency::{DOLLARS, EXISTENTIAL_DEPOSIT}, - xcm_impl::CurrencyId, EnsureRootOrHalfCouncil, }; +use scale_info::TypeInfo; use sp_core::{ConstU128, H160}; use sp_runtime::traits::AccountIdConversion; use sp_std::prelude::*; @@ -92,11 +110,16 @@ impl pallet_assets::Config for Runtime { type BenchmarkHelper = AssetsBenchmarkHelper; } +#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] +pub enum ForeignAssetType { + Xcm(xcm::v4::Location), +} + impl pallet_asset_manager::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = AssetId; - type ForeignAssetType = CurrencyId; + type ForeignAssetType = ForeignAssetType; // TODO type ForeignAssetModifierOrigin = EnsureRootOrHalfCouncil; type Currency = Balances; type WeightInfo = weights::pallet_asset_manager::WeightInfo; diff --git a/parachain/runtime/paseo/src/lib.rs b/parachain/runtime/paseo/src/lib.rs index 873c16c393..035b5e9298 100644 --- a/parachain/runtime/paseo/src/lib.rs +++ b/parachain/runtime/paseo/src/lib.rs @@ -26,27 +26,31 @@ extern crate frame_benchmarking; use core_primitives::LITENTRY_PARA_ID; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use cumulus_primitives_core::AggregateMessageOrigin; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + genesis_builder_helper::{build_state, get_preset}, + parameter_types, traits::{ + fungible::{Balanced, Credit, HoldConsideration}, + tokens::imbalance::ResolveTo, + tokens::{PayFromAccount, UnityAssetBalanceConversion}, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, Contains, ContainsLengthBound, - EnsureOrigin, Everything, FindAuthor, InstanceFilter, OnFinalize, SortedMembers, - WithdrawReasons, + EnsureOrigin, Everything, FindAuthor, Imbalance, InstanceFilter, LinearStoragePrice, + OnFinalize, OnUnbalanced, SortedMembers, WithdrawReasons, }, weights::{constants::RocksDbWeight, ConstantMultiplier, Weight}, ConsensusEngineId, PalletId, }; use frame_system::EnsureRoot; -use hex_literal::hex; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use runtime_common::EnsureEnclaveSigner; // for TEE pub use pallet_balances::Call as BalancesCall; - // for CollabAI use pallet_collab_ai_common::EnsureSignedAndVerifiedCurator; +use parachains_common::message_queue::NarrowOriginToSibling; use sp_api::impl_runtime_apis; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, RuntimeDebug, H160, H256, U256}; @@ -61,41 +65,35 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, }; -pub use sp_runtime::{MultiAddress, Perbill, Percent, Permill}; +pub use sp_runtime::{traits::IdentityLookup, MultiAddress, Perbill, Percent, Permill}; use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; -// XCM Imports -use xcm_executor::XcmExecutor; -pub use constants::currency::deposit; +pub use constants::currency::*; pub use core_primitives::{ opaque, teebag::OperationalMode as TeebagOperationalMode, AccountId, Amount, AssetId, Balance, BlockNumber, DefaultOmniAccountConverter, Hash, Header, Identity, Nonce, Signature, DAYS, HOURS, MINUTES, SLOT_DURATION, }; -pub use runtime_common::currency::*; - +use pallet_ethereum::{Call::transact, PostLogContent, TransactionStatus}; +use pallet_evm::{FeeCalculator, GasWeightMapping, Runner}; +use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; +use pallet_treasury::TreasuryAccountId; use runtime_common::{ - impl_runtime_transaction_payment_fees, prod_or_fast, BlockHashCount, BlockLength, - CouncilInstance, CouncilMembershipInstance, DeveloperCommitteeInstance, - DeveloperCommitteeMembershipInstance, EnsureOmniAccount, EnsureRootOrAllCouncil, + currency::*, prod_or_fast, BlockHashCount, BlockLength, CouncilInstance, + CouncilMembershipInstance, DeveloperCommitteeInstance, DeveloperCommitteeMembershipInstance, + EnsureEnclaveSigner, EnsureOmniAccount, EnsureRootOrAllCouncil, EnsureRootOrAllTechnicalCommittee, EnsureRootOrHalfCouncil, EnsureRootOrHalfTechnicalCommittee, EnsureRootOrTwoThirdsCouncil, EnsureRootOrTwoThirdsTechnicalCommittee, - IMPExtrinsicWhitelistInstance, NegativeImbalance, RuntimeBlockWeights, SlowAdjustingFeeUpdate, + IMPExtrinsicWhitelistInstance, RuntimeBlockWeights, SlowAdjustingFeeUpdate, TechnicalCommitteeInstance, TechnicalCommitteeMembershipInstance, - VCMPExtrinsicWhitelistInstance, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, WEIGHT_PER_GAS, - WEIGHT_TO_FEE_FACTOR, + VCMPExtrinsicWhitelistInstance, BLOCK_PROCESSING_VELOCITY, MAXIMUM_BLOCK_WEIGHT, + NORMAL_DISPATCH_RATIO, RELAY_CHAIN_SLOT_DURATION_MILLIS, UNINCLUDED_SEGMENT_CAPACITY, + WEIGHT_PER_GAS, WEIGHT_TO_FEE_FACTOR, }; -use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; -use pallet_ethereum::{Call::transact, PostLogContent, TransactionStatus}; -use pallet_evm::{ - EVMCurrencyAdapter, FeeCalculator, GasWeightMapping, - OnChargeEVMTransaction as OnChargeEVMTransactionT, Runner, -}; -// Make the WASM binary available. #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); @@ -138,10 +136,14 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = fp_self_contained::UncheckedExtrinsic; + /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic; +/// The payload being signed in transactions. +pub type SignedPayload = generic::SignedPayload; + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -230,7 +232,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("paseo-parachain"), authoring_version: 1, // same versioning-mechanism as polkadot: use last digit for minor updates - spec_version: 9203, + spec_version: 9210, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -263,6 +265,7 @@ impl frame_system::Config for Runtime { type Hashing = BlakeTwo256; type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type BlockHashCount = BlockHashCount; type Version = Version; type PalletInfo = PalletInfo; @@ -271,12 +274,17 @@ impl frame_system::Config for Runtime { type OnKilledAccount = (); type DbWeight = RocksDbWeight; type BaseCallFilter = BaseCallFilter; - type SystemWeightInfo = weights::frame_system::WeightInfo; + type SystemWeightInfo = (); type BlockWeights = RuntimeBlockWeights; type BlockLength = BlockLength; type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } parameter_types! { @@ -401,7 +409,6 @@ impl pallet_proxy::Config for Runtime { } impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. type Moment = Moment; type OnTimestampSet = (); type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; @@ -426,23 +433,28 @@ impl pallet_scheduler::Config for Runtime { type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRootOrAllCouncil; type MaxScheduledPerBlock = ConstU32<50>; - type WeightInfo = weights::pallet_scheduler::WeightInfo; + type WeightInfo = (); type OriginPrivilegeCmp = frame_support::traits::EqualPrivilegeOnly; type Preimages = Preimage; } parameter_types! { - pub const PreimageMaxSize: u32 = 4096 * 1024; - pub const PreimageBaseDeposit: Balance = 1 * DOLLARS; + pub const PreimageBaseDeposit: Balance = deposit(1, 0); + pub const PreimageByteDeposit: Balance = deposit(0, 1); + pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); } impl pallet_preimage::Config for Runtime { - type WeightInfo = weights::pallet_preimage::WeightInfo; + type WeightInfo = (); type RuntimeEvent = RuntimeEvent; type Currency = Balances; - type ManagerOrigin = EnsureRootOrAllCouncil; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type ManagerOrigin = EnsureRootOrHalfCouncil; + type Consideration = HoldConsideration< + AccountId, + Balances, + PreimageHoldReason, + LinearStoragePrice, + >; } parameter_types! { @@ -450,20 +462,18 @@ parameter_types! { } impl pallet_balances::Config for Runtime { - /// The type for recording an account's balance. type Balance = Balance; - /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; - type WeightInfo = weights::pallet_balances::WeightInfo; + type WeightInfo = (); type MaxLocks = ConstU32<50>; type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = (); + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = (); type FreezeIdentifier = (); - type MaxHolds = (); type MaxFreezes = (); } @@ -478,12 +488,41 @@ parameter_types! { pub const TransactionByteFee: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 pub const WeightToFeeFactor: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 } -impl_runtime_transaction_payment_fees!(constants); + +pub struct ToAuthor; +impl OnUnbalanced> for ToAuthor { + fn on_nonzero_unbalanced(credit: Credit) { + if let Some(author) = Authorship::author() { + let _ = Balances::resolve(&author, credit); + } + } +} + +pub struct DealWithFees; +impl OnUnbalanced> for DealWithFees { + fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { + if let Some(fees) = fees_then_tips.next() { + // for fees, (1) to treasury, (2) to author and (3) burned + let (unburned, to_burn) = + fees.ration(TREASURY_PROPORTION + AUTHOR_PROPORTION, BURNED_PROPORTION); + + // burn `to_burn` + drop(to_burn); + + let mut split = unburned.ration(TREASURY_PROPORTION, AUTHOR_PROPORTION); + if let Some(tips) = fees_then_tips.next() { + // for tips, if any, 100% to author + tips.merge_into(&mut split.1); + } + ResolveTo::, Balances>::on_unbalanced(split.0); + >::on_unbalanced(split.1); + } + } +} impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter; type WeightToFee = ConstantMultiplier; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; @@ -498,7 +537,6 @@ parameter_types! { pub const MinimumDeposit: Balance = 100 * DOLLARS; pub EnactmentPeriod: BlockNumber = prod_or_fast!(5 * MINUTES, 2 * MINUTES, "ROCOCO_ENACTMENTPERIOD"); pub CooloffPeriod: BlockNumber = prod_or_fast!(10 * MINUTES, 2 * MINUTES, "ROCOCO_COOLOFFPERIOD"); - pub const PreimageByteDeposit: Balance = deposit(0, 1); } impl pallet_democracy::Config for Runtime { @@ -573,7 +611,7 @@ impl pallet_membership::Config for Runtime { type MembershipInitialized = Council; type MembershipChanged = Council; type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; + type WeightInfo = (); } parameter_types! { @@ -603,7 +641,7 @@ impl pallet_membership::Config for Runtime type MembershipInitialized = TechnicalCommittee; type MembershipChanged = TechnicalCommittee; type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; + type WeightInfo = (); } impl pallet_collective::Config for Runtime { @@ -629,16 +667,17 @@ impl pallet_membership::Config for Runtime type MembershipInitialized = DeveloperCommittee; type MembershipChanged = DeveloperCommittee; type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; + type WeightInfo = (); } parameter_types! { + pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 1 * DOLLARS; pub const ProposalBondMaximum: Balance = 20 * DOLLARS; pub SpendPeriod: BlockNumber = prod_or_fast!(10 * MINUTES, 2 * MINUTES, "ROCOCO_SPENDPERIOD"); - pub const Burn: Permill = Permill::from_percent(0); - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub PayoutPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 2 * MINUTES, "ROCOCO_PAYOUTPERIOD"); pub const TipCountdown: BlockNumber = DAYS; pub const TipFindersFee: Percent = Percent::from_percent(5); @@ -659,7 +698,7 @@ impl EnsureOrigin for EnsureRootOrTwoThirdsCouncilWrapper { type Success = Balance; fn try_origin(o: RuntimeOrigin) -> Result { match EnsureRootOrTwoThirdsCouncil::try_origin(o) { - Ok(_) => Ok(Balance::max_value()), + Ok(_) => Ok(Balance::MAX), Err(o) => Err(o), } } @@ -672,22 +711,28 @@ impl EnsureOrigin for EnsureRootOrTwoThirdsCouncilWrapper { impl pallet_treasury::Config for Runtime { type PalletId = TreasuryPalletId; type Currency = Balances; - type ApproveOrigin = EnsureRootOrTwoThirdsCouncil; + type ApproveOrigin = EnsureRootOrHalfCouncil; type RejectOrigin = EnsureRootOrHalfCouncil; type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; type ProposalBondMaximum = ProposalBondMaximum; - // Once passed, at most all is allowed to be spent - type SpendOrigin = EnsureRootOrTwoThirdsCouncilWrapper; + type SpendOrigin = EnsureRootOrTwoThirdsCouncilWrapper; // TODO: is it related to OpenGov only? type SpendPeriod = SpendPeriod; - type Burn = Burn; + type PayoutPeriod = PayoutPeriod; + type Burn = (); type BurnDestination = (); - // Rcococo bounty enabled type SpendFunds = Bounties; - type WeightInfo = weights::pallet_treasury::WeightInfo; - type MaxApprovals = ConstU32<100>; + type MaxApprovals = ConstU32<64>; + type AssetKind = (); // Only native asset is supported + type Beneficiary = AccountId; + type BeneficiaryLookup = IdentityLookup; + type Paymaster = PayFromAccount>; + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type WeightInfo = (); } pub struct CouncilProvider; @@ -697,7 +742,7 @@ impl SortedMembers for CouncilProvider { } fn sorted_members() -> Vec { - Council::members() + CouncilMembership::sorted_members() } #[cfg(feature = "runtime-benchmarks")] @@ -738,25 +783,38 @@ impl pallet_tips::Config for Runtime { type TipCountdown = TipCountdown; type TipFindersFee = TipFindersFee; type TipReportDepositBase = TipReportDepositBase; + type MaxTipAmount = ConstU128<{ 500 * UNIT }>; type WeightInfo = (); } +parameter_types! { + pub const BasicDeposit: Balance = deposit(1, 258); // 258 bytes on-chain + pub const ByteDeposit: Balance = deposit(0, 1); + pub const SubAccountDeposit: Balance = deposit(1, 53); // 53 bytes on-chain + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; +} + impl pallet_identity::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; - // Add one item in storage and take 258 bytes - type BasicDeposit = ConstU128<{ deposit(1, 258) }>; - // Not add any item to the storage but takes 66 bytes - type FieldDeposit = ConstU128<{ deposit(0, 66) }>; - // Add one item in storage and take 53 bytes - type SubAccountDeposit = ConstU128<{ deposit(1, 53) }>; - type MaxSubAccounts = ConstU32<100>; - type MaxAdditionalFields = ConstU32<100>; - type MaxRegistrars = ConstU32<20>; + type BasicDeposit = BasicDeposit; + type ByteDeposit = ByteDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = MaxSubAccounts; + type IdentityInformation = pallet_identity::legacy::IdentityInfo; + type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; type ForceOrigin = EnsureRootOrHalfCouncil; type RegistrarOrigin = EnsureRootOrHalfCouncil; - type WeightInfo = weights::pallet_identity::WeightInfo; + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRootOrHalfCouncil; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type WeightInfo = (); } impl pallet_sudo::Config for Runtime { @@ -775,43 +833,38 @@ impl pallet_account_fix::Config for Runtime { parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; } +type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< + Runtime, + RELAY_CHAIN_SLOT_DURATION_MILLIS, + BLOCK_PROCESSING_VELOCITY, + UNINCLUDED_SEGMENT_CAPACITY, +>; + impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; - type ReservedDmpWeight = ReservedDmpWeight; type OutboundXcmpMessageSource = XcmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type ReservedDmpWeight = ReservedDmpWeight; type XcmpMessageHandler = XcmpQueue; type ReservedXcmpWeight = ReservedXcmpWeight; type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; + // note here we intentionally use this hook to ignore relay chain proof so that + // it's possible to launch as standalone chain + // + // Litentry parachain has a different(standard) setting + type ConsensusHook = cumulus_pallet_parachain_system::consensus_hook::ExpectParentIncluded; + type WeightInfo = (); } impl parachain_info::Config for Runtime {} impl cumulus_pallet_aura_ext::Config for Runtime {} -impl cumulus_pallet_xcmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ChannelInfo = ParachainSystem; - // We use pallet_xcm to confirm the version of xcm - type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRootOrAllCouncil; - type ControllerOrigin = EnsureRootOrAllCouncil; - type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type PriceForSiblingDelivery = (); -} - -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRootOrAllCouncil; -} - parameter_types! { pub const Offset: u32 = 0; } @@ -833,8 +886,132 @@ impl pallet_session::Config for Runtime { impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); - type MaxAuthorities = ConstU32<100_000>; + type MaxAuthorities = ConstU32<250>; type AllowMultipleBlocksPerSlot = ConstBool; + type SlotDuration = ConstU64; +} + +parameter_types! { + pub const MinVestedTransfer: Balance = 10 * CENTS; + pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = + WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); +} + +impl pallet_vesting::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BlockNumberToBalance = ConvertInto; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = (); + type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; + type BlockNumberProvider = System; + // `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the + // highest number of schedules that encodes less than 2^10. + const MAX_VESTING_SCHEDULES: u32 = 28; +} + +parameter_types! { + pub MessageQueueServiceWeight: Weight = + Perbill::from_percent(25) * 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; + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = ConstU32<{ 128 * 1048 }>; + type MaxStale = ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueServiceWeight; +} + +pub struct TransactionPaymentAsGasPrice; +impl pallet_evm::FeeCalculator for TransactionPaymentAsGasPrice { + fn min_gas_price() -> (U256, Weight) { + // We do not want to involve Transaction Payment Multiplier here + // It will biased normal transfer (base weight is not biased by Multiplier) too much for + // Ethereum tx + // This is hardcoded ConstantMultiplier, WeightToFeeFactor = + // MILLICENTS / 10 + let weight_to_fee: u128 = WEIGHT_TO_FEE_FACTOR; + let min_gas_price = weight_to_fee.saturating_mul(WEIGHT_PER_GAS as u128); + (min_gas_price.into(), ::DbWeight::get().reads(1)) + } +} + +parameter_types! { + pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); + pub ChainId: u64 = LITENTRY_PARA_ID.into(); + pub BlockGasLimit: U256 = U256::from( + NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS + ); + pub PrecompilesValue: Precompiles = RococoNetworkPrecompiles::<_>::new(); + // BlockGasLimit / MAX_POV_SIZE + pub GasLimitPovSizeRatio: u64 = 4; +} + +pub struct FindAuthorTruncated(sp_std::marker::PhantomData); +impl> FindAuthor for FindAuthorTruncated { + fn find_author<'a, I>(digests: I) -> Option + where + I: 'a + IntoIterator, + { + if let Some(author_index) = F::find_author(digests) { + let authority_id = + pallet_aura::Authorities::::get()[author_index as usize].clone(); + return Some(H160::from_slice(&authority_id.encode()[4..24])); + } + + None + } +} + +impl pallet_evm::Config for Runtime { + type FeeCalculator = TransactionPaymentAsGasPrice; + type GasWeightMapping = pallet_evm::FixedGasWeightMapping; + type WeightPerGas = WeightPerGas; + type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; + type CallOrigin = pallet_evm::EnsureAddressTruncated; + type WithdrawOrigin = pallet_evm::EnsureAddressTruncated; + type AddressMapping = pallet_evm::HashedAddressMapping; + type Currency = Balances; + type RuntimeEvent = RuntimeEvent; + type Runner = pallet_evm::runner::stack::Runner; + type PrecompilesType = Precompiles; + type PrecompilesValue = PrecompilesValue; + type ChainId = ChainId; + type OnChargeTransaction = pallet_evm::EVMFungibleAdapter; + type BlockGasLimit = BlockGasLimit; + type Timestamp = Timestamp; + type OnCreate = (); + type FindAuthor = FindAuthorTruncated; + type GasLimitPovSizeRatio = GasLimitPovSizeRatio; + type SuicideQuickClearLimit = ConstU32<0>; + type WeightInfo = (); +} + +parameter_types! { + pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; +} + +impl pallet_ethereum::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type StateRoot = pallet_ethereum::IntermediateStateRoot; + type PostLogContent = PostBlockAndTxnHashes; + // Maximum length (in bytes) of revert message to include in Executed event + type ExtraDataLength = ConstU32<256>; } parameter_types! { @@ -893,28 +1070,9 @@ impl pallet_parachain_staking::Config for Runtime { type OnAllDelegationRemoved = ScoreStaking; } -parameter_types! { - pub const MinVestedTransfer: Balance = 10 * CENTS; - pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = - WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); -} - -impl pallet_vesting::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = (); - // `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the - // highest number of schedules that encodes less than 2^10. - const MAX_VESTING_SCHEDULES: u32 = 28; - type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; -} - parameter_types! { pub const BridgeChainId: u8 = 3; pub const ProposalLifetime: BlockNumber = 50400; // ~7 days - pub TreasuryAccount: AccountId = TreasuryPalletId::get().into_account_truncating(); } impl pallet_chain_bridge::Config for Runtime { @@ -932,7 +1090,7 @@ parameter_types! { // Ethereum LIT total issuance in parachain decimal form pub const ExternalTotalIssuance: Balance = 100_000_000 * DOLLARS; // bridge::derive_resource_id(1, &bridge::hashing::blake2_128(b"LIT")); - pub const NativeTokenResourceId: [u8; 32] = hex!("00000000000000000000000000000063a7e2be78898ba83824b0c0cc8dfb6001"); + pub const NativeTokenResourceId: [u8; 32] = hex_literal::hex!("00000000000000000000000000000063a7e2be78898ba83824b0c0cc8dfb6001"); } pub struct TransferAssetsAnyone; @@ -958,6 +1116,10 @@ impl pallet_bridge_transfer::Config for Runtime { type WeightInfo = weights::pallet_bridge_transfer::WeightInfo; } +parameter_types! { + pub TreasuryAccount: AccountId = Treasury::account_id(); +} + impl pallet_assets_handler::Config for Runtime { type RuntimeEvent = RuntimeEvent; type TreasuryAccount = TreasuryAccount; @@ -1120,129 +1282,6 @@ impl pallet_aiusd_convertor::Config for Runtime { type ManagerOrigin = EnsureRoot; } -// For OnChargeEVMTransaction implementation -type CurrencyAccountId = ::AccountId; -type BalanceFor = - <::Currency as Currency>>::Balance; -type PositiveImbalanceFor = - <::Currency as Currency>>::PositiveImbalance; -type NegativeImbalanceFor = - <::Currency as Currency>>::NegativeImbalance; -pub struct OnChargeEVMTransaction(sp_std::marker::PhantomData); -impl OnChargeEVMTransactionT for OnChargeEVMTransaction -where - T: pallet_evm::Config, - PositiveImbalanceFor: Imbalance, Opposite = NegativeImbalanceFor>, - NegativeImbalanceFor: Imbalance, Opposite = PositiveImbalanceFor>, - OU: OnUnbalanced>, - U256: UniqueSaturatedInto>, -{ - type LiquidityInfo = Option>; - - fn withdraw_fee(who: &H160, fee: U256) -> Result> { - EVMCurrencyAdapter::<::Currency, ()>::withdraw_fee(who, fee) - } - - fn correct_and_deposit_fee( - who: &H160, - corrected_fee: U256, - base_fee: U256, - already_withdrawn: Self::LiquidityInfo, - ) -> Self::LiquidityInfo { - ::Currency, OU> as OnChargeEVMTransactionT< - T, - >>::correct_and_deposit_fee(who, corrected_fee, base_fee, already_withdrawn) - } - // This is the only difference of OnChargeEVMTransaction regarding EVMCurrencyAdapter - // We can use parachain TransactionPayment logic to handle evm tip - fn pay_priority_fee(tip: Self::LiquidityInfo) { - if let Some(tip) = tip { - OU::on_unbalanced(tip); - } - } -} - -pub struct TransactionPaymentAsGasPrice; -impl FeeCalculator for TransactionPaymentAsGasPrice { - fn min_gas_price() -> (U256, Weight) { - // We do not want to involve Transaction Payment Multiplier here - // It will biased normal transfer (base weight is not biased by Multiplier) too much for - // Ethereum tx - // This is hardcoded ConstantMultiplier, WeightToFeeFactor = - // MILLICENTS / 10 - let weight_to_fee: u128 = WEIGHT_TO_FEE_FACTOR; - let min_gas_price = weight_to_fee.saturating_mul(WEIGHT_PER_GAS as u128); - (min_gas_price.into(), ::DbWeight::get().reads(1)) - } -} - -parameter_types! { - pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); - pub ChainId: u64 = LITENTRY_PARA_ID.into(); - pub BlockGasLimit: U256 = U256::from( - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS - ); - pub PrecompilesValue: Precompiles = RococoNetworkPrecompiles::<_>::new(); - // BlockGasLimit / MAX_POV_SIZE - pub GasLimitPovSizeRatio: u64 = 4; -} - -pub struct FindAuthorTruncated(sp_std::marker::PhantomData); -impl FindAuthor for FindAuthorTruncated -where - pallet_aura::Pallet: FindAuthor, -{ - fn find_author<'a, I>(digests: I) -> Option - where - I: 'a + IntoIterator, - { - if let Some(author_index) = pallet_aura::Pallet::::find_author(digests) { - let authority_id = - >::authorities()[author_index as usize].clone(); - return Some(H160::from_slice(&authority_id.encode()[4..24])); - } - - None - } -} - -impl pallet_evm::Config for Runtime { - type FeeCalculator = TransactionPaymentAsGasPrice; - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type WeightPerGas = WeightPerGas; - type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; - type CallOrigin = pallet_evm::EnsureAddressTruncated; - type WithdrawOrigin = pallet_evm::EnsureAddressTruncated; - // From evm address to parachain address - type AddressMapping = pallet_evm::HashedAddressMapping; - type Currency = Balances; - type RuntimeEvent = RuntimeEvent; - type Runner = pallet_evm::runner::stack::Runner; - type PrecompilesType = Precompiles; - type PrecompilesValue = PrecompilesValue; - type ChainId = ChainId; - type OnChargeTransaction = OnChargeEVMTransaction>; - type BlockGasLimit = BlockGasLimit; - type Timestamp = Timestamp; - type OnCreate = (); - type FindAuthor = FindAuthorTruncated; - // BlockGasLimit / MAX_POV_SIZE - type GasLimitPovSizeRatio = GasLimitPovSizeRatio; - type WeightInfo = weights::pallet_evm::WeightInfo; -} - -parameter_types! { - pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; -} - -impl pallet_ethereum::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type StateRoot = pallet_ethereum::IntermediateStateRoot; - type PostLogContent = PostBlockAndTxnHashes; - // Maximum length (in bytes) of revert message to include in Executed event - type ExtraDataLength = ConstU32<256>; -} - parameter_types! { pub const DefaultYearlyInflation: Perbill = Perbill::from_perthousand(5); } @@ -1313,7 +1352,7 @@ construct_runtime! { // also see the comment above `AllPalletsWithSystem` and // https://github.com/litentry/litentry-parachain/issues/336 Authorship: pallet_authorship = 40, - //41 is for old CollatorSelection, replaced by ParachainSTaking + // 41 was: CollatorSelection Session: pallet_session = 42, Aura: pallet_aura = 43, AuraExt: cumulus_pallet_aura_ext = 44, @@ -1323,12 +1362,12 @@ construct_runtime! { XcmpQueue: cumulus_pallet_xcmp_queue = 50, PolkadotXcm: pallet_xcm = 51, CumulusXcm: cumulus_pallet_xcm = 52, - DmpQueue: cumulus_pallet_dmp_queue = 53, - XTokens: orml_xtokens = 54, - // 55 is saved for old pallet: Tokens: orml_tokens + // 53 was: cumulus_pallet_dmp_queue + // 54 was: orml_xtokens + // 55 was: orml_tokens Assets: pallet_assets = 56, + MessageQueue: pallet_message_queue = 57, - // Rococo pallets ChainBridge: pallet_chain_bridge= 60, BridgeTransfer: pallet_bridge_transfer = 61, ExtrinsicFilter: pallet_extrinsic_filter = 63, @@ -1415,8 +1454,6 @@ impl Contains for NormalModeFilter { RuntimeCall::Bounties(_) | // BridgeTransfer RuntimeCall::BridgeTransfer(_) | - // XTokens::transfer for normal users - RuntimeCall::XTokens(orml_xtokens::Call::transfer { .. }) | // collective RuntimeCall::DeveloperCommittee(_) | // memberships @@ -1479,7 +1516,7 @@ impl Contains for NormalModeFilter { mod benches { define_benchmarks!( [frame_system, SystemBench::] - [pallet_asset_manager, AssetManager] + // [pallet_asset_manager, AssetManager] [pallet_balances, Balances] [pallet_timestamp, Timestamp] [pallet_utility, Utility] @@ -1511,10 +1548,10 @@ impl_runtime_apis! { } fn execute_block(block: Block) { - Executive::execute_block(block); + Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -1583,11 +1620,20 @@ impl_runtime_apis! { impl sp_consensus_aura::AuraApi for Runtime { fn slot_duration() -> sp_consensus_aura::SlotDuration { - sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) + sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION) } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() + } + } + + impl cumulus_primitives_aura::AuraUnincludedSegmentApi for Runtime { + fn can_build_upon( + included_hash: ::Hash, + slot: cumulus_primitives_aura::Slot, + ) -> bool { + ConsensusHook::can_build_upon(included_hash, slot) } } @@ -1597,22 +1643,43 @@ impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< + Block, + Balance, + > for Runtime { + fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { TransactionPayment::query_info(uxt, len) } - fn query_fee_details( - uxt: ::Extrinsic, + fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details( + call: RuntimeCall, len: u32, ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_fee_details(uxt, len) + TransactionPayment::query_call_fee_details(call, len) } fn query_weight_to_fee(weight: Weight) -> Balance { TransactionPayment::weight_to_fee(weight) } + fn query_length_to_fee(length: u32) -> Balance { TransactionPayment::length_to_fee(length) } @@ -1877,12 +1944,17 @@ impl_runtime_apis! { fn trace_transaction( extrinsics: Vec<::Extrinsic>, traced_transaction: &pallet_ethereum::Transaction, + header: &::Header, ) -> Result< (), sp_runtime::DispatchError, > { use moonbeam_evm_tracer::tracer::EvmTracer; + // We need to follow the order when replaying the transactions. + // Block initialize happens first then apply_extrinsic. + Executive::initialize_block(header); + // Apply the a subset of extrinsics: all the substrate-specific or ethereum // transactions that preceded the requested transaction. for ext in extrinsics.into_iter() { @@ -1906,14 +1978,16 @@ impl_runtime_apis! { fn trace_block( extrinsics: Vec<::Extrinsic>, known_transactions: Vec, + header: &::Header, ) -> Result< (), sp_runtime::DispatchError, > { use moonbeam_evm_tracer::tracer::EvmTracer; - let mut config = ::config().clone(); - config.estimate = true; + // We need to follow the order when replaying the transactions. + // Block initialize happens first then apply_extrinsic. + Executive::initialize_block(header); // Apply all extrinsics. Ethereum extrinsics are traced. for ext in extrinsics.into_iter() { @@ -1935,6 +2009,84 @@ impl_runtime_apis! { Ok(()) } + + fn trace_call( + header: &::Header, + from: H160, + to: H160, + data: Vec, + value: U256, + gas_limit: U256, + max_fee_per_gas: Option, + max_priority_fee_per_gas: Option, + nonce: Option, + access_list: Option)>>, + ) -> Result<(), sp_runtime::DispatchError> { + use moonbeam_evm_tracer::tracer::EvmTracer; + + // Initialize block: calls the "on_initialize" hook on every pallet + // in AllPalletsWithSystem. + Executive::initialize_block(header); + + EvmTracer::new().trace(|| { + let is_transactional = false; + let validate = true; + let without_base_extrinsic_weight = true; + + + // Estimated encoded transaction size must be based on the heaviest transaction + // type (EIP1559Transaction) to be compatible with all transaction types. + let mut estimated_transaction_len = data.len() + + // pallet ethereum index: 1 + // transact call index: 1 + // Transaction enum variant: 1 + // chain_id 8 bytes + // nonce: 32 + // max_priority_fee_per_gas: 32 + // max_fee_per_gas: 32 + // gas_limit: 32 + // action: 21 (enum varianrt + call address) + // value: 32 + // access_list: 1 (empty vec size) + // 65 bytes signature + 258; + + if access_list.is_some() { + estimated_transaction_len += access_list.encoded_size(); + } + + let gas_limit = gas_limit.min(u64::MAX.into()).low_u64(); + + let (weight_limit, proof_size_base_cost) = + match ::GasWeightMapping::gas_to_weight( + gas_limit, + without_base_extrinsic_weight + ) { + weight_limit if weight_limit.proof_size() > 0 => { + (Some(weight_limit), Some(estimated_transaction_len as u64)) + } + _ => (None, None), + }; + + let _ = ::Runner::call( + from, + to, + data, + value, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + access_list.unwrap_or_default(), + is_transactional, + validate, + weight_limit, + proof_size_base_cost, + ::config(), + ); + }); + Ok(()) + } } impl moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi for Runtime { @@ -1970,23 +2122,25 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to - // have a backtrace here. If any of the pre/post migration checks fail, we shall stop - // right here and right now. - log::info!("try-runtime::on_runtime_upgrade rococo."); + log::info!("try-runtime::on_runtime_upgrade"); let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block(block: Block, state_root_check: bool,signature_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight { + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { log::info!( - target: "runtime::Rococo", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", + "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", block.header.number, block.header.hash(), state_root_check, select, ); - Executive::try_execute_block(block, state_root_check, signature_check,select).expect("try_execute_block failed") + Executive::try_execute_block(block, state_root_check, signature_check, select).expect("execute-block failed") } } @@ -2039,34 +2193,23 @@ impl_runtime_apis! { Ok(batches) } } -} - -#[allow(dead_code)] -struct CheckInherents; -impl cumulus_pallet_parachain_system::CheckInherents for CheckInherents { - fn check_inherents( - block: &Block, - relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof, - ) -> sp_inherents::CheckInherentsResult { - let relay_chain_slot = relay_state_proof - .read_slot() - .expect("Could not read the relay chain slot from the proof"); + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } - let inherent_data = - cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration( - relay_chain_slot, - sp_std::time::Duration::from_secs(6), - ) - .create_inherent_data() - .expect("Could not create the timestamp inherent data"); + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) + } - inherent_data.check_extrinsics(block) + fn preset_names() -> Vec { + vec![] + } } } cumulus_pallet_parachain_system::register_validate_block! { Runtime = Runtime, BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, - CheckInherents = CheckInherents, } diff --git a/parachain/runtime/paseo/src/tests/base_call_filter.rs b/parachain/runtime/paseo/src/tests/base_call_filter.rs deleted file mode 100644 index 03523bab00..0000000000 --- a/parachain/runtime/paseo/src/tests/base_call_filter.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use crate::{Runtime, RuntimeCall, RuntimeOrigin}; - -runtime_common::run_call_filter_tests!(); - -#[test] -fn balance_transfer_works() { - base_call_filter::balance_transfer_works::(); -} diff --git a/parachain/runtime/paseo/src/tests/mod.rs b/parachain/runtime/paseo/src/tests/mod.rs index 607cb06cc1..a4267431ad 100644 --- a/parachain/runtime/paseo/src/tests/mod.rs +++ b/parachain/runtime/paseo/src/tests/mod.rs @@ -14,32 +14,22 @@ // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . -mod base_call_filter; +// TODO: enable tests for paseo-runtime, it requires that the `setup/mod.rs` to be +// parameterized (or generalized) with Runtime -pub mod setup { - use crate::Runtime; - #[cfg(test)] - runtime_common::decl_test_chain!(Runtime); +/* +mod base_call_filter { + use crate::{Runtime, RuntimeCall, RuntimeOrigin}; + runtime_common::run_call_filter_tests!(); + + #[test] + fn balance_transfer_works() { + base_call_filter::balance_transfer_works::(); + } } mod transaction_payment { use crate::{Runtime, RuntimeCall, RuntimeOrigin, TransactionByteFee}; - runtime_common::run_transaction_payment_tests!(); } - -mod xcm_parachain { - use crate::{ - tests::setup::{ - relay_chain::{ - Runtime as RelayChainRuntime, RuntimeCall as RelayCall, - RuntimeOrigin as RelayOrigin, - }, - ParaA, ParaB, Relay, TestNet, - }, - xcm_config::{LocationToAccountId, UnitWeightCost}, - Runtime, RuntimeCall, RuntimeOrigin, - }; - - runtime_common::run_xcm_tests!(); -} +*/ diff --git a/parachain/runtime/paseo/src/weights/mod.rs b/parachain/runtime/paseo/src/weights/mod.rs index b75428447f..a92269089f 100644 --- a/parachain/runtime/paseo/src/weights/mod.rs +++ b/parachain/runtime/paseo/src/weights/mod.rs @@ -16,27 +16,27 @@ #![allow(clippy::unnecessary_cast)] -pub mod cumulus_pallet_xcmp_queue; -pub mod frame_system; +// pub mod cumulus_pallet_xcmp_queue; +// pub mod frame_system; pub mod pallet_asset_manager; -pub mod pallet_balances; +// pub mod pallet_balances; pub mod pallet_bridge_transfer; pub mod pallet_chain_bridge; pub mod pallet_collective; pub mod pallet_democracy; pub mod pallet_evm; pub mod pallet_extrinsic_filter; -pub mod pallet_identity; +// pub mod pallet_identity; pub mod pallet_identity_management; -pub mod pallet_membership; +// pub mod pallet_membership; pub mod pallet_multisig; pub mod pallet_parachain_staking; -pub mod pallet_preimage; +// pub mod pallet_preimage; pub mod pallet_proxy; -pub mod pallet_scheduler; +// pub mod pallet_scheduler; pub mod pallet_session; pub mod pallet_teebag; pub mod pallet_timestamp; -pub mod pallet_treasury; +// pub mod pallet_treasury; pub mod pallet_utility; pub mod pallet_vc_management; diff --git a/parachain/runtime/paseo/src/xcm_config.rs b/parachain/runtime/paseo/src/xcm_config.rs index f631139a4c..a376104a7f 100644 --- a/parachain/runtime/paseo/src/xcm_config.rs +++ b/parachain/runtime/paseo/src/xcm_config.rs @@ -13,63 +13,50 @@ // // You should have received a copy of the GNU General Public License // along with Litentry. If not, see . + #![allow(clippy::clone_on_copy)] #![allow(clippy::useless_conversion)] -// use frame_system::RawOrigin as SystemRawOrigin; -// use pallet_collective::RawOrigin as CollectiveRawOrigin; +use super::{ + AllPalletsWithSystem, AssetId, Assets, Balance, Balances, MessageQueue, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, XcmpQueue, +}; +use core_primitives::{AccountId, Weight}; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ - match_types, pallet_prelude::ConstU32, parameter_types, - traits::{Everything, Nothing}, - weights::ConstantMultiplier, - PalletId, + traits::{Contains, Everything, Nothing, TransformOrigin}, + weights::IdentityFee, }; use frame_system::EnsureRoot; -use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; use pallet_xcm::XcmPassthrough; +use parachains_common::message_queue::ParaIdToSibling; use polkadot_parachain_primitives::primitives::Sibling; -use xcm_builder::{ConvertedConcreteId, NoChecking}; -// Litentry: The CheckAccount implementation is forced by the bug of FungiblesAdapter. -// We should replace () regarding fake_pallet_id account after our PR passed. -use core_primitives::{AccountId, Weight}; -use runtime_common::xcm_impl::{ - AccountIdToMultiLocation, AssetIdMultiLocationConvert, CurrencyId, - CurrencyIdMultiLocationConvert, FirstAssetTrader, MultiNativeAsset, NewAnchoringSelfReserve, - OldAnchoringSelfReserve, XcmFeesToAccount, -}; - -use runtime_common::WEIGHT_TO_FEE_FACTOR; -use sp_runtime::traits::AccountIdConversion; +use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; +use runtime_common::EnsureRootOrHalfCouncil; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowHrmpNotificationsFromRelayChain, + AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, + ConvertedConcreteId, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, + FungibleAdapter, FungiblesAdapter, IsConcrete, NativeAsset, NoChecking, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + TrailingSetTopicAsId, UsingComponents, }; use xcm_executor::{traits::JustTry, XcmExecutor}; -#[cfg(test)] -use crate::tests::setup::ParachainXcmRouter; - -use super::{ - AllPalletsWithSystem, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - ParachainInfo, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, -}; -#[cfg(not(test))] -use super::{ParachainSystem, XcmpQueue}; - parameter_types! { - pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: Option = None; + pub const RelayLocation: Location = Location::parent(); + pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); + pub SelfLocation: Location = Here.into_location(); + pub DummyCheckingAccount: AccountId = PolkadotXcm::check_account(); } -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( @@ -81,152 +68,103 @@ pub type LocationToAccountId = ( AccountId32Aliases, ); -/// Means for transacting self reserve assets on this chain. -pub type LocalAssetTransactor = CurrencyAdapter< +/// Means for transacting assets on this chain. +pub type AssetTransactors = (FungibleTransactor, FungiblesTransactor); + +/// Means for transacting the native currency on this chain. +pub type FungibleTransactor = FungibleAdapter< // Use this currency: Balances, // Use this currency when it is a fungible asset matching the given location or name: - (IsConcrete>, IsConcrete>), - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: + IsConcrete, + // Do a simple punn to convert an `AccountId32` `Location` into a native chain + // `AccountId`: LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): + // Our chain's `AccountId` type (we can't get away without mentioning it explicitly): AccountId, - // We don't track any teleports. + // We don't track any teleports of `Balances`. (), >; -parameter_types! { - pub const TempPalletId: PalletId = PalletId(*b"py/tempA"); - pub TempAccount: AccountId = TempPalletId::get().into_account_truncating(); -} -// The non-reserve fungible transactor type -// It will use pallet_assets, and the Id will be CurrencyId::ParachainReserve(MultiLocation) -pub type ForeignFungiblesTransactor = FungiblesAdapter< - // Use this fungibles implementation +/// Means for transacting assets besides the native currency on this chain. +pub type FungiblesTransactor = FungiblesAdapter< + // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId, JustTry>, - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: + ConvertedConcreteId, // TODO + // Convert an XCM Location into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, - // We dont allow teleports. + // We don't support teleport so no need to check any assets. NoChecking, - // We dont track any teleports - TempAccount, + // We don't support teleport so this is just a dummy account. + DummyCheckingAccount, >; -// The XCM transaction handlers for different type of assets. -pub type AssetTransactors = ( - // SelfReserve asset, both pre and post 0.9.16 - LocalAssetTransactor, - // // Foreign assets (non native minted token crossed from remote chain) - ForeignFungiblesTransactor, -); - -/// Litentry: As our current XcmRouter (which used for receiving remote XCM message and call -/// XcmExecutor to handle) will force the origin to remoteChain sovereign account, this -/// XcmOriginToTransactDispatchOrigin implementation is not that useful. This is the type we use to -/// convert an (incoming) XCM origin into a local `Origin` instance, ready for dispatching a -/// transaction with Xcm's `Transact`. There is an `OriginKind` which can biases the kind of local -/// `Origin` it will become. +/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, +/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can +/// biases the kind of local `Origin` it will become. pub type XcmOriginToTransactDispatchOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. SovereignSignedViaLocation, - // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when - // recognized. + // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when + // recognised. RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognized. + // recognised. SiblingParachainAsNative, + // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a + // transaction from the Root origin. + ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal - // `Origin::Signed` origin of the same 32-byte value. + // `RuntimeOrigin::Signed` origin of the same 32-byte value. SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. XcmPassthrough, ); -parameter_types! { - // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - // How much we charge for XCM from remote chain per XCM command. - pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, 0); - pub const MaxInstructions: u32 = 100; -} - -match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } - }; +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } } -pub type Barriers = ( +pub type Barrier = TrailingSetTopicAsId<( TakeWeightCredit, AllowTopLevelPaidExecutionFrom, - AllowUnpaidExecutionFrom, - // ^^^ Parent and its exec plurality get free execution -); + // Parent & its unit plurality gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Expected responses are OK. + AllowKnownQueryResponses, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + // HRMP notifications from the relay chain are OK. + AllowHrmpNotificationsFromRelayChain, +)>; parameter_types! { - /// Xcm fees will go to the treasury account - pub XcmFeesAccount: AccountId = Treasury::account_id(); + // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); pub const MaxAssetsIntoHolding: u32 = 64; - pub const WeightToFeeFactor: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 + pub const MaxInstructions: u32 = 100; } -pub type Traders = ( - UsingComponents< - ConstantMultiplier, - NewAnchoringSelfReserve, - AccountId, - Balances, - DealWithFees, - >, - UsingComponents< - ConstantMultiplier, - OldAnchoringSelfReserve, - AccountId, - Balances, - DealWithFees, - >, - // TODO::Implement foreign asset fee to weight rule from AssetManager Setting; Need more test - FirstAssetTrader< - CurrencyId, - AssetManager, - XcmFeesToAccount< - Assets, - ConvertedConcreteId, JustTry>, - AccountId, - XcmFeesAccount, - >, - >, -); - -/// Xcm Weigher shared between multiple Xcm-related configs. -pub type XcmWeigher = FixedWeightBounds; - pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; - // How to withdraw and deposit an asset. type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; - // Only Allow chains to handle their own reserve assets crossed on local chain whatever way they - // want. - type IsReserve = MultiNativeAsset; - type IsTeleporter = (); // Teleporting is disabled. + type IsReserve = NativeAsset; // TODO + type IsTeleporter = (); type UniversalLocation = UniversalLocation; - type Barrier = Barriers; - type Weigher = XcmWeigher; - // Litentry: This is the tool used for calculating that inside XcmExecutor vm, how to transfer - // asset into weight fee. Usually this is in order to fulfull Barrier - // AllowTopLevelPaidExecutionFrom requirement. Currently we have not implement the asset to fee - // rule for Foreign Asset, so pure cross chain transfer from XCM parachain will be rejected no - // matter. - type Trader = Traders; + type Barrier = Barrier; + type Weigher = FixedWeightBounds; + type Trader = UsingComponents, SelfLocation, AccountId, Balances, ()>; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; @@ -240,91 +178,47 @@ impl xcm_executor::Config for XcmConfig { type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; - type Aliasers = (); + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } -/// No local origins on this chain are allowed to dispatch XCM sends/executions. +/// Local origins on this chain are allowed to dispatch XCM sends/executions. pub type LocalOriginToLocation = SignedToAccountId32; -#[cfg(test)] -/// The mimic XcmRouter which only change storage locally for Xcm to digest. -/// XCM router for parachain. -pub type XcmRouter = ParachainXcmRouter; -#[cfg(not(test))] /// The means for routing XCM messages which are not for local execution into the right message /// queues. pub type XcmRouter = ( // Two routers - use UMP to communicate with the relay chain: - // We use PolkadotXcm to confirm the XCM Version; Use () instead if pass anyway cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); -match_types! { - pub type ParentOrParachains: impl Contains = { - // Local account: Litmus - MultiLocation { parents: 0, interior: X1(Junction::AccountId32 { .. }) } | - // Relay-chain account: Kusama - MultiLocation { parents: 1, interior: X1(Junction::AccountId32 { .. }) } | - // AccountKey20 based parachain: Moonriver - MultiLocation { parents: 1, interior: X2(Parachain( .. ), Junction::AccountKey20 { .. }) } | - // AccountId 32 based parachain: Statemint - MultiLocation { parents: 1, interior: X2(Parachain( .. ), Junction::AccountId32 { .. }) } - }; -} - -parameter_type_with_key! { - pub ParachainMinFee: |_location: MultiLocation| -> Option { - // Always return `None` to disallow using fee asset and target asset with different reserve chains - None - }; -} - -parameter_types! { - pub SelfLocation: MultiLocation = MultiLocation { - parents:1, - interior: Junctions::X1( - Parachain(ParachainInfo::parachain_id().into()) - ) - }; - pub const BaseXcmWeight: Weight = Weight::from_parts(100_000_000u64, 0); - pub const MaxAssetsForTransfer: usize = 3; -} - -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - +// TODO: currently all set to `Nothing` impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; - // ^ Disable dispatchable execute on the XCM pallet. - // Needs to be `Everything` for local testing. type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; - // This filter here defines what is allowed for XcmExecutor to handle with TransferReserveAsset - // Rule. - type XcmReserveTransferFilter = Everything; - type Weigher = XcmWeigher; + type XcmReserveTransferFilter = Nothing; + type Weigher = FixedWeightBounds; type UniversalLocation = UniversalLocation; type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; type Currency = Balances; type CurrencyMatcher = (); type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; - type MaxLockers = ConstU32<8>; + type MaxLockers = ConstU32<0>; type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); @@ -335,19 +229,15 @@ impl cumulus_pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; } -impl orml_xtokens::Config for Runtime { +impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdConvert = CurrencyIdMultiLocationConvert; - type XcmExecutor = XcmExecutor; - type SelfLocation = SelfLocation; - type MultiLocationsFilter = ParentOrParachains; - type MinXcmFee = ParachainMinFee; - type Weigher = XcmWeigher; - type BaseXcmWeight = BaseXcmWeight; - type UniversalLocation = UniversalLocation; - type MaxAssetsForTransfer = MaxAssetsForTransfer; - type ReserveProvider = AbsoluteReserveProvider; + type ChannelInfo = ParachainSystem; + type VersionWrapper = (); + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type ControllerOrigin = EnsureRootOrHalfCouncil; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; + type PriceForSiblingDelivery = NoPriceForMessageDelivery; } diff --git a/parachain/runtime/rococo/Cargo.toml b/parachain/runtime/rococo/Cargo.toml deleted file mode 100644 index 5b4affe037..0000000000 --- a/parachain/runtime/rococo/Cargo.toml +++ /dev/null @@ -1,335 +0,0 @@ -[package] -authors = ["Trust Computing GmbH "] -edition = '2021' -name = 'rococo-parachain-runtime' -version = '0.1.0' - -[dependencies] -hex-literal = { workspace = true } -log = { workspace = true } -num_enum = { workspace = true } -parity-scale-codec = { workspace = true } -scale-info = { workspace = true } - -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -frame-try-runtime = { workspace = true, optional = true } - -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-bounties = { workspace = true } -pallet-collective = { workspace = true } -pallet-democracy = { workspace = true } -pallet-identity = { workspace = true } -pallet-membership = { workspace = true } -pallet-multisig = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-session = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-tips = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-vesting = { workspace = true } - -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-dmp-queue = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-timestamp = { workspace = true } -cumulus-primitives-utility = { workspace = true } -parachain-info = { workspace = true } - -pallet-xcm = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -orml-traits = { workspace = true } -orml-xtokens = { workspace = true } - -cumulus-pallet-session-benchmarking = { workspace = true, optional = true } -frame-benchmarking = { workspace = true, optional = true } -frame-system-benchmarking = { workspace = true, optional = true } - -core-primitives = { workspace = true } -pallet-account-fix = { workspace = true } -pallet-asset-manager = { workspace = true } -pallet-assets = { workspace = true } -pallet-assets-handler = { workspace = true } -pallet-bitacross = { workspace = true } -pallet-bridge-transfer = { workspace = true } -pallet-chain-bridge = { workspace = true } -pallet-evm-assertions = { workspace = true } -pallet-extrinsic-filter = { workspace = true } -pallet-group = { workspace = true } -pallet-identity-management = { workspace = true } -pallet-omni-account = { workspace = true } -pallet-omni-account-runtime-api = { workspace = true } -pallet-parachain-staking = { workspace = true } -pallet-score-staking = { workspace = true } -pallet-teebag = { workspace = true } -pallet-vc-management = { workspace = true } -runtime-common = { workspace = true } - -fp-evm = { workspace = true } -fp-rpc = { workspace = true } -fp-self-contained = { workspace = true, features = ["serde"] } -pallet-ethereum = { workspace = true } -pallet-evm = { workspace = true } -pallet-evm-precompile-assets-erc20 = { workspace = true } -pallet-evm-precompile-blake2 = { workspace = true } -pallet-evm-precompile-bn128 = { workspace = true } -pallet-evm-precompile-dispatch = { workspace = true } -pallet-evm-precompile-ed25519 = { workspace = true } -pallet-evm-precompile-modexp = { workspace = true } -pallet-evm-precompile-sha3fips = { workspace = true } -pallet-evm-precompile-simple = { workspace = true } - -pallet-evm-precompile-bridge-transfer = { workspace = true } -pallet-evm-precompile-parachain-staking = { workspace = true } -pallet-evm-precompile-score-staking = { workspace = true } - -moonbeam-evm-tracer = { workspace = true } -moonbeam-rpc-primitives-debug = { workspace = true } -moonbeam-rpc-primitives-txpool = { workspace = true } -precompile-utils = { workspace = true } - -[dev-dependencies] -cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } -polkadot-primitives = { workspace = true, features = ["std"] } -polkadot-runtime-parachains = { workspace = true, features = ["std"] } -runtime-common = { workspace = true, features = ["tests"] } -sp-state-machine = { workspace = true, features = ["std"] } -xcm-simulator = { workspace = true } -pallet-message-queue = { workspace = true, features = ["std"] } - -[build-dependencies] -substrate-wasm-builder = { workspace = true } - -[features] -default = ["std"] -fast-runtime = [] -runtime-benchmarks = [ - "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets-handler/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-bounties/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-democracy/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-membership/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-tips/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "pallet-chain-bridge/runtime-benchmarks", - "pallet-bridge-transfer/runtime-benchmarks", - "pallet-extrinsic-filter/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "pallet-group/runtime-benchmarks", - "pallet-identity-management/runtime-benchmarks", - "pallet-teebag/runtime-benchmarks", - "pallet-vc-management/runtime-benchmarks", - "pallet-account-fix/runtime-benchmarks", - "pallet-score-staking/runtime-benchmarks", - "pallet-omni-account/runtime-benchmarks", -] -std = [ - "parity-scale-codec/std", - "log/std", - "num_enum/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "frame-executive/std", - "frame-support/std", - "frame-system/std", - "frame-try-runtime?/std", - "frame-system-rpc-runtime-api/std", - "orml-traits/std", - "orml-xtokens/std", - "pallet-asset-manager/std", - "pallet-assets/std", - "pallet-assets-handler/std", - "pallet-aura/std", - "pallet-authorship/std", - "pallet-balances/std", - "pallet-bounties/std", - "pallet-collective/std", - "pallet-democracy/std", - "pallet-ethereum/std", - "pallet-evm/std", - "pallet-evm-precompile-assets-erc20/std", - "pallet-evm-precompile-blake2/std", - "pallet-evm-precompile-simple/std", - "pallet-evm-precompile-bn128/std", - "pallet-evm-precompile-dispatch/std", - "pallet-evm-precompile-ed25519/std", - "pallet-evm-precompile-modexp/std", - "pallet-evm-precompile-sha3fips/std", - "pallet-evm-precompile-bridge-transfer/std", - "pallet-evm-precompile-parachain-staking/std", - "pallet-evm-precompile-score-staking/std", - "pallet-identity/std", - "pallet-membership/std", - "pallet-message-queue/std", - "pallet-multisig/std", - "pallet-parachain-staking/std", - "pallet-preimage/std", - "pallet-proxy/std", - "pallet-scheduler/std", - "pallet-session/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-tips/std", - "pallet-transaction-payment/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-vesting/std", - "core-primitives/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-utility/std", - "cumulus-primitives-timestamp/std", - "parachain-info/std", - "pallet-xcm/std", - "polkadot-parachain-primitives/std", - "xcm/std", - "xcm-builder/std", - "xcm-executor/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking?/std", - "frame-system-benchmarking?/std", - 'runtime-common/std', - "pallet-account-fix/std", - "pallet-bitacross/std", - "pallet-chain-bridge/std", - "pallet-bridge-transfer/std", - "pallet-evm-assertions/std", - "pallet-extrinsic-filter/std", - "pallet-group/std", - "pallet-identity-management/std", - "pallet-omni-account/std", - "pallet-omni-account-runtime-api/std", - "pallet-score-staking/std", - "pallet-teebag/std", - "pallet-vc-management/std", - "moonbeam-evm-tracer/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "pallet-bitacross/std", - "precompile-utils/std", -] -try-runtime = [ - "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-dmp-queue/try-runtime", - "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-support/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "orml-xtokens/try-runtime", - "pallet-account-fix/try-runtime", - "pallet-asset-manager/try-runtime", - "pallet-assets/try-runtime", - "pallet-assets-handler/try-runtime", - "pallet-aura/try-runtime", - "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-bitacross/try-runtime", - "pallet-bounties/try-runtime", - "pallet-chain-bridge/try-runtime", - "pallet-bridge-transfer/try-runtime", - "pallet-collective/try-runtime", - "pallet-democracy/try-runtime", - "pallet-ethereum/try-runtime", - "pallet-evm/try-runtime", - "pallet-evm-assertions/try-runtime", - "pallet-identity/try-runtime", - "pallet-extrinsic-filter/try-runtime", - "pallet-identity/try-runtime", - "pallet-group/try-runtime", - "pallet-identity-management/try-runtime", - "pallet-membership/try-runtime", - "pallet-multisig/try-runtime", - "pallet-parachain-staking/try-runtime", - "pallet-preimage/try-runtime", - "pallet-proxy/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-score-staking/try-runtime", - "pallet-session/try-runtime", - "pallet-sudo/try-runtime", - "pallet-teebag/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-tips/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-treasury/try-runtime", - "pallet-utility/try-runtime", - "pallet-vc-management/try-runtime", - "pallet-vesting/try-runtime", - "pallet-xcm/try-runtime", - "parachain-info/try-runtime", - "pallet-omni-account/try-runtime", -] diff --git a/parachain/runtime/rococo/build.rs b/parachain/runtime/rococo/build.rs deleted file mode 100644 index 3ccbec6b26..0000000000 --- a/parachain/runtime/rococo/build.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use substrate_wasm_builder::WasmBuilder; - -fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() -} diff --git a/parachain/runtime/rococo/src/asset_config.rs b/parachain/runtime/rococo/src/asset_config.rs deleted file mode 100644 index 15c0b67879..0000000000 --- a/parachain/runtime/rococo/src/asset_config.rs +++ /dev/null @@ -1,103 +0,0 @@ -use super::{ - weights, AccountId, AssetId, Balance, Balances, Runtime, RuntimeEvent, TreasuryPalletId, -}; -use crate::{constants::currency::deposit, precompiles::ASSET_PRECOMPILE_ADDRESS_PREFIX}; -use frame_support::{ - parameter_types, - traits::{AsEnsureOriginWithArg, ConstU32, NeverEnsureOrigin}, -}; -use frame_system::EnsureRoot; -use pallet_evm_precompile_assets_erc20::AddressToAssetId; -use parity_scale_codec::Compact; -use runtime_common::{ - currency::{DOLLARS, EXISTENTIAL_DEPOSIT}, - xcm_impl::CurrencyId, - EnsureRootOrHalfCouncil, -}; -use sp_core::{ConstU128, H160}; -use sp_runtime::traits::AccountIdConversion; -use sp_std::prelude::*; - -pub fn get_all_module_accounts() -> Vec { - // Add whitelist here, usually this is the system account like treasury - vec![] -} - -pub struct AssetsBenchmarkHelper; -#[cfg(feature = "runtime-benchmarks")] -impl> pallet_assets::BenchmarkHelper - for AssetsBenchmarkHelper -{ - fn create_asset_id_parameter(id: u32) -> AssetIdParameter { - AssetId::from(id).into() - } -} - -parameter_types! { - pub LitTreasuryAccount: AccountId = TreasuryPalletId::get().into_account_truncating(); -} - -parameter_types! { - pub const AssetDeposit: Balance = 1 * DOLLARS; - pub const AssetsStringLimit: u32 = 50; - /// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1) - // https://github.com/paritytech/substrate/blob/069917b/frame/assets/src/lib.rs#L257L271 - pub const MetadataDepositBase: Balance = deposit(1, 68); - pub const MetadataDepositPerByte: Balance = deposit(0, 1); - pub const AssetAccountDeposit: Balance = deposit(1, 18); -} - -impl AddressToAssetId for Runtime { - fn address_to_asset_id(address: H160) -> Option { - let mut data = [0u8; 16]; - let address_bytes: [u8; 20] = address.into(); - if ASSET_PRECOMPILE_ADDRESS_PREFIX.eq(&address_bytes[0..4]) { - data.copy_from_slice(&address_bytes[4..20]); - Some(u128::from_be_bytes(data)) - } else { - None - } - } - - fn asset_id_to_address(asset_id: AssetId) -> H160 { - let mut data = [0u8; 20]; - data[0..4].copy_from_slice(ASSET_PRECOMPILE_ADDRESS_PREFIX); - data[4..20].copy_from_slice(&asset_id.to_be_bytes()); - H160::from(data) - } -} - -impl pallet_assets::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type AssetId = AssetId; - type Currency = Balances; - // TODO: We do not allow creating by regular users before pallet_asset_manager fully adopted - // P-937 - type CreateOrigin = AsEnsureOriginWithArg>; - type ForceOrigin = EnsureRoot; - type AssetDeposit = AssetDeposit; - type MetadataDepositBase = MetadataDepositBase; - type MetadataDepositPerByte = MetadataDepositPerByte; - type AssetAccountDeposit = AssetAccountDeposit; - type ApprovalDeposit = ConstU128<{ EXISTENTIAL_DEPOSIT }>; - type StringLimit = AssetsStringLimit; - type Freezer = (); - type Extra = (); - type WeightInfo = pallet_assets::weights::SubstrateWeight; - type RemoveItemsLimit = ConstU32<1000>; - type AssetIdParameter = Compact; - type CallbackHandle = (); - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = AssetsBenchmarkHelper; -} - -impl pallet_asset_manager::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type AssetId = AssetId; - type ForeignAssetType = CurrencyId; - type ForeignAssetModifierOrigin = EnsureRootOrHalfCouncil; - type Currency = Balances; - type WeightInfo = weights::pallet_asset_manager::WeightInfo; -} diff --git a/parachain/runtime/rococo/src/constants.rs b/parachain/runtime/rococo/src/constants.rs deleted file mode 100644 index b24f3ddb51..0000000000 --- a/parachain/runtime/rococo/src/constants.rs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -/// Money matters. -pub mod currency { - use crate::Balance; - use runtime_common::currency::{DOLLARS, MILLICENTS}; - - // Linear ratio of transaction fee distribution - // It is recommended to set sum of ratio to 100, yet only decimal loss is concerned. - pub const TREASURY_PROPORTION: u32 = 40u32; - pub const AUTHOR_PROPORTION: u32 = 0u32; - pub const BURNED_PROPORTION: u32 = 60u32; - - /// Function used in some fee configurations - pub const fn deposit(items: u32, bytes: u32) -> Balance { - items as Balance * DOLLARS + (bytes as Balance) * 100 * MILLICENTS - } -} diff --git a/parachain/runtime/rococo/src/lib.rs b/parachain/runtime/rococo/src/lib.rs deleted file mode 100644 index 07d7856adc..0000000000 --- a/parachain/runtime/rococo/src/lib.rs +++ /dev/null @@ -1,1974 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] -#![allow(clippy::identity_op)] -#![allow(clippy::items_after_test_module)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "512"] - -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -extern crate frame_benchmarking; - -use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; -use frame_support::{ - construct_runtime, parameter_types, - traits::{ - ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, Contains, ContainsLengthBound, - EnsureOrigin, Everything, FindAuthor, InstanceFilter, OnFinalize, SortedMembers, - WithdrawReasons, - }, - weights::{constants::RocksDbWeight, ConstantMultiplier, Weight}, - ConsensusEngineId, PalletId, -}; -use frame_system::EnsureRoot; -use hex_literal::hex; -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; - -use runtime_common::EnsureEnclaveSigner; -// for TEE -pub use pallet_balances::Call as BalancesCall; - -use sp_api::impl_runtime_apis; -pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata, RuntimeDebug, H160, H256, U256}; -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{ - AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, - DispatchInfoOf, Dispatchable, PostDispatchInfoOf, UniqueSaturatedInto, - }, - transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, - ApplyExtrinsicResult, -}; -pub use sp_runtime::{MultiAddress, Perbill, Percent, Permill}; -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -// XCM Imports -use xcm_executor::XcmExecutor; - -pub use constants::currency::deposit; -pub use core_primitives::{ - opaque, teebag::OperationalMode as TeebagOperationalMode, AccountId, Amount, AssetId, Balance, - BlockNumber, DefaultOmniAccountConverter, Hash, Header, Identity, Nonce, Signature, DAYS, - HOURS, MINUTES, ROCOCO_PARA_ID, SLOT_DURATION, -}; -pub use runtime_common::currency::*; - -use runtime_common::{ - impl_runtime_transaction_payment_fees, prod_or_fast, BlockHashCount, BlockLength, - CouncilInstance, CouncilMembershipInstance, DeveloperCommitteeInstance, - DeveloperCommitteeMembershipInstance, EnsureOmniAccount, EnsureRootOrAllCouncil, - EnsureRootOrAllTechnicalCommittee, EnsureRootOrHalfCouncil, EnsureRootOrHalfTechnicalCommittee, - EnsureRootOrTwoThirdsCouncil, EnsureRootOrTwoThirdsTechnicalCommittee, - IMPExtrinsicWhitelistInstance, NegativeImbalance, RuntimeBlockWeights, SlowAdjustingFeeUpdate, - TechnicalCommitteeInstance, TechnicalCommitteeMembershipInstance, - VCMPExtrinsicWhitelistInstance, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, WEIGHT_PER_GAS, - WEIGHT_TO_FEE_FACTOR, -}; -use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; - -use pallet_ethereum::{Call::transact, PostLogContent, TransactionStatus}; -use pallet_evm::{ - EVMCurrencyAdapter, FeeCalculator, GasWeightMapping, - OnChargeEVMTransaction as OnChargeEVMTransactionT, Runner, -}; -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -pub mod asset_config; -pub mod constants; -pub mod precompiles; - -#[cfg(test)] -mod tests; -pub mod weights; -pub mod xcm_config; - -pub use precompiles::RococoNetworkPrecompiles; -pub type Precompiles = RococoNetworkPrecompiles; - -/// The address format for describing accounts. -pub type Address = MultiAddress; - -/// Block type as expected by this runtime. -pub type Block = generic::Block; - -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; - -/// BlockId type as expected by this runtime. -pub type BlockId = generic::BlockId; - -/// The SignedExtension to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckEra, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, -); - -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - fp_self_contained::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = - fp_self_contained::CheckedExtrinsic; - -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - // see https://github.com/paritytech/substrate/pull/10043 - // - // With this type the hooks of pallets will be executed - // in the order that they are declared in `construct_runtime!` - // it was reverse order before. - // See the comment before collation related pallets too. - AllPalletsWithSystem, ->; - -impl fp_self_contained::SelfContainedCall for RuntimeCall { - type SignedInfo = H160; - - fn is_self_contained(&self) -> bool { - match self { - RuntimeCall::Ethereum(call) => call.is_self_contained(), - _ => false, - } - } - - fn check_self_contained(&self) -> Option> { - match self { - RuntimeCall::Ethereum(call) => call.check_self_contained(), - _ => None, - } - } - - fn validate_self_contained( - &self, - info: &Self::SignedInfo, - dispatch_info: &DispatchInfoOf, - len: usize, - ) -> Option { - match self { - RuntimeCall::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len), - _ => None, - } - } - - fn pre_dispatch_self_contained( - &self, - info: &Self::SignedInfo, - dispatch_info: &DispatchInfoOf, - len: usize, - ) -> Option> { - match self { - RuntimeCall::Ethereum(call) => { - call.pre_dispatch_self_contained(info, dispatch_info, len) - }, - _ => None, - } - } - - fn apply_self_contained( - self, - info: Self::SignedInfo, - ) -> Option>> { - match self { - call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => { - Some(call.dispatch(RuntimeOrigin::from( - pallet_ethereum::RawOrigin::EthereumTransaction(info), - ))) - }, - _ => None, - } - } -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub aura: Aura, - } -} - -/// This runtime version. -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - // Note: - // It's important to match `rococo-parachain-runtime`, which is runtime pkg name - spec_name: create_runtime_str!("rococo-parachain"), - impl_name: create_runtime_str!("rococo-parachain"), - authoring_version: 1, - // same versioning-mechanism as polkadot: use last digit for minor updates - spec_version: 9202, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 1, - state_version: 0, -}; - -/// A timestamp: milliseconds since the unix epoch. -pub type Moment = u64; - -/// The version information used to identify this runtime when compiled natively. -#[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } -} - -parameter_types! { - pub const Version: RuntimeVersion = VERSION; - - // using generic substrate prefix - pub const SS58Prefix: u16 = 42; -} - -impl frame_system::Config for Runtime { - type AccountId = AccountId; - type RuntimeCall = RuntimeCall; - type Lookup = AccountIdLookup; - type Nonce = Nonce; - type Block = Block; - type Hash = Hash; - type Hashing = BlakeTwo256; - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type BlockHashCount = BlockHashCount; - type Version = Version; - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type DbWeight = RocksDbWeight; - type BaseCallFilter = BaseCallFilter; - type SystemWeightInfo = weights::frame_system::WeightInfo; - type BlockWeights = RuntimeBlockWeights; - type BlockLength = BlockLength; - type SS58Prefix = SS58Prefix; - type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -parameter_types! { - // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. - pub const DepositBase: Balance = deposit(1, 88); - // Additional storage item size of 32 bytes. - pub const DepositFactor: Balance = deposit(0, 32); -} - -impl pallet_multisig::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = ConstU32<100>; - type WeightInfo = weights::pallet_multisig::WeightInfo; -} - -/// The type used to represent the kinds of proxying allowed. -#[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - scale_info::TypeInfo, -)] -pub enum ProxyType { - /// Fully permissioned proxy. Can execute any call on behalf of _proxied_. - #[codec(index = 0)] - Any, - /// Can execute any call that does not transfer funds, including asset transfers. - #[codec(index = 1)] - NonTransfer, - /// Proxy with the ability to reject time-delay proxy announcements. - #[codec(index = 2)] - CancelProxy, - /// Collator selection proxy. Can execute calls related to collator selection mechanism. - #[codec(index = 3)] - Collator, - /// Governance - #[codec(index = 4)] - Governance, -} - -impl Default for ProxyType { - fn default() -> Self { - Self::Any - } -} - -impl InstanceFilter for ProxyType { - fn filter(&self, c: &RuntimeCall) -> bool { - match self { - ProxyType::Any => true, - ProxyType::NonTransfer => !matches!( - c, - RuntimeCall::Balances(..) - | RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. }) - ), - ProxyType::CancelProxy => matches!( - c, - RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) - | RuntimeCall::Utility(..) - | RuntimeCall::Multisig(..) - ), - ProxyType::Collator => matches!( - c, - RuntimeCall::ParachainStaking(..) - | RuntimeCall::Utility(..) - | RuntimeCall::Multisig(..) - ), - ProxyType::Governance => matches!( - c, - RuntimeCall::Democracy(..) - | RuntimeCall::Council(..) - | RuntimeCall::TechnicalCommittee(..) - | RuntimeCall::Treasury(..) - | RuntimeCall::DeveloperCommittee(..) - ), - } - } - fn is_superset(&self, o: &Self) -> bool { - match (self, o) { - (x, y) if x == y => true, - (ProxyType::Any, _) => true, - (_, ProxyType::Any) => false, - (ProxyType::NonTransfer, _) => true, - _ => false, - } - } -} - -parameter_types! { - // One storage item; key size 32, value size 8; . - pub const ProxyDepositBase: Balance = deposit(1, 8); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); - pub const AnnouncementDepositBase: Balance = deposit(1, 8); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); -} - -impl pallet_proxy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; - type MaxProxies = ConstU32<32>; - type WeightInfo = weights::pallet_proxy::WeightInfo; - type MaxPending = ConstU32<32>; - type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; -} - -impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = Moment; - type OnTimestampSet = (); - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = weights::pallet_timestamp::WeightInfo; -} - -impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (ParachainStaking,); -} - -parameter_types! { - pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * - RuntimeBlockWeights::get().max_block; -} - -impl pallet_scheduler::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type PalletsOrigin = OriginCaller; - type RuntimeCall = RuntimeCall; - type MaximumWeight = MaximumSchedulerWeight; - type ScheduleOrigin = EnsureRootOrAllCouncil; - type MaxScheduledPerBlock = ConstU32<50>; - type WeightInfo = weights::pallet_scheduler::WeightInfo; - type OriginPrivilegeCmp = frame_support::traits::EqualPrivilegeOnly; - type Preimages = Preimage; -} - -parameter_types! { - pub const PreimageMaxSize: u32 = 4096 * 1024; - pub const PreimageBaseDeposit: Balance = 1 * DOLLARS; -} - -impl pallet_preimage::Config for Runtime { - type WeightInfo = weights::pallet_preimage::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type ManagerOrigin = EnsureRootOrAllCouncil; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; -} - -impl pallet_balances::Config for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = weights::pallet_balances::WeightInfo; - type MaxLocks = ConstU32<50>; - type MaxReserves = ConstU32<50>; - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); -} - -impl pallet_utility::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type PalletsOrigin = OriginCaller; - type WeightInfo = weights::pallet_utility::WeightInfo; -} - -parameter_types! { - pub const TransactionByteFee: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 - pub const WeightToFeeFactor: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 -} -impl_runtime_transaction_payment_fees!(constants); - -impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; - type WeightToFee = ConstantMultiplier; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; - type OperationalFeeMultiplier = ConstU8<5>; -} - -parameter_types! { - pub LaunchPeriod: BlockNumber = prod_or_fast!(10 * MINUTES, 5 * MINUTES, "ROCOCO_LAUNCHPERIOD"); - pub VotingPeriod: BlockNumber = prod_or_fast!(10 * MINUTES, 5 * MINUTES, "ROCOCO_VOTINGPERIOD"); - pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(8 * MINUTES, 2 * MINUTES, "ROCOCO_FASTTRACKVOTINGPERIOD"); - pub const InstantAllowed: bool = true; - pub const MinimumDeposit: Balance = 100 * DOLLARS; - pub EnactmentPeriod: BlockNumber = prod_or_fast!(5 * MINUTES, 2 * MINUTES, "ROCOCO_ENACTMENTPERIOD"); - pub CooloffPeriod: BlockNumber = prod_or_fast!(10 * MINUTES, 2 * MINUTES, "ROCOCO_COOLOFFPERIOD"); - pub const PreimageByteDeposit: Balance = deposit(0, 1); -} - -impl pallet_democracy::Config for Runtime { - type Preimages = Preimage; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type VoteLockingPeriod = EnactmentPeriod; // Same as EnactmentPeriod - type MinimumDeposit = MinimumDeposit; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = EnsureRootOrHalfCouncil; - /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = EnsureRootOrTwoThirdsCouncil; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = EnsureRootOrAllCouncil; - /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = EnsureRootOrTwoThirdsTechnicalCommittee; - type InstantOrigin = EnsureRootOrAllTechnicalCommittee; - type InstantAllowed = InstantAllowed; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = EnsureRootOrTwoThirdsCouncil; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; - type BlacklistOrigin = EnsureRootOrAllCouncil; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cool-off period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type PalletsOrigin = OriginCaller; - type MaxVotes = ConstU32<100>; - type WeightInfo = weights::pallet_democracy::WeightInfo; - type MaxProposals = ConstU32<100>; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; - type SubmitOrigin = frame_system::EnsureSigned; -} - -parameter_types! { - pub const CouncilMotionDuration: BlockNumber = 3 * DAYS; - pub const CouncilDefaultMaxMembers: u32 = 100; - pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; -} - -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = ConstU32<100>; - type MaxMembers = CouncilDefaultMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::WeightInfo; - type SetMembersOrigin = EnsureRoot; - type MaxProposalWeight = MaxProposalWeight; -} - -impl pallet_membership::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRootOrTwoThirdsCouncil; - type RemoveOrigin = EnsureRootOrTwoThirdsCouncil; - type SwapOrigin = EnsureRootOrTwoThirdsCouncil; - type ResetOrigin = EnsureRootOrTwoThirdsCouncil; - type PrimeOrigin = EnsureRootOrTwoThirdsCouncil; - type MembershipInitialized = Council; - type MembershipChanged = Council; - type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; -} - -parameter_types! { - pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS; -} - -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = TechnicalMotionDuration; - type MaxProposals = ConstU32<100>; - type MaxMembers = CouncilDefaultMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::WeightInfo; - type SetMembersOrigin = EnsureRoot; - type MaxProposalWeight = MaxProposalWeight; -} - -impl pallet_membership::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRootOrTwoThirdsCouncil; - type RemoveOrigin = EnsureRootOrTwoThirdsCouncil; - type SwapOrigin = EnsureRootOrTwoThirdsCouncil; - type ResetOrigin = EnsureRootOrTwoThirdsCouncil; - type PrimeOrigin = EnsureRootOrTwoThirdsCouncil; - type MembershipInitialized = TechnicalCommittee; - type MembershipChanged = TechnicalCommittee; - type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; -} - -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = TechnicalMotionDuration; - type MaxProposals = ConstU32<100>; - type MaxMembers = CouncilDefaultMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::WeightInfo; - type SetMembersOrigin = EnsureRoot; - type MaxProposalWeight = MaxProposalWeight; -} - -impl pallet_membership::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRootOrTwoThirdsCouncil; - type RemoveOrigin = EnsureRootOrTwoThirdsCouncil; - type SwapOrigin = EnsureRootOrTwoThirdsCouncil; - type ResetOrigin = EnsureRootOrTwoThirdsCouncil; - type PrimeOrigin = EnsureRootOrTwoThirdsCouncil; - type MembershipInitialized = DeveloperCommittee; - type MembershipChanged = DeveloperCommittee; - type MaxMembers = CouncilDefaultMaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; -} - -parameter_types! { - pub const ProposalBond: Permill = Permill::from_percent(5); - pub const ProposalBondMinimum: Balance = 1 * DOLLARS; - pub const ProposalBondMaximum: Balance = 20 * DOLLARS; - pub SpendPeriod: BlockNumber = prod_or_fast!(10 * MINUTES, 2 * MINUTES, "ROCOCO_SPENDPERIOD"); - pub const Burn: Permill = Permill::from_percent(0); - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); - - pub const TipCountdown: BlockNumber = DAYS; - pub const TipFindersFee: Percent = Percent::from_percent(5); - pub TipReportDepositBase: Balance = deposit(1, 0); - pub BountyDepositBase: Balance = deposit(1, 0); - pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; - pub const BountyUpdatePeriod: BlockNumber = 35 * DAYS; - pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); - pub CuratorDepositMin: Balance = DOLLARS; - pub CuratorDepositMax: Balance = 100 * DOLLARS; - pub BountyValueMinimum: Balance = 5 * DOLLARS; - pub DataDepositPerByte: Balance = deposit(0, 1); - pub const MaximumReasonLength: u32 = 8192; -} - -pub struct EnsureRootOrTwoThirdsCouncilWrapper; -impl EnsureOrigin for EnsureRootOrTwoThirdsCouncilWrapper { - type Success = Balance; - fn try_origin(o: RuntimeOrigin) -> Result { - match EnsureRootOrTwoThirdsCouncil::try_origin(o) { - Ok(_) => Ok(Balance::max_value()), - Err(o) => Err(o), - } - } - #[cfg(feature = "runtime-benchmarks")] - fn try_successful_origin() -> Result { - Ok(RuntimeOrigin::root()) - } -} - -impl pallet_treasury::Config for Runtime { - type PalletId = TreasuryPalletId; - type Currency = Balances; - type ApproveOrigin = EnsureRootOrTwoThirdsCouncil; - type RejectOrigin = EnsureRootOrHalfCouncil; - type RuntimeEvent = RuntimeEvent; - type OnSlash = Treasury; - type ProposalBond = ProposalBond; - type ProposalBondMinimum = ProposalBondMinimum; - type ProposalBondMaximum = ProposalBondMaximum; - // Once passed, at most all is allowed to be spent - type SpendOrigin = EnsureRootOrTwoThirdsCouncilWrapper; - type SpendPeriod = SpendPeriod; - type Burn = Burn; - type BurnDestination = (); - // Rcococo bounty enabled - type SpendFunds = Bounties; - type WeightInfo = weights::pallet_treasury::WeightInfo; - type MaxApprovals = ConstU32<100>; -} - -pub struct CouncilProvider; -impl SortedMembers for CouncilProvider { - fn contains(who: &AccountId) -> bool { - Council::is_member(who) - } - - fn sorted_members() -> Vec { - Council::members() - } - - #[cfg(feature = "runtime-benchmarks")] - fn add(_: &AccountId) { - unimplemented!() - } -} - -impl ContainsLengthBound for CouncilProvider { - fn max_len() -> usize { - CouncilDefaultMaxMembers::get() as usize - } - fn min_len() -> usize { - 0 - } -} - -impl pallet_bounties::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type BountyDepositBase = BountyDepositBase; - type BountyDepositPayoutDelay = BountyDepositPayoutDelay; - type BountyUpdatePeriod = BountyUpdatePeriod; - type BountyValueMinimum = BountyValueMinimum; - type CuratorDepositMultiplier = CuratorDepositMultiplier; - type CuratorDepositMin = CuratorDepositMin; - type CuratorDepositMax = CuratorDepositMax; - type DataDepositPerByte = DataDepositPerByte; - type MaximumReasonLength = MaximumReasonLength; - type WeightInfo = (); - type ChildBountyManager = (); -} - -impl pallet_tips::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DataDepositPerByte = DataDepositPerByte; - type MaximumReasonLength = MaximumReasonLength; - type Tippers = CouncilProvider; - type TipCountdown = TipCountdown; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = TipReportDepositBase; - type WeightInfo = (); -} - -impl pallet_identity::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - // Add one item in storage and take 258 bytes - type BasicDeposit = ConstU128<{ deposit(1, 258) }>; - // Not add any item to the storage but takes 66 bytes - type FieldDeposit = ConstU128<{ deposit(0, 66) }>; - // Add one item in storage and take 53 bytes - type SubAccountDeposit = ConstU128<{ deposit(1, 53) }>; - type MaxSubAccounts = ConstU32<100>; - type MaxAdditionalFields = ConstU32<100>; - type MaxRegistrars = ConstU32<20>; - type Slashed = Treasury; - type ForceOrigin = EnsureRootOrHalfCouncil; - type RegistrarOrigin = EnsureRootOrHalfCouncil; - type WeightInfo = weights::pallet_identity::WeightInfo; -} - -impl pallet_sudo::Config for Runtime { - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); -} - -impl pallet_account_fix::Config for Runtime { - type Currency = Balances; - type IncConsumerOrigin = EnsureRootOrTwoThirdsTechnicalCommittee; - type AddBalanceOrigin = EnsureRoot; - type BurnOrigin = EnsureRoot; -} - -parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); -} - -impl cumulus_pallet_parachain_system::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnSystemEvent = (); - type SelfParaId = parachain_info::Pallet; - type DmpMessageHandler = DmpQueue; - type ReservedDmpWeight = ReservedDmpWeight; - type OutboundXcmpMessageSource = XcmpQueue; - type XcmpMessageHandler = XcmpQueue; - type ReservedXcmpWeight = ReservedXcmpWeight; - type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; -} - -impl parachain_info::Config for Runtime {} - -impl cumulus_pallet_aura_ext::Config for Runtime {} - -impl cumulus_pallet_xcmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ChannelInfo = ParachainSystem; - // We use pallet_xcm to confirm the version of xcm - type VersionWrapper = PolkadotXcm; - type ExecuteOverweightOrigin = EnsureRootOrAllCouncil; - type ControllerOrigin = EnsureRootOrAllCouncil; - type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type PriceForSiblingDelivery = (); -} - -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; - type ExecuteOverweightOrigin = EnsureRootOrAllCouncil; -} - -parameter_types! { - pub const Offset: u32 = 0; -} - -impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = ::AccountId; - // we don't have stash and controller, thus we don't need the convert as well. - type ValidatorIdOf = ConvertInto; - type ShouldEndSession = ParachainStaking; - type NextSessionRotation = ParachainStaking; - type SessionManager = ParachainStaking; - // Essentially just Aura, but lets be pedantic. - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - type WeightInfo = weights::pallet_session::WeightInfo; -} - -impl pallet_aura::Config for Runtime { - type AuthorityId = AuraId; - type DisabledValidators = (); - type MaxAuthorities = ConstU32<100_000>; - type AllowMultipleBlocksPerSlot = ConstBool; -} - -parameter_types! { - /// Default fixed percent a collator takes off the top of due rewards - pub const DefaultCollatorCommission: Perbill = Perbill::from_percent(0); - /// Default percent of inflation set aside for parachain bond every round - pub const DefaultParachainBondReservePercent: Percent = Percent::from_percent(0); - pub const MinCollatorStk: Balance = 50 * DOLLARS; - pub const MinCandidateStk: Balance = 50 * DOLLARS; - pub const MinDelegation: Balance = 50 * DOLLARS; - pub const MinDelegatorStk: Balance = 50 * DOLLARS; -} - -impl pallet_parachain_staking::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type MonetaryGovernanceOrigin = EnsureRootOrAllCouncil; - /// Minimum round length is 2 minutes (10 * 12 second block times) - type MinBlocksPerRound = ConstU32<{ prod_or_fast!(2 * MINUTES, 2) }>; - /// Blocks per round - type DefaultBlocksPerRound = ConstU32<{ prod_or_fast!(2 * MINUTES, 2) }>; - /// Rounds before the collator leaving the candidates request can be executed - type LeaveCandidatesDelay = ConstU32<{ prod_or_fast!(8, 1) }>; - /// Rounds before the candidate bond increase/decrease can be executed - type CandidateBondLessDelay = ConstU32<{ prod_or_fast!(8, 1) }>; - /// Rounds before the delegator exit can be executed - type LeaveDelegatorsDelay = ConstU32<{ prod_or_fast!(8, 1) }>; - /// Rounds before the delegator revocation can be executed - type RevokeDelegationDelay = ConstU32<{ prod_or_fast!(8, 1) }>; - /// Rounds before the delegator bond increase/decrease can be executed - type DelegationBondLessDelay = ConstU32<{ prod_or_fast!(8, 1) }>; - /// Rounds before the reward is paid - type RewardPaymentDelay = ConstU32<2>; - /// Minimum collators selected per round, default at genesis and minimum forever after - type MinSelectedCandidates = ConstU32<1>; - /// Maximum top delegations per candidate - type MaxTopDelegationsPerCandidate = ConstU32<1000>; - /// Maximum bottom delegations per candidate - type MaxBottomDelegationsPerCandidate = ConstU32<200>; - /// Maximum delegations per delegator - type MaxDelegationsPerDelegator = ConstU32<100>; - type DefaultCollatorCommission = DefaultCollatorCommission; - type DefaultParachainBondReservePercent = DefaultParachainBondReservePercent; - /// Minimum stake required to become a collator - type MinCollatorStk = MinCollatorStk; - /// Minimum stake required to be reserved to be a candidate - type MinCandidateStk = MinCandidateStk; - /// Minimum stake required to be reserved to be a delegator - type MinDelegation = MinDelegation; - /// Minimum stake required to be reserved to be a delegator - type MinDelegatorStk = MinDelegatorStk; - type OnCollatorPayout = (); - type OnNewRound = (); - type WeightInfo = weights::pallet_parachain_staking::WeightInfo; - type IssuanceAdapter = AssetsHandler; - type OnAllDelegationRemoved = ScoreStaking; -} - -parameter_types! { - pub const MinVestedTransfer: Balance = 10 * CENTS; - pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = - WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); -} - -impl pallet_vesting::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = (); - // `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the - // highest number of schedules that encodes less than 2^10. - const MAX_VESTING_SCHEDULES: u32 = 28; - type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; -} - -parameter_types! { - pub const BridgeChainId: u8 = 3; - pub const ProposalLifetime: BlockNumber = 50400; // ~7 days - pub TreasuryAccount: AccountId = TreasuryPalletId::get().into_account_truncating(); -} - -impl pallet_chain_bridge::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type BridgeCommitteeOrigin = EnsureRootOrHalfCouncil; - type Proposal = RuntimeCall; - type BridgeChainId = BridgeChainId; - type Balance = Balance; - type ProposalLifetime = ProposalLifetime; - type WeightInfo = weights::pallet_chain_bridge::WeightInfo; -} - -parameter_types! { - pub const MaximumIssuance: Balance = 20_000_000 * DOLLARS; - // Ethereum LIT total issuance in parachain decimal form - pub const ExternalTotalIssuance: Balance = 100_000_000 * DOLLARS; - // bridge::derive_resource_id(1, &bridge::hashing::blake2_128(b"LIT")); - pub const NativeTokenResourceId: [u8; 32] = hex!("00000000000000000000000000000063a7e2be78898ba83824b0c0cc8dfb6001"); -} - -pub struct TransferAssetsAnyone; -impl SortedMembers for TransferAssetsAnyone { - fn sorted_members() -> Vec { - vec![] - } - - fn contains(_who: &AccountId) -> bool { - true - } - - #[cfg(feature = "runtime-benchmarks")] - fn add(_: &AccountId) { - unimplemented!() - } -} - -impl pallet_bridge_transfer::Config for Runtime { - type BridgeHandler = AssetsHandler; - type BridgeOrigin = pallet_chain_bridge::EnsureBridge; - type TransferAssetsMembers = TransferAssetsAnyone; - type WeightInfo = weights::pallet_bridge_transfer::WeightInfo; -} - -impl pallet_assets_handler::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type TreasuryAccount = TreasuryAccount; - type SetMaximumIssuanceOrigin = EnsureRootOrHalfCouncil; - type DefaultMaximumIssuance = MaximumIssuance; - type ExternalTotalIssuance = ExternalTotalIssuance; -} - -impl pallet_extrinsic_filter::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type UpdateOrigin = EnsureRootOrHalfTechnicalCommittee; - type NormalModeFilter = NormalModeFilter; - type SafeModeFilter = SafeModeFilter; - type TestModeFilter = Everything; - type WeightInfo = weights::pallet_extrinsic_filter::WeightInfo; -} - -parameter_types! { - pub const MomentsPerDay: Moment = 86_400_000; // [ms/d] -} - -impl pallet_teebag::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type MomentsPerDay = MomentsPerDay; - type SetAdminOrigin = EnsureRootOrHalfCouncil; - type MaxEnclaveIdentifier = ConstU32<3>; - type MaxAuthorizedEnclave = ConstU32<5>; - type WeightInfo = weights::pallet_teebag::WeightInfo; -} - -impl pallet_identity_management::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); - type TEECallOrigin = EnsureEnclaveSigner; - type DelegateeAdminOrigin = EnsureRootOrAllCouncil; - type ExtrinsicWhitelistOrigin = IMPExtrinsicWhitelist; - type MaxOIDCClientRedirectUris = ConstU32<10>; -} - -impl pallet_omni_account::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type TEECallOrigin = EnsureEnclaveSigner; - type MaxAccountStoreLength = ConstU32<64>; - type OmniAccountOrigin = EnsureOmniAccount; - type OmniAccountConverter = DefaultOmniAccountConverter; -} - -impl pallet_bitacross::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type TEECallOrigin = EnsureEnclaveSigner; - type SetAdminOrigin = EnsureRootOrAllCouncil; -} - -impl pallet_evm_assertions::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AssertionId = H160; - type ContractDevOrigin = pallet_collective::EnsureMember; - type TEECallOrigin = EnsureEnclaveSigner; -} - -impl pallet_group::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type GroupManagerOrigin = EnsureRootOrAllCouncil; -} - -impl pallet_vc_management::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::pallet_vc_management::WeightInfo; - type TEECallOrigin = EnsureEnclaveSigner; - type SetAdminOrigin = EnsureRootOrHalfCouncil; - type DelegateeAdminOrigin = EnsureRootOrAllCouncil; - type ExtrinsicWhitelistOrigin = VCMPExtrinsicWhitelist; -} - -impl pallet_group::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type GroupManagerOrigin = EnsureRootOrAllCouncil; -} - -// For OnChargeEVMTransaction implementation -type CurrencyAccountId = ::AccountId; -type BalanceFor = - <::Currency as Currency>>::Balance; -type PositiveImbalanceFor = - <::Currency as Currency>>::PositiveImbalance; -type NegativeImbalanceFor = - <::Currency as Currency>>::NegativeImbalance; -pub struct OnChargeEVMTransaction(sp_std::marker::PhantomData); -impl OnChargeEVMTransactionT for OnChargeEVMTransaction -where - T: pallet_evm::Config, - PositiveImbalanceFor: Imbalance, Opposite = NegativeImbalanceFor>, - NegativeImbalanceFor: Imbalance, Opposite = PositiveImbalanceFor>, - OU: OnUnbalanced>, - U256: UniqueSaturatedInto>, -{ - type LiquidityInfo = Option>; - - fn withdraw_fee(who: &H160, fee: U256) -> Result> { - EVMCurrencyAdapter::<::Currency, ()>::withdraw_fee(who, fee) - } - - fn correct_and_deposit_fee( - who: &H160, - corrected_fee: U256, - base_fee: U256, - already_withdrawn: Self::LiquidityInfo, - ) -> Self::LiquidityInfo { - ::Currency, OU> as OnChargeEVMTransactionT< - T, - >>::correct_and_deposit_fee(who, corrected_fee, base_fee, already_withdrawn) - } - // This is the only difference of OnChargeEVMTransaction regarding EVMCurrencyAdapter - // We can use parachain TransactionPayment logic to handle evm tip - fn pay_priority_fee(tip: Self::LiquidityInfo) { - if let Some(tip) = tip { - OU::on_unbalanced(tip); - } - } -} - -pub struct TransactionPaymentAsGasPrice; -impl FeeCalculator for TransactionPaymentAsGasPrice { - fn min_gas_price() -> (U256, Weight) { - // We do not want to involve Transaction Payment Multiplier here - // It will biased normal transfer (base weight is not biased by Multiplier) too much for - // Ethereum tx - // This is hardcoded ConstantMultiplier, WeightToFeeFactor = - // MILLICENTS / 10 - let weight_to_fee: u128 = WEIGHT_TO_FEE_FACTOR; - let min_gas_price = weight_to_fee.saturating_mul(WEIGHT_PER_GAS as u128); - (min_gas_price.into(), ::DbWeight::get().reads(1)) - } -} - -parameter_types! { - pub WeightPerGas: Weight = Weight::from_parts(WEIGHT_PER_GAS, 0); - pub ChainId: u64 = ROCOCO_PARA_ID.into(); - pub BlockGasLimit: U256 = U256::from( - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS - ); - pub PrecompilesValue: Precompiles = RococoNetworkPrecompiles::<_>::new(); - // BlockGasLimit / MAX_POV_SIZE - pub GasLimitPovSizeRatio: u64 = 4; -} - -pub struct FindAuthorTruncated(sp_std::marker::PhantomData); -impl FindAuthor for FindAuthorTruncated -where - pallet_aura::Pallet: FindAuthor, -{ - fn find_author<'a, I>(digests: I) -> Option - where - I: 'a + IntoIterator, - { - if let Some(author_index) = pallet_aura::Pallet::::find_author(digests) { - let authority_id = - >::authorities()[author_index as usize].clone(); - return Some(H160::from_slice(&authority_id.encode()[4..24])); - } - - None - } -} - -impl pallet_evm::Config for Runtime { - type FeeCalculator = TransactionPaymentAsGasPrice; - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type WeightPerGas = WeightPerGas; - type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; - type CallOrigin = pallet_evm::EnsureAddressTruncated; - type WithdrawOrigin = pallet_evm::EnsureAddressTruncated; - // From evm address to parachain address - type AddressMapping = pallet_evm::HashedAddressMapping; - type Currency = Balances; - type RuntimeEvent = RuntimeEvent; - type Runner = pallet_evm::runner::stack::Runner; - type PrecompilesType = Precompiles; - type PrecompilesValue = PrecompilesValue; - type ChainId = ChainId; - type OnChargeTransaction = OnChargeEVMTransaction>; - type BlockGasLimit = BlockGasLimit; - type Timestamp = Timestamp; - type OnCreate = (); - type FindAuthor = FindAuthorTruncated; - // BlockGasLimit / MAX_POV_SIZE - type GasLimitPovSizeRatio = GasLimitPovSizeRatio; - type WeightInfo = weights::pallet_evm::WeightInfo; -} - -parameter_types! { - pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; -} - -impl pallet_ethereum::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type StateRoot = pallet_ethereum::IntermediateStateRoot; - type PostLogContent = PostBlockAndTxnHashes; - // Maximum length (in bytes) of revert message to include in Executed event - type ExtraDataLength = ConstU32<256>; -} - -parameter_types! { - pub const DefaultYearlyInflation: Perbill = Perbill::from_perthousand(5); -} - -pub struct IdentityAccountIdConvert; - -impl pallet_score_staking::AccountIdConvert for IdentityAccountIdConvert { - fn convert(account: AccountId) -> ::AccountId { - account - } -} - -impl pallet_score_staking::Config for Runtime { - type Currency = Balances; - type RuntimeEvent = RuntimeEvent; - type AccountIdConvert = IdentityAccountIdConvert; - type AdminOrigin = EnsureRootOrHalfCouncil; - type YearlyIssuance = ConstU128<{ 100_000_000 * UNIT }>; - type YearlyInflation = DefaultYearlyInflation; - type MaxScoreUserCount = ConstU32<1_000_000>; -} - -impl runtime_common::BaseRuntimeRequirements for Runtime {} -impl runtime_common::ParaRuntimeRequirements for Runtime {} - -construct_runtime! { - pub enum Runtime - { - // Core - System: frame_system = 0, - Timestamp: pallet_timestamp = 1, - Scheduler: pallet_scheduler = 2, - Utility: pallet_utility = 3, - Multisig: pallet_multisig = 4, - Proxy: pallet_proxy = 5, - Preimage: pallet_preimage = 6, - - // Token related - Balances: pallet_balances = 10, - Vesting: pallet_vesting = 11, - TransactionPayment: pallet_transaction_payment = 12, - Treasury: pallet_treasury = 13, - - // Governance - Democracy: pallet_democracy = 21, - Council: pallet_collective:: = 22, - CouncilMembership: pallet_membership:: = 23, - TechnicalCommittee: pallet_collective:: = 24, - TechnicalCommitteeMembership: pallet_membership:: = 25, - Bounties: pallet_bounties = 26, - Tips: pallet_tips = 27, - ParachainIdentity: pallet_identity = 28, - - // Parachain - ParachainSystem: cumulus_pallet_parachain_system = 30, - ParachainInfo: parachain_info = 31, - - // Collator support - // About the order of these 5 pallets, the comment in cumulus seems to be outdated. - // - // The main thing is Authorship looks for the block author (T::FindAuthor::find_author) - // in its `on_initialize` hook -> Session::find_author, where Session::validators() is enquired. - // Meanwhile Session could modify the validators storage in its `on_initialize` hook. If Session - // comes after Authorship, the changes on validators() will only take effect in the next block. - // - // I assume it's the desired behavior though or it doesn't really matter. - // - // also see the comment above `AllPalletsWithSystem` and - // https://github.com/litentry/litentry-parachain/issues/336 - Authorship: pallet_authorship = 40, - //41 is for old CollatorSelection, replaced by ParachainSTaking - Session: pallet_session = 42, - Aura: pallet_aura = 43, - AuraExt: cumulus_pallet_aura_ext = 44, - ParachainStaking: pallet_parachain_staking = 45, - - // XCM helpers - XcmpQueue: cumulus_pallet_xcmp_queue = 50, - PolkadotXcm: pallet_xcm = 51, - CumulusXcm: cumulus_pallet_xcm = 52, - DmpQueue: cumulus_pallet_dmp_queue = 53, - XTokens: orml_xtokens = 54, - // 55 is saved for old pallet: Tokens: orml_tokens - Assets: pallet_assets = 56, - - // Rococo pallets - ChainBridge: pallet_chain_bridge= 60, - BridgeTransfer: pallet_bridge_transfer = 61, - ExtrinsicFilter: pallet_extrinsic_filter = 63, - IdentityManagement: pallet_identity_management = 64, - AssetManager: pallet_asset_manager = 65, - VCManagement: pallet_vc_management = 66, - IMPExtrinsicWhitelist: pallet_group:: = 67, - VCMPExtrinsicWhitelist: pallet_group:: = 68, - Bitacross: pallet_bitacross = 70, - EvmAssertions: pallet_evm_assertions = 71, - - // Developer council - DeveloperCommittee: pallet_collective:: = 73, - DeveloperCommitteeMembership: pallet_membership:: = 74, - ScoreStaking: pallet_score_staking = 75, - - // New Bridge Added - AssetsHandler: pallet_assets_handler = 76, - - OmniAccount: pallet_omni_account = 84, - - // TEE - Teebag: pallet_teebag = 93, - - // Frontier - EVM: pallet_evm = 120, - Ethereum: pallet_ethereum = 121, - - // TMP - AccountFix: pallet_account_fix = 254, - Sudo: pallet_sudo = 255, - } -} - -pub struct BaseCallFilter; -impl Contains for BaseCallFilter { - fn contains(call: &RuntimeCall) -> bool { - if matches!( - call, - RuntimeCall::Sudo(_) - | RuntimeCall::System(_) - | RuntimeCall::Timestamp(_) - | RuntimeCall::ParachainSystem(_) - | RuntimeCall::ExtrinsicFilter(_) - | RuntimeCall::Multisig(_) - | RuntimeCall::Council(_) - | RuntimeCall::CouncilMembership(_) - | RuntimeCall::TechnicalCommittee(_) - | RuntimeCall::TechnicalCommitteeMembership(_) - | RuntimeCall::Utility(_) - ) { - // always allow core calls - return true; - } - - pallet_extrinsic_filter::Pallet::::contains(call) - } -} - -pub struct SafeModeFilter; -impl Contains for SafeModeFilter { - fn contains(_call: &RuntimeCall) -> bool { - false - } -} - -pub struct NormalModeFilter; -impl Contains for NormalModeFilter { - fn contains(call: &RuntimeCall) -> bool { - matches!( - call, - // Vesting::vest - RuntimeCall::Vesting(pallet_vesting::Call::vest { .. }) | - // ChainBridge - RuntimeCall::ChainBridge(_) | - // Bounties - RuntimeCall::Bounties(_) | - // BridgeTransfer - RuntimeCall::BridgeTransfer(_) | - // XTokens::transfer for normal users - RuntimeCall::XTokens(orml_xtokens::Call::transfer { .. }) | - // collective - RuntimeCall::DeveloperCommittee(_) | - // memberships - RuntimeCall::CouncilMembership(_) | - RuntimeCall::TechnicalCommitteeMembership(_) | - RuntimeCall::DeveloperCommitteeMembership(_) | - // democracy, we don't subdivide the calls, so we allow public proposals - RuntimeCall::Democracy(_) | - // Preimage - RuntimeCall::Preimage(_) | - // Identity - RuntimeCall::ParachainIdentity(_) | - // Utility - RuntimeCall::Utility(_) | - // Seesion - RuntimeCall::Session(_) | - // Balance - RuntimeCall::Balances(_) | - // IMP and VCMP - RuntimeCall::IdentityManagement(_) | - RuntimeCall::VCManagement(_) | - // TEE pallets - RuntimeCall::Teebag(_) | - // ParachainStaking; Only the collator part - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::join_candidates { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::schedule_leave_candidates { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::execute_leave_candidates { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::cancel_leave_candidates { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::go_offline { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::go_online { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::candidate_bond_more { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::schedule_candidate_bond_less { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::execute_candidate_bond_less { .. }) | - RuntimeCall::ParachainStaking(pallet_parachain_staking::Call::cancel_candidate_bond_less { .. }) | - // Group - RuntimeCall::IMPExtrinsicWhitelist(_) | - RuntimeCall::VCMPExtrinsicWhitelist(_) | - // EVM - // Substrate EVM extrinsic not allowed - // So no EVM pallet - RuntimeCall::Ethereum(_) | - // AccountFix - RuntimeCall::AccountFix(_) | - RuntimeCall::AssetsHandler(_) | - RuntimeCall::Bitacross(_) | - RuntimeCall::EvmAssertions(_) | - RuntimeCall::ScoreStaking(_) | - RuntimeCall::OmniAccount(_) - ) - } -} - -#[cfg(feature = "runtime-benchmarks")] -mod benches { - define_benchmarks!( - [frame_system, SystemBench::] - [pallet_asset_manager, AssetManager] - [pallet_balances, Balances] - [pallet_timestamp, Timestamp] - [pallet_utility, Utility] - [pallet_treasury, Treasury] - [pallet_democracy, Democracy] - [pallet_collective, Council] - [pallet_proxy, Proxy] - [pallet_membership, CouncilMembership] - [pallet_multisig, Multisig] - [paleet_evm, EVM] - [pallet_extrinsic_filter, ExtrinsicFilter] - [pallet_scheduler, Scheduler] - [pallet_preimage, Preimage] - [pallet_session, SessionBench::] - [pallet_parachain_staking, ParachainStaking] - [cumulus_pallet_xcmp_queue, XcmpQueue] - [pallet_identity_management, IdentityManagement] - [pallet_vc_management, VCManagement] - [pallet_chain_bridge,ChainBridge] - [pallet_bridge_transfer,BridgeTransfer] - [pallet_teebag, Teebag] - ); -} - -impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block); - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl sp_block_builder::BlockBuilder for Runtime { - fn apply_extrinsic( - extrinsic: ::Extrinsic, - ) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents(block: Block, data: sp_inherents::InherentData) -> sp_inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl sp_offchain::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl sp_session::SessionKeys for Runtime { - fn decode_session_keys( - encoded: Vec, - ) -> Option, KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - } - - impl sp_consensus_aura::AuraApi for Runtime { - fn slot_duration() -> sp_consensus_aura::SlotDuration { - sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) - } - - fn authorities() -> Vec { - Aura::authorities().into_inner() - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment::FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl cumulus_primitives_core::CollectCollationInfo for Runtime { - fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { - ParachainSystem::collect_collation_info(header) - } - } - - impl fp_rpc::EthereumRuntimeRPCApi for Runtime { - fn chain_id() -> u64 { - ::ChainId::get() - } - - fn account_basic(address: H160) -> pallet_evm::Account { - let (account, _) = EVM::account_basic(&address); - account - } - - fn gas_price() -> U256 { - let (gas_price, _) = ::FeeCalculator::min_gas_price(); - gas_price - } - - fn account_code_at(address: H160) -> Vec { - pallet_evm::AccountCodes::::get(address) - } - - fn author() -> H160 { - >::find_author() - } - - fn storage_at(address: H160, index: U256) -> H256 { - let mut tmp = [0u8; 32]; - index.to_big_endian(&mut tmp); - pallet_evm::AccountStorages::::get(address, H256::from_slice(&tmp[..])) - } - - fn call( - from: H160, - to: H160, - data: Vec, - value: U256, - gas_limit: U256, - max_fee_per_gas: Option, - max_priority_fee_per_gas: Option, - nonce: Option, - estimate: bool, - access_list: Option)>>, - ) -> Result { - let config = if estimate { - let mut config = ::config().clone(); - config.estimate = true; - Some(config) - } else { - None - }; - - let is_transactional = false; - let validate = true; - - // Reused approach from Moonbeam since Frontier implementation doesn't support this - let mut estimated_transaction_len = data.len() + - // to: 20 - // from: 20 - // value: 32 - // gas_limit: 32 - // nonce: 32 - // 1 byte transaction action variant - // chain id 8 bytes - // 65 bytes signature - 210; - if max_fee_per_gas.is_some() { - estimated_transaction_len += 32; - } - if max_priority_fee_per_gas.is_some() { - estimated_transaction_len += 32; - } - if access_list.is_some() { - estimated_transaction_len += access_list.encoded_size(); - } - - let gas_limit = gas_limit.min(u64::MAX.into()).low_u64(); - let without_base_extrinsic_weight = true; - - let (weight_limit, proof_size_base_cost) = - match ::GasWeightMapping::gas_to_weight( - gas_limit, - without_base_extrinsic_weight - ) { - weight_limit if weight_limit.proof_size() > 0 => { - (Some(weight_limit), Some(estimated_transaction_len as u64)) - } - _ => (None, None), - }; - - ::Runner::call( - from, - to, - data, - value, - gas_limit.unique_saturated_into(), - max_fee_per_gas, - max_priority_fee_per_gas, - nonce, - Vec::new(), - is_transactional, - validate, - weight_limit, - proof_size_base_cost, - config - .as_ref() - .unwrap_or_else(|| ::config()), - ) - .map_err(|err| err.error.into()) - } - - fn create( - from: H160, - data: Vec, - value: U256, - gas_limit: U256, - max_fee_per_gas: Option, - max_priority_fee_per_gas: Option, - nonce: Option, - estimate: bool, - access_list: Option)>>, - ) -> Result { - let config = if estimate { - let mut config = ::config().clone(); - config.estimate = true; - Some(config) - } else { - None - }; - - let is_transactional = false; - let validate = true; - - // Reused approach from Moonbeam since Frontier implementation doesn't support this - let mut estimated_transaction_len = data.len() + - // to: 20 - // from: 20 - // value: 32 - // gas_limit: 32 - // nonce: 32 - // 1 byte transaction action variant - // chain id 8 bytes - // 65 bytes signature - 210; - if max_fee_per_gas.is_some() { - estimated_transaction_len += 32; - } - if max_priority_fee_per_gas.is_some() { - estimated_transaction_len += 32; - } - if access_list.is_some() { - estimated_transaction_len += access_list.encoded_size(); - } - - let gas_limit = gas_limit.min(u64::MAX.into()).low_u64(); - let without_base_extrinsic_weight = true; - - let (weight_limit, proof_size_base_cost) = - match ::GasWeightMapping::gas_to_weight( - gas_limit, - without_base_extrinsic_weight - ) { - weight_limit if weight_limit.proof_size() > 0 => { - (Some(weight_limit), Some(estimated_transaction_len as u64)) - } - _ => (None, None), - }; - - #[allow(clippy::or_fun_call)] // suggestion not helpful here - ::Runner::create( - from, - data, - value, - gas_limit.unique_saturated_into(), - max_fee_per_gas, - max_priority_fee_per_gas, - nonce, - Vec::new(), - is_transactional, - validate, - weight_limit, - proof_size_base_cost, - config - .as_ref() - .unwrap_or(::config()), - ) - .map_err(|err| err.error.into()) - } - - fn current_transaction_statuses() -> Option> { - pallet_ethereum::CurrentTransactionStatuses::::get() - } - - fn current_block() -> Option { - pallet_ethereum::CurrentBlock::::get() - } - - fn current_receipts() -> Option> { - pallet_ethereum::CurrentReceipts::::get() - } - - fn current_all() -> ( - Option, - Option>, - Option> - ) { - ( - pallet_ethereum::CurrentBlock::::get(), - pallet_ethereum::CurrentReceipts::::get(), - pallet_ethereum::CurrentTransactionStatuses::::get() - ) - } - - fn extrinsic_filter( - xts: Vec<::Extrinsic>, - ) -> Vec { - xts.into_iter().filter_map(|xt| match xt.0.function { - RuntimeCall::Ethereum(transact { transaction }) => Some(transaction), - _ => None - }).collect::>() - } - - fn elasticity() -> Option { - None - } - - fn gas_limit_multiplier_support() {} - - fn pending_block( - xts: Vec<::Extrinsic>, - ) -> (Option, Option>) { - for ext in xts.into_iter() { - let _ = Executive::apply_extrinsic(ext); - } - - Ethereum::on_finalize(System::block_number() + 1); - - ( - pallet_ethereum::CurrentBlock::::get(), - pallet_ethereum::CurrentTransactionStatuses::::get() - ) - } - } - - impl fp_rpc::ConvertTransactionRuntimeApi for Runtime { - fn convert_transaction(transaction: pallet_ethereum::Transaction) -> ::Extrinsic { - UncheckedExtrinsic::new_unsigned( - pallet_ethereum::Call::::transact { transaction }.into(), - ) - } - } - - impl moonbeam_rpc_primitives_debug::DebugRuntimeApi for Runtime { - fn trace_transaction( - extrinsics: Vec<::Extrinsic>, - traced_transaction: &pallet_ethereum::Transaction, - ) -> Result< - (), - sp_runtime::DispatchError, - > { - use moonbeam_evm_tracer::tracer::EvmTracer; - - // Apply the a subset of extrinsics: all the substrate-specific or ethereum - // transactions that preceded the requested transaction. - for ext in extrinsics.into_iter() { - let _ = match &ext.0.function { - RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => { - if transaction == traced_transaction { - EvmTracer::new().trace(|| Executive::apply_extrinsic(ext)); - return Ok(()); - } else { - Executive::apply_extrinsic(ext) - } - } - _ => Executive::apply_extrinsic(ext), - }; - } - Err(sp_runtime::DispatchError::Other( - "Failed to find Ethereum transaction among the extrinsics.", - )) - } - - fn trace_block( - extrinsics: Vec<::Extrinsic>, - known_transactions: Vec, - ) -> Result< - (), - sp_runtime::DispatchError, - > { - use moonbeam_evm_tracer::tracer::EvmTracer; - - let mut config = ::config().clone(); - config.estimate = true; - - // Apply all extrinsics. Ethereum extrinsics are traced. - for ext in extrinsics.into_iter() { - match &ext.0.function { - RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => { - if known_transactions.contains(&transaction.hash()) { - // Each known extrinsic is a new call stack. - EvmTracer::emit_new(); - EvmTracer::new().trace(|| Executive::apply_extrinsic(ext)); - } else { - let _ = Executive::apply_extrinsic(ext); - } - } - _ => { - let _ = Executive::apply_extrinsic(ext); - } - }; - } - - Ok(()) - } - } - - impl moonbeam_rpc_primitives_txpool::TxPoolRuntimeApi for Runtime { - fn extrinsic_filter( - xts_ready: Vec<::Extrinsic>, - xts_future: Vec<::Extrinsic>, - ) -> moonbeam_rpc_primitives_txpool::TxPoolResponse { - moonbeam_rpc_primitives_txpool::TxPoolResponse { - ready: xts_ready - .into_iter() - .filter_map(|xt| match xt.0.function { - RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction), - _ => None, - }) - .collect(), - future: xts_future - .into_iter() - .filter_map(|xt| match xt.0.function { - RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction), - _ => None, - }) - .collect(), - } - } - } - - impl pallet_omni_account_runtime_api::OmniAccountApi for Runtime { - fn omni_account(identity: Identity) -> AccountId { - OmniAccount::omni_account(identity) - } - } - - #[cfg(feature = "try-runtime")] - impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to - // have a backtrace here. If any of the pre/post migration checks fail, we shall stop - // right here and right now. - log::info!("try-runtime::on_runtime_upgrade rococo."); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); - (weight, RuntimeBlockWeights::get().max_block) - } - - fn execute_block(block: Block, state_root_check: bool,signature_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight { - log::info!( - target: "runtime::Rococo", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", - block.header.number, - block.header.hash(), - state_root_check, - select, - ); - Executive::try_execute_block(block, state_root_check, signature_check,select).expect("try_execute_block failed") - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(extra: bool) -> ( - Vec, - Vec, - ) { - use frame_benchmarking::{Benchmarking, BenchmarkList}; - use frame_support::traits::StorageInfoTrait; - use frame_system_benchmarking::Pallet as SystemBench; - use cumulus_pallet_session_benchmarking::Pallet as SessionBench; - - let mut list = Vec::::new(); - list_benchmarks!(list, extra); - - let storage_info = AllPalletsWithSystem::storage_info(); - (list, storage_info) - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; - - 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(()) - } - - 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 {} - - use frame_support::traits::WhitelistedStorageKeys; - let whitelist = AllPalletsWithSystem::whitelisted_storage_keys(); - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - add_benchmarks!(params, batches); - - if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } - Ok(batches) - } - } -} - -#[allow(dead_code)] -struct CheckInherents; - -impl cumulus_pallet_parachain_system::CheckInherents for CheckInherents { - fn check_inherents( - block: &Block, - relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof, - ) -> sp_inherents::CheckInherentsResult { - let relay_chain_slot = relay_state_proof - .read_slot() - .expect("Could not read the relay chain slot from the proof"); - - let inherent_data = - cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration( - relay_chain_slot, - sp_std::time::Duration::from_secs(6), - ) - .create_inherent_data() - .expect("Could not create the timestamp inherent data"); - - inherent_data.check_extrinsics(block) - } -} - -cumulus_pallet_parachain_system::register_validate_block! { - Runtime = Runtime, - BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, - CheckInherents = CheckInherents, -} diff --git a/parachain/runtime/rococo/src/migration/P9100.rs b/parachain/runtime/rococo/src/migration/P9100.rs deleted file mode 100644 index 3765266c0f..0000000000 --- a/parachain/runtime/rococo/src/migration/P9100.rs +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright 2020-2021 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -use frame_support::{ - inherent::Vec, - pallet_prelude::*, - storage::storage_prefix, - traits::{Currency, Get, OnRuntimeUpgrade}, - StorageHasher, Twox128, -}; -use pallet_parachain_staking::BalanceOf; -use sp_runtime::{traits::Zero, Perbill}; -use sp_std::marker::PhantomData; - -pub struct MigrateCollatorSelectionIntoParachainStaking(PhantomData); -impl OnRuntimeUpgrade for MigrateCollatorSelectionIntoParachainStaking -where - T: pallet_parachain_staking::Config + pallet_bridge_transfer::Config, - ::Event: From>, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { - use frame_support::traits::OnRuntimeUpgradeHelpersExt; - use core_primitives::AccountId; - - log::info!("Pre check pallet CollatorSelection exists"); - // Get Invulnerables address from CollatorSelection - // WARN: We do not care about any Candidates storage, as we forbid any general transaction - // by sudo and so no info there in practice - let invulnerables = frame_support::storage::migration::get_storage_value::>( - b"CollatorSelection", - b"Invulnerables", - b"", - ) - .expect("Storage query fails: CollatorSelection Invulnerables"); - - if invulnerables.is_empty() { - return Err("CollatorSelection empty") - }; - let invulnerables_len: u32 = invulnerables.len().try_into().unwrap_or(0); - assert!( - invulnerables_len >= - ::MinSelectedCandidates::get(), - "Need More Initial Candidates" - ); - - // Set the temporary storage for post upgrade check - Self::set_temp_storage(invulnerables, "invulnerables"); - - // Ensure ParachainStaking is Empty - assert!( - !frame_support::storage::migration::have_storage_value( - b"ParachainStaking", - b"SelectedCandidates", - b"", - ), - "ParachainStaking SelectedCandidates Storage Already Exist" - ); - - assert!( - !frame_support::storage::migration::have_storage_value( - b"ParachainStaking", - b"CandidatePool", - b"", - ), - "ParachainStaking CandidatePool Storage Already Exist" - ); - - assert!( - !frame_support::storage::migration::have_storage_value( - b"ParachainStaking", - b"Total", - b"", - ), - "ParachainStaking Total Storage Already Exist" - ); - Ok(()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - use sp_io::KillStorageResult; - let mut invulnerables = frame_support::storage::migration::get_storage_value::< - Vec<::AccountId>, - >(b"CollatorSelection", b"Invulnerables", b"") - .expect("Storage query fails: CollatorSelection Invulnerables"); - invulnerables.sort(); - - let invulnerables_len: u32 = invulnerables.len().try_into().unwrap_or(0); - assert!( - invulnerables_len >= - ::MinSelectedCandidates::get(), - "Need More Initial Candidates" - ); - - // Add whitelist Storage - frame_support::storage::migration::put_storage_value::< - Vec<::AccountId>, - >(b"ParachainStaking", b"Candidates", b"", invulnerables.clone()); - - let mut candidate_count = 0u32; - // Get the minimum collator stake amount - let min_collator_stk = ::MinCollatorStk::get(); - // Initialize the candidates - for candidate in invulnerables { - assert!( - ::Currency::free_balance(&candidate) >= - min_collator_stk, - "Account does not have enough balance to bond as a candidate." - ); - - if let Err(error) = >::join_candidates( - ::Origin::from(Some(candidate.clone()).into()), - min_collator_stk, - ) { - log::warn!("Join candidates failed in genesis with error {:?}", error); - } else { - candidate_count = candidate_count.saturating_add(1u32); - } - } - - assert!(candidate_count > 0, "No valid candidates"); - - // Reproduce the genesis build - // Initialize the rest setup of parachain-staking - // After runtimeUpgrade, we should: - // (1) Set the inflation by set_inflation - // (2) Set collator commission by set_collator_commission - // (3) Set parachain bond config by parachset_parachain_bond_account - // (4) Set total selected candidates to minimum config set_total_selected - // (5) Choose top TotalSelected collator candidates - // (6) Refresh round if it is during runtimeUpgrade - // (7) Snapshot total staked (through select_top_candidates) - // (8) NewRound Event Deposit - - // Inflation config as Default, so do nothing - // ... - // Set collator commission to default config - frame_support::storage::migration::put_storage_value::( - b"ParachainStaking", - b"CollatorCommission", - b"", - ::DefaultCollatorCommission::get(), - ); - // Set parachain bond config to default config - frame_support::storage::migration::put_storage_value::< - pallet_parachain_staking::ParachainBondConfig<::AccountId>, - >( - b"ParachainStaking", - b"ParachainBondInfo", - b"", - pallet_parachain_staking::ParachainBondConfig { - // must be set soon; if not => due inflation will be sent to some weird place - account: ::AccountId::decode( - &mut sp_runtime::traits::TrailingZeroInput::zeroes(), - ) - .expect("infinite length input; no invalid inputs for type; qed"), - percent: - ::DefaultParachainBondReservePercent::get( - ), - }, - ); - - // // Set total selected candidates to minimum config - frame_support::storage::migration::put_storage_value::( - b"ParachainStaking", - b"TotalSelected", - b"", - candidate_count, - ); - // Choose top TotalSelected collator candidates - // WARNING/TODO: We change the private into public of select_top_candidates function in - // pallet. We should change it back in next runtime upgrade for safety. - let (v_count, _, total_staked) = - >::select_top_candidates(1u32); - - // Start Round 1 at Block 0 - let round: pallet_parachain_staking::RoundInfo<::BlockNumber> = - pallet_parachain_staking::RoundInfo::new( - 1u32, - 0u32.into(), - ::DefaultBlocksPerRound::get(), - ); - frame_support::storage::migration::put_storage_value::< - pallet_parachain_staking::RoundInfo<::BlockNumber>, - >(b"ParachainStaking", b"Round", b"", round); - - // // Snapshot total stake - // The code below is supposed to behave same as: - // >::insert(1u32, >::get()) - let val = frame_support::storage::migration::get_storage_value::>( - b"ParachainStaking", - b"Total", - b"", - ); - let storage_prefix = storage_prefix(b"ParachainStaking", b"Staked"); - let key_hashed = 1u32.using_encoded(Twox64Concat::hash); - let mut final_key = Vec::with_capacity(storage_prefix.len() + key_hashed.len()); - final_key.extend_from_slice(&storage_prefix); - final_key.extend_from_slice(key_hashed.as_ref()); - frame_support::storage::unhashed::put(final_key.as_ref(), &val); - - // Deposit NewRound event at RuntimeUpgrade - >::deposit_event(pallet_parachain_staking::Event::NewRound { - starting_block: ::BlockNumber::zero(), - round: 1u32, - selected_collators_number: v_count, - total_balance: total_staked, - }); - - // Remove CollatorSelection Storage - // TODO: Very Weak safety - let entries: u64 = 4 + 6142; - let _res: KillStorageResult = frame_support::storage::unhashed::clear_prefix( - &Twox128::hash(b"CollatorSelection"), - Some(entries.try_into().unwrap()), - None, - ) - .into(); - ::DbWeight::get().writes(entries) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { - use frame_support::traits::OnRuntimeUpgradeHelpersExt; - use core_primitives::AccountId; - use sp_io::KillStorageResult; - - log::info!("Post check CollatorSelection"); - let res: KillStorageResult = frame_support::storage::unhashed::clear_prefix( - &Twox128::hash(b"CollatorSelection"), - Some(0), - None, - ) - .into(); - - match res { - KillStorageResult::AllRemoved(0) | KillStorageResult::SomeRemaining(0) => {}, - KillStorageResult::AllRemoved(n) | KillStorageResult::SomeRemaining(n) => { - log::error!("Remaining entries: {:?}", n); - return Err("CollatorSelection not removed") - }, - }; - - assert!( - frame_support::storage::migration::have_storage_value( - b"ParachainStaking", - b"CandidatePool", - b"", - ), - "ParachainStaking CandidatePool Storage not migrate properly" - ); - - assert!( - frame_support::storage::migration::have_storage_value( - b"ParachainStaking", - b"Total", - b"", - ), - "ParachainStaking Total Storage not migrate properly" - ); - - // Check the Selected Candidates info - let mut selected_candidates = frame_support::storage::migration::get_storage_value::< - Vec, - >(b"ParachainStaking", b"SelectedCandidates", b"") - .expect("Storage query fails: ParachainStaking SelectedCandidates"); - selected_candidates.sort(); - let mut invulnerables: Vec = - Self::get_temp_storage("invulnerables").expect("qed"); - invulnerables.sort(); - - assert!(selected_candidates == invulnerables, "candidates not migrate properly"); - - // Check the Round info - let round_info = frame_support::storage::migration::get_storage_value::< - pallet_parachain_staking::RoundInfo, - >(b"ParachainStaking", b"Round", b"") - .expect("Storage query fails: ParachainStaking Round"); - - let expected_round_info = pallet_parachain_staking::RoundInfo::::new( - 1u32, - 0u32.into(), - ::DefaultBlocksPerRound::get(), - ); - assert!(round_info == expected_round_info, "round info not migrate properly"); - - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9130.rs b/parachain/runtime/rococo/src/migration/P9130.rs deleted file mode 100644 index 473976f6d7..0000000000 --- a/parachain/runtime/rococo/src/migration/P9130.rs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2020-2021 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(deprecated)] -#![allow(clippy::type_complexity)] -use frame_support::{ - storage, - traits::{Get, OnRuntimeUpgrade}, -}; -use pallet_parachain_staking::{ - AtStake, BalanceOf, BondWithAutoCompound, CollatorSnapshot, Round, RoundIndex, -}; -use sp_runtime::Percent; -use sp_std::{marker::PhantomData, prelude::*, vec::Vec}; - -use parity_scale_codec::{Decode, Encode}; -extern crate alloc; -#[cfg(feature = "try-runtime")] -use alloc::{format, string::ToString}; -#[cfg(feature = "try-runtime")] -use scale_info::prelude::string::String; -#[cfg(feature = "try-runtime")] -use sp_std::{collections::btree_map::BTreeMap, vec}; - -mod deprecated { - use super::*; - use sp_core::RuntimeDebug; - use pallet_parachain_staking::Bond; - use scale_info::TypeInfo; - // CollatorSnapshot - #[deprecated(note = "use CollatorSnapshot with BondWithAutoCompound delegations")] - #[derive(Encode, Decode, RuntimeDebug, TypeInfo)] - /// Snapshot of collator state at the start of the round for which they are selected - pub struct CollatorSnapshot { - /// The total value locked by the collator. - pub bond: Balance, - - /// The rewardable delegations. This list is a subset of total delegators, where certain - /// delegators are adjusted based on their scheduled - /// [DelegationChange::Revoke] or [DelegationChange::Decrease] action. - pub delegations: Vec>, - - /// The total counted value locked for the collator, including the self bond + total staked - /// by top delegators. - pub total: Balance, - } - - impl PartialEq for CollatorSnapshot { - fn eq(&self, other: &Self) -> bool { - let must_be_true = self.bond == other.bond && self.total == other.total; - if !must_be_true { - return false - } - for (Bond { owner: o1, amount: a1 }, Bond { owner: o2, amount: a2 }) in - self.delegations.iter().zip(other.delegations.iter()) - { - if o1 != o2 || a1 != a2 { - return false - } - } - true - } - } - - impl Default for CollatorSnapshot { - fn default() -> CollatorSnapshot { - CollatorSnapshot { bond: B::default(), delegations: Vec::new(), total: B::default() } - } - } -} -use deprecated::CollatorSnapshot as OldCollatorSnapshot; -pub struct MigrateAtStakeAutoCompound(PhantomData); -impl MigrateAtStakeAutoCompound { - /// Get keys for the `AtStake` storage for the rounds up to `RewardPaymentDelay` rounds ago. - /// We migrate only the last unpaid rounds due to the presence of stale entries in `AtStake` - /// which significantly increase the PoV size. - fn unpaid_rounds_keys() -> impl Iterator)> { - let current_round = >::get().current; - let max_unpaid_round = current_round.saturating_sub(T::RewardPaymentDelay::get()); - (max_unpaid_round..=current_round).into_iter().flat_map(|round| { - >::iter_key_prefix(round).map(move |candidate| { - let key = >::hashed_key_for(round, candidate.clone()); - (round, candidate, key) - }) - }) - } -} -impl OnRuntimeUpgrade for MigrateAtStakeAutoCompound -where - T: pallet_parachain_staking::Config, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let mut num_to_update = 0u32; - let mut rounds_candidates: Vec<(RoundIndex, T::AccountId)> = vec![]; - let mut state_map: BTreeMap = BTreeMap::new(); - - for (round, candidate, key) in Self::unpaid_rounds_keys() { - let state: OldCollatorSnapshot> = - storage::unhashed::get(&key).expect("unable to decode value"); - - num_to_update = num_to_update.saturating_add(1); - rounds_candidates.push((round, candidate.clone())); - let mut delegation_str = vec![]; - for d in state.delegations { - delegation_str - .push(format!("owner={:?}_amount={:?}_autoCompound=0%", d.owner, d.amount)); - } - state_map.insert( - (*format!("round_{:?}_candidate_{:?}", round, candidate)).to_string(), - format!( - "bond={:?}_total={:?}_delegations={:?}", - state.bond, state.total, delegation_str - ), - ); - } - - rounds_candidates.sort(); - Ok((state_map, rounds_candidates, num_to_update).encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - log::info!( - target: "MigrateAtStakeAutoCompound", - "running migration to add auto-compound values" - ); - let mut reads = 0u64; - let mut writes = 0u64; - for (round, candidate, key) in Self::unpaid_rounds_keys() { - let old_state: OldCollatorSnapshot> = - storage::unhashed::get(&key).expect("unable to decode value"); - reads = reads.saturating_add(1); - writes = writes.saturating_add(1); - log::info!( - target: "MigrateAtStakeAutoCompound", - "migration from old format round {:?}, candidate {:?}", round, candidate - ); - let new_state = CollatorSnapshot { - bond: old_state.bond, - delegations: old_state - .delegations - .into_iter() - .map(|d| BondWithAutoCompound { - owner: d.owner, - amount: d.amount, - auto_compound: Percent::zero(), - }) - .collect(), - total: old_state.total, - }; - storage::unhashed::put(&key, &new_state); - } - - T::DbWeight::get().reads_writes(reads, writes) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let (state_map, rounds_candidates_received, num_updated_received): ( - BTreeMap, - Vec<(RoundIndex, T::AccountId)>, - u32, - ) = Decode::decode(&mut &state[..]).expect("pre_upgrade provides a valid state; qed"); - - let mut num_updated = 0u32; - let mut rounds_candidates = vec![]; - for (round, candidate, _) in Self::unpaid_rounds_keys() { - let state = >::get(round, &candidate); - num_updated = num_updated.saturating_add(1); - rounds_candidates.push((round, candidate.clone())); - let mut delegation_str = vec![]; - for d in state.delegations { - delegation_str.push(format!( - "owner={:?}_amount={:?}_autoCompound={:?}", - d.owner, d.amount, d.auto_compound - )); - } - assert_eq!( - Some(&format!( - "bond={:?}_total={:?}_delegations={:?}", - state.bond, state.total, delegation_str - )), - state_map - .get(&((*format!("round_{:?}_candidate_{:?}", round, candidate)).to_string())), - "incorrect delegations migration for round_{:?}_candidate_{:?}", - round, - candidate, - ); - } - - rounds_candidates.sort(); - assert_eq!(rounds_candidates, rounds_candidates_received); - assert_eq!(num_updated, num_updated_received); - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9190/balances_transaction_payment.rs b/parachain/runtime/rococo/src/migration/P9190/balances_transaction_payment.rs deleted file mode 100644 index f1d4caed2b..0000000000 --- a/parachain/runtime/rococo/src/migration/P9190/balances_transaction_payment.rs +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - migration::storage_key_iter, - pallet_prelude::*, - traits::{Get, OnRuntimeUpgrade}, - Blake2_128Concat, WeakBoundedVec, -}; -use frame_system::{Account, AccountInfo}; -use pallet_balances::{ - Account as BAccount, AccountData, BalanceLock, Freezes, Holds, InactiveIssuance, Locks, - Reserves, TotalIssuance, -}; -use sp_std::{marker::PhantomData, vec::Vec}; - -pub const DECIMAL_CONVERTOR: u128 = 1_000_000u128; - -#[cfg(feature = "try-runtime")] -use parity_scale_codec::Encode; -#[cfg(feature = "try-runtime")] -use sp_std::collections::btree_map::BTreeMap; -use storage::migration::get_storage_value; - -// Replace Frame System Storage for Decimal Change from 12 to 18 -// Replace Balances Storage for Decimal Change from 12 to 18 -pub struct ReplaceBalancesRelatedStorage(PhantomData); -impl ReplaceBalancesRelatedStorage -where - T: frame_system::Config> - + pallet_balances::Config, -{ - pub fn replace_frame_system_account_storage() -> frame_support::weights::Weight { - // The storage of Account for pallet balances is in frame_system pallet - log::info!( - target: "ReplaceBalancesRelatedStorage", - "running migration to Frame System Account" - ); - let pallet_prefix: &[u8] = b"System"; - let storage_item_prefix: &[u8] = b"Account"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (account, mut account_info) in storage_key_iter::< - T::AccountId, - AccountInfo, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - account_info.data.free = account_info.data.free.saturating_mul(DECIMAL_CONVERTOR); - account_info.data.reserved = - account_info.data.reserved.saturating_mul(DECIMAL_CONVERTOR); - // Runtime migration is wrong at first. The below code has been mistakenly applied to - // online rococo account_info.data.frozen = - // account_info.data.reserved.saturating_mul(DECIMAL_CONVERTOR); - account_info.data.frozen = account_info.data.frozen.saturating_mul(DECIMAL_CONVERTOR); - - >::insert(&account, account_info); - weight += T::DbWeight::get().reads_writes(1, 1); - } - weight - } - pub fn repalce_balances_total_issuance_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceBalancesRelatedStorage", - "running migration to Balances TotalIssuance" - ); - let pallet_prefix: &[u8] = b"Balances"; - let storage_item_prefix: &[u8] = b"TotalIssuance"; - let stored_data = get_storage_value::(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: Balances TotalIssuance"); - >::put(stored_data.saturating_mul(DECIMAL_CONVERTOR)); - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.write + weight.read) - } - pub fn repalce_balances_inactive_issuance_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceBalancesRelatedStorage", - "running migration to Balances InactiveIssuance" - ); - let pallet_prefix: &[u8] = b"Balances"; - let storage_item_prefix: &[u8] = b"InactiveIssuance"; - let stored_data = get_storage_value::(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: Balances InactiveIssuance"); - >::put(stored_data.saturating_mul(DECIMAL_CONVERTOR)); - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.write + weight.read) - } - pub fn replace_balances_locks_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceBalancesRelatedStorage", - "running checking to Balances Locks" - ); - let pallet_prefix: &[u8] = b"Balances"; - let storage_item_prefix: &[u8] = b"Locks"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (account, mut locks) in storage_key_iter::< - T::AccountId, - WeakBoundedVec, T::MaxLocks>, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - let new_locks: &mut WeakBoundedVec, T::MaxLocks> = &mut locks; - for balance_lock in new_locks.into_iter() { - balance_lock.amount = balance_lock.amount.saturating_mul(DECIMAL_CONVERTOR); - } - >::insert(&account, new_locks); - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } -} - -#[cfg(feature = "try-runtime")] -impl ReplaceBalancesRelatedStorage -where - T: frame_system::Config> - + pallet_balances::Config, -{ - pub fn pre_upgrade_frame_system_account_storage() -> Result, &'static str> { - let result: BTreeMap>> = - >::iter() - .map(|(account, state)| { - let mut new_account: AccountInfo> = state; - new_account.data.free = new_account.data.free.saturating_mul(DECIMAL_CONVERTOR); - new_account.data.reserved = - new_account.data.reserved.saturating_mul(DECIMAL_CONVERTOR); - new_account.data.frozen = - new_account.data.frozen.saturating_mul(DECIMAL_CONVERTOR); - - (account, new_account) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_frame_system_account_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = - BTreeMap::>>::decode( - &mut &state[..], - ) - .map_err(|_| "Failed to decode AccountInfo")?; - for (account, actual_result) in >::iter() { - let expected_result: AccountInfo> = - expected_state.get(&account).ok_or("Not Expected AccountInfo")?.clone(); - assert_eq!(expected_result, actual_result); - } - Ok(()) - } - pub fn pre_upgrade_balances_total_issuance_storage() -> Result, &'static str> { - Ok(>::get().saturating_mul(DECIMAL_CONVERTOR).encode()) - } - pub fn post_upgrade_balances_total_issuance_storage( - state: Vec, - ) -> Result<(), &'static str> { - let expected_state = - u128::decode(&mut &state[..]).map_err(|_| "Failed to decode Total Balance")?; - let actual_state = >::get(); - assert_eq!(expected_state, actual_state); - Ok(()) - } - pub fn pre_upgrade_balances_inactive_issuance_storage() -> Result, &'static str> { - Ok(>::get().saturating_mul(DECIMAL_CONVERTOR).encode()) - } - pub fn post_upgrade_balances_inactive_issuance_storage( - state: Vec, - ) -> Result<(), &'static str> { - let expected_state = - u128::decode(&mut &state[..]).map_err(|_| "Failed to decode Total Balance")?; - let actual_state = >::get(); - assert_eq!(expected_state, actual_state); - Ok(()) - } - pub fn pre_upgrade_balances_account_check() -> Result, &'static str> { - assert!(>::iter().next().is_none()); - Ok(Vec::::new()) - } - pub fn post_upgrade_balances_account_check(_state: Vec) -> Result<(), &'static str> { - assert!(>::iter().next().is_none()); - Ok(()) - } - pub fn pre_upgrade_balances_locks_storage() -> Result, &'static str> { - let result: BTreeMap>> = >::iter() - .map(|(account, state)| { - let mut new_locks: Vec> = state.into_inner(); - for balance_lock in new_locks.iter_mut() { - balance_lock.amount = balance_lock.amount.saturating_mul(DECIMAL_CONVERTOR); - } - (account, new_locks) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_balances_locks_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = - BTreeMap::>>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Locks")?; - for (account, actual_result) in >::iter() { - let expected_result: Vec> = - expected_state.get(&account).ok_or("Not Expected Locks")?.clone(); - assert_eq!(expected_result.encode(), actual_result.into_inner().encode()); - } - Ok(()) - } - pub fn pre_upgrade_balances_reserves_check() -> Result, &'static str> { - assert!(>::iter().next().is_none()); - Ok(Vec::::new()) - } - pub fn post_upgrade_balances_reserves_check(_state: Vec) -> Result<(), &'static str> { - assert!(>::iter().next().is_none()); - Ok(()) - } - pub fn pre_upgrade_balances_holds_check() -> Result, &'static str> { - assert!(>::iter().next().is_none()); - Ok(Vec::::new()) - } - pub fn post_upgrade_balances_holds_check(_state: Vec) -> Result<(), &'static str> { - assert!(>::iter().next().is_none()); - Ok(()) - } - pub fn pre_upgrade_balances_freezes_check() -> Result, &'static str> { - assert!(>::iter().next().is_none()); - Ok(Vec::::new()) - } - pub fn post_upgrade_balances_freezes_check(_state: Vec) -> Result<(), &'static str> { - assert!(>::iter().next().is_none()); - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplaceBalancesRelatedStorage -where - T: frame_system::Config> - + pallet_balances::Config, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let frame_system_account_vec = Self::pre_upgrade_frame_system_account_storage()?; - let balances_total_issuance_vec = Self::pre_upgrade_balances_total_issuance_storage()?; - let balances_inactive_issuance_vec = - Self::pre_upgrade_balances_inactive_issuance_storage()?; - - let _ = Self::pre_upgrade_balances_account_check()?; - - let balances_locks_vec = Self::pre_upgrade_balances_locks_storage()?; - - let _ = Self::pre_upgrade_balances_reserves_check()?; - let _ = Self::pre_upgrade_balances_holds_check()?; - let _ = Self::pre_upgrade_balances_freezes_check()?; - - Ok(( - frame_system_account_vec, - balances_total_issuance_vec, - balances_inactive_issuance_vec, - balances_locks_vec, - ) - .encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let mut weight = frame_support::weights::Weight::from_parts(0, 0); - // The storage of pallet balances is in frame_system pallet - weight += Self::replace_frame_system_account_storage(); - weight += Self::repalce_balances_total_issuance_storage(); - weight += Self::repalce_balances_inactive_issuance_storage(); - - // The storage of Account for pallet balances is in frame_system pallet - // Should be empty - - weight += Self::replace_balances_locks_storage(); - - // The storage of Reserves/Holds/Freezes for pallet balances is in frame_system pallet - // Should be empty - - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: (Vec, Vec, Vec, Vec) = - Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - Self::post_upgrade_frame_system_account_storage(pre_vec.0)?; - Self::post_upgrade_balances_total_issuance_storage(pre_vec.1)?; - Self::post_upgrade_balances_inactive_issuance_storage(pre_vec.2)?; - - Self::post_upgrade_balances_account_check(Vec::::new())?; - - Self::post_upgrade_balances_locks_storage(pre_vec.3)?; - - Self::post_upgrade_balances_reserves_check(Vec::::new())?; - Self::post_upgrade_balances_holds_check(Vec::::new())?; - Self::post_upgrade_balances_freezes_check(Vec::::new())?; - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9190/bridge_related.rs b/parachain/runtime/rococo/src/migration/P9190/bridge_related.rs deleted file mode 100644 index ee66a6dcb9..0000000000 --- a/parachain/runtime/rococo/src/migration/P9190/bridge_related.rs +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - migration::{clear_storage_prefix, storage_key_iter}, - pallet_prelude::*, - traits::{Get, OnRuntimeUpgrade}, - Blake2_256, Twox64Concat, -}; -use pallet_assets_handler::{AssetInfo, ExternalBalances, MaximumIssuance, ResourceToAssetInfo}; -use pallet_balances::AccountData; -use pallet_chain_bridge::{BridgeChainId, ResourceId}; -use sp_std::{marker::PhantomData, vec::Vec}; - -pub const DECIMAL_CONVERTOR: u128 = 1_000_000u128; - -use hex_literal::hex; -#[cfg(feature = "try-runtime")] -use parity_scale_codec::Encode; -use storage::migration::get_storage_value; - -mod old { - use super::*; - #[frame_support::storage_alias] - pub type BridgeBalances = StorageDoubleMap< - pallet_bridge_transfer::Pallet, - Twox64Concat, - ResourceId, - Twox64Concat, - ::AccountId, - u128, - >; - - #[frame_support::storage_alias] - pub type Resources = - StorageMap, Blake2_256, ResourceId, Vec>; - - #[frame_support::storage_alias] - pub type BridgeFee = - StorageMap, Twox64Concat, BridgeChainId, u128>; -} - -pub const NATIVE_TOKEN_RESOURCE_ID: [u8; 32] = - hex!("00000000000000000000000000000063a7e2be78898ba83824b0c0cc8dfb6001"); -// Hard coded key of NATIVE_TOKEN_RESOURCE_ID -pub const BLAKE2_256_KEY: [u8; 32] = - hex!("560cf5c8bfa0719141e0d1b33ae9fec279c53682ce13220d526ad79cccc8aead"); - -// Replace Frame System Storage for Decimal Change from 12 to 18 -// Replace Balances Storage for Decimal Change from 12 to 18 -pub struct ReplaceBridgeRelatedStorage(PhantomData); -impl ReplaceBridgeRelatedStorage -where - T: frame_system::Config> - + pallet_assets::Config - + pallet_assets_handler::Config - + pallet_balances::Config - + pallet_chain_bridge::Config - + pallet_bridge_transfer::Config, -{ - pub fn relocate_resource_fee_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceBridgeRelatedStorage", - "running migration to Bridge Resources/Bridge Fee" - ); - - // We get only one resource registed - // Which is native tokrn - // Resources Storage is using Blake2_256 - // So we can not reverse it out - // Must hardcode back in - let pallet_prefix: &[u8] = b"ChainBridge"; - let storage_item_prefix_resources: &[u8] = b"Resources"; - let _ = clear_storage_prefix(pallet_prefix, storage_item_prefix_resources, &[], None, None); - // Must hardcode back in - let resource_id: ResourceId = NATIVE_TOKEN_RESOURCE_ID; - - // This is fee for native token - // There should be only 1 item - let storage_item_prefix_fee: &[u8] = b"BridgeFee"; - let stored_data_fee: Vec<_> = storage_key_iter::( - pallet_prefix, - storage_item_prefix_fee, - ) - .collect(); - let _ = clear_storage_prefix(pallet_prefix, storage_item_prefix_fee, &[], None, None); - - // Replace into new storage of AssetsHandler - let fee: u128 = stored_data_fee[0].1.saturating_mul(DECIMAL_CONVERTOR); - let asset_info: AssetInfo = AssetInfo { - fee, - asset: None, // None for native token Asset Id - }; - >::insert(resource_id, asset_info); - - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, 2 * (weight.write + weight.read)) - } - pub fn delete_bridge_balances_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceBridgeRelatedStorage", - "running migration to Bridge Transfer Bridge Balances" - ); - - let result = old::BridgeBalances::::clear(u32::MAX, None); - - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts( - 0, - u64::from(result.unique).saturating_mul(weight.write + weight.read), - ) - } - pub fn relocate_external_balance_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceBridgeRelatedStorage", - "running migration to ExternalBalances" - ); - let pallet_prefix: &[u8] = b"BridgeTransfer"; - let storage_item_prefix: &[u8] = b"ExternalBalances"; - let stored_data = get_storage_value::(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: BridgeTransfer ExternalBalances"); - let _ = clear_storage_prefix(pallet_prefix, storage_item_prefix, &[], None, None); - - >::put(stored_data.saturating_mul(DECIMAL_CONVERTOR)); - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.write + weight.read) - } - pub fn relocate_maximum_issuance_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceBridgeRelatedStorage", - "running migration to MaximumIssuance" - ); - let pallet_prefix: &[u8] = b"BridgeTransfer"; - let storage_item_prefix: &[u8] = b"MaximumIssuance"; - let stored_data = get_storage_value::(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: BridgeTransfer MaximumIssuance"); - let _ = clear_storage_prefix(pallet_prefix, storage_item_prefix, &[], None, None); - - >::put(stored_data.saturating_mul(DECIMAL_CONVERTOR)); - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.write + weight.read) - } -} - -#[cfg(feature = "try-runtime")] -impl ReplaceBridgeRelatedStorage -where - T: frame_system::Config> - + pallet_assets::Config - + pallet_assets_handler::Config - + pallet_balances::Config - + pallet_chain_bridge::Config - + pallet_bridge_transfer::Config, -{ - pub fn pre_upgrade_resource_fee_storage() -> Result, &'static str> { - assert_eq!(old::Resources::::get(NATIVE_TOKEN_RESOURCE_ID), Some(b"aaaaaa?".to_vec())); - - let mut fee_iter = old::BridgeFee::::iter(); - // Just For Reference - // Ethereum: chain_id=0 - // substrate_Litmus: chain_id=1 - // substrate_Litentry:chain_id=2 - // Rinkeby: chain_id=4 - // substrate_Rococo:chain_id=3 - // substrate_Stage: chain_id=5 - // Goerli: chain_id=6 - assert_eq!(fee_iter.next(), Some((4u8, 1_000_000_000_000u128))); - - assert_eq!(fee_iter.next(), Some((97u8, 1u128))); - assert_eq!(fee_iter.next(), Some((6u8, 1_000_000_000_000u128))); - assert_eq!(fee_iter.next(), Some((99u8, 1_000_000_000_000u128))); - assert!(fee_iter.next().is_none()); - - Ok(Vec::new()) - } - pub fn post_upgrade_resource_fee_storage(_state: Vec) -> Result<(), &'static str> { - assert_eq!(old::Resources::::get(NATIVE_TOKEN_RESOURCE_ID), None); - - let mut fee_iter = old::BridgeFee::::iter(); - assert_eq!(fee_iter.next(), None); - - // Check AssetsHandler Storage - let mut new_resource_fee_iter = >::iter(); - let expected_asset_info = AssetInfo { - // The first one get migrated - fee: 1_000_000_000_000u128.saturating_mul(DECIMAL_CONVERTOR), - asset: None, - }; - assert_eq!( - new_resource_fee_iter.next(), - Some((NATIVE_TOKEN_RESOURCE_ID, expected_asset_info)) - ); - Ok(()) - } - pub fn pre_upgrade_bridge_balances_storage() -> Result, &'static str> { - Ok(Vec::new()) - } - pub fn post_upgrade_bridge_balances_storage(_state: Vec) -> Result<(), &'static str> { - assert!(old::BridgeBalances::::iter().next().is_none()); - Ok(()) - } - pub fn pre_upgrade_external_balance_storage() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"BridgeTransfer"; - let storage_item_prefix: &[u8] = b"ExternalBalances"; - let stored_data = get_storage_value::(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: BridgeTransfer ExternalBalances"); - Ok(stored_data.saturating_mul(DECIMAL_CONVERTOR).encode()) - } - pub fn post_upgrade_external_balance_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = u128::decode(&mut &state[..]) - .map_err(|_| "Failed to decode BridgeTransfer ExternalBalances")?; - - let pallet_prefix: &[u8] = b"AssetsHandler"; - let storage_item_prefix: &[u8] = b"ExternalBalances"; - let actual_state = get_storage_value::(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: BridgeTransfer ExternalBalances"); - assert_eq!(expected_state, actual_state); - Ok(()) - } - pub fn pre_upgrade_maximum_issuance_storage() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"BridgeTransfer"; - let storage_item_prefix: &[u8] = b"MaximumIssuance"; - let stored_data = get_storage_value::(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: BridgeTransfer MaximumIssuance"); - Ok(stored_data.saturating_mul(DECIMAL_CONVERTOR).encode()) - } - pub fn post_upgrade_maximum_issuance_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = u128::decode(&mut &state[..]) - .map_err(|_| "Failed to decode BridgeTransfer MaximumIssuance")?; - - let pallet_prefix: &[u8] = b"AssetsHandler"; - let storage_item_prefix: &[u8] = b"MaximumIssuance"; - let actual_state = get_storage_value::(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: BridgeTransfer MaximumIssuance"); - assert_eq!(expected_state, actual_state); - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplaceBridgeRelatedStorage -where - T: frame_system::Config> - + pallet_assets::Config - + pallet_assets_handler::Config - + pallet_balances::Config - + pallet_chain_bridge::Config - + pallet_bridge_transfer::Config, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let _ = Self::pre_upgrade_resource_fee_storage()?; - let _ = Self::pre_upgrade_bridge_balances_storage()?; - - let external_balances_vec = Self::pre_upgrade_external_balance_storage()?; - let maximum_issuance_vec = Self::pre_upgrade_maximum_issuance_storage()?; - - Ok((external_balances_vec, maximum_issuance_vec).encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let mut weight = frame_support::weights::Weight::from_parts(0, 0); - - // Replace Old Bridge's Resources, BridgeFee with AssetsHandler's ResourceToAssetInfo - weight += Self::relocate_resource_fee_storage(); - // Delete BridgeTransfer's Bridge Balances Storage - weight += Self::delete_bridge_balances_storage(); - - weight += Self::relocate_external_balance_storage(); - weight += Self::relocate_maximum_issuance_storage(); - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: (Vec, Vec) = - Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - - Self::post_upgrade_resource_fee_storage(Vec::::new())?; - Self::post_upgrade_bridge_balances_storage(Vec::::new())?; - - Self::post_upgrade_external_balance_storage(pre_vec.0)?; - Self::post_upgrade_maximum_issuance_storage(pre_vec.1)?; - - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9190/mod.rs b/parachain/runtime/rococo/src/migration/P9190/mod.rs deleted file mode 100644 index bd5e6a22bc..0000000000 --- a/parachain/runtime/rococo/src/migration/P9190/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub mod bridge_related; -pub use bridge_related::ReplaceBridgeRelatedStorage; -pub mod parachain_staking; -pub use parachain_staking::ReplaceParachainStakingStorage; -pub mod balances_transaction_payment; -pub use balances_transaction_payment::ReplaceBalancesRelatedStorage; diff --git a/parachain/runtime/rococo/src/migration/P9190/parachain_staking.rs b/parachain/runtime/rococo/src/migration/P9190/parachain_staking.rs deleted file mode 100644 index 2de502e2c0..0000000000 --- a/parachain/runtime/rococo/src/migration/P9190/parachain_staking.rs +++ /dev/null @@ -1,626 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - migration::storage_key_iter, - pallet_prelude::*, - traits::{Get, OnRuntimeUpgrade}, - Blake2_128Concat, Twox64Concat, -}; -use sp_runtime::Saturating; -use sp_std::{convert::From, marker::PhantomData, vec::Vec}; - -use pallet_parachain_staking::{ - set::OrderedSet, BalanceOf, Bond, BottomDelegations, CandidateInfo, CandidateMetadata, - CandidatePool, DelayedPayout, DelayedPayouts, DelegationAction, DelegationScheduledRequests, - Delegations, Delegator, DelegatorState, ScheduledRequest, Staked, TopDelegations, Total, -}; -pub const DECIMAL_CONVERTOR: u128 = 1_000_000u128; - -#[cfg(feature = "try-runtime")] -use parity_scale_codec::Encode; -#[cfg(feature = "try-runtime")] -use sp_std::collections::btree_map::BTreeMap; -use storage::migration::get_storage_value; - -// Replace Parachain Staking Storage for Decimal Change from 12 to 18 -pub struct ReplaceParachainStakingStorage(PhantomData); -impl ReplaceParachainStakingStorage -where - BalanceOf: From, -{ - pub fn replace_delegator_state_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking DelegatorState" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"DelegatorState"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (account, mut delegator) in storage_key_iter::< - T::AccountId, - Delegator>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - delegator.total = delegator.total.saturating_mul(DECIMAL_CONVERTOR.into()); - delegator.less_total = delegator.less_total.saturating_mul(DECIMAL_CONVERTOR.into()); - let mut sorted_inner_vector = delegator.delegations.0; - for elem in sorted_inner_vector.iter_mut() { - elem.amount = elem.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - delegator.delegations = OrderedSet::from(sorted_inner_vector); - - >::insert(&account, delegator); - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } - - pub fn replace_candidate_info_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking CandidateInfo" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"CandidateInfo"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (account, mut metadata) in storage_key_iter::< - T::AccountId, - CandidateMetadata>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - metadata.bond = metadata.bond.saturating_mul(DECIMAL_CONVERTOR.into()); - metadata.total_counted = - metadata.total_counted.saturating_mul(DECIMAL_CONVERTOR.into()); - metadata.lowest_top_delegation_amount = - metadata.lowest_top_delegation_amount.saturating_mul(DECIMAL_CONVERTOR.into()); - metadata.highest_bottom_delegation_amount = metadata - .highest_bottom_delegation_amount - .saturating_mul(DECIMAL_CONVERTOR.into()); - metadata.lowest_bottom_delegation_amount = metadata - .lowest_bottom_delegation_amount - .saturating_mul(DECIMAL_CONVERTOR.into()); - - if let Some(mut i) = metadata.request { - i.amount = i.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - >::insert(&account, metadata); - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } - - pub fn replace_delegation_scheduled_requests_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking DelegationScheduledRequests" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"DelegationScheduledRequests"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (account, mut scheduled_requests) in storage_key_iter::< - T::AccountId, - Vec>>, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - for scheduled_request in scheduled_requests.iter_mut() { - match scheduled_request.action { - DelegationAction::Revoke(n) => { - scheduled_request.action = - DelegationAction::Revoke(n.saturating_mul(DECIMAL_CONVERTOR.into())); - }, - DelegationAction::Decrease(n) => { - scheduled_request.action = - DelegationAction::Decrease(n.saturating_mul(DECIMAL_CONVERTOR.into())); - }, - } - } - >::insert(&account, scheduled_requests); - weight += T::DbWeight::get().reads_writes(1, 1); - } - weight - } - - pub fn replace_top_delegations_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking TopDelegations" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"TopDelegations"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (account, mut delegations) in storage_key_iter::< - T::AccountId, - Delegations>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - for delegation_bond in delegations.delegations.iter_mut() { - delegation_bond.amount = - delegation_bond.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - - >::insert(&account, delegations); - weight += T::DbWeight::get().reads_writes(1, 1); - } - weight - } - - pub fn replace_bottom_delegations_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking BottomDelegations" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"BottomDelegations"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (account, mut delegations) in storage_key_iter::< - T::AccountId, - Delegations>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - for delegation_bond in delegations.delegations.iter_mut() { - delegation_bond.amount = - delegation_bond.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - - >::insert(&account, delegations); - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } - - pub fn replace_total_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking Total" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"Total"; - let stored_data = - get_storage_value::>(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: ParachainStaking Total"); - >::put(stored_data.saturating_mul(DECIMAL_CONVERTOR.into())); - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.write + weight.read) - } - - pub fn replace_candidate_pool_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking CandidatePool" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"CandidatePool"; - let mut stored_data = get_storage_value::>>>( - pallet_prefix, - storage_item_prefix, - b"", - ) - .expect("Storage query fails: ParachainStaking CandidatePool"); - for bond in stored_data.0.iter_mut() { - bond.amount = bond.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - >::put(stored_data); - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.write + weight.read) - } - - pub fn replace_delayed_payouts_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking DelayedPayouts" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"DelayedPayouts"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (round, mut delayed_payout) in storage_key_iter::< - u32, - DelayedPayout>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - delayed_payout.round_issuance = - delayed_payout.round_issuance.saturating_mul(DECIMAL_CONVERTOR.into()); - delayed_payout.total_staking_reward = - delayed_payout.total_staking_reward.saturating_mul(DECIMAL_CONVERTOR.into()); - - >::insert(round, delayed_payout); - weight += T::DbWeight::get().reads_writes(1, 1); - } - weight - } - - pub fn replace_staked_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking Staked" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"Staked"; - - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (round, staked) in - storage_key_iter::, Twox64Concat>(pallet_prefix, storage_item_prefix) - .drain() - { - >::insert(round, staked.saturating_mul(DECIMAL_CONVERTOR.into())); - weight += T::DbWeight::get().reads_writes(1, 1); - } - weight - } -} - -#[cfg(feature = "try-runtime")] -impl ReplaceParachainStakingStorage -where - BalanceOf: From, -{ - pub fn pre_upgrade_delegator_state_storage() -> Result, &'static str> { - let result: BTreeMap>> = - >::iter() - .map(|(account, state)| { - let mut new_delegator: Delegator> = state; - new_delegator.total = - new_delegator.total.saturating_mul(DECIMAL_CONVERTOR.into()); - new_delegator.less_total = - new_delegator.less_total.saturating_mul(DECIMAL_CONVERTOR.into()); - let mut sorted_inner_vector = new_delegator.delegations.0; - for elem in sorted_inner_vector.iter_mut() { - elem.amount = elem.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - new_delegator.delegations = OrderedSet::from(sorted_inner_vector); - - (account, new_delegator) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_delegator_state_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = - BTreeMap::>>::decode( - &mut &state[..], - ) - .map_err(|_| "Failed to decode Delegator")?; - for (account, actual_result) in >::iter() { - let expected_result: Delegator> = - expected_state.get(&account).ok_or("Not Expected Delegator")?.clone(); - assert_eq!(expected_result, actual_result); - } - Ok(()) - } - pub fn pre_upgrade_candidate_info_storage() -> Result, &'static str> { - let result: BTreeMap>> = - >::iter() - .map(|(account, state)| { - let mut new_metadata: CandidateMetadata> = state; - new_metadata.bond = new_metadata.bond.saturating_mul(DECIMAL_CONVERTOR.into()); - new_metadata.total_counted = - new_metadata.total_counted.saturating_mul(DECIMAL_CONVERTOR.into()); - new_metadata.lowest_top_delegation_amount = new_metadata - .lowest_top_delegation_amount - .saturating_mul(DECIMAL_CONVERTOR.into()); - new_metadata.highest_bottom_delegation_amount = new_metadata - .highest_bottom_delegation_amount - .saturating_mul(DECIMAL_CONVERTOR.into()); - new_metadata.lowest_bottom_delegation_amount = new_metadata - .lowest_bottom_delegation_amount - .saturating_mul(DECIMAL_CONVERTOR.into()); - - if let Some(mut i) = new_metadata.request { - i.amount = i.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - - (account, new_metadata) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_candidate_info_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = - BTreeMap::>>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode CandidateMetadata")?; - for (account, actual_result) in >::iter() { - let expected_result: CandidateMetadata> = - expected_state.get(&account).ok_or("Not Expected CandidateMetadata")?.clone(); - // Can not compare CandidateMetadata so compare its encode - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } - pub fn pre_upgrade_delegation_scheduled_requests_storage() -> Result, &'static str> { - let result: BTreeMap>>> = - >::iter() - .map(|(account, state)| { - let mut new_scheduled_requests: Vec< - ScheduledRequest>, - > = state; - for scheduled_request in new_scheduled_requests.iter_mut() { - match scheduled_request.action { - DelegationAction::Revoke(n) => { - scheduled_request.action = DelegationAction::Revoke( - n.saturating_mul(DECIMAL_CONVERTOR.into()), - ); - }, - DelegationAction::Decrease(n) => { - scheduled_request.action = DelegationAction::Decrease( - n.saturating_mul(DECIMAL_CONVERTOR.into()), - ); - }, - } - } - - (account, new_scheduled_requests) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_delegation_scheduled_requests_storage( - state: Vec, - ) -> Result<(), &'static str> { - let expected_state = BTreeMap::< - T::AccountId, - Vec>>, - >::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Vec")?; - for (account, actual_result) in >::iter() { - let expected_result: Vec>> = expected_state - .get(&account) - .ok_or("Not Expected Vec")? - .clone(); - // Can not compare Vec so compare its encode - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } - pub fn pre_upgrade_top_delegations_storage() -> Result, &'static str> { - let result: BTreeMap>> = - >::iter() - .map(|(account, state)| { - let mut new_delegations: Delegations> = state; - - for delegation_bond in new_delegations.delegations.iter_mut() { - delegation_bond.amount = - delegation_bond.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - - (account, new_delegations) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_top_delegations_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = - BTreeMap::>>::decode( - &mut &state[..], - ) - .map_err(|_| "Failed to decode Delegations")?; - for (account, actual_result) in >::iter() { - let expected_result: Delegations> = - expected_state.get(&account).ok_or("Not Expected Delegations")?.clone(); - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } - pub fn pre_upgrade_bottom_delegations_storage() -> Result, &'static str> { - let result: BTreeMap>> = - >::iter() - .map(|(account, state)| { - let mut new_delegations: Delegations> = state; - - for delegation_bond in new_delegations.delegations.iter_mut() { - delegation_bond.amount = - delegation_bond.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - } - - (account, new_delegations) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_bottom_delegations_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = - BTreeMap::>>::decode( - &mut &state[..], - ) - .map_err(|_| "Failed to decode Delegations")?; - for (account, actual_result) in >::iter() { - let expected_result: Delegations> = - expected_state.get(&account).ok_or("Not Expected Delegations")?.clone(); - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } - pub fn pre_upgrade_total_storage() -> Result, &'static str> { - Ok(>::get().saturating_mul(DECIMAL_CONVERTOR.into()).encode()) - } - pub fn post_upgrade_total_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = BalanceOf::::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Total Balance")?; - let actual_state = >::get(); - assert_eq!(expected_state, actual_state); - Ok(()) - } - pub fn pre_upgrade_candidate_pool_storage() -> Result, &'static str> { - let result: BTreeMap> = >::get() - .0 - .iter() - .map(|bond| { - let mut new_bond: Bond> = bond.clone(); - new_bond.amount = new_bond.amount.saturating_mul(DECIMAL_CONVERTOR.into()); - (new_bond.owner, new_bond.amount) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_candidate_pool_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = BTreeMap::>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Candidate Pool Bond (owner, amount)")?; - let actual_state: BTreeMap> = >::get() - .0 - .iter() - .map(|bond| (bond.owner.clone(), bond.amount)) - .collect(); - assert_eq!(expected_state.encode(), actual_state.encode()); - Ok(()) - } - pub fn pre_upgrade_delayed_payouts_storage() -> Result, &'static str> { - let result: BTreeMap>> = >::iter() - .map(|(round, state)| { - let mut new_delayed_payout: DelayedPayout> = state; - - new_delayed_payout.round_issuance = - new_delayed_payout.round_issuance.saturating_mul(DECIMAL_CONVERTOR.into()); - new_delayed_payout.total_staking_reward = new_delayed_payout - .total_staking_reward - .saturating_mul(DECIMAL_CONVERTOR.into()); - - (round, new_delayed_payout) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_delayed_payouts_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = BTreeMap::>>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Delayed Payouts")?; - for (round, actual_result) in >::iter() { - let expected_result: DelayedPayout> = - expected_state.get(&round).ok_or("Not Expected DelayedPayout")?.clone(); - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } - pub fn pre_upgrade_staked_storage() -> Result, &'static str> { - let result: BTreeMap> = >::iter() - .map(|(round, state)| { - let new_staked: BalanceOf = state; - (round, new_staked.saturating_mul(DECIMAL_CONVERTOR.into())) - }) - .collect(); - Ok(result.encode()) - } - pub fn post_upgrade_staked_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = BTreeMap::>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Staked")?; - for (round, actual_result) in >::iter() { - let expected_result: BalanceOf = - *expected_state.get(&round).ok_or("Not Expected DelayedPayout")?; - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplaceParachainStakingStorage -where - T: frame_system::Config + pallet_parachain_staking::Config, - BalanceOf: From, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let delegator_state_vec = Self::pre_upgrade_delegator_state_storage()?; - let candidate_info_vec = Self::pre_upgrade_candidate_info_storage()?; - let delegation_scheduled_requests_vec = - Self::pre_upgrade_delegation_scheduled_requests_storage()?; - let top_delegations_vec = Self::pre_upgrade_top_delegations_storage()?; - let bottom_delegations_vec = Self::pre_upgrade_bottom_delegations_storage()?; - let total_vec = Self::pre_upgrade_total_storage()?; - let candidate_pool_vec = Self::pre_upgrade_candidate_pool_storage()?; - let delayed_payouts_vec = Self::pre_upgrade_delayed_payouts_storage()?; - let staked_vec = Self::pre_upgrade_staked_storage()?; - Ok(( - delegator_state_vec, - candidate_info_vec, - delegation_scheduled_requests_vec, - top_delegations_vec, - bottom_delegations_vec, - total_vec, - candidate_pool_vec, - delayed_payouts_vec, - staked_vec, - ) - .encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let mut weight = frame_support::weights::Weight::from_parts(0, 0); - weight += Self::replace_delegator_state_storage(); - weight += Self::replace_candidate_info_storage(); - weight += Self::replace_delegation_scheduled_requests_storage(); - weight += Self::replace_top_delegations_storage(); - weight += Self::replace_bottom_delegations_storage(); - weight += Self::replace_total_storage(); - weight += Self::replace_candidate_pool_storage(); - - // No need for AtStake Migration since this is a snapshot, everything is good as long as it - // will not change proportion AtStake - - weight += Self::replace_delayed_payouts_storage(); - // Staked Storage holds limited amount of recent rounds only, should not cause large PoV - weight += Self::replace_staked_storage(); - - // No need since all balance related config is Zero - // InflationConfig - - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: ( - Vec, - Vec, - Vec, - Vec, - Vec, - Vec, - Vec, - Vec, - Vec, - ) = Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - Self::post_upgrade_delegator_state_storage(pre_vec.0)?; - Self::post_upgrade_candidate_info_storage(pre_vec.1)?; - Self::post_upgrade_delegation_scheduled_requests_storage(pre_vec.2)?; - Self::post_upgrade_top_delegations_storage(pre_vec.3)?; - Self::post_upgrade_bottom_delegations_storage(pre_vec.4)?; - Self::post_upgrade_total_storage(pre_vec.5)?; - Self::post_upgrade_candidate_pool_storage(pre_vec.6)?; - Self::post_upgrade_delayed_payouts_storage(pre_vec.7)?; - Self::post_upgrade_staked_storage(pre_vec.8)?; - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/fix_balances.rs b/parachain/runtime/rococo/src/migration/P9191/fix_balances.rs deleted file mode 100644 index f0c352b099..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/fix_balances.rs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - migration::storage_key_iter, - pallet_prelude::*, - traits::{Get, OnRuntimeUpgrade}, -}; -use frame_system::{Account, AccountInfo}; -use pallet_balances::AccountData; -use sp_std::{marker::PhantomData, vec::Vec}; - -#[cfg(feature = "try-runtime")] -use sp_std::collections::btree_map::BTreeMap; - -// Force System Balances Storage frozen amount to 0 -pub struct ForceFixAccountFrozenStorage(PhantomData); -impl OnRuntimeUpgrade for ForceFixAccountFrozenStorage -where - T: frame_system::Config> - + pallet_balances::Config, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let result: BTreeMap>> = - >::iter() - .map(|(account, state)| { - let mut new_account: AccountInfo> = state; - new_account.data.frozen = 0u128; - - (account, new_account) - }) - .collect(); - Ok(result.encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - // The storage of Account for pallet balances is in frame_system pallet - log::info!( - target: "ReplaceBalancesRelatedStorage", - "running migration to Frame System Account" - ); - let pallet_prefix: &[u8] = b"System"; - let storage_item_prefix: &[u8] = b"Account"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (account, mut account_info) in storage_key_iter::< - T::AccountId, - AccountInfo, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - account_info.data.frozen = 0u128; - >::insert(&account, account_info); - weight += T::DbWeight::get().reads_writes(1, 1); - } - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let expected_state = - BTreeMap::>>::decode( - &mut &state[..], - ) - .map_err(|_| "Failed to decode AccountInfo")?; - for (account, actual_result) in >::iter() { - let expected_result: AccountInfo> = - expected_state.get(&account).ok_or("Not Expected AccountInfo")?.clone(); - assert_eq!(expected_result, actual_result); - } - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/migrate_bounty.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_bounty.rs deleted file mode 100644 index bf6e73c0bd..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/migrate_bounty.rs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -use frame_support::traits::{Get, OnRuntimeUpgrade}; -use sp_std::{marker::PhantomData, vec::Vec}; - -use frame_support::{migration::storage_key_iter, pallet_prelude::*, Twox64Concat}; -use frame_system::pallet_prelude::BlockNumberFor; -use pallet_bounties::{Bounties, BountyIndex, BountyStatus}; -use pallet_treasury::BalanceOf; -use parity_scale_codec::EncodeLike; -use sp_runtime::Saturating; - -pub const DECIMAL_CONVERTOR: u128 = 1_000_000u128; - -// We are creating the exact same struct from the bounties pallet because the fields are private in -// the upstream code -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] -pub struct Bounty { - /// The account proposing it. - pub proposer: AccountId, - /// The (total) amount that should be paid if the bounty is rewarded. - pub value: Balance, - /// The curator fee. Included in value. - pub fee: Balance, - /// The deposit of curator. - pub curator_deposit: Balance, - /// The amount held on deposit (reserved) for making this proposal. - pub bond: Balance, - /// The status of this bounty. - pub status: BountyStatus, -} - -// This is important when we want to insert into the storage item -impl - EncodeLike> - for Bounty -where - AccountId: EncodeLike, - Balance: EncodeLike, - BlockNumber: EncodeLike, -{ -} - -pub struct ReplacePalletBountyStorage(PhantomData<(T, I)>); -impl OnRuntimeUpgrade for ReplacePalletBountyStorage -where - T: pallet_bounties::Config + pallet_treasury::Config, - BalanceOf: EncodeLike> + From, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"Bounties"; - let storage_item_prefix: &[u8] = b"Bounties"; - let stored_data: Vec<_> = storage_key_iter::< - BountyIndex, - Bounty, BlockNumberFor>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - let result: Vec<_> = stored_data - .into_iter() - .map(|(bounty_index, bounty)| { - let mut new_bounty = bounty; - new_bounty.value = new_bounty.value.saturating_mul(DECIMAL_CONVERTOR.into()); - new_bounty.fee = new_bounty.fee.saturating_mul(DECIMAL_CONVERTOR.into()); - new_bounty.curator_deposit = - new_bounty.curator_deposit.saturating_mul(DECIMAL_CONVERTOR.into()); - new_bounty.bond = new_bounty.bond.saturating_mul(DECIMAL_CONVERTOR.into()); - - (bounty_index, new_bounty) - }) - .collect(); - - log::info!( - target: "ReplacePalletBountyStorage", - "Finished performing pre upgrade checks" - ); - - Ok(result.encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePalletBountyStorage", - "running migration to Bounties Bounties Storage Item" - ); - let pallet_prefix: &[u8] = b"Bounties"; - let storage_item_prefix: &[u8] = b"Bounties"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (bounty_index, mut bounty) in storage_key_iter::< - BountyIndex, - Bounty, BlockNumberFor>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - bounty.value = bounty.value.saturating_mul(DECIMAL_CONVERTOR.into()); - bounty.fee = bounty.fee.saturating_mul(DECIMAL_CONVERTOR.into()); - bounty.curator_deposit = - bounty.curator_deposit.saturating_mul(DECIMAL_CONVERTOR.into()); - bounty.bond = bounty.bond.saturating_mul(DECIMAL_CONVERTOR.into()); - - >::insert(bounty_index, bounty); - - weight += T::DbWeight::get().reads_writes(1, 1); - } - - log::info!( - target: "ReplacePalletBountyStorage", - "Finished performing storage migrations" - ); - - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let expected_result = Vec::<( - BountyIndex, - Bounty, BlockNumberFor>, - )>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Bounties")?; - - let pallet_prefix: &[u8] = b"Bounties"; - let storage_item_prefix: &[u8] = b"Bounties"; - let actual_result: Vec<_> = storage_key_iter::< - BountyIndex, - Bounty, BlockNumberFor>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - for x in 0..actual_result.len() { - assert_eq!(actual_result[x], expected_result[x]) - } - - log::info!( - target: "ReplacePalletBountyStorage", - "Finished performing post upgrade checks" - ); - - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/migrate_democracy.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_democracy.rs deleted file mode 100644 index d087105548..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/migrate_democracy.rs +++ /dev/null @@ -1,511 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -use frame_support::traits::{Get, OnRuntimeUpgrade}; -use pallet_democracy::{ - AccountVote, BoundedCallOf, Conviction, Delegations, DepositOf, PropIndex, ReferendumIndex, - ReferendumInfo, ReferendumInfoOf, ReferendumStatus, Tally, VotingOf, -}; -use sp_std::{marker::PhantomData, vec::Vec}; - -use frame_support::{ - migration::storage_key_iter, pallet_prelude::*, traits::Currency, Twox64Concat, -}; -use frame_system::pallet_prelude::BlockNumberFor; -use parity_scale_codec::EncodeLike; -use sp_runtime::Saturating; - -type BalanceOf = <::Currency as Currency< - ::AccountId, ->>::Balance; - -pub const DECIMAL_CONVERTOR: u128 = 1_000_000u128; - -/// A "prior" lock, i.e. a lock for some now-forgotten reason. -#[derive( - Encode, - MaxEncodedLen, - Decode, - Default, - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - RuntimeDebug, - TypeInfo, -)] -pub struct PriorLock(BlockNumber, Balance); - -#[derive(Clone, Encode, Decode, Eq, MaxEncodedLen, PartialEq, RuntimeDebug, TypeInfo)] -#[codec(mel_bound(skip_type_params(MaxVotes)))] -#[scale_info(skip_type_params(MaxVotes))] -pub enum Voting> { - /// The account is voting directly. `delegations` is the total amount of post-conviction voting - /// weight that it controls from those that have delegated to it. - Direct { - /// The current votes of the account. - votes: BoundedVec<(ReferendumIndex, AccountVote), MaxVotes>, - /// The total amount of delegations that this account has received. - delegations: Delegations, - /// Any pre-existing locks from past voting/delegating activity. - prior: PriorLock, - }, - /// The account is delegating `balance` of its balance to a `target` account with `conviction`. - Delegating { - balance: Balance, - target: AccountId, - conviction: Conviction, - /// The total amount of delegations that this account has received. - delegations: Delegations, - /// Any pre-existing locks from past voting/delegating activity. - prior: PriorLock, - }, -} - -/// Const doesn't implement partialeq trait, so we have to check manually -#[cfg(feature = "try-runtime")] -fn are_voting_instances_equal>( - a: &Voting, - b: &Voting, -) -> bool -where - Balance: PartialEq, - AccountId: PartialEq, - BlockNumber: PartialEq, -{ - match (a, b) { - ( - Voting::Direct { votes: votes_a, delegations: delegations_a, prior: prior_a }, - Voting::Direct { votes: votes_b, delegations: delegations_b, prior: prior_b }, - ) => votes_a == votes_b && delegations_a == delegations_b && prior_a == prior_b, - - ( - Voting::Delegating { - balance: balance_a, - target: target_a, - conviction: conviction_a, - delegations: delegations_a, - prior: prior_a, - }, - Voting::Delegating { - balance: balance_b, - target: target_b, - conviction: conviction_b, - delegations: delegations_b, - prior: prior_b, - }, - ) => - balance_a == balance_b && - target_a == target_b && - conviction_a == conviction_b && - delegations_a == delegations_b && - prior_a == prior_b, - - _ => false, - } -} - -// This is important when we want to insert into the storage item -impl - EncodeLike> - for Voting -where - AccountId: EncodeLike, - Balance: EncodeLike, - BlockNumber: EncodeLike, - MaxVotes: Get, -{ -} - -pub struct ReplaceDemocracyStorage(PhantomData); -impl ReplaceDemocracyStorage -where - BalanceOf: From, -{ - fn replace_deposit_of_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceDemocracyStorage", - "running migration to Democracy DepositOf Storage Item" - ); - let pallet_prefix: &[u8] = b"Democracy"; - let storage_item_prefix: &[u8] = b"DepositOf"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (prop_index, mut value) in storage_key_iter::< - PropIndex, - (BoundedVec, BalanceOf), - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - value.1 = value.1.saturating_mul(DECIMAL_CONVERTOR.into()); - - >::insert(prop_index, value); - - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } - - fn replace_referendum_info_of_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceDemocracyStorage", - "running migration to Democracy ReferendumInfoOf Storage Item" - ); - let pallet_prefix: &[u8] = b"Democracy"; - let storage_item_prefix: &[u8] = b"ReferenceInfoOf"; - - let mut weight: Weight = frame_support::weights::Weight::zero(); - for (ref_index, ref_info) in storage_key_iter::< - ReferendumIndex, - ReferendumInfo, BalanceOf>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - let new_ref_info = match ref_info { - ReferendumInfo::Finished { approved, end } => - ReferendumInfo::Finished { approved, end }, - ReferendumInfo::Ongoing(ref_status) => ReferendumInfo::Ongoing(ReferendumStatus { - end: ref_status.end, - proposal: ref_status.proposal, - threshold: ref_status.threshold, - delay: ref_status.delay, - tally: Tally { - ayes: ref_status.tally.ayes.saturating_mul(DECIMAL_CONVERTOR.into()), - nays: ref_status.tally.nays.saturating_mul(DECIMAL_CONVERTOR.into()), - turnout: ref_status.tally.turnout.saturating_mul(DECIMAL_CONVERTOR.into()), - }, - }), - }; - - >::insert(ref_index, new_ref_info); - - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } - - fn replace_voting_of_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceDemocracyStorage", - "running migration to Democracy VotingOf Storage Item" - ); - let pallet_prefix: &[u8] = b"Democracy"; - let storage_item_prefix: &[u8] = b"VotingOf"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (who, voting) in storage_key_iter::< - T::AccountId, - Voting, T::AccountId, BlockNumberFor, T::MaxVotes>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - let new_voting = match voting { - Voting::Delegating { balance, target, conviction, delegations, prior } => { - let new_balance = balance.saturating_mul(DECIMAL_CONVERTOR.into()); - let new_delegation = Delegations { - votes: delegations.votes.saturating_mul(DECIMAL_CONVERTOR.into()), - capital: delegations.capital.saturating_mul(DECIMAL_CONVERTOR.into()), - }; - let new_prior_locks = - PriorLock(prior.0, prior.1.saturating_mul(DECIMAL_CONVERTOR.into())); - Voting::Delegating { - balance: new_balance, - target, - conviction, - delegations: new_delegation, - prior: new_prior_locks, - } - }, - Voting::Direct { votes, delegations, prior } => { - let new_votes: Vec<_> = votes - .into_iter() - .map(|(id, vote)| { - let new_vote = match vote { - AccountVote::Split { aye, nay } => AccountVote::Split { - aye: aye.saturating_mul(DECIMAL_CONVERTOR.into()), - nay: nay.saturating_mul(DECIMAL_CONVERTOR.into()), - }, - AccountVote::Standard { vote, balance } => AccountVote::Standard { - vote, - balance: balance.saturating_mul(DECIMAL_CONVERTOR.into()), - }, - }; - (id, new_vote) - }) - .collect(); - - // This unwrap cannot fail since it is the same BoundedVec - let bounded_new_votes: BoundedVec< - (u32, AccountVote>), - T::MaxVotes, - > = new_votes.try_into().unwrap(); - - let new_delegation = Delegations { - votes: delegations.votes.saturating_mul(DECIMAL_CONVERTOR.into()), - capital: delegations.capital.saturating_mul(DECIMAL_CONVERTOR.into()), - }; - let new_prior_locks = - PriorLock(prior.0, prior.1.saturating_mul(DECIMAL_CONVERTOR.into())); - - Voting::Direct { - votes: bounded_new_votes, - delegations: new_delegation, - prior: new_prior_locks, - } - }, - }; - >::insert(who, new_voting); - - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } -} - -#[cfg(feature = "try-runtime")] -impl ReplaceDemocracyStorage -where - BalanceOf: From, -{ - fn pre_upgrade_deposit_of_storage() -> Result, &'static str> { - let result: Vec<_> = >::iter() - .map(|(prop_index, value)| { - let mut new_value = value; - new_value.1 = new_value.1.saturating_mul(DECIMAL_CONVERTOR.into()); - - (prop_index, new_value) - }) - .collect(); - Ok(result.encode()) - } - - fn post_upgrade_deposit_of_storage(state: Vec) -> Result<(), &'static str> { - let expected_result = Vec::<( - PropIndex, - (BoundedVec, BalanceOf), - )>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Bounties")?; - - let actual_result: Vec<_> = - >::iter().map(|(prop_index, value)| (prop_index, value)).collect(); - - for x in 0..actual_result.len() { - assert_eq!(actual_result[x], expected_result[x]) - } - - Ok(()) - } - - fn pre_upgrade_referendum_info_of_storage() -> Result, &'static str> { - let result: Vec<_> = >::iter() - .map(|(ref_index, ref_info)| { - let new_ref_info = match ref_info { - ReferendumInfo::Finished { approved, end } => - ReferendumInfo::Finished { approved, end }, - ReferendumInfo::Ongoing(ref_status) => - ReferendumInfo::Ongoing(ReferendumStatus { - end: ref_status.end, - proposal: ref_status.proposal, - threshold: ref_status.threshold, - delay: ref_status.delay, - tally: Tally { - ayes: ref_status - .tally - .ayes - .saturating_mul(DECIMAL_CONVERTOR.into()), - nays: ref_status - .tally - .nays - .saturating_mul(DECIMAL_CONVERTOR.into()), - turnout: ref_status - .tally - .turnout - .saturating_mul(DECIMAL_CONVERTOR.into()), - }, - }), - }; - - (ref_index, new_ref_info) - }) - .collect(); - Ok(result.encode()) - } - - fn post_upgrade_referendum_info_of_storage(state: Vec) -> Result<(), &'static str> { - let expected_result = Vec::<( - ReferendumIndex, - ReferendumInfo, BalanceOf>, - )>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Bounties")?; - - let actual_result: Vec<_> = >::iter() - .map(|(ref_index, ref_info)| (ref_index, ref_info)) - .collect(); - for x in 0..actual_result.len() { - assert_eq!(actual_result[x], expected_result[x]) - } - Ok(()) - } - - fn pre_upgrade_voting_of_storage() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"Democracy"; - let storage_item_prefix: &[u8] = b"VotingOf"; - let stored_data: Vec<_> = storage_key_iter::< - T::AccountId, - Voting, T::AccountId, BlockNumberFor, T::MaxVotes>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - let result: Vec<_> = stored_data - .into_iter() - .map(|(who, voting)| { - let new_voting = match voting { - Voting::Delegating { balance, target, conviction, delegations, prior } => { - let new_balance = balance.saturating_mul(DECIMAL_CONVERTOR.into()); - let new_delegation = Delegations { - votes: delegations.votes.saturating_mul(DECIMAL_CONVERTOR.into()), - capital: delegations.capital.saturating_mul(DECIMAL_CONVERTOR.into()), - }; - let new_prior_locks = - PriorLock(prior.0, prior.1.saturating_mul(DECIMAL_CONVERTOR.into())); - Voting::Delegating { - balance: new_balance, - target, - conviction, - delegations: new_delegation, - prior: new_prior_locks, - } - }, - Voting::Direct { votes, delegations, prior } => { - let new_votes: Vec<_> = votes - .into_iter() - .map(|(id, vote)| { - let new_vote = match vote { - AccountVote::Split { aye, nay } => AccountVote::Split { - aye: aye.saturating_mul(DECIMAL_CONVERTOR.into()), - nay: nay.saturating_mul(DECIMAL_CONVERTOR.into()), - }, - AccountVote::Standard { vote, balance } => - AccountVote::Standard { - vote, - balance: balance - .saturating_mul(DECIMAL_CONVERTOR.into()), - }, - }; - (id, new_vote) - }) - .collect(); - - let bounded_new_votes: BoundedVec< - (u32, AccountVote>), - T::MaxVotes, - > = new_votes.try_into().unwrap(); - - let new_delegation = Delegations { - votes: delegations.votes.saturating_mul(DECIMAL_CONVERTOR.into()), - capital: delegations.capital.saturating_mul(DECIMAL_CONVERTOR.into()), - }; - let new_prior_locks = - PriorLock(prior.0, prior.1.saturating_mul(DECIMAL_CONVERTOR.into())); - - Voting::Direct { - votes: bounded_new_votes, - delegations: new_delegation, - prior: new_prior_locks, - } - }, - }; - (who, new_voting) - }) - .collect(); - - Ok(result.encode()) - } - - fn post_upgrade_voting_of_storage(state: Vec) -> Result<(), &'static str> { - let expected_result = Vec::<( - T::AccountId, - Voting, T::AccountId, BlockNumberFor, T::MaxVotes>, - )>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Bounties")?; - - let pallet_prefix: &[u8] = b"Democracy"; - let storage_item_prefix: &[u8] = b"VotingOf"; - let actual_result: Vec<_> = storage_key_iter::< - T::AccountId, - Voting, T::AccountId, BlockNumberFor, T::MaxVotes>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - for x in 0..actual_result.len() { - assert_eq!(actual_result[x].0, expected_result[x].0); - let result = are_voting_instances_equal::< - BalanceOf, - T::AccountId, - BlockNumberFor, - T::MaxVotes, - >(&actual_result[x].1, &expected_result[x].1); - assert!(result); - } - - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplaceDemocracyStorage -where - BalanceOf: From, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let deposit_of_state_vec = Self::pre_upgrade_deposit_of_storage()?; - let referendum_info_of_state_vec = Self::pre_upgrade_referendum_info_of_storage()?; - let voting_of_state_vec = Self::pre_upgrade_voting_of_storage()?; - - log::info!(target: "ReplaceDemocracyStorage", "Finished performing pre upgrade checks"); - Ok((deposit_of_state_vec, referendum_info_of_state_vec, voting_of_state_vec).encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let mut weight = frame_support::weights::Weight::from_parts(0, 0); - weight += Self::replace_deposit_of_storage(); - weight += Self::replace_referendum_info_of_storage(); - weight += Self::replace_voting_of_storage(); - - log::info!(target: "ReplaceDemocracyStorage", "Finished performing storage migrations"); - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: (Vec, Vec, Vec) = - Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - Self::post_upgrade_deposit_of_storage(pre_vec.0)?; - Self::post_upgrade_referendum_info_of_storage(pre_vec.1)?; - Self::post_upgrade_voting_of_storage(pre_vec.2)?; - log::info!(target: "ReplaceDemocracyStorage", "Finished performing post upgrade checks"); - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/migrate_identity.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_identity.rs deleted file mode 100644 index c0bf3eee82..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/migrate_identity.rs +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - migration::storage_key_iter, - pallet_prelude::*, - traits::{Currency, Get, OnRuntimeUpgrade}, - Twox64Concat, -}; -use sp_std::{marker::PhantomData, vec::Vec}; - -#[cfg(feature = "try-runtime")] -use parity_scale_codec::{Decode, Encode}; - -use pallet_identity::{RegistrarInfo, Registration}; -use storage::migration::get_storage_value; -type BalanceOf = <::Currency as Currency< - ::AccountId, ->>::Balance; - -// Replace Parachain Staking Storage for Decimal Change from 12 to 18 -pub struct ReplacePalletIdentityStorage(PhantomData); - -impl ReplacePalletIdentityStorage -where - T: pallet_identity::Config, -{ - // pallet_identity - pub fn check_identityof_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePalletIdentityStorage", - "Running check to ParachainIdentity IdentityOf" - ); - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"IdentityOf"; - - assert!(storage_key_iter::< - T::AccountId, - Registration, T::MaxRegistrars, T::MaxAdditionalFields>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .next() - .is_none()); - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.read) - } - - pub fn check_subsof_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePalletIdentityStorage", - "Running check to ParachainIdentity SubsOf" - ); - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"SubsOf"; - - assert!(storage_key_iter::< - T::AccountId, - Registration, T::MaxRegistrars, T::MaxAdditionalFields>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .next() - .is_none()); - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.read) - } - - pub fn check_registrars_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePalletIdentityStorage", - "Running check to ParachainIdentity Registrars" - ); - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"Registrars"; - - assert!(get_storage_value::< - BoundedVec, T::AccountId>>, T::MaxRegistrars>, - >(pallet_prefix, storage_item_prefix, b"") - .is_none()); - - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.read) - } -} - -#[cfg(feature = "try-runtime")] -impl ReplacePalletIdentityStorage -where - T: pallet_identity::Config, -{ - // pallet_identity - pub fn pre_upgrade_identityof_storage() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"IdentityOf"; - - assert!(storage_key_iter::< - T::AccountId, - Registration, T::MaxRegistrars, T::MaxAdditionalFields>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .next() - .is_none()); - Ok(Vec::::new()) - } - pub fn post_upgrade_identityof_storage(_state: Vec) -> Result<(), &'static str> { - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"IdentityOf"; - - assert!(storage_key_iter::< - T::AccountId, - Registration, T::MaxRegistrars, T::MaxAdditionalFields>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .next() - .is_none()); - Ok(()) - } - pub fn pre_upgrade_subsof_storage() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"SubsOf"; - - assert!(storage_key_iter::< - T::AccountId, - Registration, T::MaxRegistrars, T::MaxAdditionalFields>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .next() - .is_none()); - Ok(Vec::::new()) - } - pub fn post_upgrade_subsof_storage(_state: Vec) -> Result<(), &'static str> { - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"SubsOf"; - - assert!(storage_key_iter::< - T::AccountId, - Registration, T::MaxRegistrars, T::MaxAdditionalFields>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .next() - .is_none()); - - Ok(()) - } - pub fn pre_upgrade_registrars_storage() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"Registrars"; - - assert!(get_storage_value::< - BoundedVec, T::AccountId>>, T::MaxRegistrars>, - >(pallet_prefix, storage_item_prefix, b"") - .is_none()); - Ok(Vec::::new()) - } - pub fn post_upgrade_registrars_storage(_state: Vec) -> Result<(), &'static str> { - let pallet_prefix: &[u8] = b"ParachainIdentity"; - let storage_item_prefix: &[u8] = b"Registrars"; - - assert!(get_storage_value::< - BoundedVec, T::AccountId>>, T::MaxRegistrars>, - >(pallet_prefix, storage_item_prefix, b"") - .is_none()); - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplacePalletIdentityStorage -where - T: frame_system::Config + pallet_identity::Config, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - // pallet_identity - let identityof_vec = Self::pre_upgrade_identityof_storage()?; - let subsof_vec = Self::pre_upgrade_subsof_storage()?; - let registrars_vec = Self::pre_upgrade_registrars_storage()?; - - Ok((identityof_vec, subsof_vec, registrars_vec).encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - frame_support::weights::Weight::zero() - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: (Vec, Vec, Vec) = - Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - // pallet_identity - Self::post_upgrade_identityof_storage(pre_vec.0)?; - Self::post_upgrade_subsof_storage(pre_vec.1)?; - Self::post_upgrade_registrars_storage(pre_vec.2)?; - - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/migrate_multisig.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_multisig.rs deleted file mode 100644 index 50209a08fa..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/migrate_multisig.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - pallet_prelude::*, - traits::{Get, OnRuntimeUpgrade}, -}; -use sp_std::{marker::PhantomData, vec::Vec}; - -#[cfg(feature = "try-runtime")] -use parity_scale_codec::Encode; - -use pallet_multisig::Multisigs; - -// Replace Parachain Staking Storage for Decimal Change from 12 to 18 -pub struct ReplacePalletMultisigStorage(PhantomData); - -impl ReplacePalletMultisigStorage -where - T: pallet_multisig::Config, -{ - // pallet_multisig - pub fn check_multisig_multisigs_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePalletMultisigStorage", - "Running checking to Multisig - Multisigs" - ); - - assert!(Multisigs::::iter().next().is_none()); - - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.read) - } -} - -#[cfg(feature = "try-runtime")] -impl ReplacePalletMultisigStorage -where - T: pallet_multisig::Config, -{ - pub fn pre_upgrade_multisig_multisigs_storage() -> Result, &'static str> { - assert!(Multisigs::::iter().next().is_none()); - Ok(Vec::::new()) - } - - pub fn post_upgrade_multisig_multisigs_storage(_state: Vec) -> Result<(), &'static str> { - assert!(Multisigs::::iter().next().is_none()); - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplacePalletMultisigStorage -where - T: frame_system::Config + pallet_multisig::Config, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - // pallet_multisig - let multisigs_vec = Self::pre_upgrade_multisig_multisigs_storage()?; - - Ok((multisigs_vec,).encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - frame_support::weights::Weight::zero() - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: (Vec,) = - Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - - // pallet_multisig - Self::post_upgrade_multisig_multisigs_storage(pre_vec.0)?; - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/migrate_preimage.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_preimage.rs deleted file mode 100644 index 8fb4b9d2b8..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/migrate_preimage.rs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -use frame_support::{ - pallet_prelude::*, - traits::{Get, OnRuntimeUpgrade}, - Identity, -}; -use pallet_preimage::RequestStatus; -use sp_std::{marker::PhantomData, vec::Vec}; - -use frame_support::migration::{put_storage_value, storage_key_iter}; -use pallet_treasury::BalanceOf; -#[cfg(feature = "try-runtime")] -use parity_scale_codec::{Decode, Encode}; -use sp_runtime::Saturating; - -pub const DECIMAL_CONVERTOR: u128 = 1_000_000u128; - -pub struct ReplacePreImageStorage(PhantomData); -impl OnRuntimeUpgrade for ReplacePreImageStorage -where - T: pallet_preimage::Config + pallet_treasury::Config, - BalanceOf: From, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"Preimage"; - let storage_item_prefix: &[u8] = b"StatusFor"; - let stored_data: Vec<_> = storage_key_iter::< - T::Hash, - RequestStatus>, - Identity, - >(pallet_prefix, storage_item_prefix) - .collect(); - - let result: Vec<_> = stored_data - .into_iter() - .map(|(hash, status)| { - let new_status = match status { - RequestStatus::Requested { deposit, count, len } => { - if let Some((account, balance)) = deposit { - RequestStatus::Requested { - deposit: Some(( - account, - balance.saturating_mul(DECIMAL_CONVERTOR.into()), - )), - count, - len, - } - } else { - RequestStatus::Requested { deposit, count, len } - } - }, - RequestStatus::Unrequested { deposit, len } => RequestStatus::Unrequested { - deposit: (deposit.0, deposit.1.saturating_mul(DECIMAL_CONVERTOR.into())), - len, - }, - }; - - (hash, new_status) - }) - .collect(); - - log::info!( - target: "ReplacePreImageStorage", - "Finished performing pre upgrade checks" - ); - - Ok(result.encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePreImageStorage", - "running migration to Preimage StatusFor Storage Item" - ); - let pallet_prefix: &[u8] = b"Preimage"; - let storage_item_prefix: &[u8] = b"StatusFor"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (hash, status) in storage_key_iter::< - T::Hash, - RequestStatus>, - Identity, - >(pallet_prefix, storage_item_prefix) - .drain() - { - let new_status = match status { - RequestStatus::Requested { deposit, count, len } => { - if let Some((account, balance)) = deposit { - RequestStatus::Requested { - deposit: Some(( - account, - balance.saturating_mul(DECIMAL_CONVERTOR.into()), - )), - count, - len, - } - } else { - RequestStatus::Requested { deposit, count, len } - } - }, - RequestStatus::Unrequested { deposit, len } => RequestStatus::Unrequested { - deposit: (deposit.0, deposit.1.saturating_mul(DECIMAL_CONVERTOR.into())), - len, - }, - }; - - // The storage item is using Identity so we don't need to do addtitional hashing and can - // directly put into storage - put_storage_value::>>( - pallet_prefix, - storage_item_prefix, - hash.as_ref(), - new_status, - ); - - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let expected_result = - Vec::<(T::Hash, RequestStatus>)>::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Bounties")?; - - let pallet_prefix: &[u8] = b"Preimage"; - let storage_item_prefix: &[u8] = b"StatusFor"; - let actual_result: Vec<_> = storage_key_iter::< - T::Hash, - RequestStatus>, - Identity, - >(pallet_prefix, storage_item_prefix) - .collect(); - - for x in 0..actual_result.len() { - assert_eq!(actual_result[x], expected_result[x]) - } - - log::info!( - target: "ReplacePreImageStorage", - "Finished performing post upgrade checks" - ); - - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/migrate_proxy.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_proxy.rs deleted file mode 100644 index c5be78ebdc..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/migrate_proxy.rs +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - migration::storage_key_iter, - pallet_prelude::*, - traits::{Currency, Get, OnRuntimeUpgrade}, - Twox64Concat, -}; -use sp_runtime::{traits::Hash, Saturating}; -use sp_std::{marker::PhantomData, vec::Vec}; - -pub const DECIMAL_CONVERTOR: u32 = 1_000_000; - -#[cfg(feature = "try-runtime")] -use parity_scale_codec::Encode; -#[cfg(feature = "try-runtime")] -use sp_std::collections::btree_map::BTreeMap; - -use pallet_proxy::{Announcement, Announcements, Proxies, ProxyDefinition}; -type BalanceOf = <::Currency as Currency< - ::AccountId, ->>::Balance; - -type CallHashOf = <::CallHasher as Hash>::Output; - -pub struct ReplacePalletProxyStorage(PhantomData); - -impl ReplacePalletProxyStorage -where - T: pallet_proxy::Config, -{ - // pallet_proxy - pub fn replace_proxy_proxies_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePalletProxyStorage", - "Running migration to Proxy - Proxies" - ); - - let mut weight = frame_support::weights::Weight::zero(); - - let pallet_prefix: &[u8] = b"Proxy"; - let storage_item_prefix: &[u8] = b"Proxies"; - - for (account, (proxies, amount)) in storage_key_iter::< - T::AccountId, - ( - BoundedVec< - ProxyDefinition, - T::MaxProxies, - >, - BalanceOf, - ), - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - let new_amount = amount.saturating_mul(DECIMAL_CONVERTOR.into()); - >::insert(account, (proxies, new_amount)); - - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } - - pub fn replace_proxy_announcements_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePalletProxyStorage", - "Running migration to Proxy - Announcements" - ); - - let mut weight = frame_support::weights::Weight::zero(); - - let pallet_prefix: &[u8] = b"Proxy"; - let storage_item_prefix: &[u8] = b"Announcements"; - - for (account, (announcements, amount)) in storage_key_iter::< - T::AccountId, - ( - BoundedVec< - Announcement, T::BlockNumber>, - T::MaxPending, - >, - BalanceOf, - ), - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - let new_amount = amount.saturating_mul(DECIMAL_CONVERTOR.into()); - >::insert(account, (announcements, new_amount)); - - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } -} - -#[cfg(feature = "try-runtime")] -impl ReplacePalletProxyStorage -where - T: pallet_proxy::Config, -{ - // pallet_proxy - pub fn pre_upgrade_proxy_proxies_storage() -> Result, &'static str> { - let result: BTreeMap< - T::AccountId, - ( - BoundedVec< - ProxyDefinition, - T::MaxProxies, - >, - BalanceOf, - ), - > = >::iter() - .map(|(account, (proxies, amount))| { - let new_amount = amount.saturating_mul(DECIMAL_CONVERTOR.into()); - (account, (proxies, new_amount)) - }) - .collect(); - Ok(result.encode()) - } - - pub fn post_upgrade_proxy_proxies_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = BTreeMap::< - T::AccountId, - ( - BoundedVec< - ProxyDefinition, - T::MaxProxies, - >, - BalanceOf, - ), - >::decode(&mut &state[..]) - .map_err(|_| "Failed to decode BoundedVec")?; - for (account, actual_result) in >::iter() { - let expected_result: ( - BoundedVec< - ProxyDefinition, - T::MaxProxies, - >, - BalanceOf, - ) = expected_state - .get(&account) - .ok_or("Not Expected BoundedVec")? - .clone(); - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } - - pub fn pre_upgrade_proxy_announcements_storage() -> Result, &'static str> { - let result: BTreeMap< - T::AccountId, - ( - BoundedVec< - Announcement, T::BlockNumber>, - T::MaxPending, - >, - BalanceOf, - ), - > = >::iter() - .map(|(account, (announcements, amount))| { - let new_amount = amount.saturating_mul(DECIMAL_CONVERTOR.into()); - (account, (announcements, new_amount)) - }) - .collect(); - Ok(result.encode()) - } - - pub fn post_upgrade_proxy_announcements_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = BTreeMap::< - T::AccountId, - ( - BoundedVec< - Announcement, T::BlockNumber>, - T::MaxPending, - >, - BalanceOf, - ), - >::decode(&mut &state[..]) - .map_err(|_| "Failed to decode BoundedVec")?; - for (account, actual_result) in >::iter() { - let expected_result: ( - BoundedVec< - Announcement, T::BlockNumber>, - T::MaxPending, - >, - BalanceOf, - ) = expected_state - .get(&account) - .ok_or("Not Expected BoundedVec")? - .clone(); - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplacePalletProxyStorage -where - T: pallet_proxy::Config, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - // pallet_proxy - let proxies_vec = Self::pre_upgrade_proxy_proxies_storage()?; - let announcements_vec = Self::pre_upgrade_proxy_announcements_storage()?; - - log::info!( - target: "ReplacePalletProxyStorage", - "Finished performing Proxy pre upgrade checks" - ); - - Ok((proxies_vec, announcements_vec).encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let mut weight = frame_support::weights::Weight::from_parts(0, 0); - - // pallet_proxy - weight += Self::replace_proxy_proxies_storage(); - weight += Self::replace_proxy_announcements_storage(); - - log::info!( - target: "ReplacePalletProxyStorage", - "Finished performing Proxy storage migration" - ); - - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: (Vec, Vec) = - Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - - // pallet_proxy - Self::post_upgrade_proxy_proxies_storage(pre_vec.0)?; - Self::post_upgrade_proxy_announcements_storage(pre_vec.1)?; - - log::info!( - target: "ReplacePalletProxyStorage", - "Finished performing Proxy post upgrade checks" - ); - - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/migrate_treasury.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_treasury.rs deleted file mode 100644 index 20160a27b7..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/migrate_treasury.rs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -use frame_support::traits::{Get, OnRuntimeUpgrade}; -use sp_std::{marker::PhantomData, vec::Vec}; - -use frame_support::{ - migration::{get_storage_value, storage_key_iter}, - pallet_prelude::*, - Twox64Concat, -}; -use pallet_treasury::{BalanceOf, Deactivated, ProposalIndex, Proposals}; -use parity_scale_codec::EncodeLike; -use sp_runtime::Saturating; - -pub const DECIMAL_CONVERTOR: u128 = 1_000_000u128; - -// We are recreating the proposal struct with public fields -#[derive(Encode, Decode, Clone, PartialEq, Eq, MaxEncodedLen, RuntimeDebug, TypeInfo)] -pub struct Proposal { - /// The account proposing it. - pub proposer: AccountId, - /// The (total) amount that should be paid if the proposal is accepted. - pub value: Balance, - /// The account to whom the payment should be made if the proposal is accepted. - pub beneficiary: AccountId, - /// The amount held on deposit (reserved) for making this proposal. - pub bond: Balance, -} - -// This is important when we want to insert into the storage item -impl EncodeLike> - for Proposal -where - AccountId: EncodeLike, - Balance: EncodeLike, -{ -} - -pub struct ReplaceTreasuryStorage(PhantomData<(T, I)>); - -impl ReplaceTreasuryStorage -where - T: pallet_treasury::Config, - BalanceOf: EncodeLike> + From, -{ - fn replace_proposals_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceTreasuryStorage", - "running migration to Treasury Proposals Storage Item" - ); - let pallet_prefix: &[u8] = b"Treasury"; - let storage_item_prefix: &[u8] = b"Proposals"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - for (proposal_index, mut proposal) in storage_key_iter::< - ProposalIndex, - Proposal>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - proposal.value = proposal.value.saturating_mul(DECIMAL_CONVERTOR.into()); - proposal.bond = proposal.bond.saturating_mul(DECIMAL_CONVERTOR.into()); - - >::insert(proposal_index, proposal); - - weight += T::DbWeight::get().reads_writes(1, 1); - } - weight - } - - fn replace_deactivated_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceTreasuryStorage", - "running migration to Treasury Deactivated Storage Item" - ); - let pallet_prefix: &[u8] = b"Treasury"; - let storage_item_prefix: &[u8] = b"Deactivated"; - let stored_data = - get_storage_value::>(pallet_prefix, storage_item_prefix, b"") - .expect("Storage query fails: Treasury Deactivated"); - - >::put(stored_data.saturating_mul(DECIMAL_CONVERTOR.into())); - - let weight = T::DbWeight::get(); - frame_support::weights::Weight::from_parts(0, weight.write + weight.read) - } -} - -#[cfg(feature = "try-runtime")] -impl ReplaceTreasuryStorage -where - T: pallet_treasury::Config, - BalanceOf: EncodeLike> + From, -{ - fn pre_upgrade_proposals_storage() -> Result, &'static str> { - let pallet_prefix: &[u8] = b"Treasury"; - let storage_item_prefix: &[u8] = b"Proposals"; - let stored_data: Vec<_> = storage_key_iter::< - ProposalIndex, - Proposal>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - let result: Vec<_> = stored_data - .into_iter() - .map(|(proposal_index, proposal)| { - let mut new_proposal = proposal; - new_proposal.value = new_proposal.value.saturating_mul(DECIMAL_CONVERTOR.into()); - new_proposal.bond = new_proposal.bond.saturating_mul(DECIMAL_CONVERTOR.into()); - - (proposal_index, new_proposal) - }) - .collect(); - - Ok(result.encode()) - } - - fn post_upgrade_proposals_storage(state: Vec) -> Result<(), &'static str> { - let expected_result = - Vec::<(ProposalIndex, Proposal>)>::decode( - &mut &state[..], - ) - .map_err(|_| "Failed to decode Bounties")?; - - let pallet_prefix: &[u8] = b"Treasury"; - let storage_item_prefix: &[u8] = b"Proposals"; - let actual_result: Vec<_> = storage_key_iter::< - ProposalIndex, - Proposal>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .collect(); - - for x in 0..actual_result.len() { - assert_eq!(actual_result[x], expected_result[x]) - } - - Ok(()) - } - - fn pre_upgrade_deactivated_storage() -> Result, &'static str> { - Ok(>::get().saturating_mul(DECIMAL_CONVERTOR.into()).encode()) - } - - fn post_upgrade_deactivated_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = BalanceOf::::decode(&mut &state[..]) - .map_err(|_| "Failed to decode Total Balance")?; - let actual_state = >::get(); - assert_eq!(expected_state, actual_state); - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplaceTreasuryStorage -where - T: pallet_treasury::Config, - BalanceOf: EncodeLike> + From, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let proposals_state_vec = Self::pre_upgrade_proposals_storage()?; - let deactivated_state_vec = Self::pre_upgrade_deactivated_storage()?; - - log::info!( - target: "ReplaceTreasuryStorage", - "Finished performing post upgrade checks" - ); - Ok((proposals_state_vec, deactivated_state_vec).encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let mut weight = frame_support::weights::Weight::from_parts(0, 0); - weight += Self::replace_proposals_storage(); - weight += Self::replace_deactivated_storage(); - - log::info!( - target: "ReplaceTreasuryStorage", - "Finished performing storage migration" - ); - - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: (Vec, Vec) = - Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - Self::post_upgrade_proposals_storage(pre_vec.0)?; - Self::post_upgrade_deactivated_storage(pre_vec.1)?; - log::info!(target: "ReplaceTreasuryStorage", "Finished performing post upgrade checks"); - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/migrate_vesting.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_vesting.rs deleted file mode 100644 index 99e0a6ea61..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/migrate_vesting.rs +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - migration::storage_key_iter, - pallet_prelude::*, - traits::{Currency, Get, OnRuntimeUpgrade}, - Blake2_128Concat, -}; -use sp_runtime::Saturating; -use sp_std::{marker::PhantomData, vec::Vec}; - -pub const DECIMAL_CONVERTOR: u32 = 1_000_000; - -#[cfg(feature = "try-runtime")] -use parity_scale_codec::Encode; -#[cfg(feature = "try-runtime")] -use sp_std::collections::btree_map::BTreeMap; - -use pallet_vesting::{MaxVestingSchedulesGet, Vesting, VestingInfo}; -type BalanceOf = <::Currency as Currency< - ::AccountId, ->>::Balance; - -pub struct ReplacePalletVestingStorage(PhantomData); - -impl ReplacePalletVestingStorage -where - T: pallet_vesting::Config, -{ - // pallet_vesting - pub fn replace_vesting_vesting_storage() -> frame_support::weights::Weight { - log::info!( - target: "ReplacePalletVestingStorage", - "Running migration to Vesting - Vesting" - ); - - let mut weight = frame_support::weights::Weight::zero(); - - let pallet_prefix: &[u8] = b"Vesting"; - let storage_item_prefix: &[u8] = b"Vesting"; - - for (account, mut vest_info) in storage_key_iter::< - T::AccountId, - BoundedVec, T::BlockNumber>, MaxVestingSchedulesGet>, - Blake2_128Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - for vest in vest_info.iter_mut() { - *vest = VestingInfo::new( - vest.locked().saturating_mul(DECIMAL_CONVERTOR.into()), - vest.per_block().saturating_mul(DECIMAL_CONVERTOR.into()), - vest.starting_block(), - ); - } - - Vesting::::insert(&account, vest_info); - weight += T::DbWeight::get().reads_writes(1, 1); - } - - weight - } -} - -#[cfg(feature = "try-runtime")] -impl ReplacePalletVestingStorage -where - T: pallet_vesting::Config, -{ - // pallet_vesting - pub fn pre_upgrade_vesting_vesting_storage() -> Result, &'static str> { - let result: BTreeMap< - T::AccountId, - BoundedVec, T::BlockNumber>, MaxVestingSchedulesGet>, - > = >::iter() - .map(|(account, vest_vec)| { - let mut new_vest_vec: BoundedVec< - VestingInfo, T::BlockNumber>, - MaxVestingSchedulesGet, - > = vest_vec; - for vest in new_vest_vec.iter_mut() { - *vest = VestingInfo::new( - vest.locked().saturating_mul(DECIMAL_CONVERTOR.into()), - vest.per_block().saturating_mul(DECIMAL_CONVERTOR.into()), - vest.starting_block(), - ); - } - (account, new_vest_vec) - }) - .collect(); - Ok(result.encode()) - } - - pub fn post_upgrade_vesting_vesting_storage(state: Vec) -> Result<(), &'static str> { - let expected_state = BTreeMap::< - T::AccountId, - BoundedVec, T::BlockNumber>, MaxVestingSchedulesGet>, - >::decode(&mut &state[..]) - .map_err(|_| "Failed to decode BoundedVec")?; - for (account, actual_result) in >::iter() { - let expected_result: BoundedVec< - VestingInfo, T::BlockNumber>, - MaxVestingSchedulesGet, - > = expected_state - .get(&account) - .ok_or("Not Expected BoundedVec")? - .clone(); - assert_eq!(expected_result.encode(), actual_result.encode()); - } - Ok(()) - } -} - -impl OnRuntimeUpgrade for ReplacePalletVestingStorage -where - T: pallet_vesting::Config, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - // pallet_vesting - let vesting_vec = Self::pre_upgrade_vesting_vesting_storage()?; - - log::info!( - target: "ReplacePalletVestingStorage", - "Finished performing Vesting pre upgrade checks" - ); - - Ok((vesting_vec).encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let mut weight = frame_support::weights::Weight::zero(); - // pallet_vesting - weight += Self::replace_vesting_vesting_storage(); - - log::info!( - target: "ReplacePalletVestingStorage", - "Finished performing Vesting storage migration" - ); - - weight - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let pre_vec: (Vec,) = - Decode::decode(&mut &state[..]).map_err(|_| "Failed to decode Tuple")?; - Self::post_upgrade_vesting_vesting_storage(pre_vec.0)?; - - log::info!( - target: "ReplacePalletVestingStorage", - "Finished performing Vesting post upgrade checks" - ); - - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/P9191/mod.rs b/parachain/runtime/rococo/src/migration/P9191/mod.rs deleted file mode 100644 index c48ab5f2e6..0000000000 --- a/parachain/runtime/rococo/src/migration/P9191/mod.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -pub mod migrate_identity; -pub use migrate_identity::ReplacePalletIdentityStorage; -pub mod migrate_multisig; -pub use migrate_multisig::ReplacePalletMultisigStorage; -pub mod migrate_proxy; -pub use migrate_proxy::ReplacePalletProxyStorage; -pub mod migrate_vesting; -pub use migrate_vesting::ReplacePalletVestingStorage; -pub mod migrate_bounty; -pub use migrate_bounty::ReplacePalletBountyStorage; -pub mod migrate_democracy; -pub use migrate_democracy::ReplaceDemocracyStorage; -pub mod migrate_preimage; -pub use migrate_preimage::ReplacePreImageStorage; -pub mod migrate_treasury; -pub use migrate_treasury::ReplaceTreasuryStorage; -pub mod fix_balances; -pub use fix_balances::ForceFixAccountFrozenStorage; diff --git a/parachain/runtime/rococo/src/migration/P9192.rs b/parachain/runtime/rococo/src/migration/P9192.rs deleted file mode 100644 index 0c10ddc50e..0000000000 --- a/parachain/runtime/rococo/src/migration/P9192.rs +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::type_complexity)] - -use frame_support::{ - migration::storage_key_iter, - pallet_prelude::*, - traits::{Get, OnRuntimeUpgrade}, - Twox64Concat, -}; -use sp_runtime::Saturating; -use sp_std::{convert::From, marker::PhantomData, vec::Vec}; - -use pallet_parachain_staking::{ - BalanceOf, Bond, CandidateInfo, CandidatePool, Delegations, TopDelegations, Total, -}; -pub const DECIMAL_CONVERTOR: u128 = 1_000_000u128; - -// Fix Parachain Staking Storage for missing migrating TopDelegations total -pub struct FixParachainStakingStorage(PhantomData); - -impl OnRuntimeUpgrade for FixParachainStakingStorage -where - T: frame_system::Config + pallet_parachain_staking::Config, - BalanceOf: From, -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - // Does not matter - Ok(Vec::::new()) - } - - // Staked is the snapshot of Total, and remove after used, so no fix - // AtStake, will not be fixed, let's wait extra two round with reward = 0 to make this data - // clean DelayedPayouts, will not fix, let's wait extra two round with reward = 0 to make this - // data clean - - // TopDelegations require fix - // CandidateInfo require fix - // CandidatePool require fix - // Total fix - fn on_runtime_upgrade() -> frame_support::weights::Weight { - log::info!( - target: "ReplaceParachainStakingStorage", - "running migration to ParachainStaking TopDelegations" - ); - let pallet_prefix: &[u8] = b"ParachainStaking"; - let storage_item_prefix: &[u8] = b"TopDelegations"; - let mut weight: Weight = frame_support::weights::Weight::zero(); - - let mut candidates = >::get(); - // remove all bonds - candidates.clear(); - - // intitialized total - let mut total: BalanceOf = 0u128.into(); - - for (account, mut delegations) in storage_key_iter::< - T::AccountId, - Delegations>, - Twox64Concat, - >(pallet_prefix, storage_item_prefix) - .drain() - { - // Patching the missed total value converting - // This storage is already correpted - let mut collator_delegations_sum: BalanceOf = 0u128.into(); - for delegation_bond in delegations.delegations.iter() { - collator_delegations_sum += delegation_bond.amount; - } - delegations.total = collator_delegations_sum; - - // Get CandidateInfo of the same collator key - let mut metadata = >::get(&account).unwrap(); - // Self + delegation total - metadata.total_counted = metadata.bond + delegations.total; - - // Fix TopDelegations - >::insert(&account, delegations); - - // Bond use its owner value to determine if equal without checking its amount - // We need to check amount later - candidates.insert(Bond { owner: account.clone(), amount: metadata.total_counted }); - // Add total - total = total.saturating_add(metadata.total_counted); - - // Fix CandidateInfo - >::insert(&account, metadata); - - weight += T::DbWeight::get().reads_writes(2, 2); - } - - // Fix CandidatePool - candidates.0.sort_by(|a, b| a.amount.cmp(&b.amount)); - >::put(candidates); - // Fix Total - >::put(total); - - weight - } - - // Check Top Delegation total = sum, collator wise - // Check CandidateInfo total count = self bond + sum of delegation, collator wise - // Check CandidatePool = - // Check Total = sum CandidateInfo total count - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - // Check Top Delegation total = sum - // Check CandidateInfo total count = self bond + sum of delegation - // Check Total = sum CandidateInfo total count - let mut total: BalanceOf = 0u128.into(); - for (account, delegations) in >::iter() { - log::info!("Checking Top Delegations Collator: {:?}", account.encode()); - // Start calculating collator delegation sum - let mut collator_delegations_sum: BalanceOf = 0u128.into(); - - for delegation_bond in delegations.delegations.iter() { - collator_delegations_sum += delegation_bond.amount; - } - - // Check Top Delegation total = sum, collator wise - assert_eq!(collator_delegations_sum, delegations.total); - - let metadata = >::get(account).unwrap(); - // Check CandidateInfo total count = self bond + sum of delegation - assert_eq!(metadata.total_counted, metadata.bond + collator_delegations_sum); - - // Collator self + Collator delegations - total += metadata.bond + collator_delegations_sum; - } - // Check Total = sum CandidateInfo total count - assert_eq!(total, >::get()); - - // It is hard to check CandidatePool without iterating vector - // So we just check its sum = Total - // Get all ordered_set of bond - let ordered_set = >::get(); - let mut candidate_pool_sum: BalanceOf = 0u128.into(); - - // Make sure the number of Order set is correct - for bond in ordered_set.0.iter() { - candidate_pool_sum += bond.amount; - } - - // Check CandidatePool element's amount total = total (self bond + sum of delegation) - log::info!("Checking total: {:?}", total); - assert_eq!(total, candidate_pool_sum); - - Ok(()) - } -} diff --git a/parachain/runtime/rococo/src/migration/migration.md b/parachain/runtime/rococo/src/migration/migration.md deleted file mode 100644 index 4c618e0bad..0000000000 --- a/parachain/runtime/rococo/src/migration/migration.md +++ /dev/null @@ -1,40 +0,0 @@ -# Migrate fix of last decimal upgrade -P9192.rs -it fixes the missing `total` migration in TopDelegations - -# Migrate decimal change 12 -> 18 -P9191/ folder: -These migration is for the follwoing task -https://github.com/litentry/litentry-parachain/releases/tag/v0.9.19-02 -The leftover part of migration including the following pallets: -Bounty, Democracy, Identity, Multisig, Preimage, Proxy, Treasury, Vesting - -Fix the rococo mistake in P9190 -set all account.frozen = 0 - -# Migrate -Under files P9190 -These migration is for the follwoing task -https://github.com/litentry/litentry-parachain/releases/tag/v0.9.19 -(1) token decimal change from 12 to 18 -(2) New token bridge related pallet storage migration. - -Rococo Only: -For rococo, the initial migration contains some error code which make account.frozen = account.reserve * 10^6 -This storage error should be fixed in the following migration of rococo - -And the migration of parachain_staking, pallet_balances and bridge related migration also applied in this migration for rococo. - -# MigrateCollatorSelectionIntoParachainStaking -P9100.rs -https://github.com/litentry/litentry-parachain/releases/tag/v0.9.10 -This migration is for the replacement of CollatorSelection with ParachainStaking - -The main purpose of runtime upgrade is for make up the missing genesis build of ParachainStaking and clean the old CollatorSelection storage. - -# MigrateAtStakeAutoCompound -P9130.rs -https://github.com/litentry/litentry-parachain/releases/tag/v0.9.13 -This migration is for the update of AtStaked with ParachainStaking - -The main purpose of runtime upgrade is for adding the autocompound staking function of ParachainStaking and need to update storage to the latest struct. \ No newline at end of file diff --git a/parachain/runtime/rococo/src/migration/mod.rs b/parachain/runtime/rococo/src/migration/mod.rs deleted file mode 100644 index d3f5a12faa..0000000000 --- a/parachain/runtime/rococo/src/migration/mod.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/parachain/runtime/rococo/src/precompiles.rs b/parachain/runtime/rococo/src/precompiles.rs deleted file mode 100644 index ac873e8003..0000000000 --- a/parachain/runtime/rococo/src/precompiles.rs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use crate::RuntimeCall; -use core::marker::PhantomData; -use fp_evm::{ExitError, PrecompileFailure}; -use frame_support::{ - dispatch::GetDispatchInfo, - pallet_prelude::{DispatchClass, Pays}, - parameter_types, - traits::Contains, -}; -use pallet_evm_precompile_assets_erc20::Erc20AssetsPrecompileSet; -use pallet_evm_precompile_blake2::Blake2F; -use pallet_evm_precompile_bn128::{Bn128Add, Bn128Mul, Bn128Pairing}; -use pallet_evm_precompile_bridge_transfer::BridgeTransferPrecompile; -use pallet_evm_precompile_dispatch::{Dispatch, DispatchValidateT}; -use pallet_evm_precompile_ed25519::Ed25519Verify; -use pallet_evm_precompile_modexp::Modexp; -use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile; -use pallet_evm_precompile_score_staking::ScoreStakingPrecompile; -use pallet_evm_precompile_sha3fips::Sha3FIPS256; -use pallet_evm_precompile_simple::{ECRecover, ECRecoverPublicKey, Identity, Ripemd160, Sha256}; -use precompile_utils::precompile_set::*; -use sp_std::fmt::Debug; - -/// The asset precompile address prefix. Addresses that match against this prefix will be routed -/// to Erc20AssetsPrecompileSet -pub const ASSET_PRECOMPILE_ADDRESS_PREFIX: &[u8] = &[255u8; 4]; -parameter_types! { - pub AssetPrefix: &'static [u8] = ASSET_PRECOMPILE_ADDRESS_PREFIX; -} - -pub struct DispatchFilterValidate>( - PhantomData<(RuntimeCall, Filter)>, -); - -impl> - DispatchValidateT for DispatchFilterValidate -{ - fn validate_before_dispatch( - _origin: &AccountId, - call: &RuntimeCall, - ) -> Option { - let info = call.get_dispatch_info(); - let paid_normal_call = info.pays_fee == Pays::Yes && info.class == DispatchClass::Normal; - if !paid_normal_call { - return Some(PrecompileFailure::Error { - exit_status: ExitError::Other("invalid call".into()), - }); - } - if Filter::contains(call) { - None - } else { - Some(PrecompileFailure::Error { - exit_status: ExitError::Other("call filtered out".into()), - }) - } - } -} - -/// Precompile checks for ethereum spec precompiles -/// We allow DELEGATECALL to stay compliant with Ethereum behavior. -type EthereumPrecompilesChecks = (AcceptDelegateCall, CallableByContract, CallableByPrecompile); - -/// Filter that only allows whitelisted runtime call to pass through dispatch precompile -pub struct WhitelistedCalls; - -impl Contains for WhitelistedCalls { - fn contains(t: &RuntimeCall) -> bool { - match t { - RuntimeCall::Assets(pallet_assets::Call::transfer { .. }) => true, - RuntimeCall::Utility(pallet_utility::Call::batch { calls }) - | RuntimeCall::Utility(pallet_utility::Call::batch_all { calls }) => { - calls.iter().all(WhitelistedCalls::contains) - }, - _ => false, - } - } -} -/// The PrecompileSet installed in the rococo runtime. -#[precompile_utils::precompile_name_from_address] -pub type PrecompilesSetAt = ( - // Ethereum precompiles: - // We allow DELEGATECALL to stay compliant with Ethereum behavior. - PrecompileAt, ECRecover, EthereumPrecompilesChecks>, - PrecompileAt, Sha256, EthereumPrecompilesChecks>, - PrecompileAt, Ripemd160, EthereumPrecompilesChecks>, - PrecompileAt, Identity, EthereumPrecompilesChecks>, - PrecompileAt, Modexp, EthereumPrecompilesChecks>, - PrecompileAt, Bn128Add, EthereumPrecompilesChecks>, - PrecompileAt, Bn128Mul, EthereumPrecompilesChecks>, - PrecompileAt, Bn128Pairing, EthereumPrecompilesChecks>, - PrecompileAt, Blake2F, EthereumPrecompilesChecks>, - // Non-Litentry specific nor Ethereum precompiles : - PrecompileAt, Sha3FIPS256, (CallableByContract, CallableByPrecompile)>, - PrecompileAt< - AddressU64<1025>, - Dispatch>, - // Not callable from smart contract nor precompiles, only EOA accounts - // TODO: test this without the gensis hack for blacklisted - (), - >, - PrecompileAt, ECRecoverPublicKey, (CallableByContract, CallableByPrecompile)>, - PrecompileAt, Ed25519Verify, (CallableByContract, CallableByPrecompile)>, - // Litentry precompiles (starts from 0x5000): - // ParachainStaking: pallet_parachain_staking = 45 + 20480 - PrecompileAt< - AddressU64<20525>, - ParachainStakingPrecompile, - (CallableByContract, CallableByPrecompile), - >, - // BridgeTransfer: pallet_bridge_transfer = 61 + 20480 - PrecompileAt< - AddressU64<20541>, - BridgeTransferPrecompile, - (CallableByContract, CallableByPrecompile), - >, - // ScoreStaking: pallet_score_staking = 75 + 20480 - PrecompileAt< - AddressU64<20555>, - ScoreStakingPrecompile, - (CallableByContract, CallableByPrecompile), - >, -); - -pub type RococoNetworkPrecompiles = PrecompileSetBuilder< - R, - ( - // Skip precompiles if out of range. - PrecompilesInRangeInclusive< - // We take range as last precompile index, UPDATE this once new prcompile is added - (AddressU64<1>, AddressU64<20556>), - PrecompilesSetAt, - >, - // Prefixed precompile sets (XC20) - PrecompileSetStartingWith, CallableByContract>, - ), ->; diff --git a/parachain/runtime/rococo/src/tests/base_call_filter.rs b/parachain/runtime/rococo/src/tests/base_call_filter.rs deleted file mode 100644 index 03523bab00..0000000000 --- a/parachain/runtime/rococo/src/tests/base_call_filter.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -use crate::{Runtime, RuntimeCall, RuntimeOrigin}; - -runtime_common::run_call_filter_tests!(); - -#[test] -fn balance_transfer_works() { - base_call_filter::balance_transfer_works::(); -} diff --git a/parachain/runtime/rococo/src/tests/mod.rs b/parachain/runtime/rococo/src/tests/mod.rs deleted file mode 100644 index 607cb06cc1..0000000000 --- a/parachain/runtime/rococo/src/tests/mod.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -mod base_call_filter; - -pub mod setup { - use crate::Runtime; - #[cfg(test)] - runtime_common::decl_test_chain!(Runtime); -} - -mod transaction_payment { - use crate::{Runtime, RuntimeCall, RuntimeOrigin, TransactionByteFee}; - - runtime_common::run_transaction_payment_tests!(); -} - -mod xcm_parachain { - use crate::{ - tests::setup::{ - relay_chain::{ - Runtime as RelayChainRuntime, RuntimeCall as RelayCall, - RuntimeOrigin as RelayOrigin, - }, - ParaA, ParaB, Relay, TestNet, - }, - xcm_config::{LocationToAccountId, UnitWeightCost}, - Runtime, RuntimeCall, RuntimeOrigin, - }; - - runtime_common::run_xcm_tests!(); -} diff --git a/parachain/runtime/rococo/src/weights/cumulus_pallet_xcmp_queue.rs b/parachain/runtime/rococo/src/weights/cumulus_pallet_xcmp_queue.rs deleted file mode 100644 index 64fd336803..0000000000 --- a/parachain/runtime/rococo/src/weights/cumulus_pallet_xcmp_queue.rs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `cumulus_pallet_xcmp_queue` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=cumulus_pallet_xcmp_queue -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/cumulus_pallet_xcmp_queue.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `cumulus_pallet_xcmp_queue`. -pub struct WeightInfo(PhantomData); -impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { - /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_u32() -> Weight { - // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `1594` - // Minimum execution time: 5_303_000 picoseconds. - Weight::from_parts(5_485_000, 0) - .saturating_add(Weight::from_parts(0, 1594)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1) - /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_config_with_weight() -> Weight { - // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `1594` - // Minimum execution time: 5_285_000 picoseconds. - Weight::from_parts(5_585_000, 0) - .saturating_add(Weight::from_parts(0, 1594)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/parachain/runtime/rococo/src/weights/frame_system.rs b/parachain/runtime/rococo/src/weights/frame_system.rs deleted file mode 100644 index 786749bc3e..0000000000 --- a/parachain/runtime/rococo/src/weights/frame_system.rs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `frame_system` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=frame_system -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/frame_system.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `frame_system`. -pub struct WeightInfo(PhantomData); -impl frame_system::WeightInfo for WeightInfo { - /// The range of component `b` is `[0, 3932160]`. - fn remark(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_161_000 picoseconds. - Weight::from_parts(2_227_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(432, 0).saturating_mul(b.into())) - } - /// The range of component `b` is `[0, 3932160]`. - fn remark_with_event(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 7_292_000 picoseconds. - Weight::from_parts(7_481_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 8 - .saturating_add(Weight::from_parts(2_345, 0).saturating_mul(b.into())) - } - /// Storage: `System::Digest` (r:1 w:1) - /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) - /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) - fn set_heap_pages() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `1485` - // Minimum execution time: 3_724_000 picoseconds. - Weight::from_parts(4_032_000, 0) - .saturating_add(Weight::from_parts(0, 1485)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainSystem::ValidationData` (r:1 w:0) - /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::UpgradeRestrictionSignal` (r:1 w:0) - /// Proof: `ParachainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingValidationCode` (r:1 w:1) - /// Proof: `ParachainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::NewValidationCode` (r:0 w:1) - /// Proof: `ParachainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::DidSetValidationCode` (r:0 w:1) - /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_code() -> Weight { - // Proof Size summary in bytes: - // Measured: `264` - // Estimated: `1749` - // Minimum execution time: 131_530_473_000 picoseconds. - Weight::from_parts(138_435_551_000, 0) - .saturating_add(Weight::from_parts(0, 1749)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Skipped::Metadata` (r:0 w:0) - /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `i` is `[0, 1000]`. - fn set_storage(i: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_328_000 picoseconds. - Weight::from_parts(2_408_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 7_057 - .saturating_add(Weight::from_parts(780_166, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - } - /// Storage: `Skipped::Metadata` (r:0 w:0) - /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `i` is `[0, 1000]`. - fn kill_storage(i: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_307_000 picoseconds. - Weight::from_parts(2_379_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_432 - .saturating_add(Weight::from_parts(562_993, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - } - /// Storage: `Skipped::Metadata` (r:0 w:0) - /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[0, 1000]`. - fn kill_prefix(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `114 + p * (69 ±0)` - // Estimated: `102 + p * (70 ±0)` - // Minimum execution time: 3_949_000 picoseconds. - Weight::from_parts(4_078_000, 0) - .saturating_add(Weight::from_parts(0, 102)) - // Standard Error: 13_088 - .saturating_add(Weight::from_parts(1_249_199, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) - } -} diff --git a/parachain/runtime/rococo/src/weights/mod.rs b/parachain/runtime/rococo/src/weights/mod.rs deleted file mode 100644 index b75428447f..0000000000 --- a/parachain/runtime/rococo/src/weights/mod.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -#![allow(clippy::unnecessary_cast)] - -pub mod cumulus_pallet_xcmp_queue; -pub mod frame_system; -pub mod pallet_asset_manager; -pub mod pallet_balances; -pub mod pallet_bridge_transfer; -pub mod pallet_chain_bridge; -pub mod pallet_collective; -pub mod pallet_democracy; -pub mod pallet_evm; -pub mod pallet_extrinsic_filter; -pub mod pallet_identity; -pub mod pallet_identity_management; -pub mod pallet_membership; -pub mod pallet_multisig; -pub mod pallet_parachain_staking; -pub mod pallet_preimage; -pub mod pallet_proxy; -pub mod pallet_scheduler; -pub mod pallet_session; -pub mod pallet_teebag; -pub mod pallet_timestamp; -pub mod pallet_treasury; -pub mod pallet_utility; -pub mod pallet_vc_management; diff --git a/parachain/runtime/rococo/src/weights/pallet_asset_manager.rs b/parachain/runtime/rococo/src/weights/pallet_asset_manager.rs deleted file mode 100644 index 1c66f95adf..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_asset_manager.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_asset_manager` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_asset_manager -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_asset_manager.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_asset_manager`. -pub struct WeightInfo(PhantomData); -impl pallet_asset_manager::WeightInfo for WeightInfo { - /// Storage: `AssetManager::AssetTypeId` (r:1 w:1) - /// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `AssetManager::ForeignAssetTracker` (r:1 w:1) - /// Proof: `AssetManager::ForeignAssetTracker` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `AssetManager::AssetIdType` (r:0 w:1) - /// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `AssetManager::AssetIdMetadata` (r:0 w:1) - /// Proof: `AssetManager::AssetIdMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn register_foreign_asset_type() -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `3607` - // Minimum execution time: 22_417_000 picoseconds. - Weight::from_parts(23_511_000, 0) - .saturating_add(Weight::from_parts(0, 3607)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `AssetManager::AssetIdType` (r:1 w:0) - /// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `AssetManager::AssetIdMetadata` (r:0 w:1) - /// Proof: `AssetManager::AssetIdMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn update_foreign_asset_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `302` - // Estimated: `3767` - // Minimum execution time: 13_327_000 picoseconds. - Weight::from_parts(13_896_000, 0) - .saturating_add(Weight::from_parts(0, 3767)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `AssetManager::AssetIdType` (r:1 w:0) - /// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `AssetManager::AssetIdUnitsPerSecond` (r:0 w:1) - /// Proof: `AssetManager::AssetIdUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn set_asset_units_per_second() -> Weight { - // Proof Size summary in bytes: - // Measured: `302` - // Estimated: `3767` - // Minimum execution time: 12_746_000 picoseconds. - Weight::from_parts(13_313_000, 0) - .saturating_add(Weight::from_parts(0, 3767)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `AssetManager::AssetIdType` (r:1 w:1) - /// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `AssetManager::AssetTypeId` (r:1 w:1) - /// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn add_asset_type() -> Weight { - // Proof Size summary in bytes: - // Measured: `325` - // Estimated: `3790` - // Minimum execution time: 17_319_000 picoseconds. - Weight::from_parts(18_423_000, 0) - .saturating_add(Weight::from_parts(0, 3790)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `AssetManager::AssetTypeId` (r:2 w:1) - /// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `AssetManager::AssetIdType` (r:0 w:1) - /// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn remove_asset_type() -> Weight { - // Proof Size summary in bytes: - // Measured: `482` - // Estimated: `6422` - // Minimum execution time: 21_607_000 picoseconds. - Weight::from_parts(22_859_000, 0) - .saturating_add(Weight::from_parts(0, 6422)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_balances.rs b/parachain/runtime/rococo/src/weights/pallet_balances.rs deleted file mode 100644 index 33dbbb5ea0..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_balances.rs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_balances` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_balances -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_balances.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_balances`. -pub struct WeightInfo(PhantomData); -impl pallet_balances::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_allow_death() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 53_007_000 picoseconds. - Weight::from_parts(68_015_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_keep_alive() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 39_762_000 picoseconds. - Weight::from_parts(41_499_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn force_set_balance_creating() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3593` - // Minimum execution time: 15_589_000 picoseconds. - Weight::from_parts(16_536_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn force_set_balance_killing() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3593` - // Minimum execution time: 22_560_000 picoseconds. - Weight::from_parts(23_315_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn force_transfer() -> Weight { - // Proof Size summary in bytes: - // Measured: `103` - // Estimated: `6196` - // Minimum execution time: 54_644_000 picoseconds. - Weight::from_parts(56_287_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_all() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 49_620_000 picoseconds. - Weight::from_parts(52_548_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn force_unreserve() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3593` - // Minimum execution time: 18_255_000 picoseconds. - Weight::from_parts(18_795_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1000 w:1000) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `u` is `[1, 1000]`. - fn upgrade_accounts(u: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + u * (136 ±0)` - // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 16_995_000 picoseconds. - Weight::from_parts(17_342_000, 0) - .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 30_882 - .saturating_add(Weight::from_parts(19_977_590, 0).saturating_mul(u.into())) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) - .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_bridge_transfer.rs b/parachain/runtime/rococo/src/weights/pallet_bridge_transfer.rs deleted file mode 100644 index 550c4446c3..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_bridge_transfer.rs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_bridge_transfer` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_bridge_transfer -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_bridge_transfer.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_bridge_transfer`. -pub struct WeightInfo(PhantomData); -impl pallet_bridge_transfer::WeightInfo for WeightInfo { - /// Storage: `AssetsHandler::ResourceToAssetInfo` (r:1 w:0) - /// Proof: `AssetsHandler::ResourceToAssetInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `AssetsHandler::ExternalBalances` (r:1 w:1) - /// Proof: `AssetsHandler::ExternalBalances` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::ChainNonces` (r:1 w:1) - /// Proof: `ChainBridge::ChainNonces` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::BridgeEvents` (r:1 w:1) - /// Proof: `ChainBridge::BridgeEvents` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn transfer_assets() -> Weight { - // Proof Size summary in bytes: - // Measured: `573` - // Estimated: `6196` - // Minimum execution time: 60_812_000 picoseconds. - Weight::from_parts(62_706_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `AssetsHandler::ResourceToAssetInfo` (r:1 w:0) - /// Proof: `AssetsHandler::ResourceToAssetInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `AssetsHandler::MaximumIssuance` (r:1 w:0) - /// Proof: `AssetsHandler::MaximumIssuance` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `AssetsHandler::ExternalBalances` (r:1 w:1) - /// Proof: `AssetsHandler::ExternalBalances` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer() -> Weight { - // Proof Size summary in bytes: - // Measured: `328` - // Estimated: `3793` - // Minimum execution time: 35_475_000 picoseconds. - Weight::from_parts(36_847_000, 0) - .saturating_add(Weight::from_parts(0, 3793)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_chain_bridge.rs b/parachain/runtime/rococo/src/weights/pallet_chain_bridge.rs deleted file mode 100644 index 7271e2d637..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_chain_bridge.rs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_chain_bridge` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_chain_bridge -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_chain_bridge.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_chain_bridge`. -pub struct WeightInfo(PhantomData); -impl pallet_chain_bridge::WeightInfo for WeightInfo { - /// Storage: `ChainBridge::RelayerThreshold` (r:0 w:1) - /// Proof: `ChainBridge::RelayerThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_threshold() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 7_198_000 picoseconds. - Weight::from_parts(7_687_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ChainBridge::ChainNonces` (r:1 w:1) - /// Proof: `ChainBridge::ChainNonces` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn whitelist_chain() -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `3607` - // Minimum execution time: 10_444_000 picoseconds. - Weight::from_parts(10_996_000, 0) - .saturating_add(Weight::from_parts(0, 3607)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ChainBridge::Relayers` (r:1 w:1) - /// Proof: `ChainBridge::Relayers` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::RelayerCount` (r:1 w:1) - /// Proof: `ChainBridge::RelayerCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn add_relayer() -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `3607` - // Minimum execution time: 12_951_000 picoseconds. - Weight::from_parts(13_847_000, 0) - .saturating_add(Weight::from_parts(0, 3607)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ChainBridge::Relayers` (r:1 w:1) - /// Proof: `ChainBridge::Relayers` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::RelayerCount` (r:1 w:1) - /// Proof: `ChainBridge::RelayerCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn remove_relayer() -> Weight { - // Proof Size summary in bytes: - // Measured: `223` - // Estimated: `3688` - // Minimum execution time: 14_662_000 picoseconds. - Weight::from_parts(15_484_000, 0) - .saturating_add(Weight::from_parts(0, 3688)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ChainBridge::Relayers` (r:1 w:0) - /// Proof: `ChainBridge::Relayers` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::ChainNonces` (r:1 w:0) - /// Proof: `ChainBridge::ChainNonces` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::Votes` (r:1 w:1) - /// Proof: `ChainBridge::Votes` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::RelayerThreshold` (r:1 w:0) - /// Proof: `ChainBridge::RelayerThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::RelayerCount` (r:1 w:0) - /// Proof: `ChainBridge::RelayerCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn acknowledge_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `285` - // Estimated: `3750` - // Minimum execution time: 34_507_000 picoseconds. - Weight::from_parts(36_153_000, 0) - .saturating_add(Weight::from_parts(0, 3750)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ChainBridge::Relayers` (r:1 w:0) - /// Proof: `ChainBridge::Relayers` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::ChainNonces` (r:1 w:0) - /// Proof: `ChainBridge::ChainNonces` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::Votes` (r:1 w:1) - /// Proof: `ChainBridge::Votes` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::RelayerThreshold` (r:1 w:0) - /// Proof: `ChainBridge::RelayerThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::RelayerCount` (r:1 w:0) - /// Proof: `ChainBridge::RelayerCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn reject_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `285` - // Estimated: `3750` - // Minimum execution time: 29_590_000 picoseconds. - Weight::from_parts(30_478_000, 0) - .saturating_add(Weight::from_parts(0, 3750)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ChainBridge::Votes` (r:1 w:1) - /// Proof: `ChainBridge::Votes` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::RelayerThreshold` (r:1 w:0) - /// Proof: `ChainBridge::RelayerThreshold` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ChainBridge::RelayerCount` (r:1 w:0) - /// Proof: `ChainBridge::RelayerCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn eval_vote_state() -> Weight { - // Proof Size summary in bytes: - // Measured: `451` - // Estimated: `3916` - // Minimum execution time: 14_114_000 picoseconds. - Weight::from_parts(14_930_000, 0) - .saturating_add(Weight::from_parts(0, 3916)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_collective.rs b/parachain/runtime/rococo/src/weights/pallet_collective.rs deleted file mode 100644 index b3dd85eda1..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_collective.rs +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_collective -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_collective.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: `Council::Members` (r:1 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Voting` (r:100 w:100) - /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `32761 + m * (1968 ±23) + p * (4247 ±23)` - // Minimum execution time: 16_998_000 picoseconds. - Weight::from_parts(17_440_000, 0) - .saturating_add(Weight::from_parts(0, 32761)) - // Standard Error: 157_175 - .saturating_add(Weight::from_parts(5_557_666, 0).saturating_mul(m.into())) - // Standard Error: 157_175 - .saturating_add(Weight::from_parts(9_190_914, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 1968).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 4247).saturating_mul(p.into())) - } - /// Storage: `Council::Members` (r:1 w:0) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `1588 + m * (32 ±0)` - // Minimum execution time: 15_435_000 picoseconds. - Weight::from_parts(15_418_071, 0) - .saturating_add(Weight::from_parts(0, 1588)) - // Standard Error: 83 - .saturating_add(Weight::from_parts(1_459, 0).saturating_mul(b.into())) - // Standard Error: 859 - .saturating_add(Weight::from_parts(7_413, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: `Council::Members` (r:1 w:0) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::ProposalOf` (r:1 w:0) - /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `3568 + m * (32 ±0)` - // Minimum execution time: 18_397_000 picoseconds. - Weight::from_parts(17_080_441, 0) - .saturating_add(Weight::from_parts(0, 3568)) - // Standard Error: 92 - .saturating_add(Weight::from_parts(1_651, 0).saturating_mul(b.into())) - // Standard Error: 946 - .saturating_add(Weight::from_parts(27_912, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: `Council::Members` (r:1 w:0) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::ProposalOf` (r:1 w:1) - /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:1) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::ProposalCount` (r:1 w:1) - /// Proof: `Council::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Voting` (r:0 w:1) - /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `463 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `3821 + m * (33 ±0) + p * (36 ±0)` - // Minimum execution time: 23_851_000 picoseconds. - Weight::from_parts(24_231_413, 0) - .saturating_add(Weight::from_parts(0, 3821)) - // Standard Error: 207 - .saturating_add(Weight::from_parts(2_710, 0).saturating_mul(b.into())) - // Standard Error: 2_153 - .saturating_add(Weight::from_parts(23_162, 0).saturating_mul(m.into())) - // Standard Error: 2_131 - .saturating_add(Weight::from_parts(212_594, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: `Council::Members` (r:1 w:0) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Voting` (r:1 w:1) - /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `841 + m * (64 ±0)` - // Estimated: `4306 + m * (64 ±0)` - // Minimum execution time: 26_294_000 picoseconds. - Weight::from_parts(29_486_906, 0) - .saturating_add(Weight::from_parts(0, 4306)) - // Standard Error: 1_787 - .saturating_add(Weight::from_parts(37_613, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: `Council::Voting` (r:1 w:1) - /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Members` (r:1 w:0) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:1) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::ProposalOf` (r:0 w:1) - /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `468 + m * (64 ±0) + p * (35 ±0)` - // Estimated: `3856 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 27_374_000 picoseconds. - Weight::from_parts(29_537_848, 0) - .saturating_add(Weight::from_parts(0, 3856)) - // Standard Error: 1_788 - .saturating_add(Weight::from_parts(32_813, 0).saturating_mul(m.into())) - // Standard Error: 1_730 - .saturating_add(Weight::from_parts(179_325, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: `Council::Voting` (r:1 w:1) - /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Members` (r:1 w:0) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::ProposalOf` (r:1 w:1) - /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:1) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `778 + m * (64 ±0) + p * (39 ±0)` - // Estimated: `4117 + b * (1 ±0) + m * (65 ±0) + p * (40 ±0)` - // Minimum execution time: 39_326_000 picoseconds. - Weight::from_parts(40_720_816, 0) - .saturating_add(Weight::from_parts(0, 4117)) - // Standard Error: 278 - .saturating_add(Weight::from_parts(3_568, 0).saturating_mul(b.into())) - // Standard Error: 2_957 - .saturating_add(Weight::from_parts(39_984, 0).saturating_mul(m.into())) - // Standard Error: 2_861 - .saturating_add(Weight::from_parts(244_445, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: `Council::Voting` (r:1 w:1) - /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Members` (r:1 w:0) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:1 w:0) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:1) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::ProposalOf` (r:0 w:1) - /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `488 + m * (64 ±0) + p * (35 ±0)` - // Estimated: `3876 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 30_613_000 picoseconds. - Weight::from_parts(30_257_113, 0) - .saturating_add(Weight::from_parts(0, 3876)) - // Standard Error: 1_996 - .saturating_add(Weight::from_parts(45_575, 0).saturating_mul(m.into())) - // Standard Error: 1_930 - .saturating_add(Weight::from_parts(198_080, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: `Council::Voting` (r:1 w:1) - /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Members` (r:1 w:0) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:1 w:0) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::ProposalOf` (r:1 w:1) - /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:1) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `798 + m * (64 ±0) + p * (39 ±0)` - // Estimated: `4137 + b * (1 ±0) + m * (65 ±0) + p * (40 ±0)` - // Minimum execution time: 41_992_000 picoseconds. - Weight::from_parts(41_104_224, 0) - .saturating_add(Weight::from_parts(0, 4137)) - // Standard Error: 286 - .saturating_add(Weight::from_parts(6_229, 0).saturating_mul(b.into())) - // Standard Error: 3_038 - .saturating_add(Weight::from_parts(34_790, 0).saturating_mul(m.into())) - // Standard Error: 2_939 - .saturating_add(Weight::from_parts(257_557, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: `Council::Proposals` (r:1 w:1) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Voting` (r:0 w:1) - /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::ProposalOf` (r:0 w:1) - /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `259 + p * (32 ±0)` - // Estimated: `1745 + p * (32 ±0)` - // Minimum execution time: 14_911_000 picoseconds. - Weight::from_parts(16_891_474, 0) - .saturating_add(Weight::from_parts(0, 1745)) - // Standard Error: 1_968 - .saturating_add(Weight::from_parts(182_344, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_democracy.rs b/parachain/runtime/rococo/src/weights/pallet_democracy.rs deleted file mode 100644 index c1d05abe63..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_democracy.rs +++ /dev/null @@ -1,527 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_democracy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_democracy -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_democracy.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_democracy`. -pub struct WeightInfo(PhantomData); -impl pallet_democracy::WeightInfo for WeightInfo { - /// Storage: `Democracy::PublicPropCount` (r:1 w:1) - /// Proof: `Democracy::PublicPropCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::PublicProps` (r:1 w:1) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Blacklist` (r:1 w:0) - /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) - /// Storage: `Democracy::DepositOf` (r:0 w:1) - /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) - fn propose() -> Weight { - // Proof Size summary in bytes: - // Measured: `4734` - // Estimated: `18187` - // Minimum execution time: 47_135_000 picoseconds. - Weight::from_parts(50_506_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::DepositOf` (r:1 w:1) - /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) - fn second() -> Weight { - // Proof Size summary in bytes: - // Measured: `3489` - // Estimated: `6695` - // Minimum execution time: 40_561_000 picoseconds. - Weight::from_parts(43_857_000, 0) - .saturating_add(Weight::from_parts(0, 6695)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) - fn vote_new() -> Weight { - // Proof Size summary in bytes: - // Measured: `3365` - // Estimated: `7260` - // Minimum execution time: 55_662_000 picoseconds. - Weight::from_parts(62_595_000, 0) - .saturating_add(Weight::from_parts(0, 7260)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) - fn vote_existing() -> Weight { - // Proof Size summary in bytes: - // Measured: `3387` - // Estimated: `7260` - // Minimum execution time: 62_188_000 picoseconds. - Weight::from_parts(67_185_000, 0) - .saturating_add(Weight::from_parts(0, 7260)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Cancellations` (r:1 w:1) - /// Proof: `Democracy::Cancellations` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn emergency_cancel() -> Weight { - // Proof Size summary in bytes: - // Measured: `299` - // Estimated: `3666` - // Minimum execution time: 26_674_000 picoseconds. - Weight::from_parts(27_415_000, 0) - .saturating_add(Weight::from_parts(0, 3666)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::PublicProps` (r:1 w:1) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) - /// Storage: `Democracy::DepositOf` (r:1 w:1) - /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:3 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - /// Storage: `Democracy::NextExternal` (r:1 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Blacklist` (r:0 w:1) - /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) - fn blacklist() -> Weight { - // Proof Size summary in bytes: - // Measured: `6182` - // Estimated: `18187` - // Minimum execution time: 112_290_000 picoseconds. - Weight::from_parts(120_955_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(8)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Blacklist` (r:1 w:0) - /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) - fn external_propose() -> Weight { - // Proof Size summary in bytes: - // Measured: `3349` - // Estimated: `6703` - // Minimum execution time: 12_980_000 picoseconds. - Weight::from_parts(13_511_000, 0) - .saturating_add(Weight::from_parts(0, 6703)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::NextExternal` (r:0 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - fn external_propose_majority() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_157_000 picoseconds. - Weight::from_parts(3_417_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::NextExternal` (r:0 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - fn external_propose_default() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_266_000 picoseconds. - Weight::from_parts(3_510_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumCount` (r:1 w:1) - /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:2) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - fn fast_track() -> Weight { - // Proof Size summary in bytes: - // Measured: `219` - // Estimated: `3518` - // Minimum execution time: 27_475_000 picoseconds. - Weight::from_parts(28_199_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Blacklist` (r:1 w:1) - /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(3238), added: 5713, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn veto_external() -> Weight { - // Proof Size summary in bytes: - // Measured: `3452` - // Estimated: `6703` - // Minimum execution time: 30_559_000 picoseconds. - Weight::from_parts(31_432_000, 0) - .saturating_add(Weight::from_parts(0, 6703)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::PublicProps` (r:1 w:1) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) - /// Storage: `Democracy::DepositOf` (r:1 w:1) - /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(3230), added: 5705, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn cancel_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `6093` - // Estimated: `18187` - // Minimum execution time: 93_105_000 picoseconds. - Weight::from_parts(96_978_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - fn cancel_referendum() -> Weight { - // Proof Size summary in bytes: - // Measured: `204` - // Estimated: `3518` - // Minimum execution time: 19_693_000 picoseconds. - Weight::from_parts(20_212_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) - /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumCount` (r:1 w:0) - /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn on_initialize_base(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `176 + r * (86 ±0)` - // Estimated: `1489 + r * (2676 ±0)` - // Minimum execution time: 7_043_000 picoseconds. - Weight::from_parts(9_128_994, 0) - .saturating_add(Weight::from_parts(0, 1489)) - // Standard Error: 12_845 - .saturating_add(Weight::from_parts(3_221_856, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) - /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumCount` (r:1 w:0) - /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::LastTabledWasExternal` (r:1 w:0) - /// Proof: `Democracy::LastTabledWasExternal` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - /// Storage: `Democracy::NextExternal` (r:1 w:0) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::PublicProps` (r:1 w:0) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `176 + r * (86 ±0)` - // Estimated: `18187 + r * (2676 ±0)` - // Minimum execution time: 10_018_000 picoseconds. - Weight::from_parts(8_772_022, 0) - .saturating_add(Weight::from_parts(0, 18187)) - // Standard Error: 24_683 - .saturating_add(Weight::from_parts(3_366_083, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: `Democracy::VotingOf` (r:3 w:3) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn delegate(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `727 + r * (108 ±0)` - // Estimated: `19800 + r * (2676 ±0)` - // Minimum execution time: 39_191_000 picoseconds. - Weight::from_parts(47_705_035, 0) - .saturating_add(Weight::from_parts(0, 19800)) - // Standard Error: 22_056 - .saturating_add(Weight::from_parts(4_143_626, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: `Democracy::VotingOf` (r:2 w:2) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn undelegate(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `424 + r * (108 ±0)` - // Estimated: `13530 + r * (2676 ±0)` - // Minimum execution time: 20_305_000 picoseconds. - Weight::from_parts(22_819_541, 0) - .saturating_add(Weight::from_parts(0, 13530)) - // Standard Error: 16_749 - .saturating_add(Weight::from_parts(4_112_400, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: `Democracy::PublicProps` (r:0 w:1) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) - fn clear_public_proposals() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_283_000 picoseconds. - Weight::from_parts(3_420_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn unlock_remove(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `421` - // Estimated: `7260` - // Minimum execution time: 22_262_000 picoseconds. - Weight::from_parts(37_078_280, 0) - .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 5_886 - .saturating_add(Weight::from_parts(152_633, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn unlock_set(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `421 + r * (22 ±0)` - // Estimated: `7260` - // Minimum execution time: 33_177_000 picoseconds. - Weight::from_parts(36_908_770, 0) - .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 2_627 - .saturating_add(Weight::from_parts(151_786, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 100]`. - fn remove_vote(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `638 + r * (27 ±0)` - // Estimated: `7260` - // Minimum execution time: 15_091_000 picoseconds. - Weight::from_parts(18_895_047, 0) - .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 2_235 - .saturating_add(Weight::from_parts(143_124, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3795), added: 6270, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 100]`. - fn remove_other_vote(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `638 + r * (27 ±0)` - // Estimated: `7260` - // Minimum execution time: 15_531_000 picoseconds. - Weight::from_parts(19_188_343, 0) - .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 2_418 - .saturating_add(Weight::from_parts(140_473, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:0) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:0) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:0 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn set_external_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `323` - // Estimated: `3556` - // Minimum execution time: 18_508_000 picoseconds. - Weight::from_parts(18_938_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:0) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn clear_external_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `219` - // Estimated: `3518` - // Minimum execution time: 16_462_000 picoseconds. - Weight::from_parts(16_989_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::PublicProps` (r:1 w:0) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:0) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:0 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn set_proposal_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `4855` - // Estimated: `18187` - // Minimum execution time: 40_830_000 picoseconds. - Weight::from_parts(43_038_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::PublicProps` (r:1 w:0) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(16702), added: 17197, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn clear_proposal_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `4755` - // Estimated: `18187` - // Minimum execution time: 38_130_000 picoseconds. - Weight::from_parts(40_840_000, 0) - .saturating_add(Weight::from_parts(0, 18187)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Preimage::StatusFor` (r:1 w:0) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:0 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn set_referendum_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `3556` - // Minimum execution time: 14_167_000 picoseconds. - Weight::from_parts(14_902_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:0) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn clear_referendum_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `235` - // Estimated: `3666` - // Minimum execution time: 18_959_000 picoseconds. - Weight::from_parts(19_645_000, 0) - .saturating_add(Weight::from_parts(0, 3666)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_evm.rs b/parachain/runtime/rococo/src/weights/pallet_evm.rs deleted file mode 100644 index 1ea11571cd..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_evm.rs +++ /dev/null @@ -1,58 +0,0 @@ -// This file is part of Frontier. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for pallet_evm -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `archlinux`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/frontier-template-node -// benchmark -// pallet -// --chain=dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_evm -// --extrinsic=withdraw -// --execution=wasm -// --wasm-execution=compiled -// --output=weights.rs -// --header=HEADER-APACHE2 -// --template=./.maintain/frame-weight-template.hbs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weights for pallet_evm using the Substrate node and recommended hardware. -pub struct WeightInfo(PhantomData); -impl pallet_evm::WeightInfo for WeightInfo { - fn withdraw() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_extrinsic_filter.rs b/parachain/runtime/rococo/src/weights/pallet_extrinsic_filter.rs deleted file mode 100644 index 3ada00c439..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_extrinsic_filter.rs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_extrinsic_filter` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_extrinsic_filter -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_extrinsic_filter.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_extrinsic_filter`. -pub struct WeightInfo(PhantomData); -impl pallet_extrinsic_filter::WeightInfo for WeightInfo { - /// Storage: `ExtrinsicFilter::BlockedExtrinsics` (r:1 w:1) - /// Proof: `ExtrinsicFilter::BlockedExtrinsics` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[1, 1024]`. - /// The range of component `f` is `[1, 1024]`. - fn block_extrinsics(p: u32, f: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `3607` - // Minimum execution time: 14_933_000 picoseconds. - Weight::from_parts(13_403_699, 0) - .saturating_add(Weight::from_parts(0, 3607)) - // Standard Error: 86 - .saturating_add(Weight::from_parts(2_772, 0).saturating_mul(p.into())) - // Standard Error: 86 - .saturating_add(Weight::from_parts(2_313, 0).saturating_mul(f.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ExtrinsicFilter::BlockedExtrinsics` (r:1 w:1) - /// Proof: `ExtrinsicFilter::BlockedExtrinsics` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[1, 1024]`. - /// The range of component `f` is `[1, 1024]`. - fn unblock_extrinsics(p: u32, f: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `178 + f * (1 ±0) + p * (1 ±0)` - // Estimated: `3644 + f * (1 ±0) + p * (1 ±0)` - // Minimum execution time: 24_081_000 picoseconds. - Weight::from_parts(14_828_975, 0) - .saturating_add(Weight::from_parts(0, 3644)) - // Standard Error: 92 - .saturating_add(Weight::from_parts(10_321, 0).saturating_mul(p.into())) - // Standard Error: 92 - .saturating_add(Weight::from_parts(10_231, 0).saturating_mul(f.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(f.into())) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(p.into())) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_identity.rs b/parachain/runtime/rococo/src/weights/pallet_identity.rs deleted file mode 100644 index 561456e983..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_identity.rs +++ /dev/null @@ -1,199 +0,0 @@ - -//! Autogenerated weights for `pallet_identity` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-10-27, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("./source/local.json"), DB CACHE: 20 - -// Executed Command: -// ./target/release/litentry-collator -// benchmark -// --chain=./source/local.json -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet-identity -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --output=./runtime/src/weights/pallet-identity.rs - - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_identity`. -pub struct WeightInfo(PhantomData); -impl pallet_identity::WeightInfo for WeightInfo { - // Storage: Identity Registrars (r:1 w:1) - fn add_registrar(r: u32, ) -> Weight { - Weight::from_parts(30_842_000 as u64, 0) - // Standard Error: 6_000 - .saturating_add(Weight::from_parts(463_000 as u64, 0).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:1) - fn set_identity(r: u32, x: u32, ) -> Weight { - Weight::from_parts(69_189_000 as u64, 0) - // Standard Error: 37_000 - .saturating_add(Weight::from_parts(550_000 as u64, 0).saturating_mul(r as u64)) - // Standard Error: 6_000 - .saturating_add(Weight::from_parts(1_467_000 as u64, 0).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:1 w:1) - fn set_subs_new(s: u32, ) -> Weight { - Weight::from_parts(60_117_000 as u64, 0) - // Standard Error: 5_000 - .saturating_add(Weight::from_parts(9_215_000 as u64, 0).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:1) - fn set_subs_old(p: u32, ) -> Weight { - Weight::from_parts(59_651_000 as u64, 0) - // Standard Error: 4_000 - .saturating_add(Weight::from_parts(3_043_000 as u64, 0).saturating_mul(p as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) - } - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity IdentityOf (r:1 w:1) - // Storage: Identity SuperOf (r:0 w:100) - fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_parts(64_330_000 as u64, 0) - // Standard Error: 18_000 - .saturating_add(Weight::from_parts(659_000 as u64, 0).saturating_mul(r as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(3_089_000 as u64, 0).saturating_mul(s as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(812_000 as u64, 0).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity Registrars (r:1 w:0) - // Storage: Identity IdentityOf (r:1 w:1) - fn request_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_parts(79_592_000 as u64, 0) - // Standard Error: 6_000 - .saturating_add(Weight::from_parts(435_000 as u64, 0).saturating_mul(r as u64)) - // Standard Error: 1_000 - .saturating_add(Weight::from_parts(1_483_000 as u64, 0).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:1) - fn cancel_request(r: u32, x: u32, ) -> Weight { - Weight::from_parts(74_756_000 as u64, 0) - // Standard Error: 26_000 - .saturating_add(Weight::from_parts(291_000 as u64, 0).saturating_mul(r as u64)) - // Standard Error: 4_000 - .saturating_add(Weight::from_parts(1_461_000 as u64, 0).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity Registrars (r:1 w:1) - fn set_fee(r: u32, ) -> Weight { - Weight::from_parts(12_562_000 as u64, 0) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(407_000 as u64, 0).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity Registrars (r:1 w:1) - fn set_account_id(r: u32, ) -> Weight { - Weight::from_parts(12_588_000 as u64, 0) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(406_000 as u64, 0).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity Registrars (r:1 w:1) - fn set_fields(r: u32, ) -> Weight { - Weight::from_parts(12_601_000 as u64, 0) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(404_000 as u64, 0).saturating_mul(r as u64)) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity Registrars (r:1 w:0) - // Storage: Identity IdentityOf (r:1 w:1) - fn provide_judgement(r: u32, x: u32, ) -> Weight { - Weight::from_parts(55_809_000 as u64, 0) - // Standard Error: 22_000 - .saturating_add(Weight::from_parts(142_000 as u64, 0).saturating_mul(r as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(1_483_000 as u64, 0).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity SubsOf (r:1 w:1) - // Storage: Identity IdentityOf (r:1 w:1) - // Storage: System Account (r:2 w:2) - // Storage: Identity SuperOf (r:0 w:100) - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - Weight::from_parts(82_981_000 as u64, 0) - // Standard Error: 16_000 - .saturating_add(Weight::from_parts(586_000 as u64, 0).saturating_mul(r as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(3_095_000 as u64, 0).saturating_mul(s as u64)) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(2_000 as u64, 0).saturating_mul(x as u64)) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) - .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) - fn add_sub(s: u32, ) -> Weight { - Weight::from_parts(82_321_000 as u64, 0) - // Standard Error: 3_000 - .saturating_add(Weight::from_parts(268_000 as u64, 0).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) - fn rename_sub(s: u32, ) -> Weight { - Weight::from_parts(23_968_000 as u64, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(85_000 as u64, 0).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) - } - // Storage: Identity IdentityOf (r:1 w:0) - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) - fn remove_sub(s: u32, ) -> Weight { - Weight::from_parts(82_550_000 as u64, 0) - // Standard Error: 2_000 - .saturating_add(Weight::from_parts(264_000 as u64, 0).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } - // Storage: Identity SuperOf (r:1 w:1) - // Storage: Identity SubsOf (r:1 w:1) - fn quit_sub(s: u32, ) -> Weight { - Weight::from_parts(50_979_000 as u64, 0) - // Standard Error: 2_000 - .saturating_add(Weight::from_parts(251_000 as u64, 0).saturating_mul(s as u64)) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_identity_management.rs b/parachain/runtime/rococo/src/weights/pallet_identity_management.rs deleted file mode 100644 index d2b0c90d35..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_identity_management.rs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_identity_management` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_identity_management -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_identity_management.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_identity_management`. -pub struct WeightInfo(PhantomData); -impl pallet_identity_management::WeightInfo for WeightInfo { - /// Storage: `IdentityManagement::Delegatee` (r:0 w:1) - /// Proof: `IdentityManagement::Delegatee` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn add_delegatee() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 8_549_000 picoseconds. - Weight::from_parts(8_919_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `IdentityManagement::Delegatee` (r:1 w:1) - /// Proof: `IdentityManagement::Delegatee` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn remove_delegatee() -> Weight { - // Proof Size summary in bytes: - // Measured: `116` - // Estimated: `3513` - // Minimum execution time: 12_876_000 picoseconds. - Weight::from_parts(13_453_000, 0) - .saturating_add(Weight::from_parts(0, 3513)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `IMPExtrinsicWhitelist::GroupControlOn` (r:1 w:0) - /// Proof: `IMPExtrinsicWhitelist::GroupControlOn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn link_identity() -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 15_759_000 picoseconds. - Weight::from_parts(16_281_000, 0) - .saturating_add(Weight::from_parts(0, 1627)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `IMPExtrinsicWhitelist::GroupControlOn` (r:1 w:0) - /// Proof: `IMPExtrinsicWhitelist::GroupControlOn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn deactivate_identity() -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 11_564_000 picoseconds. - Weight::from_parts(12_013_000, 0) - .saturating_add(Weight::from_parts(0, 1627)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `IMPExtrinsicWhitelist::GroupControlOn` (r:1 w:0) - /// Proof: `IMPExtrinsicWhitelist::GroupControlOn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn activate_identity() -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `1627` - // Minimum execution time: 11_785_000 picoseconds. - Weight::from_parts(12_083_000, 0) - .saturating_add(Weight::from_parts(0, 1627)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn identity_linked() -> Weight { - // Proof Size summary in bytes: - // Measured: `347` - // Estimated: `3812` - // Minimum execution time: 12_364_000 picoseconds. - Weight::from_parts(13_195_000, 0) - .saturating_add(Weight::from_parts(0, 3812)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn identity_deactivated() -> Weight { - // Proof Size summary in bytes: - // Measured: `347` - // Estimated: `3812` - // Minimum execution time: 12_490_000 picoseconds. - Weight::from_parts(12_958_000, 0) - .saturating_add(Weight::from_parts(0, 3812)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn identity_activated() -> Weight { - // Proof Size summary in bytes: - // Measured: `347` - // Estimated: `3812` - // Minimum execution time: 12_481_000 picoseconds. - Weight::from_parts(12_928_000, 0) - .saturating_add(Weight::from_parts(0, 3812)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn identity_networks_set() -> Weight { - // Proof Size summary in bytes: - // Measured: `347` - // Estimated: `3812` - // Minimum execution time: 12_392_000 picoseconds. - Weight::from_parts(12_997_000, 0) - .saturating_add(Weight::from_parts(0, 3812)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn some_error() -> Weight { - // Proof Size summary in bytes: - // Measured: `347` - // Estimated: `3812` - // Minimum execution time: 12_290_000 picoseconds. - Weight::from_parts(12_662_000, 0) - .saturating_add(Weight::from_parts(0, 3812)) - .saturating_add(T::DbWeight::get().reads(1)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_membership.rs b/parachain/runtime/rococo/src/weights/pallet_membership.rs deleted file mode 100644 index 0798959d02..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_membership.rs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_membership` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_membership -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_membership.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_membership`. -pub struct WeightInfo(PhantomData); -impl pallet_membership::WeightInfo for WeightInfo { - /// Storage: `CouncilMembership::Members` (r:1 w:1) - /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Members` (r:0 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[1, 99]`. - fn add_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 15_544_000 picoseconds. - Weight::from_parts(16_557_881, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 474 - .saturating_add(Weight::from_parts(27_986, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: `CouncilMembership::Members` (r:1 w:1) - /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `CouncilMembership::Prime` (r:1 w:0) - /// Proof: `CouncilMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Council::Members` (r:0 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[2, 100]`. - fn remove_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `316 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 18_073_000 picoseconds. - Weight::from_parts(19_162_325, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 486 - .saturating_add(Weight::from_parts(24_863, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: `CouncilMembership::Members` (r:1 w:1) - /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `CouncilMembership::Prime` (r:1 w:0) - /// Proof: `CouncilMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Council::Members` (r:0 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[2, 100]`. - fn swap_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `316 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 18_247_000 picoseconds. - Weight::from_parts(19_238_238, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 723 - .saturating_add(Weight::from_parts(37_571, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: `CouncilMembership::Members` (r:1 w:1) - /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `CouncilMembership::Prime` (r:1 w:0) - /// Proof: `CouncilMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Council::Members` (r:0 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[1, 100]`. - fn reset_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `315 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 18_407_000 picoseconds. - Weight::from_parts(19_739_921, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 1_891 - .saturating_add(Weight::from_parts(132_297, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: `CouncilMembership::Members` (r:1 w:1) - /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `CouncilMembership::Prime` (r:1 w:1) - /// Proof: `CouncilMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Council::Members` (r:0 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[1, 100]`. - fn change_key(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `315 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 19_205_000 picoseconds. - Weight::from_parts(20_277_093, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 1_316 - .saturating_add(Weight::from_parts(33_126, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: `CouncilMembership::Members` (r:1 w:0) - /// Proof: `CouncilMembership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `CouncilMembership::Prime` (r:0 w:1) - /// Proof: `CouncilMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[1, 100]`. - fn set_prime(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `107 + m * (32 ±0)` - // Estimated: `4687 + m * (32 ±0)` - // Minimum execution time: 7_663_000 picoseconds. - Weight::from_parts(8_091_030, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 215 - .saturating_add(Weight::from_parts(12_336, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: `CouncilMembership::Prime` (r:0 w:1) - /// Proof: `CouncilMembership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[1, 100]`. - fn clear_prime(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_043_000 picoseconds. - Weight::from_parts(3_337_476, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 111 - .saturating_add(Weight::from_parts(164, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_multisig.rs b/parachain/runtime/rococo/src/weights/pallet_multisig.rs deleted file mode 100644 index 40fa77030a..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_multisig.rs +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_multisig` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_multisig -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_multisig.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_multisig`. -pub struct WeightInfo(PhantomData); -impl pallet_multisig::WeightInfo for WeightInfo { - /// The range of component `z` is `[0, 10000]`. - fn as_multi_threshold_1(z: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 13_018_000 picoseconds. - Weight::from_parts(16_358_007, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(502, 0).saturating_mul(z.into())) - } - /// Storage: `Multisig::Multisigs` (r:1 w:1) - /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `289 + s * (2 ±0)` - // Estimated: `6811` - // Minimum execution time: 43_932_000 picoseconds. - Weight::from_parts(33_535_441, 0) - .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 4_217 - .saturating_add(Weight::from_parts(146_766, 0).saturating_mul(s.into())) - // Standard Error: 41 - .saturating_add(Weight::from_parts(1_557, 0).saturating_mul(z.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Multisig::Multisigs` (r:1 w:1) - /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) - /// The range of component `s` is `[3, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `315` - // Estimated: `6811` - // Minimum execution time: 29_075_000 picoseconds. - Weight::from_parts(17_070_108, 0) - .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_957 - .saturating_add(Weight::from_parts(147_016, 0).saturating_mul(s.into())) - // Standard Error: 19 - .saturating_add(Weight::from_parts(1_592, 0).saturating_mul(z.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Multisig::Multisigs` (r:1 w:1) - /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `421 + s * (33 ±0)` - // Estimated: `6811` - // Minimum execution time: 49_610_000 picoseconds. - Weight::from_parts(38_076_052, 0) - .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 2_625 - .saturating_add(Weight::from_parts(176_208, 0).saturating_mul(s.into())) - // Standard Error: 25 - .saturating_add(Weight::from_parts(1_589, 0).saturating_mul(z.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Multisig::Multisigs` (r:1 w:1) - /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_create(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `292 + s * (2 ±0)` - // Estimated: `6811` - // Minimum execution time: 30_004_000 picoseconds. - Weight::from_parts(32_460_826, 0) - .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 3_414 - .saturating_add(Weight::from_parts(152_194, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Multisig::Multisigs` (r:1 w:1) - /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_approve(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `315` - // Estimated: `6811` - // Minimum execution time: 16_701_000 picoseconds. - Weight::from_parts(17_280_857, 0) - .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_905 - .saturating_add(Weight::from_parts(136_920, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Multisig::Multisigs` (r:1 w:1) - /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) - /// The range of component `s` is `[2, 100]`. - fn cancel_as_multi(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `486 + s * (1 ±0)` - // Estimated: `6811` - // Minimum execution time: 31_656_000 picoseconds. - Weight::from_parts(33_456_462, 0) - .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 2_823 - .saturating_add(Weight::from_parts(141_836, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_parachain_staking.rs b/parachain/runtime/rococo/src/weights/pallet_parachain_staking.rs deleted file mode 100644 index 357e2e3547..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_parachain_staking.rs +++ /dev/null @@ -1,722 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_parachain_staking` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `25`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_parachain_staking -// --extrinsic=* -// --heap-pages=4096 -// --steps=25 -// --repeat=20 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_parachain_staking.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_parachain_staking`. -pub struct WeightInfo(PhantomData); -impl pallet_parachain_staking::WeightInfo for WeightInfo { - /// Storage: `ParachainStaking::Candidates` (r:1 w:1) - /// Proof: `ParachainStaking::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[1, 100]`. - fn add_candidates_whitelist(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `337 + x * (32 ±0)` - // Estimated: `1826 + x * (32 ±0)` - // Minimum execution time: 12_371_000 picoseconds. - Weight::from_parts(15_519_329, 0) - .saturating_add(Weight::from_parts(0, 1826)) - // Standard Error: 3_320 - .saturating_add(Weight::from_parts(113_759, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(x.into())) - } - /// Storage: `ParachainStaking::Candidates` (r:1 w:1) - /// Proof: `ParachainStaking::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[1, 100]`. - fn remove_candidates_whitelist(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `369 + x * (32 ±0)` - // Estimated: `1859 + x * (32 ±0)` - // Minimum execution time: 11_880_000 picoseconds. - Weight::from_parts(15_002_167, 0) - .saturating_add(Weight::from_parts(0, 1859)) - // Standard Error: 3_213 - .saturating_add(Weight::from_parts(105_293, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(x.into())) - } - /// Storage: `ParachainStaking::InflationConfig` (r:1 w:1) - /// Proof: `ParachainStaking::InflationConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_staking_expectations() -> Weight { - // Proof Size summary in bytes: - // Measured: `466` - // Estimated: `1951` - // Minimum execution time: 12_459_000 picoseconds. - Weight::from_parts(13_116_000, 0) - .saturating_add(Weight::from_parts(0, 1951)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainStaking::InflationConfig` (r:1 w:1) - /// Proof: `ParachainStaking::InflationConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_inflation() -> Weight { - // Proof Size summary in bytes: - // Measured: `502` - // Estimated: `1987` - // Minimum execution time: 42_609_000 picoseconds. - Weight::from_parts(43_433_000, 0) - .saturating_add(Weight::from_parts(0, 1987)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainStaking::ParachainBondInfo` (r:1 w:1) - /// Proof: `ParachainStaking::ParachainBondInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_parachain_bond_account() -> Weight { - // Proof Size summary in bytes: - // Measured: `434` - // Estimated: `1919` - // Minimum execution time: 12_529_000 picoseconds. - Weight::from_parts(13_080_000, 0) - .saturating_add(Weight::from_parts(0, 1919)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainStaking::ParachainBondInfo` (r:1 w:1) - /// Proof: `ParachainStaking::ParachainBondInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_parachain_bond_reserve_percent() -> Weight { - // Proof Size summary in bytes: - // Measured: `434` - // Estimated: `1919` - // Minimum execution time: 12_215_000 picoseconds. - Weight::from_parts(13_141_000, 0) - .saturating_add(Weight::from_parts(0, 1919)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainStaking::TotalSelected` (r:1 w:1) - /// Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_total_selected() -> Weight { - // Proof Size summary in bytes: - // Measured: `442` - // Estimated: `1927` - // Minimum execution time: 13_709_000 picoseconds. - Weight::from_parts(14_340_000, 0) - .saturating_add(Weight::from_parts(0, 1927)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainStaking::CollatorCommission` (r:1 w:1) - /// Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_collator_commission() -> Weight { - // Proof Size summary in bytes: - // Measured: `405` - // Estimated: `1890` - // Minimum execution time: 11_060_000 picoseconds. - Weight::from_parts(11_690_000, 0) - .saturating_add(Weight::from_parts(0, 1890)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainStaking::Round` (r:1 w:1) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::TotalSelected` (r:1 w:0) - /// Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::InflationConfig` (r:1 w:1) - /// Proof: `ParachainStaking::InflationConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn set_blocks_per_round() -> Weight { - // Proof Size summary in bytes: - // Measured: `530` - // Estimated: `2015` - // Minimum execution time: 18_786_000 picoseconds. - Weight::from_parts(19_544_000, 0) - .saturating_add(Weight::from_parts(0, 2015)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::Candidates` (r:1 w:0) - /// Proof: `ParachainStaking::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:0) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::TopDelegations` (r:0 w:1) - /// Proof: `ParachainStaking::TopDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::BottomDelegations` (r:0 w:1) - /// Proof: `ParachainStaking::BottomDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[3, 1000]`. - fn join_candidates(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1512 + x * (80 ±0)` - // Estimated: `4815 + x * (81 ±0)` - // Minimum execution time: 48_531_000 picoseconds. - Weight::from_parts(50_133_211, 0) - .saturating_add(Weight::from_parts(0, 4815)) - // Standard Error: 2_372 - .saturating_add(Weight::from_parts(150_172, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(6)) - .saturating_add(Weight::from_parts(0, 81).saturating_mul(x.into())) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[3, 1000]`. - fn schedule_leave_candidates(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1327 + x * (48 ±0)` - // Estimated: `4691 + x * (49 ±0)` - // Minimum execution time: 22_779_000 picoseconds. - Weight::from_parts(18_073_114, 0) - .saturating_add(Weight::from_parts(0, 4691)) - // Standard Error: 2_296 - .saturating_add(Weight::from_parts(120_415, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 49).saturating_mul(x.into())) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::TopDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::TopDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1200 w:1200) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::DelegatorState` (r:1199 w:1199) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AutoCompoundingDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::AutoCompoundingDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::BottomDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::BottomDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[2, 1200]`. - fn execute_leave_candidates(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `469 + x * (447 ±0)` - // Estimated: `5094 + x * (2915 ±0)` - // Minimum execution time: 90_448_000 picoseconds. - Weight::from_parts(95_467_000, 0) - .saturating_add(Weight::from_parts(0, 5094)) - // Standard Error: 842_280 - .saturating_add(Weight::from_parts(68_676_766, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(x.into()))) - .saturating_add(T::DbWeight::get().writes(5)) - .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 2915).saturating_mul(x.into())) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[3, 1000]`. - fn cancel_leave_candidates(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1247 + x * (48 ±0)` - // Estimated: `4611 + x * (49 ±0)` - // Minimum execution time: 20_426_000 picoseconds. - Weight::from_parts(16_451_221, 0) - .saturating_add(Weight::from_parts(0, 4611)) - // Standard Error: 2_616 - .saturating_add(Weight::from_parts(132_896, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 49).saturating_mul(x.into())) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn go_offline() -> Weight { - // Proof Size summary in bytes: - // Measured: `686` - // Estimated: `4151` - // Minimum execution time: 19_979_000 picoseconds. - Weight::from_parts(21_030_000, 0) - .saturating_add(Weight::from_parts(0, 4151)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn go_online() -> Weight { - // Proof Size summary in bytes: - // Measured: `637` - // Estimated: `4102` - // Minimum execution time: 20_087_000 picoseconds. - Weight::from_parts(20_871_000, 0) - .saturating_add(Weight::from_parts(0, 4102)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn candidate_bond_more() -> Weight { - // Proof Size summary in bytes: - // Measured: `829` - // Estimated: `4294` - // Minimum execution time: 37_568_000 picoseconds. - Weight::from_parts(39_038_000, 0) - .saturating_add(Weight::from_parts(0, 4294)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn schedule_candidate_bond_less() -> Weight { - // Proof Size summary in bytes: - // Measured: `598` - // Estimated: `4063` - // Minimum execution time: 18_568_000 picoseconds. - Weight::from_parts(19_643_000, 0) - .saturating_add(Weight::from_parts(0, 4063)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn execute_candidate_bond_less() -> Weight { - // Proof Size summary in bytes: - // Measured: `918` - // Estimated: `4383` - // Minimum execution time: 47_721_000 picoseconds. - Weight::from_parts(51_545_000, 0) - .saturating_add(Weight::from_parts(0, 4383)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn cancel_candidate_bond_less() -> Weight { - // Proof Size summary in bytes: - // Measured: `582` - // Estimated: `4047` - // Minimum execution time: 15_559_000 picoseconds. - Weight::from_parts(16_199_000, 0) - .saturating_add(Weight::from_parts(0, 4047)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn schedule_leave_delegators() -> Weight { - // Proof Size summary in bytes: - // Measured: `595` - // Estimated: `4060` - // Minimum execution time: 21_772_000 picoseconds. - Weight::from_parts(22_653_000, 0) - .saturating_add(Weight::from_parts(0, 4060)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:99 w:99) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidateInfo` (r:99 w:99) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::TopDelegations` (r:99 w:99) - /// Proof: `ParachainStaking::TopDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AutoCompoundingDelegations` (r:99 w:0) - /// Proof: `ParachainStaking::AutoCompoundingDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ScoreStaking::Scores` (r:1 w:0) - /// Proof: `ScoreStaking::Scores` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[2, 100]`. - fn execute_leave_delegators(x: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1008 + x * (458 ±0)` - // Estimated: `5061 + x * (2852 ±3)` - // Minimum execution time: 79_414_000 picoseconds. - Weight::from_parts(82_954_000, 0) - .saturating_add(Weight::from_parts(0, 5061)) - // Standard Error: 338_518 - .saturating_add(Weight::from_parts(44_951_389, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 2852).saturating_mul(x.into())) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn cancel_leave_delegators() -> Weight { - // Proof Size summary in bytes: - // Measured: `720` - // Estimated: `4185` - // Minimum execution time: 23_662_000 picoseconds. - Weight::from_parts(25_715_000, 0) - .saturating_add(Weight::from_parts(0, 4185)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn schedule_revoke_delegation() -> Weight { - // Proof Size summary in bytes: - // Measured: `595` - // Estimated: `4060` - // Minimum execution time: 21_876_000 picoseconds. - Weight::from_parts(30_423_000, 0) - .saturating_add(Weight::from_parts(0, 4060)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:0) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::TopDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::TopDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn delegator_bond_more() -> Weight { - // Proof Size summary in bytes: - // Measured: `1217` - // Estimated: `4682` - // Minimum execution time: 56_734_000 picoseconds. - Weight::from_parts(61_346_000, 0) - .saturating_add(Weight::from_parts(0, 4682)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(6)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn schedule_delegator_bond_less() -> Weight { - // Proof Size summary in bytes: - // Measured: `595` - // Estimated: `4060` - // Minimum execution time: 22_033_000 picoseconds. - Weight::from_parts(23_316_000, 0) - .saturating_add(Weight::from_parts(0, 4060)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AutoCompoundingDelegations` (r:1 w:0) - /// Proof: `ParachainStaking::AutoCompoundingDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::TopDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::TopDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ScoreStaking::Scores` (r:1 w:0) - /// Proof: `ScoreStaking::Scores` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn execute_revoke_delegation() -> Weight { - // Proof Size summary in bytes: - // Measured: `1596` - // Estimated: `5061` - // Minimum execution time: 82_289_000 picoseconds. - Weight::from_parts(85_150_000, 0) - .saturating_add(Weight::from_parts(0, 5061)) - .saturating_add(T::DbWeight::get().reads(10)) - .saturating_add(T::DbWeight::get().writes(7)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::TopDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::TopDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn execute_delegator_bond_less() -> Weight { - // Proof Size summary in bytes: - // Measured: `1375` - // Estimated: `4840` - // Minimum execution time: 66_897_000 picoseconds. - Weight::from_parts(72_647_000, 0) - .saturating_add(Weight::from_parts(0, 4840)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(7)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn cancel_revoke_delegation() -> Weight { - // Proof Size summary in bytes: - // Measured: `720` - // Estimated: `4185` - // Minimum execution time: 22_063_000 picoseconds. - Weight::from_parts(23_092_000, 0) - .saturating_add(Weight::from_parts(0, 4185)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:1 w:1) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn cancel_delegator_bond_less() -> Weight { - // Proof Size summary in bytes: - // Measured: `753` - // Estimated: `4218` - // Minimum execution time: 27_125_000 picoseconds. - Weight::from_parts(29_839_000, 0) - .saturating_add(Weight::from_parts(0, 4218)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `ParachainStaking::Round` (r:1 w:1) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Points` (r:1 w:0) - /// Proof: `ParachainStaking::Points` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Staked` (r:1 w:2) - /// Proof: `ParachainStaking::Staked` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::InflationConfig` (r:1 w:0) - /// Proof: `ParachainStaking::InflationConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `AssetsHandler::ExternalBalances` (r:1 w:0) - /// Proof: `AssetsHandler::ExternalBalances` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::ParachainBondInfo` (r:1 w:0) - /// Proof: `ParachainStaking::ParachainBondInfo` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CollatorCommission` (r:1 w:0) - /// Proof: `ParachainStaking::CollatorCommission` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:0) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::TotalSelected` (r:1 w:0) - /// Proof: `ParachainStaking::TotalSelected` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidateInfo` (r:99 w:0) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelegationScheduledRequests` (r:99 w:0) - /// Proof: `ParachainStaking::DelegationScheduledRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::TopDelegations` (r:99 w:0) - /// Proof: `ParachainStaking::TopDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AutoCompoundingDelegations` (r:99 w:0) - /// Proof: `ParachainStaking::AutoCompoundingDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Total` (r:1 w:0) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AwardedPts` (r:2 w:1) - /// Proof: `ParachainStaking::AwardedPts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AtStake` (r:1 w:100) - /// Proof: `ParachainStaking::AtStake` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::SelectedCandidates` (r:0 w:1) - /// Proof: `ParachainStaking::SelectedCandidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::DelayedPayouts` (r:0 w:1) - /// Proof: `ParachainStaking::DelayedPayouts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[8, 100]`. - /// The range of component `y` is `[0, 5000]`. - fn round_transition_on_initialize(x: u32, y: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `4347 + x * (297 ±0) + y * (47 ±0)` - // Estimated: `519520 + x * (2390 ±43) + y * (46 ±0)` - // Minimum execution time: 829_036_000 picoseconds. - Weight::from_parts(4_788_241_561, 0) - .saturating_add(Weight::from_parts(0, 519520)) - .saturating_add(T::DbWeight::get().reads(214)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(x.into()))) - .saturating_add(T::DbWeight::get().writes(207)) - .saturating_add(Weight::from_parts(0, 2390).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 46).saturating_mul(y.into())) - } - /// Storage: `ParachainStaking::DelayedPayouts` (r:1 w:0) - /// Proof: `ParachainStaking::DelayedPayouts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Points` (r:1 w:0) - /// Proof: `ParachainStaking::Points` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AwardedPts` (r:2 w:1) - /// Proof: `ParachainStaking::AwardedPts` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AtStake` (r:1 w:1) - /// Proof: `ParachainStaking::AtStake` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1001 w:1001) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `y` is `[0, 1000]`. - fn pay_one_collator_reward(y: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `399 + y * (185 ±0)` - // Estimated: `6424 + y * (2603 ±0)` - // Minimum execution time: 41_873_000 picoseconds. - Weight::from_parts(42_692_000, 0) - .saturating_add(Weight::from_parts(0, 6424)) - // Standard Error: 54_978 - .saturating_add(Weight::from_parts(22_646_853, 0).saturating_mul(y.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(y.into()))) - .saturating_add(Weight::from_parts(0, 2603).saturating_mul(y.into())) - } - /// Storage: `ParachainStaking::Round` (r:1 w:0) - /// Proof: `ParachainStaking::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn base_on_initialize() -> Weight { - // Proof Size summary in bytes: - // Measured: `447` - // Estimated: `1932` - // Minimum execution time: 4_640_000 picoseconds. - Weight::from_parts(4_902_000, 0) - .saturating_add(Weight::from_parts(0, 1932)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:0) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AutoCompoundingDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::AutoCompoundingDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[0, 1000]`. - /// The range of component `y` is `[0, 100]`. - fn set_auto_compound(x: u32, y: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1273 + x * (33 ±0) + y * (48 ±0)` - // Estimated: `4574 + x * (34 ±0) + y * (49 ±0)` - // Minimum execution time: 38_548_000 picoseconds. - Weight::from_parts(43_959_261, 0) - .saturating_add(Weight::from_parts(0, 4574)) - // Standard Error: 2_369 - .saturating_add(Weight::from_parts(89_391, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 34).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 49).saturating_mul(y.into())) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainStaking::DelegatorState` (r:1 w:1) - /// Proof: `ParachainStaking::DelegatorState` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidateInfo` (r:1 w:1) - /// Proof: `ParachainStaking::CandidateInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::AutoCompoundingDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::AutoCompoundingDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::BottomDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::BottomDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::Total` (r:1 w:1) - /// Proof: `ParachainStaking::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::TopDelegations` (r:1 w:1) - /// Proof: `ParachainStaking::TopDelegations` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainStaking::CandidatePool` (r:1 w:1) - /// Proof: `ParachainStaking::CandidatePool` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `x` is `[0, 1200]`. - /// The range of component `y` is `[0, 1200]`. - /// The range of component `z` is `[0, 100]`. - fn delegate_with_auto_compound(x: u32, y: u32, z: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + x * (81 ±0) + y * (33 ±0) + z * (55 ±0)` - // Estimated: `21773 + x * (82 ±0) + y * (31 ±0) + z * (29 ±0)` - // Minimum execution time: 89_451_000 picoseconds. - Weight::from_parts(95_607_000, 0) - .saturating_add(Weight::from_parts(0, 21773)) - // Standard Error: 1_809 - .saturating_add(Weight::from_parts(50_247, 0).saturating_mul(x.into())) - // Standard Error: 1_809 - .saturating_add(Weight::from_parts(61_589, 0).saturating_mul(y.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(7)) - .saturating_add(Weight::from_parts(0, 82).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 31).saturating_mul(y.into())) - .saturating_add(Weight::from_parts(0, 29).saturating_mul(z.into())) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_preimage.rs b/parachain/runtime/rococo/src/weights/pallet_preimage.rs deleted file mode 100644 index c34bc1508f..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_preimage.rs +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_preimage` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_preimage -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_preimage.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_preimage`. -pub struct WeightInfo(PhantomData); -impl pallet_preimage::WeightInfo for WeightInfo { - /// 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 note_preimage(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `177` - // Estimated: `3556` - // Minimum execution time: 28_776_000 picoseconds. - Weight::from_parts(29_081_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(3_231, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// 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 note_requested_preimage(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3556` - // Minimum execution time: 15_682_000 picoseconds. - Weight::from_parts(16_044_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 11 - .saturating_add(Weight::from_parts(3_369, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// 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 note_no_deposit_preimage(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3556` - // Minimum execution time: 14_685_000 picoseconds. - Weight::from_parts(14_901_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 9 - .saturating_add(Weight::from_parts(3_386, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// 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`) - fn unnote_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `323` - // Estimated: `3556` - // Minimum execution time: 50_875_000 picoseconds. - Weight::from_parts(57_436_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// 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`) - fn unnote_no_deposit_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `3556` - // Minimum execution time: 33_855_000 picoseconds. - Weight::from_parts(39_934_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Preimage::StatusFor` (r:1 w:1) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - fn request_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `222` - // Estimated: `3556` - // Minimum execution time: 29_810_000 picoseconds. - Weight::from_parts(36_615_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Preimage::StatusFor` (r:1 w:1) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - fn request_no_deposit_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `3556` - // Minimum execution time: 19_068_000 picoseconds. - Weight::from_parts(23_875_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Preimage::StatusFor` (r:1 w:1) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - fn request_unnoted_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `3556` - // Minimum execution time: 18_539_000 picoseconds. - Weight::from_parts(23_207_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Preimage::StatusFor` (r:1 w:1) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - fn request_requested_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3556` - // Minimum execution time: 10_579_000 picoseconds. - Weight::from_parts(11_917_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// 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`) - fn unrequest_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `3556` - // Minimum execution time: 31_098_000 picoseconds. - Weight::from_parts(38_182_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Preimage::StatusFor` (r:1 w:1) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - fn unrequest_unnoted_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3556` - // Minimum execution time: 11_423_000 picoseconds. - Weight::from_parts(13_067_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Preimage::StatusFor` (r:1 w:1) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - fn unrequest_multi_referenced_preimage() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3556` - // Minimum execution time: 10_892_000 picoseconds. - Weight::from_parts(12_065_000, 0) - .saturating_add(Weight::from_parts(0, 3556)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_proxy.rs b/parachain/runtime/rococo/src/weights/pallet_proxy.rs deleted file mode 100644 index 8b3aac0722..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_proxy.rs +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_proxy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_proxy -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_proxy.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_proxy`. -pub struct WeightInfo(PhantomData); -impl pallet_proxy::WeightInfo for WeightInfo { - /// Storage: `Proxy::Proxies` (r:1 w:0) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn proxy(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `227 + p * (37 ±0)` - // Estimated: `4706` - // Minimum execution time: 14_852_000 picoseconds. - Weight::from_parts(15_496_268, 0) - .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 3_760 - .saturating_add(Weight::from_parts(61_031, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Proxy::Proxies` (r:1 w:0) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn proxy_announced(a: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `517 + a * (68 ±0) + p * (37 ±0)` - // Estimated: `5698` - // Minimum execution time: 36_109_000 picoseconds. - Weight::from_parts(40_625_859, 0) - .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 12_274 - .saturating_add(Weight::from_parts(63_550, 0).saturating_mul(a.into())) - // Standard Error: 12_690 - .saturating_add(Weight::from_parts(22_123, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `432 + a * (68 ±0)` - // Estimated: `5698` - // Minimum execution time: 23_471_000 picoseconds. - Weight::from_parts(24_712_512, 0) - .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 6_956 - .saturating_add(Weight::from_parts(142_549, 0).saturating_mul(a.into())) - // Standard Error: 7_192 - .saturating_add(Weight::from_parts(10_000, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, _p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `432 + a * (68 ±0)` - // Estimated: `5698` - // Minimum execution time: 23_177_000 picoseconds. - Weight::from_parts(26_786_710, 0) - .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 6_878 - .saturating_add(Weight::from_parts(74_968, 0).saturating_mul(a.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Proxy::Proxies` (r:1 w:0) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) - /// Storage: `Proxy::Announcements` (r:1 w:1) - /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `449 + a * (68 ±0) + p * (37 ±0)` - // Estimated: `5698` - // Minimum execution time: 31_607_000 picoseconds. - Weight::from_parts(32_110_068, 0) - .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 5_438 - .saturating_add(Weight::from_parts(166_689, 0).saturating_mul(a.into())) - // Standard Error: 5_623 - .saturating_add(Weight::from_parts(57_727, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn add_proxy(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `227 + p * (37 ±0)` - // Estimated: `4706` - // Minimum execution time: 23_415_000 picoseconds. - Weight::from_parts(24_296_550, 0) - .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 3_820 - .saturating_add(Weight::from_parts(65_159, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn remove_proxy(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `227 + p * (37 ±0)` - // Estimated: `4706` - // Minimum execution time: 23_627_000 picoseconds. - Weight::from_parts(24_584_721, 0) - .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 2_510 - .saturating_add(Weight::from_parts(79_889, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn remove_proxies(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `227 + p * (37 ±0)` - // Estimated: `4706` - // Minimum execution time: 20_903_000 picoseconds. - Weight::from_parts(21_695_859, 0) - .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 2_780 - .saturating_add(Weight::from_parts(68_100, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) - /// The range of component `p` is `[1, 31]`. - fn create_pure(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `239` - // Estimated: `4706` - // Minimum execution time: 24_812_000 picoseconds. - Weight::from_parts(26_101_401, 0) - .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 2_911 - .saturating_add(Weight::from_parts(25_085, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Proxy::Proxies` (r:1 w:1) - /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) - /// The range of component `p` is `[0, 30]`. - fn kill_pure(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `264 + p * (37 ±0)` - // Estimated: `4706` - // Minimum execution time: 21_522_000 picoseconds. - Weight::from_parts(22_686_604, 0) - .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 6_847 - .saturating_add(Weight::from_parts(65_146, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_scheduler.rs b/parachain/runtime/rococo/src/weights/pallet_scheduler.rs deleted file mode 100644 index 3e81d948a2..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_scheduler.rs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_scheduler` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_scheduler -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_scheduler.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_scheduler`. -pub struct WeightInfo(PhantomData); -impl pallet_scheduler::WeightInfo for WeightInfo { - /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) - /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - fn service_agendas_base() -> Weight { - // Proof Size summary in bytes: - // Measured: `31` - // Estimated: `1489` - // Minimum execution time: 3_869_000 picoseconds. - Weight::from_parts(4_010_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Scheduler::Agenda` (r:1 w:1) - /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) - /// The range of component `s` is `[0, 50]`. - fn service_agenda_base(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `78 + s * (177 ±0)` - // Estimated: `42428` - // Minimum execution time: 3_440_000 picoseconds. - Weight::from_parts(5_369_165, 0) - .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 3_419 - .saturating_add(Weight::from_parts(818_093, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn service_task_base() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_651_000 picoseconds. - Weight::from_parts(5_887_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `Preimage::PreimageFor` (r:1 w:1) - /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) - /// Storage: `Preimage::StatusFor` (r:1 w:1) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) - /// The range of component `s` is `[128, 4194304]`. - fn service_task_fetched(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `213 + s * (1 ±0)` - // Estimated: `3677 + s * (1 ±0)` - // Minimum execution time: 19_927_000 picoseconds. - Weight::from_parts(20_384_000, 0) - .saturating_add(Weight::from_parts(0, 3677)) - // Standard Error: 19 - .saturating_add(Weight::from_parts(1_763, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) - } - /// Storage: `Scheduler::Lookup` (r:0 w:1) - /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn service_task_named() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_855_000 picoseconds. - Weight::from_parts(7_307_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn service_task_periodic() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_769_000 picoseconds. - Weight::from_parts(6_026_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn execute_dispatch_signed() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_738_000 picoseconds. - Weight::from_parts(2_845_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn execute_dispatch_unsigned() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_722_000 picoseconds. - Weight::from_parts(2_850_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `Scheduler::Agenda` (r:1 w:1) - /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) - /// The range of component `s` is `[0, 49]`. - fn schedule(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `78 + s * (177 ±0)` - // Estimated: `42428` - // Minimum execution time: 11_643_000 picoseconds. - Weight::from_parts(14_146_402, 0) - .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 4_946 - .saturating_add(Weight::from_parts(869_859, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Scheduler::Agenda` (r:1 w:1) - /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) - /// Storage: `Scheduler::Lookup` (r:0 w:1) - /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - /// The range of component `s` is `[1, 50]`. - fn cancel(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `78 + s * (177 ±0)` - // Estimated: `42428` - // Minimum execution time: 16_273_000 picoseconds. - Weight::from_parts(14_733_434, 0) - .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 8_832 - .saturating_add(Weight::from_parts(1_568_387, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Scheduler::Lookup` (r:1 w:1) - /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - /// Storage: `Scheduler::Agenda` (r:1 w:1) - /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) - /// The range of component `s` is `[0, 49]`. - fn schedule_named(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `230 + s * (186 ±0)` - // Estimated: `42428` - // Minimum execution time: 15_357_000 picoseconds. - Weight::from_parts(20_257_339, 0) - .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 8_159 - .saturating_add(Weight::from_parts(854_396, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Scheduler::Lookup` (r:1 w:1) - /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - /// Storage: `Scheduler::Agenda` (r:1 w:1) - /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) - /// The range of component `s` is `[1, 50]`. - fn cancel_named(s: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `282 + s * (185 ±0)` - // Estimated: `42428` - // Minimum execution time: 18_198_000 picoseconds. - Weight::from_parts(17_254_480, 0) - .saturating_add(Weight::from_parts(0, 42428)) - // Standard Error: 8_061 - .saturating_add(Weight::from_parts(1_591_237, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_session.rs b/parachain/runtime/rococo/src/weights/pallet_session.rs deleted file mode 100644 index bbe6be4004..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_session.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_session` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_session -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_session.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_session`. -pub struct WeightInfo(PhantomData); -impl pallet_session::WeightInfo for WeightInfo { - /// Storage: `Session::NextKeys` (r:1 w:1) - /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Session::KeyOwner` (r:1 w:1) - /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn set_keys() -> Weight { - // Proof Size summary in bytes: - // Measured: `271` - // Estimated: `3736` - // Minimum execution time: 15_933_000 picoseconds. - Weight::from_parts(16_633_000, 0) - .saturating_add(Weight::from_parts(0, 3736)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Session::NextKeys` (r:1 w:1) - /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Session::KeyOwner` (r:0 w:1) - /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn purge_keys() -> Weight { - // Proof Size summary in bytes: - // Measured: `243` - // Estimated: `3708` - // Minimum execution time: 11_374_000 picoseconds. - Weight::from_parts(11_780_000, 0) - .saturating_add(Weight::from_parts(0, 3708)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_teebag.rs b/parachain/runtime/rococo/src/weights/pallet_teebag.rs deleted file mode 100644 index ba98905fc2..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_teebag.rs +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_teebag` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-11-06, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_teebag -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_teebag.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_teebag`. -pub struct WeightInfo(PhantomData); -impl pallet_teebag::WeightInfo for WeightInfo { - /// Storage: `Teebag::Mode` (r:1 w:0) - /// Proof: `Teebag::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:1) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:1) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn force_add_enclave() -> Weight { - // Proof Size summary in bytes: - // Measured: `260` - // Estimated: `3725` - // Minimum execution time: 31_807_000 picoseconds. - Weight::from_parts(32_414_000, 0) - .saturating_add(Weight::from_parts(0, 3725)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:1) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:1) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn force_remove_enclave() -> Weight { - // Proof Size summary in bytes: - // Measured: `541` - // Estimated: `4006` - // Minimum execution time: 34_010_000 picoseconds. - Weight::from_parts(34_836_000, 0) - .saturating_add(Weight::from_parts(0, 4006)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:4 w:3) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:1) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn force_remove_enclave_by_mrenclave() -> Weight { - // Proof Size summary in bytes: - // Measured: `720` - // Estimated: `11610` - // Minimum execution time: 81_080_000 picoseconds. - Weight::from_parts(82_708_000, 0) - .saturating_add(Weight::from_parts(0, 11610)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:4 w:3) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:1) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn force_remove_enclave_by_worker_type() -> Weight { - // Proof Size summary in bytes: - // Measured: `720` - // Estimated: `11610` - // Minimum execution time: 81_657_000 picoseconds. - Weight::from_parts(83_065_000, 0) - .saturating_add(Weight::from_parts(0, 11610)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `Teebag::AuthorizedEnclave` (r:1 w:1) - /// Proof: `Teebag::AuthorizedEnclave` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn force_add_authorized_enclave() -> Weight { - // Proof Size summary in bytes: - // Measured: `383` - // Estimated: `3848` - // Minimum execution time: 23_807_000 picoseconds. - Weight::from_parts(24_668_000, 0) - .saturating_add(Weight::from_parts(0, 3848)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Teebag::AuthorizedEnclave` (r:1 w:1) - /// Proof: `Teebag::AuthorizedEnclave` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn force_remove_authorized_enclave() -> Weight { - // Proof Size summary in bytes: - // Measured: `415` - // Estimated: `3880` - // Minimum execution time: 34_089_000 picoseconds. - Weight::from_parts(34_763_000, 0) - .saturating_add(Weight::from_parts(0, 3880)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Teebag::Mode` (r:1 w:0) - /// Proof: `Teebag::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::AuthorizedEnclave` (r:1 w:1) - /// Proof: `Teebag::AuthorizedEnclave` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:1) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:1) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn register_enclave_with_ias_attestation() -> Weight { - // Proof Size summary in bytes: - // Measured: `427` - // Estimated: `3892` - // Minimum execution time: 2_568_908_000 picoseconds. - Weight::from_parts(2_588_802_000, 0) - .saturating_add(Weight::from_parts(0, 3892)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Teebag::QuotingEnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::QuotingEnclaveRegistry` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::TcbInfo` (r:1 w:0) - /// Proof: `Teebag::TcbInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::Mode` (r:1 w:0) - /// Proof: `Teebag::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::AuthorizedEnclave` (r:1 w:1) - /// Proof: `Teebag::AuthorizedEnclave` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:1) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:1) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn register_enclave_with_dcap_attestation() -> Weight { - // Proof Size summary in bytes: - // Measured: `644` - // Estimated: `4109` - // Minimum execution time: 4_625_715_000 picoseconds. - Weight::from_parts(4_634_541_000, 0) - .saturating_add(Weight::from_parts(0, 4109)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:1) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:1) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn unregister_enclave() -> Weight { - // Proof Size summary in bytes: - // Measured: `458` - // Estimated: `3923` - // Minimum execution time: 35_219_000 picoseconds. - Weight::from_parts(36_165_000, 0) - .saturating_add(Weight::from_parts(0, 3923)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Teebag::QuotingEnclaveRegistry` (r:0 w:1) - /// Proof: `Teebag::QuotingEnclaveRegistry` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn register_quoting_enclave() -> Weight { - // Proof Size summary in bytes: - // Measured: `94` - // Estimated: `1493` - // Minimum execution time: 2_295_770_000 picoseconds. - Weight::from_parts(2_323_268_000, 0) - .saturating_add(Weight::from_parts(0, 1493)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Teebag::TcbInfo` (r:0 w:1) - /// Proof: `Teebag::TcbInfo` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn register_tcb_info() -> Weight { - // Proof Size summary in bytes: - // Measured: `94` - // Estimated: `1493` - // Minimum execution time: 2_508_790_000 picoseconds. - Weight::from_parts(2_531_884_000, 0) - .saturating_add(Weight::from_parts(0, 1493)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn post_opaque_task() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 14_005_000 picoseconds. - Weight::from_parts(14_320_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - fn parentchain_block_processed() -> Weight { - // Proof Size summary in bytes: - // Measured: `407` - // Estimated: `3872` - // Minimum execution time: 29_279_000 picoseconds. - Weight::from_parts(30_218_000, 0) - .saturating_add(Weight::from_parts(0, 3872)) - .saturating_add(T::DbWeight::get().reads(2)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Timestamp::Now` (r:1 w:0) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:0) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::SidechainBlockFinalizationCandidate` (r:1 w:1) - /// Proof: `Teebag::SidechainBlockFinalizationCandidate` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Teebag::LatestSidechainBlockConfirmation` (r:0 w:1) - /// Proof: `Teebag::LatestSidechainBlockConfirmation` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn sidechain_block_imported() -> Weight { - // Proof Size summary in bytes: - // Measured: `528` - // Estimated: `3993` - // Minimum execution time: 43_786_000 picoseconds. - Weight::from_parts(44_672_000, 0) - .saturating_add(Weight::from_parts(0, 3993)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Teebag::EnclaveIdentifier` (r:1 w:1) - /// Proof: `Teebag::EnclaveIdentifier` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn add_enclave_identifier() -> Weight { - // Proof Size summary in bytes: - // Measured: `213` - // Estimated: `3678` - // Minimum execution time: 12_267_000 picoseconds. - Weight::from_parts(12_894_000, 0) - .saturating_add(Weight::from_parts(0, 3678)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_timestamp.rs b/parachain/runtime/rococo/src/weights/pallet_timestamp.rs deleted file mode 100644 index 323233f684..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_timestamp.rs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_timestamp` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_timestamp -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_timestamp.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_timestamp`. -pub struct WeightInfo(PhantomData); -impl pallet_timestamp::WeightInfo for WeightInfo { - /// Storage: `Timestamp::Now` (r:1 w:1) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - fn set() -> Weight { - // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `1493` - // Minimum execution time: 6_526_000 picoseconds. - Weight::from_parts(6_951_000, 0) - .saturating_add(Weight::from_parts(0, 1493)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn on_finalize() -> Weight { - // Proof Size summary in bytes: - // Measured: `94` - // Estimated: `0` - // Minimum execution time: 4_045_000 picoseconds. - Weight::from_parts(4_268_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_treasury.rs b/parachain/runtime/rococo/src/weights/pallet_treasury.rs deleted file mode 100644 index 69feb64575..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_treasury.rs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_treasury` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_treasury -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_treasury.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_treasury`. -pub struct WeightInfo(PhantomData); -impl pallet_treasury::WeightInfo for WeightInfo { - /// Storage: `Treasury::ProposalCount` (r:1 w:1) - /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Approvals` (r:1 w:1) - /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Proposals` (r:0 w:1) - /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - fn spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `1887` - // Minimum execution time: 15_111_000 picoseconds. - Weight::from_parts(15_455_000, 0) - .saturating_add(Weight::from_parts(0, 1887)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Treasury::ProposalCount` (r:1 w:1) - /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Proposals` (r:0 w:1) - /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - fn propose_spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `181` - // Estimated: `1489` - // Minimum execution time: 27_711_000 picoseconds. - Weight::from_parts(28_843_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Treasury::Proposals` (r:1 w:1) - /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn reject_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `442` - // Estimated: `6196` - // Minimum execution time: 43_181_000 picoseconds. - Weight::from_parts(44_547_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Treasury::Proposals` (r:1 w:0) - /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Approvals` (r:1 w:1) - /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - /// The range of component `p` is `[0, 99]`. - fn approve_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `486 + p * (9 ±0)` - // Estimated: `3573` - // Minimum execution time: 9_814_000 picoseconds. - Weight::from_parts(12_878_486, 0) - .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 1_792 - .saturating_add(Weight::from_parts(107_787, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Treasury::Approvals` (r:1 w:1) - /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - fn remove_approval() -> Weight { - // Proof Size summary in bytes: - // Measured: `165` - // Estimated: `1887` - // Minimum execution time: 7_677_000 picoseconds. - Weight::from_parts(7_922_000, 0) - .saturating_add(Weight::from_parts(0, 1887)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:201 w:201) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Deactivated` (r:1 w:1) - /// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Approvals` (r:1 w:1) - /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Proposals` (r:100 w:100) - /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - /// Storage: `Bounties::BountyApprovals` (r:1 w:1) - /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) - /// The range of component `p` is `[0, 100]`. - fn on_initialize_proposals(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `149 + p * (252 ±0)` - // Estimated: `3593 + p * (5206 ±0)` - // Minimum execution time: 31_474_000 picoseconds. - Weight::from_parts(32_241_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 222_050 - .saturating_add(Weight::from_parts(53_985_901, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 5206).saturating_mul(p.into())) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_utility.rs b/parachain/runtime/rococo/src/weights/pallet_utility.rs deleted file mode 100644 index 2426e338cc..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_utility.rs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_utility` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_utility -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_utility.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_utility`. -pub struct WeightInfo(PhantomData); -impl pallet_utility::WeightInfo for WeightInfo { - /// The range of component `c` is `[0, 1000]`. - fn batch(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_462_000 picoseconds. - Weight::from_parts(6_692_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 21_648 - .saturating_add(Weight::from_parts(6_706_710, 0).saturating_mul(c.into())) - } - fn as_derivative() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_500_000 picoseconds. - Weight::from_parts(4_824_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// The range of component `c` is `[0, 1000]`. - fn batch_all(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_600_000 picoseconds. - Weight::from_parts(7_067_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 21_698 - .saturating_add(Weight::from_parts(6_985_924, 0).saturating_mul(c.into())) - } - fn dispatch_as() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 8_567_000 picoseconds. - Weight::from_parts(9_046_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - /// The range of component `c` is `[0, 1000]`. - fn force_batch(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 6_552_000 picoseconds. - Weight::from_parts(6_747_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 22_937 - .saturating_add(Weight::from_parts(6_700_953, 0).saturating_mul(c.into())) - } -} diff --git a/parachain/runtime/rococo/src/weights/pallet_vc_management.rs b/parachain/runtime/rococo/src/weights/pallet_vc_management.rs deleted file mode 100644 index 3c9323f0c2..0000000000 --- a/parachain/runtime/rococo/src/weights/pallet_vc_management.rs +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . - -//! Autogenerated weights for `pallet_vc_management` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-08-28, STEPS: `20`, REPEAT: `50`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `litentry-benchmark-server`, CPU: `Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 20 - -// Executed Command: -// ./litentry-collator -// benchmark -// pallet -// --chain=rococo-dev -// --execution=wasm -// --db-cache=20 -// --wasm-execution=compiled -// --pallet=pallet_vc_management -// --extrinsic=* -// --heap-pages=4096 -// --steps=20 -// --repeat=50 -// --header=./LICENSE_HEADER -// --output=./runtime/rococo/src/weights/pallet_vc_management.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_vc_management`. -pub struct WeightInfo(PhantomData); -impl pallet_vc_management::WeightInfo for WeightInfo { - /// Storage: `VCManagement::Delegatee` (r:0 w:1) - /// Proof: `VCManagement::Delegatee` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn add_delegatee() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 8_151_000 picoseconds. - Weight::from_parts(8_591_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `VCManagement::Delegatee` (r:1 w:1) - /// Proof: `VCManagement::Delegatee` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) - fn remove_delegatee() -> Weight { - // Proof Size summary in bytes: - // Measured: `113` - // Estimated: `3513` - // Minimum execution time: 12_524_000 picoseconds. - Weight::from_parts(12_831_000, 0) - .saturating_add(Weight::from_parts(0, 3513)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `VCMPExtrinsicWhitelist::GroupControlOn` (r:1 w:0) - /// Proof: `VCMPExtrinsicWhitelist::GroupControlOn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn request_vc() -> Weight { - // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `1491` - // Minimum execution time: 9_407_000 picoseconds. - Weight::from_parts(9_800_000, 0) - .saturating_add(Weight::from_parts(0, 1491)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn vc_issued() -> Weight { - // Proof Size summary in bytes: - // Measured: `347` - // Estimated: `3812` - // Minimum execution time: 12_659_000 picoseconds. - Weight::from_parts(13_134_000, 0) - .saturating_add(Weight::from_parts(0, 3812)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Teebag::EnclaveRegistry` (r:1 w:0) - /// Proof: `Teebag::EnclaveRegistry` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn some_error() -> Weight { - // Proof Size summary in bytes: - // Measured: `347` - // Estimated: `3812` - // Minimum execution time: 12_419_000 picoseconds. - Weight::from_parts(12_933_000, 0) - .saturating_add(Weight::from_parts(0, 3812)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `VCManagement::Admin` (r:1 w:1) - /// Proof: `VCManagement::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - fn set_admin() -> Weight { - // Proof Size summary in bytes: - // Measured: `61` - // Estimated: `1517` - // Minimum execution time: 10_226_000 picoseconds. - Weight::from_parts(10_824_000, 0) - .saturating_add(Weight::from_parts(0, 1517)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `VCManagement::Admin` (r:1 w:0) - /// Proof: `VCManagement::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `VCManagement::SchemaRegistryIndex` (r:1 w:1) - /// Proof: `VCManagement::SchemaRegistryIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `VCManagement::SchemaRegistry` (r:0 w:1) - /// Proof: `VCManagement::SchemaRegistry` (`max_values`: None, `max_size`: Some(2621), added: 5096, mode: `MaxEncodedLen`) - fn add_schema() -> Weight { - // Proof Size summary in bytes: - // Measured: `61` - // Estimated: `1517` - // Minimum execution time: 13_987_000 picoseconds. - Weight::from_parts(14_507_000, 0) - .saturating_add(Weight::from_parts(0, 1517)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `VCManagement::Admin` (r:1 w:0) - /// Proof: `VCManagement::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `VCManagement::SchemaRegistry` (r:1 w:1) - /// Proof: `VCManagement::SchemaRegistry` (`max_values`: None, `max_size`: Some(2621), added: 5096, mode: `MaxEncodedLen`) - fn disable_schema() -> Weight { - // Proof Size summary in bytes: - // Measured: `179` - // Estimated: `6086` - // Minimum execution time: 14_696_000 picoseconds. - Weight::from_parts(15_262_000, 0) - .saturating_add(Weight::from_parts(0, 6086)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `VCManagement::Admin` (r:1 w:0) - /// Proof: `VCManagement::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `VCManagement::SchemaRegistry` (r:1 w:1) - /// Proof: `VCManagement::SchemaRegistry` (`max_values`: None, `max_size`: Some(2621), added: 5096, mode: `MaxEncodedLen`) - fn activate_schema() -> Weight { - // Proof Size summary in bytes: - // Measured: `179` - // Estimated: `6086` - // Minimum execution time: 14_553_000 picoseconds. - Weight::from_parts(15_289_000, 0) - .saturating_add(Weight::from_parts(0, 6086)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `VCManagement::Admin` (r:1 w:0) - /// Proof: `VCManagement::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `VCManagement::SchemaRegistry` (r:1 w:1) - /// Proof: `VCManagement::SchemaRegistry` (`max_values`: None, `max_size`: Some(2621), added: 5096, mode: `MaxEncodedLen`) - fn revoke_schema() -> Weight { - // Proof Size summary in bytes: - // Measured: `179` - // Estimated: `6086` - // Minimum execution time: 15_129_000 picoseconds. - Weight::from_parts(15_648_000, 0) - .saturating_add(Weight::from_parts(0, 6086)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/parachain/runtime/rococo/src/xcm_config.rs b/parachain/runtime/rococo/src/xcm_config.rs deleted file mode 100644 index fe014fbbda..0000000000 --- a/parachain/runtime/rococo/src/xcm_config.rs +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry 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. -// -// Litentry 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 Litentry. If not, see . -#![allow(clippy::clone_on_copy)] -#![allow(clippy::useless_conversion)] - -// use frame_system::RawOrigin as SystemRawOrigin; -// use pallet_collective::RawOrigin as CollectiveRawOrigin; -use frame_support::{ - match_types, - pallet_prelude::ConstU32, - parameter_types, - traits::{Everything, Nothing}, - weights::ConstantMultiplier, - PalletId, -}; -use frame_system::EnsureRoot; -use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; -use pallet_xcm::XcmPassthrough; -use polkadot_parachain_primitives::primitives::Sibling; -use xcm_builder::{ConvertedConcreteId, NoChecking}; -// Litentry: The CheckAccount implementation is forced by the bug of FungiblesAdapter. -// We should replace () regarding fake_pallet_id account after our PR passed. -use core_primitives::{AccountId, Weight}; -use runtime_common::xcm_impl::{ - AccountIdToMultiLocation, AssetIdMultiLocationConvert, CurrencyId, - CurrencyIdMultiLocationConvert, FirstAssetTrader, MultiNativeAsset, NewAnchoringSelfReserve, - OldAnchoringSelfReserve, XcmFeesToAccount, -}; - -use runtime_common::WEIGHT_TO_FEE_FACTOR; -use sp_runtime::traits::AccountIdConversion; -use xcm::latest::prelude::*; -use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, -}; -use xcm_executor::{traits::JustTry, XcmExecutor}; - -#[cfg(test)] -use crate::tests::setup::ParachainXcmRouter; - -use super::{ - AllPalletsWithSystem, AssetId, AssetManager, Assets, Balance, Balances, DealWithFees, - ParachainInfo, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Treasury, -}; -#[cfg(not(test))] -use super::{ParachainSystem, XcmpQueue}; - -parameter_types! { - pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: Option = None; - pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); -} - -/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used -/// when determining ownership of accounts for asset transacting and when attempting to use XCM -/// `Transact` in order to determine the dispatch Origin. -pub type LocationToAccountId = ( - // The parent (Relay-chain) origin converts to the parent `AccountId`. - ParentIsPreset, - // Sibling parachain origins convert to AccountId via the `ParaId::into`. - SiblingParachainConvertsVia, - // Straight up local `AccountId32` origins just alias directly to `AccountId`. - AccountId32Aliases, -); - -/// Means for transacting self reserve assets on this chain. -pub type LocalAssetTransactor = CurrencyAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - (IsConcrete>, IsConcrete>), - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: - LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We don't track any teleports. - (), ->; - -parameter_types! { - pub const TempPalletId: PalletId = PalletId(*b"py/tempA"); - pub TempAccount: AccountId = TempPalletId::get().into_account_truncating(); -} -// The non-reserve fungible transactor type -// It will use pallet_assets, and the Id will be CurrencyId::ParachainReserve(MultiLocation) -pub type ForeignFungiblesTransactor = FungiblesAdapter< - // Use this fungibles implementation - Assets, - // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId, JustTry>, - // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: - LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We dont allow teleports. - NoChecking, - // We dont track any teleports - TempAccount, ->; - -// The XCM transaction handlers for different type of assets. -pub type AssetTransactors = ( - // SelfReserve asset, both pre and post 0.9.16 - LocalAssetTransactor, - // // Foreign assets (non native minted token crossed from remote chain) - ForeignFungiblesTransactor, -); - -/// Litentry: As our current XcmRouter (which used for receiving remote XCM message and call -/// XcmExecutor to handle) will force the origin to remoteChain sovereign account, this -/// XcmOriginToTransactDispatchOrigin implementation is not that useful. This is the type we use to -/// convert an (incoming) XCM origin into a local `Origin` instance, ready for dispatching a -/// transaction with Xcm's `Transact`. There is an `OriginKind` which can biases the kind of local -/// `Origin` it will become. -pub type XcmOriginToTransactDispatchOrigin = ( - // Sovereign account converter; this attempts to derive an `AccountId` from the origin location - // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for - // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, - // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when - // recognized. - RelayChainAsNative, - // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognized. - SiblingParachainAsNative, - // Native signed account converter; this just converts an `AccountId32` origin into a normal - // `Origin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, - // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, -); - -parameter_types! { - // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - // How much we charge for XCM from remote chain per XCM command. - pub UnitWeightCost: Weight = Weight::from_parts(200_000_000u64, 0); - pub const MaxInstructions: u32 = 100; -} - -match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { - MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } - }; -} - -pub type Barriers = ( - TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - AllowUnpaidExecutionFrom, - // ^^^ Parent and its exec plurality get free execution -); - -parameter_types! { - /// Xcm fees will go to the treasury account - pub XcmFeesAccount: AccountId = Treasury::account_id(); - pub const MaxAssetsIntoHolding: u32 = 64; - pub const WeightToFeeFactor: Balance = WEIGHT_TO_FEE_FACTOR; // 10^6 -} - -pub type Traders = ( - UsingComponents< - ConstantMultiplier, - NewAnchoringSelfReserve, - AccountId, - Balances, - DealWithFees, - >, - UsingComponents< - ConstantMultiplier, - OldAnchoringSelfReserve, - AccountId, - Balances, - DealWithFees, - >, - // TODO::Implement foreign asset fee to weight rule from AssetManager Setting; Need more test - FirstAssetTrader< - CurrencyId, - AssetManager, - XcmFeesToAccount< - Assets, - ConvertedConcreteId, JustTry>, - AccountId, - XcmFeesAccount, - >, - >, -); - -/// Xcm Weigher shared between multiple Xcm-related configs. -pub type XcmWeigher = FixedWeightBounds; - -pub struct XcmConfig; -impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = XcmRouter; - // How to withdraw and deposit an asset. - type AssetTransactor = AssetTransactors; - type OriginConverter = XcmOriginToTransactDispatchOrigin; - // Only Allow chains to handle their own reserve assets crossed on local chain whatever way they - // want. - type IsReserve = MultiNativeAsset; - type IsTeleporter = (); // Teleporting is disabled. - type UniversalLocation = UniversalLocation; - type Barrier = Barriers; - type Weigher = XcmWeigher; - // Litentry: This is the tool used for calculating that inside XcmExecutor vm, how to transfer - // asset into weight fee. Usually this is in order to fulfull Barrier - // AllowTopLevelPaidExecutionFrom requirement. Currently we have not implement the asset to fee - // rule for Foreign Asset, so pure cross chain transfer from XCM parachain will be rejected no - // matter. - type Trader = Traders; - type ResponseHandler = PolkadotXcm; - type AssetTrap = PolkadotXcm; - type AssetClaims = PolkadotXcm; - type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type AssetLocker = (); - type AssetExchanger = (); - type FeeManager = (); - type MessageExporter = (); - type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; - type SafeCallFilter = Everything; - type Aliasers = (); -} - -/// No local origins on this chain are allowed to dispatch XCM sends/executions. -pub type LocalOriginToLocation = SignedToAccountId32; - -#[cfg(test)] -/// The mimic XcmRouter which only change storage locally for Xcm to digest. -/// XCM router for parachain. -pub type XcmRouter = ParachainXcmRouter; -#[cfg(not(test))] -/// The means for routing XCM messages which are not for local execution into the right message -/// queues. -pub type XcmRouter = ( - // Two routers - use UMP to communicate with the relay chain: - // We use PolkadotXcm to confirm the XCM Version; Use () instead if pass anyway - cumulus_primitives_utility::ParentAsUmp, - // ..and XCMP to communicate with the sibling chains. - XcmpQueue, -); - -match_types! { - pub type ParentOrParachains: impl Contains = { - // Local account: Rococo - MultiLocation { parents: 0, interior: X1(Junction::AccountId32 { .. }) } | - // Relay-chain account: Rococo - MultiLocation { parents: 1, interior: X1(Junction::AccountId32 { .. }) } | - // AccountKey20 based parachain: Moonriver - MultiLocation { parents: 1, interior: X2(Parachain( .. ), Junction::AccountKey20 { .. }) } | - // AccountId 32 based parachain: Statemint - MultiLocation { parents: 1, interior: X2(Parachain( .. ), Junction::AccountId32 { .. }) } - }; -} - -parameter_type_with_key! { - pub ParachainMinFee: |_location: MultiLocation| -> Option { - // Always return `None` to disallow using fee asset and target asset with different reserve chains - None - }; -} - -parameter_types! { - pub SelfLocation: MultiLocation = MultiLocation { - parents:1, - interior: Junctions::X1( - Parachain(ParachainInfo::parachain_id().into()) - ) - }; - pub const BaseXcmWeight: Weight = Weight::from_parts(100_000_000u64, 0); - pub const MaxAssetsForTransfer: usize = 3; -} - -#[cfg(feature = "runtime-benchmarks")] -parameter_types! { - pub ReachableDest: Option = Some(Parent.into()); -} - -impl pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = EnsureXcmOrigin; - type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; - type XcmExecuteFilter = Nothing; - // ^ Disable dispatchable execute on the XCM pallet. - // Needs to be `Everything` for local testing. - type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Nothing; - // This filter here defines what is allowed for XcmExecutor to handle with TransferReserveAsset - // Rule. - type XcmReserveTransferFilter = Everything; - type Weigher = XcmWeigher; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - // ^ Override for AdvertisedXcmVersion default - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = LocationToAccountId; - type MaxLockers = ConstU32<8>; - type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; - type AdminOrigin = EnsureRoot; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); -} - -impl cumulus_pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; -} - -impl orml_xtokens::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Balance = Balance; - type CurrencyId = CurrencyId; - type AccountIdToMultiLocation = AccountIdToMultiLocation; - type CurrencyIdConvert = CurrencyIdMultiLocationConvert; - type XcmExecutor = XcmExecutor; - type SelfLocation = SelfLocation; - type MultiLocationsFilter = ParentOrParachains; - type MinXcmFee = ParachainMinFee; - type Weigher = XcmWeigher; - type BaseXcmWeight = BaseXcmWeight; - type UniversalLocation = UniversalLocation; - type MaxAssetsForTransfer = MaxAssetsForTransfer; - type ReserveProvider = AbsoluteReserveProvider; -} diff --git a/parachain/rust-toolchain.toml b/parachain/rust-toolchain.toml index 46b0a7632c..a521319151 100644 --- a/parachain/rust-toolchain.toml +++ b/parachain/rust-toolchain.toml @@ -1,8 +1,4 @@ [toolchain] -channel = "1.78.0" -components = [ - "clippy", - "rust-src", - "rustfmt", -] +channel = "1.81.0" +components = ["rust-src", "rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"] \ No newline at end of file diff --git a/parachain/scripts/benchmark-weight-local.sh b/parachain/scripts/benchmark-weight-local.sh index b0ac6e4915..5ba85509c3 100755 --- a/parachain/scripts/benchmark-weight-local.sh +++ b/parachain/scripts/benchmark-weight-local.sh @@ -10,7 +10,7 @@ set -eo pipefail # The `litentry-collator` binary must be compiled with `runtime-benchmarks` feature. function usage() { - echo "Usage: $0 litentry|rococo pallet-name runtime|pallet" + echo "Usage: $0 litentry|paseo pallet-name runtime|pallet" } [ $# -ne 3 ] && (usage; exit 1) diff --git a/parachain/scripts/benchmark-weight-remote.sh b/parachain/scripts/benchmark-weight-remote.sh index aa87c9ef15..4faf62d59c 100755 --- a/parachain/scripts/benchmark-weight-remote.sh +++ b/parachain/scripts/benchmark-weight-remote.sh @@ -8,7 +8,7 @@ set -eo pipefail # important from where we stand as it will be overriden by runtime weight anyway function usage() { - echo "Usage: $0 litentry|rococo branch-or-tag pallet-names" + echo "Usage: $0 litentry|paseo branch-or-tag pallet-names" echo " branch-or-tag will be used to checkout codes" echo " pallet-names can be either * or a comma listed pallet names" echo "e.g.: $0 litentry dev *" diff --git a/parachain/scripts/generate-prod-chain-spec.sh b/parachain/scripts/generate-prod-chain-spec.sh index 424349c25d..a5128925ae 100755 --- a/parachain/scripts/generate-prod-chain-spec.sh +++ b/parachain/scripts/generate-prod-chain-spec.sh @@ -2,7 +2,7 @@ set -eo pipefail function usage() { - echo "Usage: $0 litentry|rococo [docker-tag]" + echo "Usage: $0 litentry|paseo [docker-tag]" } [ $# -lt 1 ] && (usage; exit 1) diff --git a/parachain/scripts/generate-release-notes.sh b/parachain/scripts/generate-release-notes.sh index 0ff9a943cd..566ac6b4c2 100755 --- a/parachain/scripts/generate-release-notes.sh +++ b/parachain/scripts/generate-release-notes.sh @@ -119,7 +119,7 @@ fi if is_runtime_release; then echo "## Parachain runtime" >> "$1" - for CHAIN in rococo litentry paseo; do + for CHAIN in litentry paseo; do SRTOOL_DIGEST_FILE=$CHAIN-parachain-runtime/$CHAIN-parachain-srtool-digest.json RUNTIME_VERSION=$(grep spec_version parachain/runtime/$CHAIN/src/lib.rs | sed 's/.*version: //;s/,//') RUNTIME_COMPRESSED_SIZE=$(cat "$SRTOOL_DIGEST_FILE" | jq .runtimes.compressed.size | sed 's/"//g') diff --git a/parachain/scripts/launch-network.sh b/parachain/scripts/launch-network.sh index c36a46ea8d..d8a1125f19 100755 --- a/parachain/scripts/launch-network.sh +++ b/parachain/scripts/launch-network.sh @@ -6,7 +6,7 @@ set -eo pipefail function usage() { - echo "Usage: $0 litentry|rococo|paseo" + echo "Usage: $0 litentry|paseo" } function print_divider() { @@ -17,7 +17,7 @@ function print_divider() { CHAIN=$1 -ZOMBIENET_VERSION=v1.3.109 +ZOMBIENET_VERSION=v1.3.116 ZOMBIENET_DIR=$(LC_ALL=C tr -dc A-Za-z0-9 0) { const batch = data.splice(0, BATCH_SIZE); const batchTxs = batch.map((entry: any) => - destinationAPI.tx.balances.transfer(entry.account[0], entry.totalBalance) + destinationAPI.tx.balances.transferKeepAlive(entry.account[0], entry.totalBalance) ); txs = txs.concat(batchTxs); if (data.length === 0 || txs.length >= BATCH_SIZE) { diff --git a/parachain/scripts/ts-utils/setup-enclave.ts b/parachain/scripts/ts-utils/setup-enclave.ts index 61f303a30d..d26cf2c646 100644 --- a/parachain/scripts/ts-utils/setup-enclave.ts +++ b/parachain/scripts/ts-utils/setup-enclave.ts @@ -15,7 +15,7 @@ async function transfer(api: any, Alice: any) { console.log(colors.green('transfer start...')); return new Promise(async (resolve, reject) => { await api.tx.balances - .transfer(enclaveAccount, transferAmount) + .transferKeepAlive(enclaveAccount, transferAmount) .signAndSend(Alice, ({ status, events, dispatchError }) => { if (status.isInBlock || status.isFinalized) { events.forEach(({ phase, event: { data, method, section } }) => { diff --git a/parachain/scripts/ts-utils/transfer-to-whitelist.ts b/parachain/scripts/ts-utils/transfer-to-whitelist.ts index 7206cd9638..256e37b519 100644 --- a/parachain/scripts/ts-utils/transfer-to-whitelist.ts +++ b/parachain/scripts/ts-utils/transfer-to-whitelist.ts @@ -11,7 +11,7 @@ function transfer(api: any) { let txs: any = []; for (let index = 0; index < whiteList.length; index++) { try { - let tx = api.tx.balances.transfer(whiteList[index], transferAmount); + let tx = api.tx.balances.transferKeepAlive(whiteList[index], transferAmount); txs.push(tx); } catch (error: any) { //maybe invalied address or other error remove it from whitelist diff --git a/parachain/scripts/ts-utils/transfer.ts b/parachain/scripts/ts-utils/transfer.ts index 093de57ed9..0584102b7f 100644 --- a/parachain/scripts/ts-utils/transfer.ts +++ b/parachain/scripts/ts-utils/transfer.ts @@ -10,7 +10,7 @@ const enclaveAccount = process.argv[2]; async function transfer(api, Alice) { console.log(colors.green('Transfer start...')); return new Promise((resolve, reject) => { - api.tx.balances.transfer(enclaveAccount, transferAmount).signAndSend(Alice, ({ status, events }) => { + api.tx.balances.transferKeepAlive(enclaveAccount, transferAmount).signAndSend(Alice, ({ status, events }) => { if (status.isInBlock || status.isFinalized) { events.forEach(({ event: { method, section } }) => { if (method === 'Transfer' && section === 'balances') { diff --git a/parachain/ts-tests/integration-tests/base-filter.test.ts b/parachain/ts-tests/integration-tests/base-filter.test.ts index 5f3c103122..0b3f0d4a23 100644 --- a/parachain/ts-tests/integration-tests/base-filter.test.ts +++ b/parachain/ts-tests/integration-tests/base-filter.test.ts @@ -14,7 +14,7 @@ describeLitentry('Test Base Filter', ``, (context) => { context.bob.address ); - const tx = context.api.tx.balances.transfer(context.bob.address, 1000); + const tx = context.api.tx.balances.transferKeepAlive(context.bob.address, 1000); await signAndSend(tx, context.eve); const { nonce: eveCurrentNonce, data: eveCurrentBalance } = await context.api.query.system.account( diff --git a/parachain/ts-tests/integration-tests/bridge.test.ts b/parachain/ts-tests/integration-tests/bridge.test.ts index f7db3d4239..88809d8bfd 100644 --- a/parachain/ts-tests/integration-tests/bridge.test.ts +++ b/parachain/ts-tests/integration-tests/bridge.test.ts @@ -37,8 +37,8 @@ describeCrossChainTransfer('Test Cross-chain Transfer', ``, (context) => { ); assert.equal( - bn100e18.add(beforeAccountData.data.free.toBn()).toString(), - afterAccountData.data.free.toBn().toString() + bn100e18.add(new BN(beforeAccountData.data.free.toString())).toString(), + new BN(afterAccountData.data.free.toString()).toString() ); }); diff --git a/parachain/ts-tests/integration-tests/evm-contract.test.ts b/parachain/ts-tests/integration-tests/evm-contract.test.ts index 160e22d704..5494be6229 100644 --- a/parachain/ts-tests/integration-tests/evm-contract.test.ts +++ b/parachain/ts-tests/integration-tests/evm-contract.test.ts @@ -26,7 +26,10 @@ describeLitentry('Test EVM Module Contract', ``, (context) => { let eveMappedSustrateAccount = evmToAddress(eveMappedEVMAccount, 31); // Deposit money into substrate account's truncated EVM address's mapping substrate account - const tx_init = context.api.tx.balances.transfer(eveMappedSustrateAccount, new BN('30000000000000000000')); + const tx_init = context.api.tx.balances.transferKeepAlive( + eveMappedSustrateAccount, + new BN('30000000000000000000') + ); await signAndSend(tx_init, context.eve); // Get the initial balance of Eve and EVM external account diff --git a/parachain/ts-tests/integration-tests/precompile-contract.test.ts b/parachain/ts-tests/integration-tests/precompile-contract.test.ts index beb018a859..5c6c16ba55 100644 --- a/parachain/ts-tests/integration-tests/precompile-contract.test.ts +++ b/parachain/ts-tests/integration-tests/precompile-contract.test.ts @@ -85,7 +85,10 @@ describeLitentry('Test Parachain Precompile Contract', ``, (context) => { console.log('transfer from Alice to alice EMV'); // Deposit money into substrate account's truncated EVM address's mapping substrate account - const tx_init = context.api.tx.balances.transfer(aliceMappedSustrateAccount, new BN('70000000000000000000')); // 70 + const tx_init = context.api.tx.balances.transferKeepAlive( + aliceMappedSustrateAccount, + new BN('70000000000000000000') + ); // 70 await signAndSend(tx_init, context.alice); // 25000 is min_gas_price setup diff --git a/parachain/ts-tests/integration-tests/transaction-fee.test.ts b/parachain/ts-tests/integration-tests/transaction-fee.test.ts index d6eca16117..9b899fc1a9 100644 --- a/parachain/ts-tests/integration-tests/transaction-fee.test.ts +++ b/parachain/ts-tests/integration-tests/transaction-fee.test.ts @@ -29,7 +29,7 @@ describeLitentry('Test Transaction Fee', ``, (context) => { // Send a transaction from Eve const transferAmount = 1000; - const txTransfer = context.api.tx.balances.transfer(context.bob.address, transferAmount); + const txTransfer = context.api.tx.balances.transferKeepAlive(context.bob.address, transferAmount); await signAndSend(txTransfer, context.eve); // Get the current balances of Alice (the block author), Eve and Treasury diff --git a/parachain/ts-tests/integration-tests/transfer.test.ts b/parachain/ts-tests/integration-tests/transfer.test.ts index 4537f7feb2..dc6d191bc8 100644 --- a/parachain/ts-tests/integration-tests/transfer.test.ts +++ b/parachain/ts-tests/integration-tests/transfer.test.ts @@ -15,7 +15,7 @@ describeLitentry('Test Balance Transfer', ``, (context) => { context.bob.address ); - const tx = context.api.tx.balances.transfer(context.bob.address, 1000); + const tx = context.api.tx.balances.transferKeepAlive(context.bob.address, 1000); await signAndSend(tx, context.eve); const { nonce: eveCurrentNonce, data: eveCurrentBalance } = await context.api.query.system.account( @@ -38,7 +38,7 @@ describeLitentry('Test Balance Transfer', ``, (context) => { context.bob.address ); - const tx = context.api.tx.balances.transfer(context.eve.address, 1000); + const tx = context.api.tx.balances.transferKeepAlive(context.eve.address, 1000); await signAndSend(tx, context.bob); const { nonce: eveCurrentNonce, data: eveCurrentBalance } = await context.api.query.system.account( diff --git a/parachain/ts-tests/package.json b/parachain/ts-tests/package.json index b5a92fa704..606566d124 100644 --- a/parachain/ts-tests/package.json +++ b/parachain/ts-tests/package.json @@ -34,10 +34,10 @@ "typescript": "^4.9.4" }, "dependencies": { - "@polkadot/api": "10.9.1", - "@polkadot/api-augment": "10.9.1", + "@polkadot/api": "^15.0.1", + "@polkadot/api-augment": "^15.0.1", "@polkadot/keyring": "12.4.2", - "@polkadot/types": "10.9.1", + "@polkadot/types": "^15.0.1", "@polkadot/util": "12.4.2", "@polkadot/util-crypto": "12.4.2", "@types/bn.js": "^5.1.2", diff --git a/parachain/ts-tests/pnpm-lock.yaml b/parachain/ts-tests/pnpm-lock.yaml index 246c7803de..4f2ebad680 100644 --- a/parachain/ts-tests/pnpm-lock.yaml +++ b/parachain/ts-tests/pnpm-lock.yaml @@ -6,17 +6,17 @@ settings: dependencies: '@polkadot/api': - specifier: 10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-augment': - specifier: 10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/keyring': specifier: 12.4.2 version: 12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2) '@polkadot/types': - specifier: 10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/util': specifier: 12.4.2 version: 12.4.2 @@ -501,11 +501,28 @@ packages: '@noble/hashes': 1.3.1 dev: false + /@noble/curves@1.7.0: + resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} + engines: {node: ^14.21.3 || >=16} + dependencies: + '@noble/hashes': 1.6.0 + dev: false + /@noble/hashes@1.3.1: resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} engines: {node: '>= 16'} dev: false + /@noble/hashes@1.6.0: + resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} + engines: {node: ^14.21.3 || >=16} + dev: false + + /@noble/hashes@1.6.1: + resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} + engines: {node: ^14.21.3 || >=16} + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -527,79 +544,141 @@ packages: fastq: 1.15.0 dev: true - /@polkadot/api-augment@10.9.1: - resolution: {integrity: sha512-kRZZvCFVcN4hAH4dJ+Qzfdy27/4EEq3oLDf3ihj0LTVrAezSWcKPGE3EVFy+Mn6Lo4SUc7RVyoKvIUhSk2l4Dg==} - engines: {node: '>=16'} + /@polkadot-api/json-rpc-provider-proxy@0.1.0: + resolution: {integrity: sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==} + requiresBuild: true + dev: false + optional: true + + /@polkadot-api/json-rpc-provider@0.0.1: + resolution: {integrity: sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==} + requiresBuild: true + dev: false + optional: true + + /@polkadot-api/metadata-builders@0.3.2: + resolution: {integrity: sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==} + requiresBuild: true dependencies: - '@polkadot/api-base': 10.9.1 - '@polkadot/rpc-augment': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.4.2 - tslib: 2.6.2 + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/utils': 0.1.0 + dev: false + optional: true + + /@polkadot-api/observable-client@0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.1): + resolution: {integrity: sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==} + requiresBuild: true + peerDependencies: + '@polkadot-api/substrate-client': 0.1.4 + rxjs: '>=7.8.0' + dependencies: + '@polkadot-api/metadata-builders': 0.3.2 + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/substrate-client': 0.1.4 + '@polkadot-api/utils': 0.1.0 + rxjs: 7.8.1 + dev: false + optional: true + + /@polkadot-api/substrate-bindings@0.6.0: + resolution: {integrity: sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==} + requiresBuild: true + dependencies: + '@noble/hashes': 1.6.1 + '@polkadot-api/utils': 0.1.0 + '@scure/base': 1.2.1 + scale-ts: 1.6.1 + dev: false + optional: true + + /@polkadot-api/substrate-client@0.1.4: + resolution: {integrity: sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==} + requiresBuild: true + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/utils': 0.1.0 + dev: false + optional: true + + /@polkadot-api/utils@0.1.0: + resolution: {integrity: sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==} + requiresBuild: true + dev: false + optional: true + + /@polkadot/api-augment@15.0.1: + resolution: {integrity: sha512-dNFrim/87+rStNCrI1aSaH0nZzRadDwEIya/p860lFRVZQpkBvZlqvSBQUqcKxI0c5c1pp1uaSEixq+A+IOUBg==} + engines: {node: '>=18'} + dependencies: + '@polkadot/api-base': 15.0.1 + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: false - /@polkadot/api-base@10.9.1: - resolution: {integrity: sha512-Q3m2KzlceMK2kX8bhnUZWk3RT6emmijeeFZZQgCePpEcrSeNjnqG4qjuTPgkveaOkUT8MAoDc5Avuzcc2jlW9g==} - engines: {node: '>=16'} + /@polkadot/api-base@15.0.1: + resolution: {integrity: sha512-P4WQ+SqyuotVd//EFMIzlWLRbER9JycpdmTaKof2NpVioGotbHhJtO4TXPC3CW1C8zovM7KYrcWtz6b8/FxqoA==} + engines: {node: '>=18'} dependencies: - '@polkadot/rpc-core': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/util': 12.4.2 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/util': 13.2.3 rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: false - /@polkadot/api-derive@10.9.1: - resolution: {integrity: sha512-mRud1UZCFIc4Z63qAoGSIHh/foyUYADfy1RQYCmPpeFKfIdCIrHpd7xFdJXTOMYOS0BwlM6u4qli/ZT4XigezQ==} - engines: {node: '>=16'} + /@polkadot/api-derive@15.0.1: + resolution: {integrity: sha512-gaLqZ8wL+hGMntq5gxHb6Rv+EQzmmnC63plMBvk5pnNfCm4xjN43GYpbOwSQknHVNo+irC7qwD3GyPK6TfFUUA==} + engines: {node: '>=18'} dependencies: - '@polkadot/api': 10.9.1 - '@polkadot/api-augment': 10.9.1 - '@polkadot/api-base': 10.9.1 - '@polkadot/rpc-core': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.4.2 - '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) + '@polkadot/api': 15.0.1 + '@polkadot/api-augment': 15.0.1 + '@polkadot/api-base': 15.0.1 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: false - /@polkadot/api@10.9.1: - resolution: {integrity: sha512-ND/2UqZBWvtt4PfV03OStTKg0mxmPk4UpMAgJKutdgsz/wP9CYJ1KbjwFgPNekL9JnzbKQsWyQNPVrcw7kQk8A==} - engines: {node: '>=16'} - dependencies: - '@polkadot/api-augment': 10.9.1 - '@polkadot/api-base': 10.9.1 - '@polkadot/api-derive': 10.9.1 - '@polkadot/keyring': 12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2) - '@polkadot/rpc-augment': 10.9.1 - '@polkadot/rpc-core': 10.9.1 - '@polkadot/rpc-provider': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/types-known': 10.9.1 - '@polkadot/util': 12.4.2 - '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) + /@polkadot/api@15.0.1: + resolution: {integrity: sha512-ZOqw99B70XrX0it0cWu1YSBrtGNhdFpk5zvUVL5+FD8iyO+Tuk1m32VR0PukDCdlwxFXuEw7vRdZX/G/BzoZhg==} + engines: {node: '>=18'} + dependencies: + '@polkadot/api-augment': 15.0.1 + '@polkadot/api-base': 15.0.1 + '@polkadot/api-derive': 15.0.1 + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/rpc-provider': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/types-known': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) eventemitter3: 5.0.1 rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color @@ -615,7 +694,19 @@ packages: dependencies: '@polkadot/util': 12.4.2 '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3): + resolution: {integrity: sha512-pgTo6DXNXub0wGD+MnVHYhKxf80Jl+QMOCb818ioGdXz++Uw4mTueFAwtB+N7TGo0HafhChUiNJDxFdlDkcAng==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3 + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + tslib: 2.8.1 dev: false /@polkadot/networks@12.4.2: @@ -623,134 +714,134 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/util': 12.4.2 - '@substrate/ss58-registry': 1.43.0 - tslib: 2.6.2 + '@substrate/ss58-registry': 1.51.0 + tslib: 2.8.1 dev: false - /@polkadot/networks@12.5.1: - resolution: {integrity: sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ==} - engines: {node: '>=16'} + /@polkadot/networks@13.2.3: + resolution: {integrity: sha512-mG+zkXg/33AyPrkv2xBbAo3LBUwOwBn6qznBU/4jxiZPnVvCwMaxE7xHM22B5riItbNJ169FXv3wy0v6ZmkFbw==} + engines: {node: '>=18'} dependencies: - '@polkadot/util': 12.5.1 - '@substrate/ss58-registry': 1.43.0 - tslib: 2.6.2 + '@polkadot/util': 13.2.3 + '@substrate/ss58-registry': 1.51.0 + tslib: 2.8.1 dev: false - /@polkadot/rpc-augment@10.9.1: - resolution: {integrity: sha512-MaLHkNlyqN20ZRYr6uNd1BZr1OsrnX9qLAmsl0mcrri1vPGRH6VHjfFH1RBLkikpWD82v17g0l2hLwdV1ZHMcw==} - engines: {node: '>=16'} + /@polkadot/rpc-augment@15.0.1: + resolution: {integrity: sha512-4FoY+oXC08+vaLMAvFgOOjcFHNBHEv2kOqgxtO/yCyMLNvyRRnrBtMofznJ1EWEwzehvU5iSlbMCerKdImFRZQ==} + engines: {node: '>=18'} dependencies: - '@polkadot/rpc-core': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.4.2 - tslib: 2.6.2 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: false - /@polkadot/rpc-core@10.9.1: - resolution: {integrity: sha512-ZtA8B8SfXSAwVkBlCcKRHw0eSM7ec/sbiNOM5GasXPeRujUgT7lOwSH2GbUZSqe9RfRDMp6DvO9c2JoGc3LLWw==} - engines: {node: '>=16'} + /@polkadot/rpc-core@15.0.1: + resolution: {integrity: sha512-I5F1T17Nr5oEuqAysP7n14tWym54hCriqj0pV0tM4yfIF0iWaWPkqWNRU7uNfv86n3m15IMGoMapvgZVnUF5LQ==} + engines: {node: '>=18'} dependencies: - '@polkadot/rpc-augment': 10.9.1 - '@polkadot/rpc-provider': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/util': 12.4.2 + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/rpc-provider': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/util': 13.2.3 rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: false - /@polkadot/rpc-provider@10.9.1: - resolution: {integrity: sha512-4QzT2QzD+320+eT6b79sGAA85Tt3Bb8fQvse4r5Mom2iiBd2SO81vOhxSAOaIe4GUsw25VzFJmsbe7+OObItdg==} - engines: {node: '>=16'} + /@polkadot/rpc-provider@15.0.1: + resolution: {integrity: sha512-ziRob/sco751+OK700vNh7IivysFOeZthO7JpC8CEQhZ2c+z/HY7bNsAucy1q1ELGe7xLMZW2/rm/RG285ZDPQ==} + engines: {node: '>=18'} dependencies: - '@polkadot/keyring': 12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2) - '@polkadot/types': 10.9.1 - '@polkadot/types-support': 10.9.1 - '@polkadot/util': 12.4.2 - '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) - '@polkadot/x-fetch': 12.5.1 - '@polkadot/x-global': 12.5.1 - '@polkadot/x-ws': 12.5.1 + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/types': 15.0.1 + '@polkadot/types-support': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + '@polkadot/x-fetch': 13.2.3 + '@polkadot/x-global': 13.2.3 + '@polkadot/x-ws': 13.2.3 eventemitter3: 5.0.1 mock-socket: 9.3.1 - nock: 13.3.4 - tslib: 2.6.2 + nock: 13.5.6 + tslib: 2.8.1 optionalDependencies: - '@substrate/connect': 0.7.26 + '@substrate/connect': 0.8.11 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: false - /@polkadot/types-augment@10.9.1: - resolution: {integrity: sha512-OY9/jTMFRFqYdkUnfcGwqMLC64A0Q25bjvCuVQCVjsPFKE3wl0Kt5rNT01eV2UmLXrR6fY0xWbR2w80bLA7CIQ==} - engines: {node: '>=16'} + /@polkadot/types-augment@15.0.1: + resolution: {integrity: sha512-6fTjJmTGd46UUIYPHr5oA6kiFl6IY45dvDgUQu07AmVdEQlq3OPq/7GyS639SLHHfMLSPbFKyt1iMVj9BNu0qA==} + engines: {node: '>=18'} dependencies: - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.4.2 - tslib: 2.6.2 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false - /@polkadot/types-codec@10.9.1: - resolution: {integrity: sha512-mJ5OegKGraY1FLvEa8FopRCr3pQrhDkcn5RNOjmgJQozENVeRaxhk0NwxYz7IojFvSDnKnc6lNQfKaaSe5pLHg==} - engines: {node: '>=16'} + /@polkadot/types-codec@15.0.1: + resolution: {integrity: sha512-SLypmYH6FYRmqGG8TBbi4X0tYh1OUZEMNkujln2eHxsuFIYRGrHFnEohtkF9ktSxoUji2ph9I5ZW5gqQvEsXrA==} + engines: {node: '>=18'} dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/x-bigint': 12.5.1 - tslib: 2.6.2 + '@polkadot/util': 13.2.3 + '@polkadot/x-bigint': 13.2.3 + tslib: 2.8.1 dev: false - /@polkadot/types-create@10.9.1: - resolution: {integrity: sha512-OVz50MGTTuiuVnRP/zAx4CTuLioc0hsiwNwqN2lNhmIJGtnQ4Vy/7mQRsIWehiYz6g0Vzzm5B3qWkTXO1NSN5w==} - engines: {node: '>=16'} + /@polkadot/types-create@15.0.1: + resolution: {integrity: sha512-M1vs5o3sw8p3g88GhJgz2vSSgxnr5CfbaL4r5EYzR+Hx9xUvz03aEofySvodusEpdRQ9MijnsNSP9306xvcqhw==} + engines: {node: '>=18'} dependencies: - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.4.2 - tslib: 2.6.2 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false - /@polkadot/types-known@10.9.1: - resolution: {integrity: sha512-zCMVWc4pJtkbMFPu72bD4IhvV/gkHXPX3C5uu92WdmCfnn0vEIEsMKWlVXVVvQQZKAqvs/awpqIfrUtEViOGEA==} - engines: {node: '>=16'} + /@polkadot/types-known@15.0.1: + resolution: {integrity: sha512-9VC6QX4/JAjWmnSdaZIm4n8CgmVj9KutgQ5/Uy9VBrTwfRzUPIBwHZT8lPQLeN1WwQRbtc5ojDoo2SR+OqGTqw==} + engines: {node: '>=18'} dependencies: - '@polkadot/networks': 12.5.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/util': 12.4.2 - tslib: 2.6.2 + '@polkadot/networks': 13.2.3 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false - /@polkadot/types-support@10.9.1: - resolution: {integrity: sha512-XsieuLDsszvMZQlleacQBfx07i/JkwQV/UxH9q8Hz7Okmaz9pEVEW1h3ka2/cPuC7a4l32JhaORBUYshBZNdJg==} - engines: {node: '>=16'} + /@polkadot/types-support@15.0.1: + resolution: {integrity: sha512-w/IWFuDn290brw75ZXKPkQMazz0yizE0zK0XuqP2S4IW009x+z0peRc7Q4k36JOqDVDwSc38vTxWtRPVqdoI1g==} + engines: {node: '>=18'} dependencies: - '@polkadot/util': 12.4.2 - tslib: 2.6.2 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false - /@polkadot/types@10.9.1: - resolution: {integrity: sha512-AG33i2ZGGfq7u+5rkAdGrXAQHHl844/Yv+junH5ZzX69xiCoWO1bH/yzDUNBdpki2GlACWvF9nLYh3F2tVF93w==} - engines: {node: '>=16'} + /@polkadot/types@15.0.1: + resolution: {integrity: sha512-jnn0h8Z4O3l/UjrBOJPmkfKjuC6fSqhQfsn7HpWF18lEicGp4/A7X3AZryIg8npKHHiuH30bK/o1VuivH+4dVw==} + engines: {node: '>=18'} dependencies: - '@polkadot/keyring': 12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2) - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/util': 12.4.2 - '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 dev: false /@polkadot/util-crypto@12.4.2(@polkadot/util@12.4.2): @@ -763,12 +854,30 @@ packages: '@noble/hashes': 1.3.1 '@polkadot/networks': 12.4.2 '@polkadot/util': 12.4.2 - '@polkadot/wasm-crypto': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) + '@polkadot/wasm-crypto': 7.4.1(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@12.4.2) '@polkadot/x-bigint': 12.4.2 - '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) + '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.4.1) '@scure/base': 1.1.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3): + resolution: {integrity: sha512-5sbggmLbn5eiuVMyPROPlT5roHRqdKHOfSpioNbGvGIZ1qIWVoC1RfsK0NWJOVGDzy6DpQe0KYT/kgcU5Xsrzw==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + dependencies: + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + '@polkadot/networks': 13.2.3 + '@polkadot/util': 13.2.3 + '@polkadot/wasm-crypto': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-bigint': 13.2.3 + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + '@scure/base': 1.2.1 + tslib: 2.8.1 dev: false /@polkadot/util@12.4.2: @@ -779,99 +888,176 @@ packages: '@polkadot/x-global': 12.4.2 '@polkadot/x-textdecoder': 12.4.2 '@polkadot/x-textencoder': 12.4.2 - '@types/bn.js': 5.1.2 + '@types/bn.js': 5.1.6 bn.js: 5.2.1 - tslib: 2.6.2 + tslib: 2.8.1 dev: false - /@polkadot/util@12.5.1: - resolution: {integrity: sha512-fDBZL7D4/baMG09Qowseo884m3QBzErGkRWNBId1UjWR99kyex+cIY9fOSzmuQxo6nLdJlLHw1Nz2caN3+Bq0A==} - engines: {node: '>=16'} + /@polkadot/util@13.2.3: + resolution: {integrity: sha512-pioNnsig3qHXrfOKMe4Yqos8B8N3/EZUpS+WfTpWnn1VjYban/0GrTXeavPlAwggnY27b8fS6rBzQBhnVYDw8g==} + engines: {node: '>=18'} dependencies: - '@polkadot/x-bigint': 12.5.1 - '@polkadot/x-global': 12.5.1 - '@polkadot/x-textdecoder': 12.5.1 - '@polkadot/x-textencoder': 12.5.1 - '@types/bn.js': 5.1.2 + '@polkadot/x-bigint': 13.2.3 + '@polkadot/x-global': 13.2.3 + '@polkadot/x-textdecoder': 13.2.3 + '@polkadot/x-textencoder': 13.2.3 + '@types/bn.js': 5.1.6 bn.js: 5.2.1 - tslib: 2.6.2 + tslib: 2.8.1 dev: false - /@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): - resolution: {integrity: sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A==} - engines: {node: '>=16'} + /@polkadot/wasm-bridge@7.4.1(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): + resolution: {integrity: sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==} + engines: {node: '>=18'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@12.4.2) + '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 dev: false - /@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.4.2): - resolution: {integrity: sha512-wKg+cpsWQCTSVhjlHuNeB/184rxKqY3vaklacbLOMbUXieIfuDBav5PJdzS3yeiVE60TpYaHW4iX/5OYHS82gg==} - engines: {node: '>=16'} + /@polkadot/wasm-bridge@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto-asmjs@7.4.1(@polkadot/util@12.4.2): + resolution: {integrity: sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==} + engines: {node: '>=18'} peerDependencies: '@polkadot/util': '*' dependencies: '@polkadot/util': 12.4.2 - tslib: 2.6.2 + tslib: 2.8.1 dev: false - /@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): - resolution: {integrity: sha512-vD4iPIp9x+SssUIWUenxWLPw4BVIwhXHNMpsV81egK990tvpyIxL205/EF5QRb1mKn8WfWcNFm5tYwwh9NdnnA==} - engines: {node: '>=16'} + /@polkadot/wasm-crypto-asmjs@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto-init@7.4.1(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): + resolution: {integrity: sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==} + engines: {node: '>=18'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: '@polkadot/util': 12.4.2 - '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) - '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@12.4.2) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@12.4.2) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@12.4.2) + '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 dev: false - /@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.4.2): - resolution: {integrity: sha512-3efoIB6jA3Hhv6k0YIBwCtlC8gCSWCk+R296yIXRLLr3cGN415KM/PO/d1JIXYI64lbrRzWRmZRhllw3jf6Atg==} - engines: {node: '>=16'} + /@polkadot/wasm-crypto-init@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto-wasm@7.4.1(@polkadot/util@12.4.2): + resolution: {integrity: sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==} + engines: {node: '>=18'} peerDependencies: '@polkadot/util': '*' dependencies: '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - tslib: 2.6.2 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@12.4.2) + tslib: 2.8.1 dev: false - /@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): - resolution: {integrity: sha512-1ZY1rxUTawYm0m1zylvBMFovNIHYgG2v/XoASNp/EMG5c8FQIxCbhJRaTBA983GVq4lN/IAKREKEp9ZbLLqssA==} - engines: {node: '>=16'} + /@polkadot/wasm-crypto-wasm@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto@7.4.1(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): + resolution: {integrity: sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==} + engines: {node: '>=18'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: '@polkadot/util': 12.4.2 - '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) - '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-crypto-init': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) - '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@12.4.2) + '@polkadot/wasm-crypto-init': 7.4.1(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@12.4.2) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@12.4.2) + '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-init': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 dev: false - /@polkadot/wasm-util@7.2.2(@polkadot/util@12.4.2): - resolution: {integrity: sha512-N/25960ifCc56sBlJZ2h5UBpEPvxBmMLgwYsl7CUuT+ea2LuJW9Xh8VHDN/guYXwmm92/KvuendYkEUykpm/JQ==} - engines: {node: '>=16'} + /@polkadot/wasm-util@7.4.1(@polkadot/util@12.4.2): + resolution: {integrity: sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==} + engines: {node: '>=18'} peerDependencies: '@polkadot/util': '*' dependencies: '@polkadot/util': 12.4.2 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/x-bigint@12.4.2: @@ -879,41 +1065,41 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/x-global': 12.4.2 - tslib: 2.6.2 + tslib: 2.8.1 dev: false - /@polkadot/x-bigint@12.5.1: - resolution: {integrity: sha512-Fw39eoN9v0sqxSzfSC5awaDVdzojIiE7d1hRSQgVSrES+8whWvtbYMR0qwbVhTuW7DvogHmye41P9xKMlXZysg==} - engines: {node: '>=16'} + /@polkadot/x-bigint@13.2.3: + resolution: {integrity: sha512-VKgEAh0LsxTd/Hg517Tt5ZU4CySjBwMpaojbkjgv3fOdg1cN7t4eFEUxpyj7mlO0cp22SzDh7nmy4TO98qhLQA==} + engines: {node: '>=18'} dependencies: - '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 dev: false - /@polkadot/x-fetch@12.5.1: - resolution: {integrity: sha512-Bc019lOKCoQJrthiS+H3LwCahGtl5tNnb2HK7xe3DBQIUx9r2HsF/uEngNfMRUFkUYg5TPCLFbEWU8NIREBS1A==} - engines: {node: '>=16'} + /@polkadot/x-fetch@13.2.3: + resolution: {integrity: sha512-7Nmk+8ieEGzz43nc1rX6nH3rQo6rhGmAaIXJWnXY9gOHY0k1me1bJYbP+xDdh8vcLh8eY3D1sESUwG6QYZW2lg==} + engines: {node: '>=18'} dependencies: - '@polkadot/x-global': 12.5.1 + '@polkadot/x-global': 13.2.3 node-fetch: 3.3.2 - tslib: 2.6.2 + tslib: 2.8.1 dev: false /@polkadot/x-global@12.4.2: resolution: {integrity: sha512-CwbjSt1Grmn56xAj+hGC8ZB0uZxMl92K+VkBH0KxjgcbAX/D24ZD/0ds8pAnUYrO4aYHYq2j2MAGVSMdHcMBAQ==} engines: {node: '>=16'} dependencies: - tslib: 2.6.2 + tslib: 2.8.1 dev: false - /@polkadot/x-global@12.5.1: - resolution: {integrity: sha512-6K0YtWEg0eXInDOihU5aSzeb1t9TiDdX9ZuRly+58ALSqw5kPZYmQLbzE1d8HWzyXRXK+YH65GtLzfMGqfYHmw==} - engines: {node: '>=16'} + /@polkadot/x-global@13.2.3: + resolution: {integrity: sha512-7MYQIAEwBkRcNrgqac5PbB0kNPlI6ISJEy6/Nb+crj8BFjQ8rf11PF49fq0QsvDeuYM1aNLigrvYZNptQs4lbw==} + engines: {node: '>=18'} dependencies: - tslib: 2.6.2 + tslib: 2.8.1 dev: false - /@polkadot/x-randomvalues@12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2): + /@polkadot/x-randomvalues@12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.4.1): resolution: {integrity: sha512-HVlXRWY9RfN54RgfDroDy2itWmtTUtr119DfPl3wjnBf9i4wl/M+848OYlmCZCTpViTJrvWVSEJH9zVgchlNnw==} engines: {node: '>=16'} peerDependencies: @@ -921,9 +1107,22 @@ packages: '@polkadot/wasm-util': '*' dependencies: '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@12.4.2) '@polkadot/x-global': 12.4.2 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1): + resolution: {integrity: sha512-Zf0GTfLmVk+VzPUmcQSpXjjmFzMTjPhXoLuIoE7xIu73T+vQ+TX9j7DvorN6bIRsnZ9l1SyTZsSf/NTjNZKIZg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/x-textdecoder@12.4.2: @@ -931,15 +1130,15 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/x-global': 12.4.2 - tslib: 2.6.2 + tslib: 2.8.1 dev: false - /@polkadot/x-textdecoder@12.5.1: - resolution: {integrity: sha512-j2YZGWfwhMC8nHW3BXq10fAPY02ObLL/qoTjCMJ1Cmc/OGq18Ep7k9cXXbjFAq3wf3tUUewt/u/hStKCk3IvfQ==} - engines: {node: '>=16'} + /@polkadot/x-textdecoder@13.2.3: + resolution: {integrity: sha512-i8hRXPtGknmdm3FYv6/94I52VXHJZa5sgYNw1+Hqb4Jqmq4awUjea35CKXd/+aw70Qn8Ngg31l2GoiH494fa+Q==} + engines: {node: '>=18'} dependencies: - '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/x-textencoder@12.4.2: @@ -947,24 +1146,24 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/x-global': 12.4.2 - tslib: 2.6.2 + tslib: 2.8.1 dev: false - /@polkadot/x-textencoder@12.5.1: - resolution: {integrity: sha512-1JNNpOGb4wD+c7zFuOqjibl49LPnHNr4rj4s3WflLUIZvOMY6euoDuN3ISjQSHCLlVSoH0sOCWA3qXZU4bCTDQ==} - engines: {node: '>=16'} + /@polkadot/x-textencoder@13.2.3: + resolution: {integrity: sha512-wJI3Bb/dC4zyBXJFm5+ZhyBXWoI5wvP8k8qX0/ZC0PQsgSAqs7LVhiofk4Wd94n0P41W5re58LrGXLyziSAshw==} + engines: {node: '>=18'} dependencies: - '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 dev: false - /@polkadot/x-ws@12.5.1: - resolution: {integrity: sha512-efNMhB3Lh6pW2iTipMkqwrjpuUtb3EwR/jYZftiIGo5tDPB7rqoMOp9s6KRFJEIUfZkLnMUtbkZ5fHzUJaCjmQ==} - engines: {node: '>=16'} + /@polkadot/x-ws@13.2.3: + resolution: {integrity: sha512-Y6MTAWgcnrnx/LkBx65X3ZyoJH5EFj3tXtflRoKg1+PLHSLuNBV7Wi5mLcE70z4e5c+4hgBbLq+8SqCqzFtSPw==} + engines: {node: '>=18'} dependencies: - '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 - ws: 8.14.2 + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -978,6 +1177,10 @@ packages: resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} dev: false + /@scure/base@1.2.1: + resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} + dev: false + /@scure/bip32@1.3.1: resolution: {integrity: sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==} dependencies: @@ -993,27 +1196,52 @@ packages: '@scure/base': 1.1.3 dev: false - /@substrate/connect-extension-protocol@1.0.1: - resolution: {integrity: sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==} + /@substrate/connect-extension-protocol@2.2.1: + resolution: {integrity: sha512-GoafTgm/Jey9E4Xlj4Z5ZBt/H4drH2CNq8VrAro80rtoznrXnFDNVivLQzZN0Xaj2g8YXSn9pC9Oc9IovYZJXw==} requiresBuild: true dev: false optional: true - /@substrate/connect@0.7.26: - resolution: {integrity: sha512-uuGSiroGuKWj1+38n1kY5HReer5iL9bRwPCzuoLtqAOmI1fGI0hsSI2LlNQMAbfRgr7VRHXOk5MTuQf5ulsFRw==} + /@substrate/connect-known-chains@1.8.0: + resolution: {integrity: sha512-sl7WfeDgnZuPvUl5Xw0XIziOTe8rEBJ3uugyDETGnafxEbjYMv5aJL0ilq5djhnQ7l9OuMJCN3Ckved2yINeeQ==} + requiresBuild: true + dev: false + optional: true + + /@substrate/connect@0.8.11: + resolution: {integrity: sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==} + deprecated: versions below 1.x are no longer maintained requiresBuild: true dependencies: - '@substrate/connect-extension-protocol': 1.0.1 - eventemitter3: 4.0.7 - smoldot: 1.0.4 + '@substrate/connect-extension-protocol': 2.2.1 + '@substrate/connect-known-chains': 1.8.0 + '@substrate/light-client-extension-helpers': 1.0.0(smoldot@2.0.26) + smoldot: 2.0.26 transitivePeerDependencies: - bufferutil - utf-8-validate dev: false optional: true - /@substrate/ss58-registry@1.43.0: - resolution: {integrity: sha512-USEkXA46P9sqClL7PZv0QFsit4S8Im97wchKG0/H/9q3AT/S76r40UHfCr4Un7eBJPE23f7fU9BZ0ITpP9MCsA==} + /@substrate/light-client-extension-helpers@1.0.0(smoldot@2.0.26): + resolution: {integrity: sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==} + requiresBuild: true + peerDependencies: + smoldot: 2.x + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/json-rpc-provider-proxy': 0.1.0 + '@polkadot-api/observable-client': 0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.1) + '@polkadot-api/substrate-client': 0.1.4 + '@substrate/connect-extension-protocol': 2.2.1 + '@substrate/connect-known-chains': 1.8.0 + rxjs: 7.8.1 + smoldot: 2.0.26 + dev: false + optional: true + + /@substrate/ss58-registry@1.51.0: + resolution: {integrity: sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==} dev: false /@tsconfig/node10@1.0.9: @@ -1038,6 +1266,12 @@ packages: '@types/node': 20.8.6 dev: false + /@types/bn.js@5.1.6: + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} + dependencies: + '@types/node': 20.8.6 + dev: false + /@types/chai@4.3.8: resolution: {integrity: sha512-yW/qTM4mRBBcsA9Xw9FbcImYtFPY7sgr+G/O5RDYVmxiy9a+pE5FyoFUi8JYCZY5nicj8atrr1pcfPiYpeNGOA==} dev: true @@ -1883,12 +2117,6 @@ packages: - utf-8-validate dev: false - /eventemitter3@4.0.7: - resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} - requiresBuild: true - dev: false - optional: true - /eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} dev: false @@ -2497,6 +2725,7 @@ packages: /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true /log-symbols@4.1.0: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} @@ -2676,13 +2905,12 @@ packages: hasBin: true dev: true - /nock@13.3.4: - resolution: {integrity: sha512-DDpmn5oLEdCTclEqweOT4U7bEpuoifBMFUXem9sA4turDAZ5tlbrEoWqCorwXey8CaAw44mst5JOQeVNiwtkhw==} + /nock@13.5.6: + resolution: {integrity: sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==} engines: {node: '>= 10.13'} dependencies: debug: 4.3.4(supports-color@8.1.1) json-stringify-safe: 5.0.1 - lodash: 4.17.21 propagate: 2.0.1 transitivePeerDependencies: - supports-color @@ -2807,12 +3035,6 @@ packages: engines: {node: '>=6'} dev: true - /pako@2.1.0: - resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} - requiresBuild: true - dev: false - optional: true - /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -3015,7 +3237,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.6.2 + tslib: 2.8.1 dev: false /safe-buffer@5.2.1: @@ -3026,6 +3248,12 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true + /scale-ts@1.6.1: + resolution: {integrity: sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g==} + requiresBuild: true + dev: false + optional: true + /scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} dev: false @@ -3087,11 +3315,10 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true - /smoldot@1.0.4: - resolution: {integrity: sha512-N3TazI1C4GGrseFH/piWyZCCCRJTRx2QhDfrUKRT4SzILlW5m8ayZ3QTKICcz1C/536T9cbHHJyP7afxI6Mi1A==} + /smoldot@2.0.26: + resolution: {integrity: sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==} requiresBuild: true dependencies: - pako: 2.1.0 ws: 8.14.2 transitivePeerDependencies: - bufferutil @@ -3275,8 +3502,8 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + /tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} dev: false /tsutils@3.21.0(typescript@4.9.5): @@ -3723,6 +3950,19 @@ packages: optional: true dev: false + /ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: false + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} diff --git a/parachain/zombienet/config.toml b/parachain/zombienet/config.toml index 8d46a5983d..e16a527ecd 100644 --- a/parachain/zombienet/config.toml +++ b/parachain/zombienet/config.toml @@ -26,5 +26,12 @@ cumulus_based = true [[parachains.collators]] name = "collator1" command = "litentry-collator" -args = ["--no-hardware-benchmarks", "--force-authoring", "--enable-evm-rpc", "--state-pruning=archive"] +args = [ + "--no-hardware-benchmarks", + "--force-authoring", + "--enable-evm-rpc", + "--state-pruning=archive", + "--delayed-best-block", + "-l=parachain=debug,txpool=debug" +] ws_port = {{COLLATOR_WS_PORT}} diff --git a/tee-worker/Cargo.lock b/tee-worker/Cargo.lock index f570965d9f..283982ca59 100644 --- a/tee-worker/Cargo.lock +++ b/tee-worker/Cargo.lock @@ -15,7 +15,7 @@ dependencies = [ [[package]] name = "ac-compose-macros" version = "0.4.2" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-primitives", "log 0.4.20", @@ -25,7 +25,7 @@ dependencies = [ [[package]] name = "ac-node-api" version = "0.5.1" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-primitives", "bitvec", @@ -50,7 +50,7 @@ dependencies = [ [[package]] name = "ac-primitives" version = "0.9.0" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "frame-system", "impl-serde", @@ -1472,6 +1472,7 @@ dependencies = [ "scale-info", "serde 1.0.210", "serde_json 1.0.120", + "sp-consensus-aura", "sp-core", "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", "sp-runtime", @@ -4051,6 +4052,7 @@ dependencies = [ name = "itp-extrinsics-factory" version = "0.1.0" dependencies = [ + "hex", "itp-node-api", "itp-nonce-cache", "itp-types", @@ -8626,6 +8628,39 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-consensus" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +dependencies = [ + "async-trait", + "futures 0.3.28", + "log 0.4.20", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "thiserror 1.0.44", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +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-timestamp", +] + [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" @@ -9170,7 +9205,7 @@ dependencies = [ [[package]] name = "substrate-api-client" version = "0.14.0" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-compose-macros", "ac-node-api", @@ -9208,7 +9243,7 @@ dependencies = [ [[package]] name = "substrate-client-keystore" version = "0.9.1" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "array-bytes 4.2.0", "async-trait", diff --git a/tee-worker/Cargo.toml b/tee-worker/Cargo.toml index 963d8c1e09..dc3d1d616a 100644 --- a/tee-worker/Cargo.toml +++ b/tee-worker/Cargo.toml @@ -154,8 +154,8 @@ rlp = { version = "0.5", default-features = false } sha3 = { version = "0.10", default-features = false } url = { git = "https://github.com/domenukk/rust-url", rev = "316c868", default-features = false, features = ["alloc", "no_std_net"] } -substrate-api-client = { git = "https://github.com/scs/substrate-api-client", branch = "polkadot-v0.9.42-tag-v0.14.0", default-features = false, features = ["sync-api"] } -substrate-client-keystore = { git = "https://github.com/scs/substrate-api-client.git", branch = "polkadot-v0.9.42-tag-v0.14.0" } +substrate-api-client = { git = "https://github.com/Kailai-Wang/substrate-api-client", branch = "polkadot-v0.9.42-litentry", default-features = false, features = ["sync-api"] } +substrate-client-keystore = { git = "https://github.com/Kailai-Wang/substrate-api-client", branch = "polkadot-v0.9.42-litentry" } # substrate finality-grandpa = { version = "0.16.0", default-features = false, features = ["derive-codec"] } @@ -325,6 +325,8 @@ its-validateer-fetch = { path = "identity/sidechain/validateer-fetch", default-f [patch."https://github.com/paritytech/polkadot-sdk"] frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } diff --git a/tee-worker/bitacross/enclave-runtime/Cargo.lock b/tee-worker/bitacross/enclave-runtime/Cargo.lock index 3b6cb8f3bd..3cf9f542f2 100644 --- a/tee-worker/bitacross/enclave-runtime/Cargo.lock +++ b/tee-worker/bitacross/enclave-runtime/Cargo.lock @@ -15,7 +15,7 @@ dependencies = [ [[package]] name = "ac-compose-macros" version = "0.4.2" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-primitives", "log 0.4.21", @@ -25,7 +25,7 @@ dependencies = [ [[package]] name = "ac-node-api" version = "0.5.1" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-primitives", "bitvec", @@ -50,7 +50,7 @@ dependencies = [ [[package]] name = "ac-primitives" version = "0.9.0" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "impl-serde", "parity-scale-codec", @@ -987,6 +987,7 @@ dependencies = [ "scale-info", "serde 1.0.204", "serde_json 1.0.120", + "sp-consensus-aura", "sp-core", "sp-io", "sp-runtime", @@ -2298,6 +2299,7 @@ dependencies = [ name = "itp-extrinsics-factory" version = "0.1.0" dependencies = [ + "hex", "itp-node-api", "itp-nonce-cache", "itp-types", @@ -4346,6 +4348,22 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" @@ -4362,6 +4380,17 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-consensus-slots" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-std", + "sp-timestamp", +] + [[package]] name = "sp-core" version = "7.0.0" @@ -4710,7 +4739,7 @@ dependencies = [ [[package]] name = "substrate-api-client" version = "0.14.0" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-compose-macros", "ac-node-api", diff --git a/tee-worker/bitacross/enclave-runtime/Cargo.toml b/tee-worker/bitacross/enclave-runtime/Cargo.toml index 466adb9977..b74c56ca31 100644 --- a/tee-worker/bitacross/enclave-runtime/Cargo.toml +++ b/tee-worker/bitacross/enclave-runtime/Cargo.toml @@ -155,6 +155,8 @@ log = { git = "https://github.com/integritee-network/log-sgx" } [patch."https://github.com/paritytech/polkadot-sdk"] frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } sp-io = { path = "../../common/core-primitives/substrate-sgx/sp-io" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } diff --git a/tee-worker/bitacross/scripts/launch.sh b/tee-worker/bitacross/scripts/launch.sh index e9d6d5c3be..f91405f3d3 100755 --- a/tee-worker/bitacross/scripts/launch.sh +++ b/tee-worker/bitacross/scripts/launch.sh @@ -2,7 +2,7 @@ set -euo pipefail -PARACHAIN="rococo" +PARACHAIN="paseo" ROOTDIR=$(git rev-parse --show-toplevel) ROOTDIR="${ROOTDIR}/tee-worker" @@ -20,7 +20,7 @@ function start_local_parachain() { cd ${ROOTDIR} echo "------------------------------------------------------------" echo "Start local parachain: ${PARACHAIN} ..." - # TODO: only `rococo` is supported for the moment. And it's hard-coded inside `start_parachain.sh` + # TODO: only `paseo` is supported for the moment. And it's hard-coded inside `start_parachain.sh` ./../local-setup/start_parachain.sh if [ $? -ne 0 ]; then exit 1 diff --git a/tee-worker/bitacross/scripts/litentry/release/deploy.sh b/tee-worker/bitacross/scripts/litentry/release/deploy.sh index fa52a4e9f6..efd6b329c4 100755 --- a/tee-worker/bitacross/scripts/litentry/release/deploy.sh +++ b/tee-worker/bitacross/scripts/litentry/release/deploy.sh @@ -35,7 +35,7 @@ PARACHAIN_ALICE_BASEDIR="$PARACHAIN_BASEDIR/para-alice" BUILD=false DISCARD=false WORKER_CONFIG= -CHAIN=rococo +CHAIN=paseo ONLY_WORKER=false PARACHAIN_HOST=localhost PARACHAIN_PORT=9944 @@ -215,7 +215,7 @@ function display_help { echo " -d, --discard Clean the existing state for parachain and worker (default: false)" echo " -c, --config Config file for the worker" echo " -a, --only-worker Start only the worker (default: false)" - echo " -x, --chain Chain type for launching the parachain network (default: rococo)" + echo " -x, --chain Chain type for launching the parachain network (default: paseo)" echo " -h, --parachain-host Parachain ws URL (default: localhost)" echo " -p, --parachain-port Parachain ws port (default: 9944)" echo " -v, --copy-from-docker Copy the parachain binary from a docker image (default: litentry/litentry-parachain:tee-prod)" diff --git a/tee-worker/bitacross/scripts/test_transfer/transfer.js b/tee-worker/bitacross/scripts/test_transfer/transfer.js index 6d45154008..ed0801fb68 100644 --- a/tee-worker/bitacross/scripts/test_transfer/transfer.js +++ b/tee-worker/bitacross/scripts/test_transfer/transfer.js @@ -31,7 +31,7 @@ async function main () { console.log('Sending', AMOUNT, 'from', address, 'who has a balance of', balance.free, 'to', recipient, 'with nonce', nonce.toString()); api.tx.balances - .transfer(recipient, AMOUNT) + .transferKeepAlive(recipient, AMOUNT) .signAndSend(alice, { nonce }, ({ events = [], status }) => { console.log('Transaction status:', status.type); diff --git a/tee-worker/bitacross/service/src/account_funding.rs b/tee-worker/bitacross/service/src/account_funding.rs index b80ee08e9c..61a3e8780f 100644 --- a/tee-worker/bitacross/service/src/account_funding.rs +++ b/tee-worker/bitacross/service/src/account_funding.rs @@ -158,7 +158,7 @@ fn bootstrap_funds_from_alice( println!("[+] send extrinsic: bootstrap funding Enclave from Alice's funds"); let xt = alice_signer_api .balance_transfer_allow_death(MultiAddress::Id(accountid.clone()), funding_amount); - let xt_report = alice_signer_api.submit_and_watch_extrinsic_until(xt, XtStatus::InBlock)?; + let xt_report = alice_signer_api.submit_and_watch_extrinsic_until(xt, XtStatus::Finalized)?; info!( "[<] L1 extrinsic success. extrinsic hash: {:?} / status: {:?}", xt_report.extrinsic_hash, xt_report.status diff --git a/tee-worker/common/core-primitives/extrinsics-factory/Cargo.toml b/tee-worker/common/core-primitives/extrinsics-factory/Cargo.toml index 2de446487b..e035e10c88 100644 --- a/tee-worker/common/core-primitives/extrinsics-factory/Cargo.toml +++ b/tee-worker/common/core-primitives/extrinsics-factory/Cargo.toml @@ -5,6 +5,7 @@ authors = ['Trust Computing GmbH ', 'Integritee AG = calls .iter() .map(|call| { - log::info!("Creating extrinsics using nonce: {}", nonce_value); let extrinsic_params = ParentchainExtrinsicParams::new( runtime_spec_version, runtime_transaction_version, @@ -141,6 +140,9 @@ where additional_extrinsic_params, ); let xt = compose_extrinsic_offline!(&self.signer, call, extrinsic_params).encode(); + log::info!("extrinsic created: {}", hex::encode(&xt)); + log::info!("extrinsic nonce: {}", nonce_value); + log::info!("extrinsic hash: {}", hex::encode(blake2_256(&xt))); nonce_value += 1; xt }) diff --git a/tee-worker/common/core-primitives/node-api/api-client-types/src/lib.rs b/tee-worker/common/core-primitives/node-api/api-client-types/src/lib.rs index 9da42eaf44..44d17c3f89 100644 --- a/tee-worker/common/core-primitives/node-api/api-client-types/src/lib.rs +++ b/tee-worker/common/core-primitives/node-api/api-client-types/src/lib.rs @@ -86,6 +86,7 @@ pub enum XtStatus { Ready = 1, Broadcast = 2, InBlock = 3, + Retracted = 4, Finalized = 6, } @@ -95,6 +96,7 @@ impl From for substrate_api_client::XtStatus { XtStatus::Ready => substrate_api_client::XtStatus::Ready, XtStatus::Broadcast => substrate_api_client::XtStatus::Broadcast, XtStatus::InBlock => substrate_api_client::XtStatus::InBlock, + XtStatus::Retracted => substrate_api_client::XtStatus::Retracted, XtStatus::Finalized => substrate_api_client::XtStatus::Finalized, } } @@ -217,6 +219,7 @@ mod tests { assert_eq!(1, XtStatus::Ready as u8); assert_eq!(2, XtStatus::Broadcast as u8); assert_eq!(3, XtStatus::InBlock as u8); + assert_eq!(4, XtStatus::Retracted as u8); assert_eq!(6, XtStatus::Finalized as u8); } @@ -242,6 +245,10 @@ mod tests { XtStatus::InBlock as u8, TransactionStatus::::InBlock(Hash::random()).as_u8() ); + assert_eq!( + XtStatus::Retracted as u8, + TransactionStatus::::Retracted(Hash::random()).as_u8() + ); assert_eq!( XtStatus::Finalized as u8, TransactionStatus::::Finalized(Hash::random()).as_u8() diff --git a/tee-worker/identity/client-api/parachain-api/package.json b/tee-worker/identity/client-api/parachain-api/package.json index 161d6a3d78..6b5c09e0c6 100644 --- a/tee-worker/identity/client-api/parachain-api/package.json +++ b/tee-worker/identity/client-api/parachain-api/package.json @@ -19,23 +19,23 @@ "lint": "tsc --noEmit --pretty" }, "dependencies": { - "@polkadot/api": "^10.9.1", - "@polkadot/api-augment": "^10.9.1", - "@polkadot/api-derive": "^10.9.1", - "@polkadot/api-base": "^10.9.1", + "@polkadot/api": "^15.0.1", + "@polkadot/api-augment": "^15.0.1", + "@polkadot/api-derive": "^15.0.1", + "@polkadot/api-base": "^15.0.1", "@polkadot/keyring": "^12.2.1", - "@polkadot/types": "^10.9.1", - "@polkadot/types-augment": "^10.9.1", - "@polkadot/types-create": "^10.9.1", - "@polkadot/types-known": "^10.9.1", - "@polkadot/types-support": "^10.9.1", + "@polkadot/types": "^15.0.1", + "@polkadot/types-augment": "^15.0.1", + "@polkadot/types-create": "^15.0.1", + "@polkadot/types-known": "^15.0.1", + "@polkadot/types-support": "^15.0.1", "@polkadot/util": "^12.5.1", "@polkadot/util-crypto": "^12.5.1", - "@polkadot/types-codec": "^10.9.1", - "@polkadot/rpc-core": "^10.9.1" + "@polkadot/types-codec": "^15.0.1", + "@polkadot/rpc-core": "^15.0.1" }, "devDependencies": { - "@polkadot/typegen": "^10.9.1", + "@polkadot/typegen": "^15.0.1", "@types/node": "^20.3.1", "prettier": "2.8.1", "ts-node": "^10.9.1", diff --git a/tee-worker/identity/client-api/pnpm-lock.yaml b/tee-worker/identity/client-api/pnpm-lock.yaml index 94b1e4725c..c00ae2c4a4 100644 --- a/tee-worker/identity/client-api/pnpm-lock.yaml +++ b/tee-worker/identity/client-api/pnpm-lock.yaml @@ -11,779 +11,931 @@ importers: parachain-api: dependencies: '@polkadot/api': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/api@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-augment': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/api-augment@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-base': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/api-base@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-derive': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/api-derive@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/keyring': specifier: ^12.2.1 - version: registry.npmjs.org/@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + version: 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/rpc-core': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/rpc-core@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-augment': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-augment@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-codec': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-codec@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-create': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-create@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-known': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-known@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-support': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-support@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/util': specifier: ^12.5.1 - version: registry.npmjs.org/@polkadot/util@12.5.1 + version: 12.5.1 '@polkadot/util-crypto': specifier: ^12.5.1 - version: registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1) + version: 12.5.1(@polkadot/util@12.5.1) devDependencies: '@polkadot/typegen': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/typegen@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@types/node': specifier: ^20.3.1 - version: registry.npmjs.org/@types/node@20.7.1 + version: 20.7.1 prettier: specifier: 2.8.1 - version: registry.npmjs.org/prettier@2.8.1 + version: 2.8.1 ts-node: specifier: ^10.9.1 - version: registry.npmjs.org/ts-node@10.9.1(@types/node@20.7.1)(typescript@5.2.2) + version: 10.9.1(@types/node@20.7.1)(typescript@5.2.2) typescript: specifier: ^5.0.4 - version: registry.npmjs.org/typescript@5.2.2 + version: 5.2.2 sidechain-api: dependencies: '@polkadot/api': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/api@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-augment': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/api-augment@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-base': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/api-base@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-derive': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/api-derive@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/keyring': specifier: ^12.2.1 - version: registry.npmjs.org/@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + version: 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/rpc-core': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/rpc-core@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-augment': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-augment@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-codec': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-codec@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-create': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-create@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-known': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-known@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-support': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/types-support@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/util': specifier: ^12.5.1 - version: registry.npmjs.org/@polkadot/util@12.5.1 + version: 12.5.1 '@polkadot/util-crypto': specifier: ^12.5.1 - version: registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1) + version: 12.5.1(@polkadot/util@12.5.1) devDependencies: '@polkadot/typegen': - specifier: ^10.9.1 - version: registry.npmjs.org/@polkadot/typegen@10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@types/node': specifier: ^20.3.1 - version: registry.npmjs.org/@types/node@20.7.1 + version: 20.7.1 prettier: specifier: 2.8.1 - version: registry.npmjs.org/prettier@2.8.1 + version: 2.8.1 ts-node: specifier: ^10.9.1 - version: registry.npmjs.org/ts-node@10.9.1(@types/node@20.7.1)(typescript@5.2.2) + version: 10.9.1(@types/node@20.7.1)(typescript@5.2.2) typescript: specifier: ^5.0.4 - version: registry.npmjs.org/typescript@5.2.2 + version: 5.2.2 packages: - registry.npmjs.org/@cspotcode/source-map-support@0.8.1: - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz} - name: '@cspotcode/source-map-support' - version: 0.8.1 + /@cspotcode/source-map-support@0.8.1: + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} dependencies: - '@jridgewell/trace-mapping': registry.npmjs.org/@jridgewell/trace-mapping@0.3.9 + '@jridgewell/trace-mapping': 0.3.9 dev: true - registry.npmjs.org/@jridgewell/resolve-uri@3.1.1: - resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz} - name: '@jridgewell/resolve-uri' - version: 3.1.1 + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} dev: true - registry.npmjs.org/@jridgewell/sourcemap-codec@1.4.15: - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz} - name: '@jridgewell/sourcemap-codec' - version: 1.4.15 + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - registry.npmjs.org/@jridgewell/trace-mapping@0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz} - name: '@jridgewell/trace-mapping' - version: 0.3.9 + /@jridgewell/trace-mapping@0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: - '@jridgewell/resolve-uri': registry.npmjs.org/@jridgewell/resolve-uri@3.1.1 - '@jridgewell/sourcemap-codec': registry.npmjs.org/@jridgewell/sourcemap-codec@1.4.15 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true - registry.npmjs.org/@noble/curves@1.2.0: - resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz} - name: '@noble/curves' - version: 1.2.0 + /@noble/curves@1.2.0: + resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} + dependencies: + '@noble/hashes': 1.3.2 + dev: false + + /@noble/curves@1.7.0: + resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} + engines: {node: ^14.21.3 || >=16} dependencies: - '@noble/hashes': registry.npmjs.org/@noble/hashes@1.3.2 + '@noble/hashes': 1.6.0 - registry.npmjs.org/@noble/hashes@1.3.2: - resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz} - name: '@noble/hashes' - version: 1.3.2 + /@noble/hashes@1.3.2: + resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} - registry.npmjs.org/@polkadot/api-augment@10.9.1: - resolution: {integrity: sha512-kRZZvCFVcN4hAH4dJ+Qzfdy27/4EEq3oLDf3ihj0LTVrAezSWcKPGE3EVFy+Mn6Lo4SUc7RVyoKvIUhSk2l4Dg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-10.9.1.tgz} - name: '@polkadot/api-augment' - version: 10.9.1 - engines: {node: '>=16'} + /@noble/hashes@1.6.0: + resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} + engines: {node: ^14.21.3 || >=16} + + /@noble/hashes@1.6.1: + resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} + engines: {node: ^14.21.3 || >=16} + + /@polkadot-api/json-rpc-provider-proxy@0.1.0: + resolution: {integrity: sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==} + requiresBuild: true + optional: true + + /@polkadot-api/json-rpc-provider@0.0.1: + resolution: {integrity: sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==} + requiresBuild: true + optional: true + + /@polkadot-api/metadata-builders@0.3.2: + resolution: {integrity: sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==} + requiresBuild: true + dependencies: + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/utils': 0.1.0 + optional: true + + /@polkadot-api/observable-client@0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.1): + resolution: {integrity: sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==} + requiresBuild: true + peerDependencies: + '@polkadot-api/substrate-client': 0.1.4 + rxjs: '>=7.8.0' + dependencies: + '@polkadot-api/metadata-builders': 0.3.2 + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/substrate-client': 0.1.4 + '@polkadot-api/utils': 0.1.0 + rxjs: 7.8.1 + optional: true + + /@polkadot-api/substrate-bindings@0.6.0: + resolution: {integrity: sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==} + requiresBuild: true + dependencies: + '@noble/hashes': 1.3.2 + '@polkadot-api/utils': 0.1.0 + '@scure/base': 1.1.3 + scale-ts: 1.6.1 + optional: true + + /@polkadot-api/substrate-client@0.1.4: + resolution: {integrity: sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==} + requiresBuild: true + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/utils': 0.1.0 + optional: true + + /@polkadot-api/utils@0.1.0: + resolution: {integrity: sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==} + requiresBuild: true + optional: true + + /@polkadot/api-augment@15.0.1: + resolution: {integrity: sha512-dNFrim/87+rStNCrI1aSaH0nZzRadDwEIya/p860lFRVZQpkBvZlqvSBQUqcKxI0c5c1pp1uaSEixq+A+IOUBg==} + engines: {node: '>=18'} dependencies: - '@polkadot/api-base': registry.npmjs.org/@polkadot/api-base@10.9.1 - '@polkadot/rpc-augment': registry.npmjs.org/@polkadot/rpc-augment@10.9.1 - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/types-augment': registry.npmjs.org/@polkadot/types-augment@10.9.1 - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/api-base': 15.0.1 + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - registry.npmjs.org/@polkadot/api-base@10.9.1: - resolution: {integrity: sha512-Q3m2KzlceMK2kX8bhnUZWk3RT6emmijeeFZZQgCePpEcrSeNjnqG4qjuTPgkveaOkUT8MAoDc5Avuzcc2jlW9g==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/api-base/-/api-base-10.9.1.tgz} - name: '@polkadot/api-base' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/api-base@15.0.1: + resolution: {integrity: sha512-P4WQ+SqyuotVd//EFMIzlWLRbER9JycpdmTaKof2NpVioGotbHhJtO4TXPC3CW1C8zovM7KYrcWtz6b8/FxqoA==} + engines: {node: '>=18'} dependencies: - '@polkadot/rpc-core': registry.npmjs.org/@polkadot/rpc-core@10.9.1 - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - rxjs: registry.npmjs.org/rxjs@7.8.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/util': 13.2.3 + rxjs: 7.8.1 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - registry.npmjs.org/@polkadot/api-derive@10.9.1: - resolution: {integrity: sha512-mRud1UZCFIc4Z63qAoGSIHh/foyUYADfy1RQYCmPpeFKfIdCIrHpd7xFdJXTOMYOS0BwlM6u4qli/ZT4XigezQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-10.9.1.tgz} - name: '@polkadot/api-derive' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/api-derive@15.0.1: + resolution: {integrity: sha512-gaLqZ8wL+hGMntq5gxHb6Rv+EQzmmnC63plMBvk5pnNfCm4xjN43GYpbOwSQknHVNo+irC7qwD3GyPK6TfFUUA==} + engines: {node: '>=18'} dependencies: - '@polkadot/api': registry.npmjs.org/@polkadot/api@10.9.1 - '@polkadot/api-augment': registry.npmjs.org/@polkadot/api-augment@10.9.1 - '@polkadot/api-base': registry.npmjs.org/@polkadot/api-base@10.9.1 - '@polkadot/rpc-core': registry.npmjs.org/@polkadot/rpc-core@10.9.1 - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/util-crypto': registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1) - rxjs: registry.npmjs.org/rxjs@7.8.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/api': 15.0.1 + '@polkadot/api-augment': 15.0.1 + '@polkadot/api-base': 15.0.1 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + rxjs: 7.8.1 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - registry.npmjs.org/@polkadot/api@10.9.1: - resolution: {integrity: sha512-ND/2UqZBWvtt4PfV03OStTKg0mxmPk4UpMAgJKutdgsz/wP9CYJ1KbjwFgPNekL9JnzbKQsWyQNPVrcw7kQk8A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/api/-/api-10.9.1.tgz} - name: '@polkadot/api' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/api@15.0.1: + resolution: {integrity: sha512-ZOqw99B70XrX0it0cWu1YSBrtGNhdFpk5zvUVL5+FD8iyO+Tuk1m32VR0PukDCdlwxFXuEw7vRdZX/G/BzoZhg==} + engines: {node: '>=18'} dependencies: - '@polkadot/api-augment': registry.npmjs.org/@polkadot/api-augment@10.9.1 - '@polkadot/api-base': registry.npmjs.org/@polkadot/api-base@10.9.1 - '@polkadot/api-derive': registry.npmjs.org/@polkadot/api-derive@10.9.1 - '@polkadot/keyring': registry.npmjs.org/@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) - '@polkadot/rpc-augment': registry.npmjs.org/@polkadot/rpc-augment@10.9.1 - '@polkadot/rpc-core': registry.npmjs.org/@polkadot/rpc-core@10.9.1 - '@polkadot/rpc-provider': registry.npmjs.org/@polkadot/rpc-provider@10.9.1 - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/types-augment': registry.npmjs.org/@polkadot/types-augment@10.9.1 - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/types-create': registry.npmjs.org/@polkadot/types-create@10.9.1 - '@polkadot/types-known': registry.npmjs.org/@polkadot/types-known@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/util-crypto': registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1) - eventemitter3: registry.npmjs.org/eventemitter3@5.0.1 - rxjs: registry.npmjs.org/rxjs@7.8.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/api-augment': 15.0.1 + '@polkadot/api-base': 15.0.1 + '@polkadot/api-derive': 15.0.1 + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/rpc-provider': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/types-known': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + eventemitter3: 5.0.1 + rxjs: 7.8.1 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - registry.npmjs.org/@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1): - resolution: {integrity: sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/keyring/-/keyring-12.5.1.tgz} - id: registry.npmjs.org/@polkadot/keyring/12.5.1 - name: '@polkadot/keyring' - version: 12.5.1 + /@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1): + resolution: {integrity: sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1 dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/util-crypto': registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1) - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) + tslib: 2.6.2 + dev: false - registry.npmjs.org/@polkadot/networks@12.5.1: - resolution: {integrity: sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/networks/-/networks-12.5.1.tgz} - name: '@polkadot/networks' - version: 12.5.1 - engines: {node: '>=16'} + /@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3): + resolution: {integrity: sha512-pgTo6DXNXub0wGD+MnVHYhKxf80Jl+QMOCb818ioGdXz++Uw4mTueFAwtB+N7TGo0HafhChUiNJDxFdlDkcAng==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3 dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@substrate/ss58-registry': registry.npmjs.org/@substrate/ss58-registry@1.43.0 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + tslib: 2.8.1 - registry.npmjs.org/@polkadot/rpc-augment@10.9.1: - resolution: {integrity: sha512-MaLHkNlyqN20ZRYr6uNd1BZr1OsrnX9qLAmsl0mcrri1vPGRH6VHjfFH1RBLkikpWD82v17g0l2hLwdV1ZHMcw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-10.9.1.tgz} - name: '@polkadot/rpc-augment' - version: 10.9.1 + /@polkadot/networks@12.5.1: + resolution: {integrity: sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ==} engines: {node: '>=16'} dependencies: - '@polkadot/rpc-core': registry.npmjs.org/@polkadot/rpc-core@10.9.1 - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 12.5.1 + '@substrate/ss58-registry': 1.43.0 + tslib: 2.6.2 + dev: false + + /@polkadot/networks@13.2.3: + resolution: {integrity: sha512-mG+zkXg/33AyPrkv2xBbAo3LBUwOwBn6qznBU/4jxiZPnVvCwMaxE7xHM22B5riItbNJ169FXv3wy0v6ZmkFbw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/util': 13.2.3 + '@substrate/ss58-registry': 1.51.0 + tslib: 2.8.1 + + /@polkadot/rpc-augment@15.0.1: + resolution: {integrity: sha512-4FoY+oXC08+vaLMAvFgOOjcFHNBHEv2kOqgxtO/yCyMLNvyRRnrBtMofznJ1EWEwzehvU5iSlbMCerKdImFRZQ==} + engines: {node: '>=18'} + dependencies: + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - registry.npmjs.org/@polkadot/rpc-core@10.9.1: - resolution: {integrity: sha512-ZtA8B8SfXSAwVkBlCcKRHw0eSM7ec/sbiNOM5GasXPeRujUgT7lOwSH2GbUZSqe9RfRDMp6DvO9c2JoGc3LLWw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-10.9.1.tgz} - name: '@polkadot/rpc-core' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/rpc-core@15.0.1: + resolution: {integrity: sha512-I5F1T17Nr5oEuqAysP7n14tWym54hCriqj0pV0tM4yfIF0iWaWPkqWNRU7uNfv86n3m15IMGoMapvgZVnUF5LQ==} + engines: {node: '>=18'} dependencies: - '@polkadot/rpc-augment': registry.npmjs.org/@polkadot/rpc-augment@10.9.1 - '@polkadot/rpc-provider': registry.npmjs.org/@polkadot/rpc-provider@10.9.1 - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - rxjs: registry.npmjs.org/rxjs@7.8.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/rpc-provider': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/util': 13.2.3 + rxjs: 7.8.1 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - registry.npmjs.org/@polkadot/rpc-provider@10.9.1: - resolution: {integrity: sha512-4QzT2QzD+320+eT6b79sGAA85Tt3Bb8fQvse4r5Mom2iiBd2SO81vOhxSAOaIe4GUsw25VzFJmsbe7+OObItdg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-10.9.1.tgz} - name: '@polkadot/rpc-provider' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/rpc-provider@15.0.1: + resolution: {integrity: sha512-ziRob/sco751+OK700vNh7IivysFOeZthO7JpC8CEQhZ2c+z/HY7bNsAucy1q1ELGe7xLMZW2/rm/RG285ZDPQ==} + engines: {node: '>=18'} dependencies: - '@polkadot/keyring': registry.npmjs.org/@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/types-support': registry.npmjs.org/@polkadot/types-support@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/util-crypto': registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1) - '@polkadot/x-fetch': registry.npmjs.org/@polkadot/x-fetch@12.5.1 - '@polkadot/x-global': registry.npmjs.org/@polkadot/x-global@12.5.1 - '@polkadot/x-ws': registry.npmjs.org/@polkadot/x-ws@12.5.1 - eventemitter3: registry.npmjs.org/eventemitter3@5.0.1 - mock-socket: registry.npmjs.org/mock-socket@9.3.1 - nock: registry.npmjs.org/nock@13.3.3 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/types': 15.0.1 + '@polkadot/types-support': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + '@polkadot/x-fetch': 13.2.3 + '@polkadot/x-global': 13.2.3 + '@polkadot/x-ws': 13.2.3 + eventemitter3: 5.0.1 + mock-socket: 9.3.1 + nock: 13.5.6 + tslib: 2.8.1 optionalDependencies: - '@substrate/connect': registry.npmjs.org/@substrate/connect@0.7.26 + '@substrate/connect': 0.8.11 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - registry.npmjs.org/@polkadot/typegen@10.9.1: - resolution: {integrity: sha512-SbG9U8/POyY8QwQUp70qzTnYsRxc6Rrjt4wzIWsBKmzVRy0i19O23EXSUo+81ukOBiLZj551GAJwRa3YBpdR+A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/typegen/-/typegen-10.9.1.tgz} - name: '@polkadot/typegen' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/typegen@15.0.1: + resolution: {integrity: sha512-XXE4ZQ6nXA98HWrNgzjQnX7emQcXqPsDsqiIytDBL4i4G/xgw4OFtykHqjbTu5y0LmoHAYsa3L6sSQU0Mg8cag==} + engines: {node: '>=18'} hasBin: true dependencies: - '@polkadot/api': registry.npmjs.org/@polkadot/api@10.9.1 - '@polkadot/api-augment': registry.npmjs.org/@polkadot/api-augment@10.9.1 - '@polkadot/rpc-augment': registry.npmjs.org/@polkadot/rpc-augment@10.9.1 - '@polkadot/rpc-provider': registry.npmjs.org/@polkadot/rpc-provider@10.9.1 - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/types-augment': registry.npmjs.org/@polkadot/types-augment@10.9.1 - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/types-create': registry.npmjs.org/@polkadot/types-create@10.9.1 - '@polkadot/types-support': registry.npmjs.org/@polkadot/types-support@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/util-crypto': registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1) - '@polkadot/x-ws': registry.npmjs.org/@polkadot/x-ws@12.5.1 - handlebars: registry.npmjs.org/handlebars@4.7.8 - tslib: registry.npmjs.org/tslib@2.6.2 - yargs: registry.npmjs.org/yargs@17.7.2 + '@polkadot/api': 15.0.1 + '@polkadot/api-augment': 15.0.1 + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/rpc-provider': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/types-support': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + '@polkadot/x-ws': 13.2.3 + handlebars: 4.7.8 + tslib: 2.8.1 + yargs: 17.7.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: true - registry.npmjs.org/@polkadot/types-augment@10.9.1: - resolution: {integrity: sha512-OY9/jTMFRFqYdkUnfcGwqMLC64A0Q25bjvCuVQCVjsPFKE3wl0Kt5rNT01eV2UmLXrR6fY0xWbR2w80bLA7CIQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-10.9.1.tgz} - name: '@polkadot/types-augment' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/types-augment@15.0.1: + resolution: {integrity: sha512-6fTjJmTGd46UUIYPHr5oA6kiFl6IY45dvDgUQu07AmVdEQlq3OPq/7GyS639SLHHfMLSPbFKyt1iMVj9BNu0qA==} + engines: {node: '>=18'} dependencies: - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 - - registry.npmjs.org/@polkadot/types-codec@10.9.1: - resolution: {integrity: sha512-mJ5OegKGraY1FLvEa8FopRCr3pQrhDkcn5RNOjmgJQozENVeRaxhk0NwxYz7IojFvSDnKnc6lNQfKaaSe5pLHg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-10.9.1.tgz} - name: '@polkadot/types-codec' - version: 10.9.1 - engines: {node: '>=16'} + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + + /@polkadot/types-codec@15.0.1: + resolution: {integrity: sha512-SLypmYH6FYRmqGG8TBbi4X0tYh1OUZEMNkujln2eHxsuFIYRGrHFnEohtkF9ktSxoUji2ph9I5ZW5gqQvEsXrA==} + engines: {node: '>=18'} dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/x-bigint': registry.npmjs.org/@polkadot/x-bigint@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 13.2.3 + '@polkadot/x-bigint': 13.2.3 + tslib: 2.8.1 - registry.npmjs.org/@polkadot/types-create@10.9.1: - resolution: {integrity: sha512-OVz50MGTTuiuVnRP/zAx4CTuLioc0hsiwNwqN2lNhmIJGtnQ4Vy/7mQRsIWehiYz6g0Vzzm5B3qWkTXO1NSN5w==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/types-create/-/types-create-10.9.1.tgz} - name: '@polkadot/types-create' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/types-create@15.0.1: + resolution: {integrity: sha512-M1vs5o3sw8p3g88GhJgz2vSSgxnr5CfbaL4r5EYzR+Hx9xUvz03aEofySvodusEpdRQ9MijnsNSP9306xvcqhw==} + engines: {node: '>=18'} dependencies: - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 - registry.npmjs.org/@polkadot/types-known@10.9.1: - resolution: {integrity: sha512-zCMVWc4pJtkbMFPu72bD4IhvV/gkHXPX3C5uu92WdmCfnn0vEIEsMKWlVXVVvQQZKAqvs/awpqIfrUtEViOGEA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/types-known/-/types-known-10.9.1.tgz} - name: '@polkadot/types-known' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/types-known@15.0.1: + resolution: {integrity: sha512-9VC6QX4/JAjWmnSdaZIm4n8CgmVj9KutgQ5/Uy9VBrTwfRzUPIBwHZT8lPQLeN1WwQRbtc5ojDoo2SR+OqGTqw==} + engines: {node: '>=18'} dependencies: - '@polkadot/networks': registry.npmjs.org/@polkadot/networks@12.5.1 - '@polkadot/types': registry.npmjs.org/@polkadot/types@10.9.1 - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/types-create': registry.npmjs.org/@polkadot/types-create@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 - - registry.npmjs.org/@polkadot/types-support@10.9.1: - resolution: {integrity: sha512-XsieuLDsszvMZQlleacQBfx07i/JkwQV/UxH9q8Hz7Okmaz9pEVEW1h3ka2/cPuC7a4l32JhaORBUYshBZNdJg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/types-support/-/types-support-10.9.1.tgz} - name: '@polkadot/types-support' - version: 10.9.1 - engines: {node: '>=16'} + '@polkadot/networks': 13.2.3 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + + /@polkadot/types-support@15.0.1: + resolution: {integrity: sha512-w/IWFuDn290brw75ZXKPkQMazz0yizE0zK0XuqP2S4IW009x+z0peRc7Q4k36JOqDVDwSc38vTxWtRPVqdoI1g==} + engines: {node: '>=18'} dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 - registry.npmjs.org/@polkadot/types@10.9.1: - resolution: {integrity: sha512-AG33i2ZGGfq7u+5rkAdGrXAQHHl844/Yv+junH5ZzX69xiCoWO1bH/yzDUNBdpki2GlACWvF9nLYh3F2tVF93w==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/types/-/types-10.9.1.tgz} - name: '@polkadot/types' - version: 10.9.1 - engines: {node: '>=16'} + /@polkadot/types@15.0.1: + resolution: {integrity: sha512-jnn0h8Z4O3l/UjrBOJPmkfKjuC6fSqhQfsn7HpWF18lEicGp4/A7X3AZryIg8npKHHiuH30bK/o1VuivH+4dVw==} + engines: {node: '>=18'} dependencies: - '@polkadot/keyring': registry.npmjs.org/@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) - '@polkadot/types-augment': registry.npmjs.org/@polkadot/types-augment@10.9.1 - '@polkadot/types-codec': registry.npmjs.org/@polkadot/types-codec@10.9.1 - '@polkadot/types-create': registry.npmjs.org/@polkadot/types-create@10.9.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/util-crypto': registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1) - rxjs: registry.npmjs.org/rxjs@7.8.1 - tslib: registry.npmjs.org/tslib@2.6.2 - - registry.npmjs.org/@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1): - resolution: {integrity: sha512-Y8ORbMcsM/VOqSG3DgqutRGQ8XXK+X9M3C8oOEI2Tji65ZsXbh9Yh+ryPLM0oBp/9vqOXjkLgZJbbVuQceOw0A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-12.5.1.tgz} - id: registry.npmjs.org/@polkadot/util-crypto/12.5.1 - name: '@polkadot/util-crypto' - version: 12.5.1 + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + rxjs: 7.8.1 + tslib: 2.8.1 + + /@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1): + resolution: {integrity: sha512-Y8ORbMcsM/VOqSG3DgqutRGQ8XXK+X9M3C8oOEI2Tji65ZsXbh9Yh+ryPLM0oBp/9vqOXjkLgZJbbVuQceOw0A==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': 12.5.1 dependencies: - '@noble/curves': registry.npmjs.org/@noble/curves@1.2.0 - '@noble/hashes': registry.npmjs.org/@noble/hashes@1.3.2 - '@polkadot/networks': registry.npmjs.org/@polkadot/networks@12.5.1 - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/wasm-crypto': registry.npmjs.org/@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) - '@polkadot/wasm-util': registry.npmjs.org/@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1) - '@polkadot/x-bigint': registry.npmjs.org/@polkadot/x-bigint@12.5.1 - '@polkadot/x-randomvalues': registry.npmjs.org/@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) - '@scure/base': registry.npmjs.org/@scure/base@1.1.3 - tslib: registry.npmjs.org/tslib@2.6.2 - - registry.npmjs.org/@polkadot/util@12.5.1: - resolution: {integrity: sha512-fDBZL7D4/baMG09Qowseo884m3QBzErGkRWNBId1UjWR99kyex+cIY9fOSzmuQxo6nLdJlLHw1Nz2caN3+Bq0A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/util/-/util-12.5.1.tgz} - name: '@polkadot/util' - version: 12.5.1 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@polkadot/networks': 12.5.1 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-crypto': 7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-bigint': 12.5.1 + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) + '@scure/base': 1.1.3 + tslib: 2.6.2 + dev: false + + /@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3): + resolution: {integrity: sha512-5sbggmLbn5eiuVMyPROPlT5roHRqdKHOfSpioNbGvGIZ1qIWVoC1RfsK0NWJOVGDzy6DpQe0KYT/kgcU5Xsrzw==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + dependencies: + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + '@polkadot/networks': 13.2.3 + '@polkadot/util': 13.2.3 + '@polkadot/wasm-crypto': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-bigint': 13.2.3 + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + '@scure/base': 1.2.1 + tslib: 2.8.1 + + /@polkadot/util@12.5.1: + resolution: {integrity: sha512-fDBZL7D4/baMG09Qowseo884m3QBzErGkRWNBId1UjWR99kyex+cIY9fOSzmuQxo6nLdJlLHw1Nz2caN3+Bq0A==} engines: {node: '>=16'} dependencies: - '@polkadot/x-bigint': registry.npmjs.org/@polkadot/x-bigint@12.5.1 - '@polkadot/x-global': registry.npmjs.org/@polkadot/x-global@12.5.1 - '@polkadot/x-textdecoder': registry.npmjs.org/@polkadot/x-textdecoder@12.5.1 - '@polkadot/x-textencoder': registry.npmjs.org/@polkadot/x-textencoder@12.5.1 - '@types/bn.js': registry.npmjs.org/@types/bn.js@5.1.2 - bn.js: registry.npmjs.org/bn.js@5.2.1 - tslib: registry.npmjs.org/tslib@2.6.2 - - registry.npmjs.org/@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): - resolution: {integrity: sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-7.2.2.tgz} - id: registry.npmjs.org/@polkadot/wasm-bridge/7.2.2 - name: '@polkadot/wasm-bridge' - version: 7.2.2 + '@polkadot/x-bigint': 12.5.1 + '@polkadot/x-global': 12.5.1 + '@polkadot/x-textdecoder': 12.5.1 + '@polkadot/x-textencoder': 12.5.1 + '@types/bn.js': 5.1.2 + bn.js: 5.2.1 + tslib: 2.6.2 + dev: false + + /@polkadot/util@13.2.3: + resolution: {integrity: sha512-pioNnsig3qHXrfOKMe4Yqos8B8N3/EZUpS+WfTpWnn1VjYban/0GrTXeavPlAwggnY27b8fS6rBzQBhnVYDw8g==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-bigint': 13.2.3 + '@polkadot/x-global': 13.2.3 + '@polkadot/x-textdecoder': 13.2.3 + '@polkadot/x-textencoder': 13.2.3 + '@types/bn.js': 5.1.6 + bn.js: 5.2.1 + tslib: 2.8.1 + + /@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/wasm-util': registry.npmjs.org/@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1) - '@polkadot/x-randomvalues': registry.npmjs.org/@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) + tslib: 2.6.2 + dev: false + + /@polkadot/wasm-bridge@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 - registry.npmjs.org/@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.5.1): - resolution: {integrity: sha512-wKg+cpsWQCTSVhjlHuNeB/184rxKqY3vaklacbLOMbUXieIfuDBav5PJdzS3yeiVE60TpYaHW4iX/5OYHS82gg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.2.2.tgz} - id: registry.npmjs.org/@polkadot/wasm-crypto-asmjs/7.2.2 - name: '@polkadot/wasm-crypto-asmjs' - version: 7.2.2 + /@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.5.1): + resolution: {integrity: sha512-wKg+cpsWQCTSVhjlHuNeB/184rxKqY3vaklacbLOMbUXieIfuDBav5PJdzS3yeiVE60TpYaHW4iX/5OYHS82gg==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 + dev: false + + /@polkadot/wasm-crypto-asmjs@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 - registry.npmjs.org/@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): - resolution: {integrity: sha512-vD4iPIp9x+SssUIWUenxWLPw4BVIwhXHNMpsV81egK990tvpyIxL205/EF5QRb1mKn8WfWcNFm5tYwwh9NdnnA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.2.2.tgz} - id: registry.npmjs.org/@polkadot/wasm-crypto-init/7.2.2 - name: '@polkadot/wasm-crypto-init' - version: 7.2.2 + /@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-vD4iPIp9x+SssUIWUenxWLPw4BVIwhXHNMpsV81egK990tvpyIxL205/EF5QRb1mKn8WfWcNFm5tYwwh9NdnnA==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/wasm-bridge': registry.npmjs.org/@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) - '@polkadot/wasm-crypto-asmjs': registry.npmjs.org/@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.5.1) - '@polkadot/wasm-crypto-wasm': registry.npmjs.org/@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.5.1) - '@polkadot/wasm-util': registry.npmjs.org/@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1) - '@polkadot/x-randomvalues': registry.npmjs.org/@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) - tslib: registry.npmjs.org/tslib@2.6.2 - - registry.npmjs.org/@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.5.1): - resolution: {integrity: sha512-3efoIB6jA3Hhv6k0YIBwCtlC8gCSWCk+R296yIXRLLr3cGN415KM/PO/d1JIXYI64lbrRzWRmZRhllw3jf6Atg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.2.2.tgz} - id: registry.npmjs.org/@polkadot/wasm-crypto-wasm/7.2.2 - name: '@polkadot/wasm-crypto-wasm' - version: 7.2.2 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) + tslib: 2.6.2 + dev: false + + /@polkadot/wasm-crypto-init@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 + + /@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.5.1): + resolution: {integrity: sha512-3efoIB6jA3Hhv6k0YIBwCtlC8gCSWCk+R296yIXRLLr3cGN415KM/PO/d1JIXYI64lbrRzWRmZRhllw3jf6Atg==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/wasm-util': registry.npmjs.org/@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1) - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + tslib: 2.6.2 + dev: false + + /@polkadot/wasm-crypto-wasm@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + tslib: 2.8.1 - registry.npmjs.org/@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): - resolution: {integrity: sha512-1ZY1rxUTawYm0m1zylvBMFovNIHYgG2v/XoASNp/EMG5c8FQIxCbhJRaTBA983GVq4lN/IAKREKEp9ZbLLqssA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-7.2.2.tgz} - id: registry.npmjs.org/@polkadot/wasm-crypto/7.2.2 - name: '@polkadot/wasm-crypto' - version: 7.2.2 + /@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-1ZY1rxUTawYm0m1zylvBMFovNIHYgG2v/XoASNp/EMG5c8FQIxCbhJRaTBA983GVq4lN/IAKREKEp9ZbLLqssA==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/wasm-bridge': registry.npmjs.org/@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) - '@polkadot/wasm-crypto-asmjs': registry.npmjs.org/@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.5.1) - '@polkadot/wasm-crypto-init': registry.npmjs.org/@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) - '@polkadot/wasm-crypto-wasm': registry.npmjs.org/@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.5.1) - '@polkadot/wasm-util': registry.npmjs.org/@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1) - '@polkadot/x-randomvalues': registry.npmjs.org/@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) - tslib: registry.npmjs.org/tslib@2.6.2 - - registry.npmjs.org/@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1): - resolution: {integrity: sha512-N/25960ifCc56sBlJZ2h5UBpEPvxBmMLgwYsl7CUuT+ea2LuJW9Xh8VHDN/guYXwmm92/KvuendYkEUykpm/JQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-7.2.2.tgz} - id: registry.npmjs.org/@polkadot/wasm-util/7.2.2 - name: '@polkadot/wasm-util' - version: 7.2.2 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/wasm-crypto-init': 7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) + tslib: 2.6.2 + dev: false + + /@polkadot/wasm-crypto@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-init': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 + + /@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1): + resolution: {integrity: sha512-N/25960ifCc56sBlJZ2h5UBpEPvxBmMLgwYsl7CUuT+ea2LuJW9Xh8VHDN/guYXwmm92/KvuendYkEUykpm/JQ==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 + dev: false - registry.npmjs.org/@polkadot/x-bigint@12.5.1: - resolution: {integrity: sha512-Fw39eoN9v0sqxSzfSC5awaDVdzojIiE7d1hRSQgVSrES+8whWvtbYMR0qwbVhTuW7DvogHmye41P9xKMlXZysg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-12.5.1.tgz} - name: '@polkadot/x-bigint' - version: 12.5.1 - engines: {node: '>=16'} + /@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' dependencies: - '@polkadot/x-global': registry.npmjs.org/@polkadot/x-global@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 - registry.npmjs.org/@polkadot/x-fetch@12.5.1: - resolution: {integrity: sha512-Bc019lOKCoQJrthiS+H3LwCahGtl5tNnb2HK7xe3DBQIUx9r2HsF/uEngNfMRUFkUYg5TPCLFbEWU8NIREBS1A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-12.5.1.tgz} - name: '@polkadot/x-fetch' - version: 12.5.1 + /@polkadot/x-bigint@12.5.1: + resolution: {integrity: sha512-Fw39eoN9v0sqxSzfSC5awaDVdzojIiE7d1hRSQgVSrES+8whWvtbYMR0qwbVhTuW7DvogHmye41P9xKMlXZysg==} engines: {node: '>=16'} dependencies: - '@polkadot/x-global': registry.npmjs.org/@polkadot/x-global@12.5.1 - node-fetch: registry.npmjs.org/node-fetch@3.3.2 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 + dev: false + + /@polkadot/x-bigint@13.2.3: + resolution: {integrity: sha512-VKgEAh0LsxTd/Hg517Tt5ZU4CySjBwMpaojbkjgv3fOdg1cN7t4eFEUxpyj7mlO0cp22SzDh7nmy4TO98qhLQA==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + + /@polkadot/x-fetch@13.2.3: + resolution: {integrity: sha512-7Nmk+8ieEGzz43nc1rX6nH3rQo6rhGmAaIXJWnXY9gOHY0k1me1bJYbP+xDdh8vcLh8eY3D1sESUwG6QYZW2lg==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + node-fetch: 3.3.2 + tslib: 2.8.1 - registry.npmjs.org/@polkadot/x-global@12.5.1: - resolution: {integrity: sha512-6K0YtWEg0eXInDOihU5aSzeb1t9TiDdX9ZuRly+58ALSqw5kPZYmQLbzE1d8HWzyXRXK+YH65GtLzfMGqfYHmw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/x-global/-/x-global-12.5.1.tgz} - name: '@polkadot/x-global' - version: 12.5.1 + /@polkadot/x-global@12.5.1: + resolution: {integrity: sha512-6K0YtWEg0eXInDOihU5aSzeb1t9TiDdX9ZuRly+58ALSqw5kPZYmQLbzE1d8HWzyXRXK+YH65GtLzfMGqfYHmw==} engines: {node: '>=16'} dependencies: - tslib: registry.npmjs.org/tslib@2.6.2 + tslib: 2.6.2 + dev: false + + /@polkadot/x-global@13.2.3: + resolution: {integrity: sha512-7MYQIAEwBkRcNrgqac5PbB0kNPlI6ISJEy6/Nb+crj8BFjQ8rf11PF49fq0QsvDeuYM1aNLigrvYZNptQs4lbw==} + engines: {node: '>=18'} + dependencies: + tslib: 2.8.1 - registry.npmjs.org/@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2): - resolution: {integrity: sha512-UsMb1d+77EPNjW78BpHjZLIm4TaIpfqq89OhZP/6gDIoS2V9iE/AK3jOWKm1G7Y2F8XIoX1qzQpuMakjfagFoQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-12.5.1.tgz} - id: registry.npmjs.org/@polkadot/x-randomvalues/12.5.1 - name: '@polkadot/x-randomvalues' - version: 12.5.1 + /@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2): + resolution: {integrity: sha512-UsMb1d+77EPNjW78BpHjZLIm4TaIpfqq89OhZP/6gDIoS2V9iE/AK3jOWKm1G7Y2F8XIoX1qzQpuMakjfagFoQ==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': 12.5.1 '@polkadot/wasm-util': '*' dependencies: - '@polkadot/util': registry.npmjs.org/@polkadot/util@12.5.1 - '@polkadot/wasm-util': registry.npmjs.org/@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1) - '@polkadot/x-global': registry.npmjs.org/@polkadot/x-global@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 + dev: false + + /@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1): + resolution: {integrity: sha512-Zf0GTfLmVk+VzPUmcQSpXjjmFzMTjPhXoLuIoE7xIu73T+vQ+TX9j7DvorN6bIRsnZ9l1SyTZsSf/NTjNZKIZg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 - registry.npmjs.org/@polkadot/x-textdecoder@12.5.1: - resolution: {integrity: sha512-j2YZGWfwhMC8nHW3BXq10fAPY02ObLL/qoTjCMJ1Cmc/OGq18Ep7k9cXXbjFAq3wf3tUUewt/u/hStKCk3IvfQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-12.5.1.tgz} - name: '@polkadot/x-textdecoder' - version: 12.5.1 + /@polkadot/x-textdecoder@12.5.1: + resolution: {integrity: sha512-j2YZGWfwhMC8nHW3BXq10fAPY02ObLL/qoTjCMJ1Cmc/OGq18Ep7k9cXXbjFAq3wf3tUUewt/u/hStKCk3IvfQ==} engines: {node: '>=16'} dependencies: - '@polkadot/x-global': registry.npmjs.org/@polkadot/x-global@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 + dev: false - registry.npmjs.org/@polkadot/x-textencoder@12.5.1: - resolution: {integrity: sha512-1JNNpOGb4wD+c7zFuOqjibl49LPnHNr4rj4s3WflLUIZvOMY6euoDuN3ISjQSHCLlVSoH0sOCWA3qXZU4bCTDQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-12.5.1.tgz} - name: '@polkadot/x-textencoder' - version: 12.5.1 - engines: {node: '>=16'} + /@polkadot/x-textdecoder@13.2.3: + resolution: {integrity: sha512-i8hRXPtGknmdm3FYv6/94I52VXHJZa5sgYNw1+Hqb4Jqmq4awUjea35CKXd/+aw70Qn8Ngg31l2GoiH494fa+Q==} + engines: {node: '>=18'} dependencies: - '@polkadot/x-global': registry.npmjs.org/@polkadot/x-global@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 - registry.npmjs.org/@polkadot/x-ws@12.5.1: - resolution: {integrity: sha512-efNMhB3Lh6pW2iTipMkqwrjpuUtb3EwR/jYZftiIGo5tDPB7rqoMOp9s6KRFJEIUfZkLnMUtbkZ5fHzUJaCjmQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-12.5.1.tgz} - name: '@polkadot/x-ws' - version: 12.5.1 + /@polkadot/x-textencoder@12.5.1: + resolution: {integrity: sha512-1JNNpOGb4wD+c7zFuOqjibl49LPnHNr4rj4s3WflLUIZvOMY6euoDuN3ISjQSHCLlVSoH0sOCWA3qXZU4bCTDQ==} engines: {node: '>=16'} dependencies: - '@polkadot/x-global': registry.npmjs.org/@polkadot/x-global@12.5.1 - tslib: registry.npmjs.org/tslib@2.6.2 - ws: registry.npmjs.org/ws@8.14.2 + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 + dev: false + + /@polkadot/x-textencoder@13.2.3: + resolution: {integrity: sha512-wJI3Bb/dC4zyBXJFm5+ZhyBXWoI5wvP8k8qX0/ZC0PQsgSAqs7LVhiofk4Wd94n0P41W5re58LrGXLyziSAshw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + + /@polkadot/x-ws@13.2.3: + resolution: {integrity: sha512-Y6MTAWgcnrnx/LkBx65X3ZyoJH5EFj3tXtflRoKg1+PLHSLuNBV7Wi5mLcE70z4e5c+4hgBbLq+8SqCqzFtSPw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - utf-8-validate - registry.npmjs.org/@scure/base@1.1.3: - resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz} - name: '@scure/base' - version: 1.1.3 + /@scure/base@1.1.3: + resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} + + /@scure/base@1.2.1: + resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} - registry.npmjs.org/@substrate/connect-extension-protocol@1.0.1: - resolution: {integrity: sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.1.tgz} - name: '@substrate/connect-extension-protocol' - version: 1.0.1 + /@substrate/connect-extension-protocol@2.2.1: + resolution: {integrity: sha512-GoafTgm/Jey9E4Xlj4Z5ZBt/H4drH2CNq8VrAro80rtoznrXnFDNVivLQzZN0Xaj2g8YXSn9pC9Oc9IovYZJXw==} requiresBuild: true optional: true - registry.npmjs.org/@substrate/connect@0.7.26: - resolution: {integrity: sha512-uuGSiroGuKWj1+38n1kY5HReer5iL9bRwPCzuoLtqAOmI1fGI0hsSI2LlNQMAbfRgr7VRHXOk5MTuQf5ulsFRw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@substrate/connect/-/connect-0.7.26.tgz} - name: '@substrate/connect' - version: 0.7.26 + /@substrate/connect-known-chains@1.8.0: + resolution: {integrity: sha512-sl7WfeDgnZuPvUl5Xw0XIziOTe8rEBJ3uugyDETGnafxEbjYMv5aJL0ilq5djhnQ7l9OuMJCN3Ckved2yINeeQ==} + requiresBuild: true + optional: true + + /@substrate/connect@0.8.11: + resolution: {integrity: sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==} + deprecated: versions below 1.x are no longer maintained requiresBuild: true dependencies: - '@substrate/connect-extension-protocol': registry.npmjs.org/@substrate/connect-extension-protocol@1.0.1 - eventemitter3: registry.npmjs.org/eventemitter3@4.0.7 - smoldot: registry.npmjs.org/smoldot@1.0.4 + '@substrate/connect-extension-protocol': 2.2.1 + '@substrate/connect-known-chains': 1.8.0 + '@substrate/light-client-extension-helpers': 1.0.0(smoldot@2.0.26) + smoldot: 2.0.26 transitivePeerDependencies: - bufferutil - utf-8-validate optional: true - registry.npmjs.org/@substrate/ss58-registry@1.43.0: - resolution: {integrity: sha512-USEkXA46P9sqClL7PZv0QFsit4S8Im97wchKG0/H/9q3AT/S76r40UHfCr4Un7eBJPE23f7fU9BZ0ITpP9MCsA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.43.0.tgz} - name: '@substrate/ss58-registry' - version: 1.43.0 + /@substrate/light-client-extension-helpers@1.0.0(smoldot@2.0.26): + resolution: {integrity: sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==} + requiresBuild: true + peerDependencies: + smoldot: 2.x + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/json-rpc-provider-proxy': 0.1.0 + '@polkadot-api/observable-client': 0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.1) + '@polkadot-api/substrate-client': 0.1.4 + '@substrate/connect-extension-protocol': 2.2.1 + '@substrate/connect-known-chains': 1.8.0 + rxjs: 7.8.1 + smoldot: 2.0.26 + optional: true + + /@substrate/ss58-registry@1.43.0: + resolution: {integrity: sha512-USEkXA46P9sqClL7PZv0QFsit4S8Im97wchKG0/H/9q3AT/S76r40UHfCr4Un7eBJPE23f7fU9BZ0ITpP9MCsA==} + dev: false - registry.npmjs.org/@tsconfig/node10@1.0.9: - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz} - name: '@tsconfig/node10' - version: 1.0.9 + /@substrate/ss58-registry@1.51.0: + resolution: {integrity: sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==} + + /@tsconfig/node10@1.0.9: + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} dev: true - registry.npmjs.org/@tsconfig/node12@1.0.11: - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz} - name: '@tsconfig/node12' - version: 1.0.11 + /@tsconfig/node12@1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} dev: true - registry.npmjs.org/@tsconfig/node14@1.0.3: - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz} - name: '@tsconfig/node14' - version: 1.0.3 + /@tsconfig/node14@1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} dev: true - registry.npmjs.org/@tsconfig/node16@1.0.4: - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz} - name: '@tsconfig/node16' - version: 1.0.4 + /@tsconfig/node16@1.0.4: + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true - registry.npmjs.org/@types/bn.js@5.1.2: - resolution: {integrity: sha512-dkpZu0szUtn9UXTmw+e0AJFd4D2XAxDnsCLdc05SfqpqzPEBft8eQr8uaFitfo/dUUOZERaLec2hHMG87A4Dxg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.2.tgz} - name: '@types/bn.js' - version: 5.1.2 + /@types/bn.js@5.1.2: + resolution: {integrity: sha512-dkpZu0szUtn9UXTmw+e0AJFd4D2XAxDnsCLdc05SfqpqzPEBft8eQr8uaFitfo/dUUOZERaLec2hHMG87A4Dxg==} + dependencies: + '@types/node': 20.7.1 + dev: false + + /@types/bn.js@5.1.6: + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} dependencies: - '@types/node': registry.npmjs.org/@types/node@20.7.1 + '@types/node': 20.7.1 - registry.npmjs.org/@types/node@20.7.1: - resolution: {integrity: sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz} - name: '@types/node' - version: 20.7.1 + /@types/node@20.7.1: + resolution: {integrity: sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==} - registry.npmjs.org/acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz} - name: acorn-walk - version: 8.2.0 + /acorn-walk@8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} dev: true - registry.npmjs.org/acorn@8.10.0: - resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz} - name: acorn - version: 8.10.0 + /acorn@8.10.0: + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} hasBin: true dev: true - registry.npmjs.org/ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz} - name: ansi-regex - version: 5.0.1 + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} dev: true - registry.npmjs.org/ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz} - name: ansi-styles - version: 4.3.0 + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} dependencies: - color-convert: registry.npmjs.org/color-convert@2.0.1 + color-convert: 2.0.1 dev: true - registry.npmjs.org/arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/arg/-/arg-4.1.3.tgz} - name: arg - version: 4.1.3 + /arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} dev: true - registry.npmjs.org/bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz} - name: bn.js - version: 5.2.1 + /bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - registry.npmjs.org/cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz} - name: cliui - version: 8.0.1 + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} dependencies: - string-width: registry.npmjs.org/string-width@4.2.3 - strip-ansi: registry.npmjs.org/strip-ansi@6.0.1 - wrap-ansi: registry.npmjs.org/wrap-ansi@7.0.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 dev: true - registry.npmjs.org/color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz} - name: color-convert - version: 2.0.1 + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: - color-name: registry.npmjs.org/color-name@1.1.4 + color-name: 1.1.4 dev: true - registry.npmjs.org/color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz} - name: color-name - version: 1.1.4 + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - registry.npmjs.org/create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz} - name: create-require - version: 1.1.1 + /create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true - registry.npmjs.org/data-uri-to-buffer@4.0.1: - resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz} - name: data-uri-to-buffer - version: 4.0.1 + /data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} engines: {node: '>= 12'} - registry.npmjs.org/debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/debug/-/debug-4.3.4.tgz} - name: debug - version: 4.3.4 + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -791,234 +943,163 @@ packages: supports-color: optional: true dependencies: - ms: registry.npmjs.org/ms@2.1.2 + ms: 2.1.2 - registry.npmjs.org/diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/diff/-/diff-4.0.2.tgz} - name: diff - version: 4.0.2 + /diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} dev: true - registry.npmjs.org/emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz} - name: emoji-regex - version: 8.0.0 + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - registry.npmjs.org/escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz} - name: escalade - version: 3.1.1 + /escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} dev: true - registry.npmjs.org/eventemitter3@4.0.7: - resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz} - name: eventemitter3 - version: 4.0.7 - requiresBuild: true - optional: true + /eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - registry.npmjs.org/eventemitter3@5.0.1: - resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz} - name: eventemitter3 - version: 5.0.1 - - registry.npmjs.org/fetch-blob@3.2.0: - resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz} - name: fetch-blob - version: 3.2.0 + /fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} dependencies: - node-domexception: registry.npmjs.org/node-domexception@1.0.0 - web-streams-polyfill: registry.npmjs.org/web-streams-polyfill@3.2.1 + node-domexception: 1.0.0 + web-streams-polyfill: 3.2.1 - registry.npmjs.org/formdata-polyfill@4.0.10: - resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz} - name: formdata-polyfill - version: 4.0.10 + /formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} dependencies: - fetch-blob: registry.npmjs.org/fetch-blob@3.2.0 + fetch-blob: 3.2.0 - registry.npmjs.org/get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz} - name: get-caller-file - version: 2.0.5 + /get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} dev: true - registry.npmjs.org/handlebars@4.7.8: - resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz} - name: handlebars - version: 4.7.8 + /handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} hasBin: true dependencies: - minimist: registry.npmjs.org/minimist@1.2.8 - neo-async: registry.npmjs.org/neo-async@2.6.2 - source-map: registry.npmjs.org/source-map@0.6.1 - wordwrap: registry.npmjs.org/wordwrap@1.0.0 + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 optionalDependencies: - uglify-js: registry.npmjs.org/uglify-js@3.17.4 + uglify-js: 3.17.4 dev: true - registry.npmjs.org/is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz} - name: is-fullwidth-code-point - version: 3.0.0 + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} dev: true - registry.npmjs.org/json-stringify-safe@5.0.1: - resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz} - name: json-stringify-safe - version: 5.0.1 - - registry.npmjs.org/lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz} - name: lodash - version: 4.17.21 + /json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} - registry.npmjs.org/make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz} - name: make-error - version: 1.3.6 + /make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true - registry.npmjs.org/minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz} - name: minimist - version: 1.2.8 + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true - registry.npmjs.org/mock-socket@9.3.1: - resolution: {integrity: sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/mock-socket/-/mock-socket-9.3.1.tgz} - name: mock-socket - version: 9.3.1 + /mock-socket@9.3.1: + resolution: {integrity: sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==} engines: {node: '>= 8'} - registry.npmjs.org/ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/ms/-/ms-2.1.2.tgz} - name: ms - version: 2.1.2 + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - registry.npmjs.org/neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz} - name: neo-async - version: 2.6.2 + /neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - registry.npmjs.org/nock@13.3.3: - resolution: {integrity: sha512-z+KUlILy9SK/RjpeXDiDUEAq4T94ADPHE3qaRkf66mpEhzc/ytOMm3Bwdrbq6k1tMWkbdujiKim3G2tfQARuJw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/nock/-/nock-13.3.3.tgz} - name: nock - version: 13.3.3 + /nock@13.5.6: + resolution: {integrity: sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==} engines: {node: '>= 10.13'} dependencies: - debug: registry.npmjs.org/debug@4.3.4 - json-stringify-safe: registry.npmjs.org/json-stringify-safe@5.0.1 - lodash: registry.npmjs.org/lodash@4.17.21 - propagate: registry.npmjs.org/propagate@2.0.1 + debug: 4.3.4 + json-stringify-safe: 5.0.1 + propagate: 2.0.1 transitivePeerDependencies: - supports-color - registry.npmjs.org/node-domexception@1.0.0: - resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz} - name: node-domexception - version: 1.0.0 + /node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} - registry.npmjs.org/node-fetch@3.3.2: - resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz} - name: node-fetch - version: 3.3.2 + /node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: - data-uri-to-buffer: registry.npmjs.org/data-uri-to-buffer@4.0.1 - fetch-blob: registry.npmjs.org/fetch-blob@3.2.0 - formdata-polyfill: registry.npmjs.org/formdata-polyfill@4.0.10 + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 - registry.npmjs.org/pako@2.1.0: - resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/pako/-/pako-2.1.0.tgz} - name: pako - version: 2.1.0 - requiresBuild: true - optional: true - - registry.npmjs.org/prettier@2.8.1: - resolution: {integrity: sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz} - name: prettier - version: 2.8.1 + /prettier@2.8.1: + resolution: {integrity: sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==} engines: {node: '>=10.13.0'} hasBin: true dev: true - registry.npmjs.org/propagate@2.0.1: - resolution: {integrity: sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz} - name: propagate - version: 2.0.1 + /propagate@2.0.1: + resolution: {integrity: sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==} engines: {node: '>= 8'} - registry.npmjs.org/require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz} - name: require-directory - version: 2.1.1 + /require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} dev: true - registry.npmjs.org/rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz} - name: rxjs - version: 7.8.1 + /rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: registry.npmjs.org/tslib@2.6.2 + tslib: 2.8.1 + + /scale-ts@1.6.1: + resolution: {integrity: sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g==} + requiresBuild: true + optional: true - registry.npmjs.org/smoldot@1.0.4: - resolution: {integrity: sha512-N3TazI1C4GGrseFH/piWyZCCCRJTRx2QhDfrUKRT4SzILlW5m8ayZ3QTKICcz1C/536T9cbHHJyP7afxI6Mi1A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/smoldot/-/smoldot-1.0.4.tgz} - name: smoldot - version: 1.0.4 + /smoldot@2.0.26: + resolution: {integrity: sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==} requiresBuild: true dependencies: - pako: registry.npmjs.org/pako@2.1.0 - ws: registry.npmjs.org/ws@8.14.2 + ws: 8.14.2 transitivePeerDependencies: - bufferutil - utf-8-validate optional: true - registry.npmjs.org/source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz} - name: source-map - version: 0.6.1 + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} dev: true - registry.npmjs.org/string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz} - name: string-width - version: 4.2.3 + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} dependencies: - emoji-regex: registry.npmjs.org/emoji-regex@8.0.0 - is-fullwidth-code-point: registry.npmjs.org/is-fullwidth-code-point@3.0.0 - strip-ansi: registry.npmjs.org/strip-ansi@6.0.1 + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 dev: true - registry.npmjs.org/strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz} - name: strip-ansi - version: 6.0.1 + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} dependencies: - ansi-regex: registry.npmjs.org/ansi-regex@5.0.1 + ansi-regex: 5.0.1 dev: true - registry.npmjs.org/ts-node@10.9.1(@types/node@20.7.1)(typescript@5.2.2): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz} - id: registry.npmjs.org/ts-node/10.9.1 - name: ts-node - version: 10.9.1 + /ts-node@10.9.1(@types/node@20.7.1)(typescript@5.2.2): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: '@swc/core': '>=1.2.50' @@ -1031,79 +1112,81 @@ packages: '@swc/wasm': optional: true dependencies: - '@cspotcode/source-map-support': registry.npmjs.org/@cspotcode/source-map-support@0.8.1 - '@tsconfig/node10': registry.npmjs.org/@tsconfig/node10@1.0.9 - '@tsconfig/node12': registry.npmjs.org/@tsconfig/node12@1.0.11 - '@tsconfig/node14': registry.npmjs.org/@tsconfig/node14@1.0.3 - '@tsconfig/node16': registry.npmjs.org/@tsconfig/node16@1.0.4 - '@types/node': registry.npmjs.org/@types/node@20.7.1 - acorn: registry.npmjs.org/acorn@8.10.0 - acorn-walk: registry.npmjs.org/acorn-walk@8.2.0 - arg: registry.npmjs.org/arg@4.1.3 - create-require: registry.npmjs.org/create-require@1.1.1 - diff: registry.npmjs.org/diff@4.0.2 - make-error: registry.npmjs.org/make-error@1.3.6 - typescript: registry.npmjs.org/typescript@5.2.2 - v8-compile-cache-lib: registry.npmjs.org/v8-compile-cache-lib@3.0.1 - yn: registry.npmjs.org/yn@3.1.1 + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.7.1 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.2.2 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 dev: true - registry.npmjs.org/tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz} - name: tslib - version: 2.6.2 + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: false + + /tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - registry.npmjs.org/typescript@5.2.2: - resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz} - name: typescript - version: 5.2.2 + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} hasBin: true dev: true - registry.npmjs.org/uglify-js@3.17.4: - resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz} - name: uglify-js - version: 3.17.4 + /uglify-js@3.17.4: + resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true dev: true optional: true - registry.npmjs.org/v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz} - name: v8-compile-cache-lib - version: 3.0.1 + /v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true - registry.npmjs.org/web-streams-polyfill@3.2.1: - resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz} - name: web-streams-polyfill - version: 3.2.1 + /web-streams-polyfill@3.2.1: + resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} engines: {node: '>= 8'} - registry.npmjs.org/wordwrap@1.0.0: - resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz} - name: wordwrap - version: 1.0.0 + /wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true - registry.npmjs.org/wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz} - name: wrap-ansi - version: 7.0.0 + /wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} dependencies: - ansi-styles: registry.npmjs.org/ansi-styles@4.3.0 - string-width: registry.npmjs.org/string-width@4.2.3 - strip-ansi: registry.npmjs.org/strip-ansi@6.0.1 + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 dev: true - registry.npmjs.org/ws@8.14.2: - resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/ws/-/ws-8.14.2.tgz} - name: ws - version: 8.14.2 + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} + engines: {node: '>=10.0.0'} + requiresBuild: true + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + optional: true + + /ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -1114,38 +1197,30 @@ packages: utf-8-validate: optional: true - registry.npmjs.org/y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz} - name: y18n - version: 5.0.8 + /y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} dev: true - registry.npmjs.org/yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz} - name: yargs-parser - version: 21.1.1 + /yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} dev: true - registry.npmjs.org/yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz} - name: yargs - version: 17.7.2 + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} dependencies: - cliui: registry.npmjs.org/cliui@8.0.1 - escalade: registry.npmjs.org/escalade@3.1.1 - get-caller-file: registry.npmjs.org/get-caller-file@2.0.5 - require-directory: registry.npmjs.org/require-directory@2.1.1 - string-width: registry.npmjs.org/string-width@4.2.3 - y18n: registry.npmjs.org/y18n@5.0.8 - yargs-parser: registry.npmjs.org/yargs-parser@21.1.1 + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 dev: true - registry.npmjs.org/yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/yn/-/yn-3.1.1.tgz} - name: yn - version: 3.1.1 + /yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} dev: true diff --git a/tee-worker/identity/client-api/sidechain-api/package.json b/tee-worker/identity/client-api/sidechain-api/package.json index 0980926f45..dfb1de4e6e 100644 --- a/tee-worker/identity/client-api/sidechain-api/package.json +++ b/tee-worker/identity/client-api/sidechain-api/package.json @@ -19,23 +19,23 @@ "lint": "tsc --noEmit --pretty" }, "dependencies": { - "@polkadot/api": "^10.9.1", - "@polkadot/api-augment": "^10.9.1", - "@polkadot/api-derive": "^10.9.1", - "@polkadot/api-base": "^10.9.1", + "@polkadot/api": "^15.0.1", + "@polkadot/api-augment": "^15.0.1", + "@polkadot/api-derive": "^15.0.1", + "@polkadot/api-base": "^15.0.1", "@polkadot/keyring": "^12.2.1", - "@polkadot/types": "^10.9.1", - "@polkadot/types-augment": "^10.9.1", - "@polkadot/types-create": "^10.9.1", - "@polkadot/types-known": "^10.9.1", - "@polkadot/types-support": "^10.9.1", + "@polkadot/types": "^15.0.1", + "@polkadot/types-augment": "^15.0.1", + "@polkadot/types-create": "^15.0.1", + "@polkadot/types-known": "^15.0.1", + "@polkadot/types-support": "^15.0.1", "@polkadot/util": "^12.5.1", "@polkadot/util-crypto": "^12.5.1", - "@polkadot/types-codec": "^10.9.1", - "@polkadot/rpc-core": "^10.9.1" + "@polkadot/types-codec": "^15.0.1", + "@polkadot/rpc-core": "^15.0.1" }, "devDependencies": { - "@polkadot/typegen": "^10.9.1", + "@polkadot/typegen": "^15.0.1", "@types/node": "^20.3.1", "prettier": "2.8.1", "ts-node": "^10.9.1", diff --git a/tee-worker/identity/enclave-runtime/Cargo.lock b/tee-worker/identity/enclave-runtime/Cargo.lock index 77119ded80..a74173f4ef 100644 --- a/tee-worker/identity/enclave-runtime/Cargo.lock +++ b/tee-worker/identity/enclave-runtime/Cargo.lock @@ -15,7 +15,7 @@ dependencies = [ [[package]] name = "ac-compose-macros" version = "0.4.2" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-primitives", "log", @@ -25,7 +25,7 @@ dependencies = [ [[package]] name = "ac-node-api" version = "0.5.1" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-primitives", "bitvec", @@ -50,7 +50,7 @@ dependencies = [ [[package]] name = "ac-primitives" version = "0.9.0" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "impl-serde", "parity-scale-codec", @@ -630,6 +630,7 @@ dependencies = [ "scale-info", "serde 1.0.204", "serde_json 1.0.120", + "sp-consensus-aura", "sp-core", "sp-io", "sp-runtime", @@ -2366,6 +2367,7 @@ dependencies = [ name = "itp-extrinsics-factory" version = "0.1.0" dependencies = [ + "hex", "itp-node-api", "itp-nonce-cache", "itp-types", @@ -5002,6 +5004,22 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" @@ -5377,7 +5395,7 @@ dependencies = [ [[package]] name = "substrate-api-client" version = "0.14.0" -source = "git+https://github.com/scs/substrate-api-client?branch=polkadot-v0.9.42-tag-v0.14.0#e4ed74b0fb6c2fd5585f55c2702b97b56d99c7f6" +source = "git+https://github.com/Kailai-Wang/substrate-api-client?branch=polkadot-v0.9.42-litentry#f867fea44a3de5352d419a605afdd7bf22859e78" dependencies = [ "ac-compose-macros", "ac-node-api", diff --git a/tee-worker/identity/enclave-runtime/Cargo.toml b/tee-worker/identity/enclave-runtime/Cargo.toml index e353980dd4..22441a9700 100644 --- a/tee-worker/identity/enclave-runtime/Cargo.toml +++ b/tee-worker/identity/enclave-runtime/Cargo.toml @@ -178,6 +178,8 @@ log = { git = "https://github.com/integritee-network/log-sgx" } [patch."https://github.com/paritytech/polkadot-sdk"] frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } sp-io = { path = "../../common/core-primitives/substrate-sgx/sp-io" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } diff --git a/tee-worker/identity/scripts/test_transfer/transfer.js b/tee-worker/identity/scripts/test_transfer/transfer.js index 6d45154008..ed0801fb68 100644 --- a/tee-worker/identity/scripts/test_transfer/transfer.js +++ b/tee-worker/identity/scripts/test_transfer/transfer.js @@ -31,7 +31,7 @@ async function main () { console.log('Sending', AMOUNT, 'from', address, 'who has a balance of', balance.free, 'to', recipient, 'with nonce', nonce.toString()); api.tx.balances - .transfer(recipient, AMOUNT) + .transferKeepAlive(recipient, AMOUNT) .signAndSend(alice, { nonce }, ({ events = [], status }) => { console.log('Transaction status:', status.type); diff --git a/tee-worker/identity/service/src/account_funding.rs b/tee-worker/identity/service/src/account_funding.rs index b80ee08e9c..61a3e8780f 100644 --- a/tee-worker/identity/service/src/account_funding.rs +++ b/tee-worker/identity/service/src/account_funding.rs @@ -158,7 +158,7 @@ fn bootstrap_funds_from_alice( println!("[+] send extrinsic: bootstrap funding Enclave from Alice's funds"); let xt = alice_signer_api .balance_transfer_allow_death(MultiAddress::Id(accountid.clone()), funding_amount); - let xt_report = alice_signer_api.submit_and_watch_extrinsic_until(xt, XtStatus::InBlock)?; + let xt_report = alice_signer_api.submit_and_watch_extrinsic_until(xt, XtStatus::Finalized)?; info!( "[<] L1 extrinsic success. extrinsic hash: {:?} / status: {:?}", xt_report.extrinsic_hash, xt_report.status diff --git a/tee-worker/identity/ts-tests/integration-tests/common/utils/context.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/context.ts index 8e53ac6a35..1a7b656db3 100644 --- a/tee-worker/identity/ts-tests/integration-tests/common/utils/context.ts +++ b/tee-worker/identity/ts-tests/integration-tests/common/utils/context.ts @@ -28,7 +28,7 @@ export async function initWorkerConnection(endpoint: string): Promise { const provider = new WsProvider(parachainEndpoint); diff --git a/tee-worker/identity/ts-tests/integration-tests/omni_account.test.ts b/tee-worker/identity/ts-tests/integration-tests/omni_account.test.ts index d5c899ab22..08134e7911 100644 --- a/tee-worker/identity/ts-tests/integration-tests/omni_account.test.ts +++ b/tee-worker/identity/ts-tests/integration-tests/omni_account.test.ts @@ -33,9 +33,6 @@ describe('Omni Account', function () { before(async function () { const parachainEndpoint = process.env.PARACHAIN_ENDPOINT; - if (!parachainEndpoint) { - throw new Error('PARACHAIN_ENDPOINT environment variable is missing.'); - } context = await initIntegrationTestContext(parachainEndpoint); teeShieldingKey = await getTeeShieldingKey(context); const wallet = context.web3Wallets['substrate']; diff --git a/tee-worker/identity/ts-tests/integration-tests/package.json b/tee-worker/identity/ts-tests/integration-tests/package.json index 66c5d36b43..01987da351 100644 --- a/tee-worker/identity/ts-tests/integration-tests/package.json +++ b/tee-worker/identity/ts-tests/integration-tests/package.json @@ -12,18 +12,18 @@ "dependencies": { "@litentry/vc-schema-validator": "^0.0.1", "@noble/ed25519": "^1.7.3", - "@polkadot/api": "^10.9.1", - "@polkadot/api-augment": "^10.9.1", - "@polkadot/api-base": "^10.9.1", - "@polkadot/api-derive": "^10.9.1", + "@polkadot/api": "^15.0.1", + "@polkadot/api-augment": "^15.0.1", + "@polkadot/api-base": "^15.0.1", + "@polkadot/api-derive": "^15.0.1", "@polkadot/keyring": "^12.2.1", - "@polkadot/rpc-core": "^10.9.1", - "@polkadot/types": "^10.9.1", - "@polkadot/types-augment": "^10.9.1", - "@polkadot/types-codec": "^10.9.1", - "@polkadot/types-create": "^10.9.1", - "@polkadot/types-known": "^10.9.1", - "@polkadot/types-support": "^10.9.1", + "@polkadot/rpc-core": "^15.0.1", + "@polkadot/types": "^15.0.1", + "@polkadot/types-augment": "^15.0.1", + "@polkadot/types-codec": "^15.0.1", + "@polkadot/types-create": "^15.0.1", + "@polkadot/types-known": "^15.0.1", + "@polkadot/types-support": "^15.0.1", "@polkadot/util": "^12.5.1", "@polkadot/util-crypto": "^12.5.1", "@solana/web3.js": "^1.91.4", diff --git a/tee-worker/identity/ts-tests/pnpm-lock.yaml b/tee-worker/identity/ts-tests/pnpm-lock.yaml index 39834bd030..ecfc9d1a85 100644 --- a/tee-worker/identity/ts-tests/pnpm-lock.yaml +++ b/tee-worker/identity/ts-tests/pnpm-lock.yaml @@ -15,46 +15,46 @@ importers: version: 0.2.0 '@litentry/vc-schema-validator': specifier: ^0.0.1 - version: 0.0.1(ajv-formats@2.1.1)(ajv@8.12.0)(fast-glob@3.3.2)(tslib@2.6.2) + version: 0.0.1(ajv-formats@2.1.1)(ajv@8.12.0)(fast-glob@3.3.2)(tslib@2.8.1) '@noble/ed25519': specifier: ^1.7.3 version: 1.7.3 '@polkadot/api': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-augment': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-base': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-derive': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/keyring': specifier: ^12.2.1 version: 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/rpc-core': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-augment': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-codec': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-create': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-known': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-support': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/util': specifier: ^12.5.1 version: 12.5.1 @@ -114,7 +114,7 @@ importers: version: 2.0.1 ws: specifier: ^8.17.1 - version: 8.17.1 + version: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) zx: specifier: ^7.2.3 version: 7.2.3 @@ -169,7 +169,7 @@ importers: version: 0.2.0 '@litentry/client-sdk': specifier: ^1.0.0 - version: 1.0.0(@litentry/chaindata@0.2.0)(@litentry/parachain-api@0.9.20-4.1)(@litentry/sidechain-api@0.9.20-4)(@polkadot/api@10.9.1)(@polkadot/types-codec@10.9.1)(@polkadot/types@10.9.1)(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1)(tslib@2.6.2) + version: 1.0.0(@litentry/chaindata@0.2.0)(@litentry/parachain-api@0.9.20-4.1)(@litentry/sidechain-api@0.9.20-4)(@polkadot/api@10.9.1)(@polkadot/types-codec@10.9.1)(@polkadot/types@10.9.1)(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1)(tslib@2.8.1) '@litentry/parachain-api': specifier: 0.9.20-4.1 version: 0.9.20-4.1 @@ -217,7 +217,7 @@ importers: version: 5.0.4 ws: specifier: ^8.17.1 - version: 8.17.1 + version: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) stress: dependencies: @@ -225,17 +225,17 @@ importers: specifier: ^1.7.3 version: 1.7.3 '@polkadot/api': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/keyring': specifier: ^12.2.1 - version: 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + version: 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@13.2.3) '@polkadot/typegen': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 add: specifier: ^2.0.6 version: 2.0.6 @@ -259,7 +259,7 @@ importers: version: 2.0.1 ws: specifier: ^8.17.1 - version: 8.17.1 + version: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) zod: specifier: ^3.22.3 version: 3.22.3 @@ -325,41 +325,41 @@ importers: specifier: ^1.7.3 version: 1.7.3 '@polkadot/api': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-augment': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-base': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/api-derive': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/keyring': specifier: ^12.2.1 version: 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/rpc-core': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-augment': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-codec': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-create': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-known': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/types-support': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^15.0.1 + version: 15.0.1 '@polkadot/util': specifier: ^12.5.1 version: 12.5.1 @@ -401,7 +401,7 @@ importers: version: 2.0.1 ws: specifier: ^8.17.1 - version: 8.17.1 + version: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) devDependencies: '@ethersproject/providers': specifier: ^5.7.2 @@ -489,7 +489,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 globals: 13.22.0 ignore: 5.2.4 @@ -826,7 +826,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -860,7 +860,7 @@ packages: tslib: 2.6.2 dev: false - /@litentry/client-sdk@1.0.0(@litentry/chaindata@0.2.0)(@litentry/parachain-api@0.9.20-4.1)(@litentry/sidechain-api@0.9.20-4)(@polkadot/api@10.9.1)(@polkadot/types-codec@10.9.1)(@polkadot/types@10.9.1)(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1)(tslib@2.6.2): + /@litentry/client-sdk@1.0.0(@litentry/chaindata@0.2.0)(@litentry/parachain-api@0.9.20-4.1)(@litentry/sidechain-api@0.9.20-4)(@polkadot/api@10.9.1)(@polkadot/types-codec@10.9.1)(@polkadot/types@10.9.1)(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1)(tslib@2.8.1): resolution: {integrity: sha512-htcII+AN0v99G4u7Dbe7g/KU+IPukPit5hm8bR/kA0b8FaPQySKLsvO0bdKdNvExGOeLj9uhmMo5LdwB9tXj+A==} peerDependencies: '@litentry/chaindata': '*' @@ -881,7 +881,7 @@ packages: '@polkadot/types-codec': 10.9.1 '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) - tslib: 2.6.2 + tslib: 2.8.1 dev: false /@litentry/parachain-api@0.9.20-4.1: @@ -930,7 +930,7 @@ packages: - utf-8-validate dev: false - /@litentry/vc-schema-validator@0.0.1(ajv-formats@2.1.1)(ajv@8.12.0)(fast-glob@3.3.2)(tslib@2.6.2): + /@litentry/vc-schema-validator@0.0.1(ajv-formats@2.1.1)(ajv@8.12.0)(fast-glob@3.3.2)(tslib@2.8.1): resolution: {integrity: sha512-Utnu2m/IPcGbqpopNsEdB1AvRimoL300dGpk/9g/8P16OemCHYxHE8j+n2JrHS+BUvH9upDiNMy5sbZPmDAAfQ==} peerDependencies: ajv: ^8.12.0 @@ -941,7 +941,7 @@ packages: ajv: 8.12.0 ajv-formats: 2.1.1(ajv@8.12.0) fast-glob: 3.3.2 - tslib: 2.6.2 + tslib: 2.8.1 dev: false /@noble/curves@1.2.0: @@ -950,6 +950,13 @@ packages: '@noble/hashes': 1.3.2 dev: false + /@noble/curves@1.7.0: + resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} + engines: {node: ^14.21.3 || >=16} + dependencies: + '@noble/hashes': 1.6.0 + dev: false + /@noble/ed25519@1.7.3: resolution: {integrity: sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==} dev: false @@ -964,6 +971,11 @@ packages: engines: {node: '>= 16'} dev: false + /@noble/hashes@1.6.0: + resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} + engines: {node: ^14.21.3 || >=16} + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -982,6 +994,68 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 + /@polkadot-api/json-rpc-provider-proxy@0.1.0: + resolution: {integrity: sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==} + requiresBuild: true + dev: false + optional: true + + /@polkadot-api/json-rpc-provider@0.0.1: + resolution: {integrity: sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==} + requiresBuild: true + dev: false + optional: true + + /@polkadot-api/metadata-builders@0.3.2: + resolution: {integrity: sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==} + requiresBuild: true + dependencies: + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/utils': 0.1.0 + dev: false + optional: true + + /@polkadot-api/observable-client@0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.1): + resolution: {integrity: sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==} + requiresBuild: true + peerDependencies: + '@polkadot-api/substrate-client': 0.1.4 + rxjs: '>=7.8.0' + dependencies: + '@polkadot-api/metadata-builders': 0.3.2 + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/substrate-client': 0.1.4 + '@polkadot-api/utils': 0.1.0 + rxjs: 7.8.1 + dev: false + optional: true + + /@polkadot-api/substrate-bindings@0.6.0: + resolution: {integrity: sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==} + requiresBuild: true + dependencies: + '@noble/hashes': 1.4.0 + '@polkadot-api/utils': 0.1.0 + '@scure/base': 1.1.3 + scale-ts: 1.6.1 + dev: false + optional: true + + /@polkadot-api/substrate-client@0.1.4: + resolution: {integrity: sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==} + requiresBuild: true + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/utils': 0.1.0 + dev: false + optional: true + + /@polkadot-api/utils@0.1.0: + resolution: {integrity: sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==} + requiresBuild: true + dev: false + optional: true + /@polkadot/api-augment@10.9.1: resolution: {integrity: sha512-kRZZvCFVcN4hAH4dJ+Qzfdy27/4EEq3oLDf3ihj0LTVrAezSWcKPGE3EVFy+Mn6Lo4SUc7RVyoKvIUhSk2l4Dg==} engines: {node: '>=16'} @@ -992,7 +1066,24 @@ packages: '@polkadot/types-augment': 10.9.1 '@polkadot/types-codec': 10.9.1 '@polkadot/util': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@polkadot/api-augment@15.0.1: + resolution: {integrity: sha512-dNFrim/87+rStNCrI1aSaH0nZzRadDwEIya/p860lFRVZQpkBvZlqvSBQUqcKxI0c5c1pp1uaSEixq+A+IOUBg==} + engines: {node: '>=18'} + dependencies: + '@polkadot/api-base': 15.0.1 + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color @@ -1007,7 +1098,22 @@ packages: '@polkadot/types': 10.9.1 '@polkadot/util': 12.5.1 rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@polkadot/api-base@15.0.1: + resolution: {integrity: sha512-P4WQ+SqyuotVd//EFMIzlWLRbER9JycpdmTaKof2NpVioGotbHhJtO4TXPC3CW1C8zovM7KYrcWtz6b8/FxqoA==} + engines: {node: '>=18'} + dependencies: + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/util': 13.2.3 + rxjs: 7.8.1 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color @@ -1027,7 +1133,27 @@ packages: '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@polkadot/api-derive@15.0.1: + resolution: {integrity: sha512-gaLqZ8wL+hGMntq5gxHb6Rv+EQzmmnC63plMBvk5pnNfCm4xjN43GYpbOwSQknHVNo+irC7qwD3GyPK6TfFUUA==} + engines: {node: '>=18'} + dependencies: + '@polkadot/api': 15.0.1 + '@polkadot/api-augment': 15.0.1 + '@polkadot/api-base': 15.0.1 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + rxjs: 7.8.1 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color @@ -1061,6 +1187,33 @@ packages: - utf-8-validate dev: false + /@polkadot/api@15.0.1: + resolution: {integrity: sha512-ZOqw99B70XrX0it0cWu1YSBrtGNhdFpk5zvUVL5+FD8iyO+Tuk1m32VR0PukDCdlwxFXuEw7vRdZX/G/BzoZhg==} + engines: {node: '>=18'} + dependencies: + '@polkadot/api-augment': 15.0.1 + '@polkadot/api-base': 15.0.1 + '@polkadot/api-derive': 15.0.1 + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/rpc-provider': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/types-known': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + eventemitter3: 5.0.1 + rxjs: 7.8.1 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1): resolution: {integrity: sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA==} engines: {node: '>=16'} @@ -1073,13 +1226,46 @@ packages: tslib: 2.6.2 dev: false + /@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@13.2.3): + resolution: {integrity: sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA==} + engines: {node: '>=16'} + peerDependencies: + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1 + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@13.2.3) + tslib: 2.8.1 + dev: false + + /@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3): + resolution: {integrity: sha512-pgTo6DXNXub0wGD+MnVHYhKxf80Jl+QMOCb818ioGdXz++Uw4mTueFAwtB+N7TGo0HafhChUiNJDxFdlDkcAng==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3 + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + tslib: 2.8.1 + dev: false + /@polkadot/networks@12.5.1: resolution: {integrity: sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ==} engines: {node: '>=16'} dependencies: '@polkadot/util': 12.5.1 - '@substrate/ss58-registry': 1.43.0 - tslib: 2.6.2 + '@substrate/ss58-registry': 1.51.0 + tslib: 2.8.1 + dev: false + + /@polkadot/networks@13.2.3: + resolution: {integrity: sha512-mG+zkXg/33AyPrkv2xBbAo3LBUwOwBn6qznBU/4jxiZPnVvCwMaxE7xHM22B5riItbNJ169FXv3wy0v6ZmkFbw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/util': 13.2.3 + '@substrate/ss58-registry': 1.51.0 + tslib: 2.8.1 dev: false /@polkadot/rpc-augment@10.9.1: @@ -1090,7 +1276,22 @@ packages: '@polkadot/types': 10.9.1 '@polkadot/types-codec': 10.9.1 '@polkadot/util': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@polkadot/rpc-augment@15.0.1: + resolution: {integrity: sha512-4FoY+oXC08+vaLMAvFgOOjcFHNBHEv2kOqgxtO/yCyMLNvyRRnrBtMofznJ1EWEwzehvU5iSlbMCerKdImFRZQ==} + engines: {node: '>=18'} + dependencies: + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color @@ -1106,7 +1307,23 @@ packages: '@polkadot/types': 10.9.1 '@polkadot/util': 12.5.1 rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@polkadot/rpc-core@15.0.1: + resolution: {integrity: sha512-I5F1T17Nr5oEuqAysP7n14tWym54hCriqj0pV0tM4yfIF0iWaWPkqWNRU7uNfv86n3m15IMGoMapvgZVnUF5LQ==} + engines: {node: '>=18'} + dependencies: + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/rpc-provider': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/util': 13.2.3 + rxjs: 7.8.1 + tslib: 2.8.1 transitivePeerDependencies: - bufferutil - supports-color @@ -1128,7 +1345,7 @@ packages: eventemitter3: 5.0.1 mock-socket: 9.3.1 nock: 13.3.3 - tslib: 2.6.2 + tslib: 2.8.1 optionalDependencies: '@substrate/connect': 0.7.26 transitivePeerDependencies: @@ -1137,25 +1354,49 @@ packages: - utf-8-validate dev: false - /@polkadot/typegen@10.9.1: - resolution: {integrity: sha512-SbG9U8/POyY8QwQUp70qzTnYsRxc6Rrjt4wzIWsBKmzVRy0i19O23EXSUo+81ukOBiLZj551GAJwRa3YBpdR+A==} - engines: {node: '>=16'} + /@polkadot/rpc-provider@15.0.1: + resolution: {integrity: sha512-ziRob/sco751+OK700vNh7IivysFOeZthO7JpC8CEQhZ2c+z/HY7bNsAucy1q1ELGe7xLMZW2/rm/RG285ZDPQ==} + engines: {node: '>=18'} + dependencies: + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/types': 15.0.1 + '@polkadot/types-support': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + '@polkadot/x-fetch': 13.2.3 + '@polkadot/x-global': 13.2.3 + '@polkadot/x-ws': 13.2.3 + eventemitter3: 5.0.1 + mock-socket: 9.3.1 + nock: 13.5.6 + tslib: 2.8.1 + optionalDependencies: + '@substrate/connect': 0.8.11 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@polkadot/typegen@15.0.1: + resolution: {integrity: sha512-XXE4ZQ6nXA98HWrNgzjQnX7emQcXqPsDsqiIytDBL4i4G/xgw4OFtykHqjbTu5y0LmoHAYsa3L6sSQU0Mg8cag==} + engines: {node: '>=18'} hasBin: true dependencies: - '@polkadot/api': 10.9.1 - '@polkadot/api-augment': 10.9.1 - '@polkadot/rpc-augment': 10.9.1 - '@polkadot/rpc-provider': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/types-support': 10.9.1 - '@polkadot/util': 12.5.1 - '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) - '@polkadot/x-ws': 12.5.1 + '@polkadot/api': 15.0.1 + '@polkadot/api-augment': 15.0.1 + '@polkadot/rpc-augment': 15.0.1 + '@polkadot/rpc-provider': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/types-support': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + '@polkadot/x-ws': 13.2.3 handlebars: 4.7.8 - tslib: 2.6.2 + tslib: 2.8.1 yargs: 17.7.2 transitivePeerDependencies: - bufferutil @@ -1170,7 +1411,17 @@ packages: '@polkadot/types': 10.9.1 '@polkadot/types-codec': 10.9.1 '@polkadot/util': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/types-augment@15.0.1: + resolution: {integrity: sha512-6fTjJmTGd46UUIYPHr5oA6kiFl6IY45dvDgUQu07AmVdEQlq3OPq/7GyS639SLHHfMLSPbFKyt1iMVj9BNu0qA==} + engines: {node: '>=18'} + dependencies: + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/types-codec@10.9.1: @@ -1179,7 +1430,16 @@ packages: dependencies: '@polkadot/util': 12.5.1 '@polkadot/x-bigint': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/types-codec@15.0.1: + resolution: {integrity: sha512-SLypmYH6FYRmqGG8TBbi4X0tYh1OUZEMNkujln2eHxsuFIYRGrHFnEohtkF9ktSxoUji2ph9I5ZW5gqQvEsXrA==} + engines: {node: '>=18'} + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/x-bigint': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/types-create@10.9.1: @@ -1188,7 +1448,16 @@ packages: dependencies: '@polkadot/types-codec': 10.9.1 '@polkadot/util': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/types-create@15.0.1: + resolution: {integrity: sha512-M1vs5o3sw8p3g88GhJgz2vSSgxnr5CfbaL4r5EYzR+Hx9xUvz03aEofySvodusEpdRQ9MijnsNSP9306xvcqhw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/types-codec': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/types-known@10.9.1: @@ -1200,7 +1469,19 @@ packages: '@polkadot/types-codec': 10.9.1 '@polkadot/types-create': 10.9.1 '@polkadot/util': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/types-known@15.0.1: + resolution: {integrity: sha512-9VC6QX4/JAjWmnSdaZIm4n8CgmVj9KutgQ5/Uy9VBrTwfRzUPIBwHZT8lPQLeN1WwQRbtc5ojDoo2SR+OqGTqw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/networks': 13.2.3 + '@polkadot/types': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/types-support@10.9.1: @@ -1208,7 +1489,15 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/util': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/types-support@15.0.1: + resolution: {integrity: sha512-w/IWFuDn290brw75ZXKPkQMazz0yizE0zK0XuqP2S4IW009x+z0peRc7Q4k36JOqDVDwSc38vTxWtRPVqdoI1g==} + engines: {node: '>=18'} + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/types@10.9.1: @@ -1222,7 +1511,21 @@ packages: '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) rxjs: 7.8.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/types@15.0.1: + resolution: {integrity: sha512-jnn0h8Z4O3l/UjrBOJPmkfKjuC6fSqhQfsn7HpWF18lEicGp4/A7X3AZryIg8npKHHiuH30bK/o1VuivH+4dVw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3)(@polkadot/util@13.2.3) + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + rxjs: 7.8.1 + tslib: 2.8.1 dev: false /@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1): @@ -1243,6 +1546,42 @@ packages: tslib: 2.6.2 dev: false + /@polkadot/util-crypto@12.5.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-Y8ORbMcsM/VOqSG3DgqutRGQ8XXK+X9M3C8oOEI2Tji65ZsXbh9Yh+ryPLM0oBp/9vqOXjkLgZJbbVuQceOw0A==} + engines: {node: '>=16'} + peerDependencies: + '@polkadot/util': 12.5.1 + dependencies: + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.0 + '@polkadot/networks': 12.5.1 + '@polkadot/util': 13.2.3 + '@polkadot/wasm-crypto': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-bigint': 12.5.1 + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + '@scure/base': 1.2.1 + tslib: 2.8.1 + dev: false + + /@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3): + resolution: {integrity: sha512-5sbggmLbn5eiuVMyPROPlT5roHRqdKHOfSpioNbGvGIZ1qIWVoC1RfsK0NWJOVGDzy6DpQe0KYT/kgcU5Xsrzw==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + dependencies: + '@noble/curves': 1.7.0 + '@noble/hashes': 1.4.0 + '@polkadot/networks': 13.2.3 + '@polkadot/util': 13.2.3 + '@polkadot/wasm-crypto': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-bigint': 13.2.3 + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + '@scure/base': 1.2.1 + tslib: 2.8.1 + dev: false + /@polkadot/util@12.5.1: resolution: {integrity: sha512-fDBZL7D4/baMG09Qowseo884m3QBzErGkRWNBId1UjWR99kyex+cIY9fOSzmuQxo6nLdJlLHw1Nz2caN3+Bq0A==} engines: {node: '>=16'} @@ -1256,6 +1595,19 @@ packages: tslib: 2.6.2 dev: false + /@polkadot/util@13.2.3: + resolution: {integrity: sha512-pioNnsig3qHXrfOKMe4Yqos8B8N3/EZUpS+WfTpWnn1VjYban/0GrTXeavPlAwggnY27b8fS6rBzQBhnVYDw8g==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-bigint': 13.2.3 + '@polkadot/x-global': 13.2.3 + '@polkadot/x-textdecoder': 13.2.3 + '@polkadot/x-textencoder': 13.2.3 + '@types/bn.js': 5.1.6 + bn.js: 5.2.1 + tslib: 2.8.1 + dev: false + /@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): resolution: {integrity: sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A==} engines: {node: '>=16'} @@ -1266,7 +1618,33 @@ packages: '@polkadot/util': 12.5.1 '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-bridge@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-bridge@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 dev: false /@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.5.1): @@ -1276,7 +1654,17 @@ packages: '@polkadot/util': '*' dependencies: '@polkadot/util': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto-asmjs@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): @@ -1292,7 +1680,39 @@ packages: '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.5.1) '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto-init@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto-init@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 dev: false /@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.5.1): @@ -1303,7 +1723,18 @@ packages: dependencies: '@polkadot/util': 12.5.1 '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto-wasm@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + tslib: 2.8.1 dev: false /@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): @@ -1320,7 +1751,41 @@ packages: '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.5.1) '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-init': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-crypto@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3): + resolution: {integrity: sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-init': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1) + tslib: 2.8.1 dev: false /@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1): @@ -1330,7 +1795,17 @@ packages: '@polkadot/util': '*' dependencies: '@polkadot/util': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3): + resolution: {integrity: sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/x-bigint@12.5.1: @@ -1338,7 +1813,15 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/x-bigint@13.2.3: + resolution: {integrity: sha512-VKgEAh0LsxTd/Hg517Tt5ZU4CySjBwMpaojbkjgv3fOdg1cN7t4eFEUxpyj7mlO0cp22SzDh7nmy4TO98qhLQA==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/x-fetch@12.5.1: @@ -1347,14 +1830,30 @@ packages: dependencies: '@polkadot/x-global': 12.5.1 node-fetch: 3.3.2 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/x-fetch@13.2.3: + resolution: {integrity: sha512-7Nmk+8ieEGzz43nc1rX6nH3rQo6rhGmAaIXJWnXY9gOHY0k1me1bJYbP+xDdh8vcLh8eY3D1sESUwG6QYZW2lg==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + node-fetch: 3.3.2 + tslib: 2.8.1 dev: false /@polkadot/x-global@12.5.1: resolution: {integrity: sha512-6K0YtWEg0eXInDOihU5aSzeb1t9TiDdX9ZuRly+58ALSqw5kPZYmQLbzE1d8HWzyXRXK+YH65GtLzfMGqfYHmw==} engines: {node: '>=16'} dependencies: - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/x-global@13.2.3: + resolution: {integrity: sha512-7MYQIAEwBkRcNrgqac5PbB0kNPlI6ISJEy6/Nb+crj8BFjQ8rf11PF49fq0QsvDeuYM1aNLigrvYZNptQs4lbw==} + engines: {node: '>=18'} + dependencies: + tslib: 2.8.1 dev: false /@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2): @@ -1367,7 +1866,33 @@ packages: '@polkadot/util': 12.5.1 '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/x-randomvalues@12.5.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1): + resolution: {integrity: sha512-UsMb1d+77EPNjW78BpHjZLIm4TaIpfqq89OhZP/6gDIoS2V9iE/AK3jOWKm1G7Y2F8XIoX1qzQpuMakjfagFoQ==} + engines: {node: '>=16'} + peerDependencies: + '@polkadot/util': 12.5.1 + '@polkadot/wasm-util': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-global': 12.5.1 + tslib: 2.8.1 + dev: false + + /@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1): + resolution: {integrity: sha512-Zf0GTfLmVk+VzPUmcQSpXjjmFzMTjPhXoLuIoE7xIu73T+vQ+TX9j7DvorN6bIRsnZ9l1SyTZsSf/NTjNZKIZg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': '*' + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/x-textdecoder@12.5.1: @@ -1375,7 +1900,15 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/x-textdecoder@13.2.3: + resolution: {integrity: sha512-i8hRXPtGknmdm3FYv6/94I52VXHJZa5sgYNw1+Hqb4Jqmq4awUjea35CKXd/+aw70Qn8Ngg31l2GoiH494fa+Q==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/x-textencoder@12.5.1: @@ -1383,7 +1916,15 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 + tslib: 2.8.1 + dev: false + + /@polkadot/x-textencoder@13.2.3: + resolution: {integrity: sha512-wJI3Bb/dC4zyBXJFm5+ZhyBXWoI5wvP8k8qX0/ZC0PQsgSAqs7LVhiofk4Wd94n0P41W5re58LrGXLyziSAshw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 dev: false /@polkadot/x-ws@12.5.1: @@ -1391,8 +1932,20 @@ packages: engines: {node: '>=16'} dependencies: '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 - ws: 8.17.1 + tslib: 2.8.1 + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + + /@polkadot/x-ws@13.2.3: + resolution: {integrity: sha512-Y6MTAWgcnrnx/LkBx65X3ZyoJH5EFj3tXtflRoKg1+PLHSLuNBV7Wi5mLcE70z4e5c+4hgBbLq+8SqCqzFtSPw==} + engines: {node: '>=18'} + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -1402,6 +1955,10 @@ packages: resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} dev: false + /@scure/base@1.2.1: + resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} + dev: false + /@solana/buffer-layout@4.0.1: resolution: {integrity: sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==} engines: {node: '>=5.10'} @@ -1439,6 +1996,18 @@ packages: dev: false optional: true + /@substrate/connect-extension-protocol@2.2.1: + resolution: {integrity: sha512-GoafTgm/Jey9E4Xlj4Z5ZBt/H4drH2CNq8VrAro80rtoznrXnFDNVivLQzZN0Xaj2g8YXSn9pC9Oc9IovYZJXw==} + requiresBuild: true + dev: false + optional: true + + /@substrate/connect-known-chains@1.8.0: + resolution: {integrity: sha512-sl7WfeDgnZuPvUl5Xw0XIziOTe8rEBJ3uugyDETGnafxEbjYMv5aJL0ilq5djhnQ7l9OuMJCN3Ckved2yINeeQ==} + requiresBuild: true + dev: false + optional: true + /@substrate/connect@0.7.26: resolution: {integrity: sha512-uuGSiroGuKWj1+38n1kY5HReer5iL9bRwPCzuoLtqAOmI1fGI0hsSI2LlNQMAbfRgr7VRHXOk5MTuQf5ulsFRw==} deprecated: versions below 1.x are no longer maintained @@ -1453,8 +2022,40 @@ packages: dev: false optional: true - /@substrate/ss58-registry@1.43.0: - resolution: {integrity: sha512-USEkXA46P9sqClL7PZv0QFsit4S8Im97wchKG0/H/9q3AT/S76r40UHfCr4Un7eBJPE23f7fU9BZ0ITpP9MCsA==} + /@substrate/connect@0.8.11: + resolution: {integrity: sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==} + deprecated: versions below 1.x are no longer maintained + requiresBuild: true + dependencies: + '@substrate/connect-extension-protocol': 2.2.1 + '@substrate/connect-known-chains': 1.8.0 + '@substrate/light-client-extension-helpers': 1.0.0(smoldot@2.0.26) + smoldot: 2.0.26 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + optional: true + + /@substrate/light-client-extension-helpers@1.0.0(smoldot@2.0.26): + resolution: {integrity: sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==} + requiresBuild: true + peerDependencies: + smoldot: 2.x + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/json-rpc-provider-proxy': 0.1.0 + '@polkadot-api/observable-client': 0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.1) + '@polkadot-api/substrate-client': 0.1.4 + '@substrate/connect-extension-protocol': 2.2.1 + '@substrate/connect-known-chains': 1.8.0 + rxjs: 7.8.1 + smoldot: 2.0.26 + dev: false + optional: true + + /@substrate/ss58-registry@1.51.0: + resolution: {integrity: sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==} dev: false /@tsconfig/node10@1.0.9: @@ -1481,6 +2082,12 @@ packages: '@types/node': 20.7.1 dev: false + /@types/bn.js@5.1.6: + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} + dependencies: + '@types/node': 20.7.1 + dev: false + /@types/chai@4.3.6: resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} @@ -1566,7 +2173,7 @@ packages: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/type-utils': 5.62.0(eslint@8.50.0)(typescript@5.0.4) '@typescript-eslint/utils': 5.62.0(eslint@8.50.0)(typescript@5.0.4) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.50.0 graphemer: 1.4.0 ignore: 5.2.4 @@ -1591,7 +2198,7 @@ packages: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.4) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.50.0 typescript: 5.0.4 transitivePeerDependencies: @@ -1618,7 +2225,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.4) '@typescript-eslint/utils': 5.62.0(eslint@8.50.0)(typescript@5.0.4) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.50.0 tsutils: 3.21.0(typescript@5.0.4) typescript: 5.0.4 @@ -1642,7 +2249,7 @@ packages: dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 @@ -2174,17 +2781,6 @@ packages: engines: {node: '>= 12'} dev: false - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2420,7 +3016,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -3324,7 +3920,7 @@ packages: resolution: {integrity: sha512-z+KUlILy9SK/RjpeXDiDUEAq4T94ADPHE3qaRkf66mpEhzc/ytOMm3Bwdrbq6k1tMWkbdujiKim3G2tfQARuJw==} engines: {node: '>= 10.13'} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) json-stringify-safe: 5.0.1 lodash: 4.17.21 propagate: 2.0.1 @@ -3332,6 +3928,17 @@ packages: - supports-color dev: false + /nock@13.5.6: + resolution: {integrity: sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==} + engines: {node: '>= 10.13'} + dependencies: + debug: 4.3.4(supports-color@8.1.1) + json-stringify-safe: 5.0.1 + propagate: 2.0.1 + transitivePeerDependencies: + - supports-color + dev: false + /node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} @@ -3604,7 +4211,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.6.2 + tslib: 2.8.1 dev: false /safe-array-concat@1.0.1: @@ -3632,6 +4239,12 @@ packages: resolution: {integrity: sha512-hNGuU5Yhohmp4BjFrNEioDkPAOWe6aYRDUlBi9FTxxmp1wZ8SAkDxAf/IobinuSa+J0a9srZEP73dqmYeyYYXg==} dev: false + /scale-ts@1.6.1: + resolution: {integrity: sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g==} + requiresBuild: true + dev: false + optional: true + /scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} dev: true @@ -3716,7 +4329,18 @@ packages: requiresBuild: true dependencies: pako: 2.1.0 - ws: 8.17.1 + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + optional: true + + /smoldot@2.0.26: + resolution: {integrity: sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==} + requiresBuild: true + dependencies: + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -3872,6 +4496,10 @@ packages: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: false + /tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + dev: false + /tsutils@3.21.0(typescript@5.0.4): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -4115,7 +4743,7 @@ packages: utf-8-validate: optional: true - /ws@8.17.1: + /ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} engines: {node: '>=10.0.0'} peerDependencies: @@ -4126,10 +4754,13 @@ packages: optional: true utf-8-validate: optional: true + dependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 dev: false - /ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): - resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + /ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -4139,9 +4770,6 @@ packages: optional: true utf-8-validate: optional: true - dependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 dev: false /y18n@5.0.8: @@ -4237,20 +4865,19 @@ packages: file:../client-api/parachain-api: resolution: {directory: ../client-api/parachain-api, type: directory} name: '@litentry/parachain-api' - version: 0.9.20-04.1 dependencies: - '@polkadot/api': 10.9.1 - '@polkadot/api-augment': 10.9.1 - '@polkadot/api-base': 10.9.1 - '@polkadot/api-derive': 10.9.1 + '@polkadot/api': 15.0.1 + '@polkadot/api-augment': 15.0.1 + '@polkadot/api-base': 15.0.1 + '@polkadot/api-derive': 15.0.1 '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) - '@polkadot/rpc-core': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/types-known': 10.9.1 - '@polkadot/types-support': 10.9.1 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/types-known': 15.0.1 + '@polkadot/types-support': 15.0.1 '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) transitivePeerDependencies: @@ -4262,20 +4889,19 @@ packages: file:../client-api/sidechain-api: resolution: {directory: ../client-api/sidechain-api, type: directory} name: '@litentry/sidechain-api' - version: 0.9.20-04 dependencies: - '@polkadot/api': 10.9.1 - '@polkadot/api-augment': 10.9.1 - '@polkadot/api-base': 10.9.1 - '@polkadot/api-derive': 10.9.1 + '@polkadot/api': 15.0.1 + '@polkadot/api-augment': 15.0.1 + '@polkadot/api-base': 15.0.1 + '@polkadot/api-derive': 15.0.1 '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) - '@polkadot/rpc-core': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/types-known': 10.9.1 - '@polkadot/types-support': 10.9.1 + '@polkadot/rpc-core': 15.0.1 + '@polkadot/types': 15.0.1 + '@polkadot/types-augment': 15.0.1 + '@polkadot/types-codec': 15.0.1 + '@polkadot/types-create': 15.0.1 + '@polkadot/types-known': 15.0.1 + '@polkadot/types-support': 15.0.1 '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) transitivePeerDependencies: diff --git a/tee-worker/identity/ts-tests/stress/package.json b/tee-worker/identity/ts-tests/stress/package.json index ee25a27589..603c03ff12 100644 --- a/tee-worker/identity/ts-tests/stress/package.json +++ b/tee-worker/identity/ts-tests/stress/package.json @@ -10,10 +10,10 @@ }, "dependencies": { "@noble/ed25519": "^1.7.3", - "@polkadot/api": "^10.9.1", + "@polkadot/api": "^15.0.1", "@polkadot/keyring": "^12.2.1", - "@polkadot/typegen": "^10.9.1", - "@polkadot/types": "^10.9.1", + "@polkadot/typegen": "^15.0.1", + "@polkadot/types": "^15.0.1", "add": "^2.0.6", "ajv": "^8.12.0", "colors": "^1.4.0", diff --git a/tee-worker/identity/ts-tests/worker/package.json b/tee-worker/identity/ts-tests/worker/package.json index b34f365ba1..dffbc812be 100644 --- a/tee-worker/identity/ts-tests/worker/package.json +++ b/tee-worker/identity/ts-tests/worker/package.json @@ -15,18 +15,18 @@ "@polkadot/util": "^12.5.1", "websocket-as-promised": "^2.0.1", "@noble/ed25519": "^1.7.3", - "@polkadot/api": "^10.9.1", - "@polkadot/api-augment": "^10.9.1", - "@polkadot/api-base": "^10.9.1", - "@polkadot/api-derive": "^10.9.1", + "@polkadot/api": "^15.0.1", + "@polkadot/api-augment": "^15.0.1", + "@polkadot/api-base": "^15.0.1", + "@polkadot/api-derive": "^15.0.1", "@polkadot/keyring": "^12.2.1", - "@polkadot/rpc-core": "^10.9.1", - "@polkadot/types": "^10.9.1", - "@polkadot/types-augment": "^10.9.1", - "@polkadot/types-codec": "^10.9.1", - "@polkadot/types-create": "^10.9.1", - "@polkadot/types-known": "^10.9.1", - "@polkadot/types-support": "^10.9.1", + "@polkadot/rpc-core": "^15.0.1", + "@polkadot/types": "^15.0.1", + "@polkadot/types-augment": "^15.0.1", + "@polkadot/types-codec": "^15.0.1", + "@polkadot/types-create": "^15.0.1", + "@polkadot/types-known": "^15.0.1", + "@polkadot/types-support": "^15.0.1", "@polkadot/util-crypto": "^12.5.1", "add": "^2.0.6", "ajv": "^8.12.0",