diff --git a/.github/workflows/integration-tests-matrix.json b/.github/workflows/integration-tests-matrix.json index bb5266dd5a..48ce7e5681 100644 --- a/.github/workflows/integration-tests-matrix.json +++ b/.github/workflows/integration-tests-matrix.json @@ -19,6 +19,10 @@ "name": "people-kusama", "package": "people-kusama-integration-tests" }, + { + "name": "people-polkadot", + "package": "people-polkadot-integration-tests" + }, { "name": "collectives-polkadot", "package": "collectives-polkadot-integration-tests" diff --git a/.github/workflows/runtimes-matrix.json b/.github/workflows/runtimes-matrix.json index 265924dc10..7df5878b7d 100644 --- a/.github/workflows/runtimes-matrix.json +++ b/.github/workflows/runtimes-matrix.json @@ -67,6 +67,12 @@ "path": "system-parachains/people/people-kusama", "is_relay": false }, + { + "name": "people-polkadot", + "package": "people-polkadot-runtime", + "path": "system-parachains/people/people-polkadot", + "is_relay": false + }, { "name": "encointer-kusama", "package": "encointer-kusama-runtime", diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2a1a53d8a..e74b57668f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: RUSTFLAGS: "-C debug-assertions -D warnings" - name: Test all features ${{ matrix.runtime.name }} - run: cargo test -p ${{ matrix.runtime.package }} --release --locked -q --features=runtime-benchmarks,try-runtime + run: cargo test -p ${{ matrix.runtime.package }} --release --locked -q --all-features env: RUSTFLAGS: "-C debug-assertions -D warnings" SKIP_WASM_BUILD: 1 @@ -189,3 +189,54 @@ jobs: env: RUSTFLAGS: "-C debug-assertions -D warnings" SKIP_WASM_BUILD: 1 + + zombienet-smoke: + needs: [build-chain-spec-generator] + runs-on: ubuntu-latest + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # v0.11.0 + with: + access_token: ${{ github.token }} + + - name: Install updates and protobuf-compiler + run: sudo apt update && sudo apt install --assume-yes cmake protobuf-compiler + + - name: Free space on the runner + run: | + df -h + sudo apt -y autoremove --purge + sudo apt -y autoclean + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + df -h + + - name: Checkout + uses: actions/checkout@v3 + + - name: Set rust version via common env file + run: cat .github/env >> $GITHUB_ENV + + - name: Install stable toolchain + run: | + rustup install $RUST_STABLE_VERSION + rustup default $RUST_STABLE_VERSION + rustup target add wasm32-unknown-unknown + rustup component add rust-src + + - name: Fetch cache + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 + with: + shared-key: "fellowship-cache-integration-tests" + + - name: Build + run: | + cargo build -p chain-spec-generator --features fast-runtime --release --locked + + - name: Zombienet smoke test + timeout-minutes: 20 + run: | + export PATH=$(pwd)/target/release:$PATH + cargo test --manifest-path integration-tests/zombienet/Cargo.toml diff --git a/.github/workflows/up-to-date.yml b/.github/workflows/up-to-date.yml index ccf3277aca..a660979a8a 100644 --- a/.github/workflows/up-to-date.yml +++ b/.github/workflows/up-to-date.yml @@ -4,9 +4,6 @@ on: push: branches: - main - workflow_run: - workflows: [Auto Merge Bot] - types: [completed] jobs: updatePullRequests: @@ -16,7 +13,7 @@ jobs: steps: - name: Generate token id: generate_token - uses: actions/create-github-app-token@v1.9.3 + uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.MERGE_APP_ID }} private-key: ${{ secrets.MERGE_APP_KEY }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 048ffcbcb9..cf6443fbd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,70 @@ Changelog for the runtimes governed by the Polkadot Fellowship. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.2.7] 14.06.2024 + +Note: This release only affects the following runtimes and is not a full system release: + +- Polkadot Relay Chain +- Polkadot People + +### Changed + +- Updated Relay and People configurations to complete launch ([polkadot-fellows/runtimes#350](https://github.com/polkadot-fellows/runtimes/pull/350)) + +## [1.2.6] 13.06.2024 + +Note: This release only affects the following runtimes and is not a full system release: + +- Polkadot Relay Chain +- Polkadot Asset Hub +- Polkadot People +- Kusama Relay Chain +- Kusama Asset Hub +- Kusama People + +### Added + +- Add the Polkadot People Chain ([polkadot-fellows/runtimes#319](https://github.com/polkadot-fellows/runtimes/pull/319)) + +### Changed + +- Set max asset ID restriction for the creation of trusted assets ([polkadot-fellows/runtimes#346](https://github.com/polkadot-fellows/runtimes/pull/346)) + +### Fixed + +- Kusama People: clear requested judgements that do not have corresponding deposits reserved ([polkadot-fellows/runtimes#339](https://github.com/polkadot-fellows/runtimes/pull/339)) + +### Removed + +- Removed Identity-related code from Kusama Relay Chain ([polkadot-fellows/runtimes#315](https://github.com/polkadot-fellows/runtimes/pull/315)) + +## [1.2.5] 06.06.2024 + +### Added + +- Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) +- Allow any parachain to have bidirectional channel with any system parachains ([polkadot-fellows/runtimes#329](https://github.com/polkadot-fellows/runtimes/pull/329)) +- Update price controller of broker pallet to use higher leadin, without adjusting the minimum price too much ([polkadot-fellows/runtimes#334](https://github.com/polkadot-fellows/runtimes/pull/334)) +- Enable support for new hardware signers like the generic ledger app ([polkadot-fellows/runtimes#337](https://github.com/polkadot-fellows/runtimes/pull/337)) + +### Changed + +- Transaction payments work via new `fungible` trait implementation ([polkadot-fellows/runtimes#332](https://github.com/polkadot-fellows/runtimes/pull/332)) +- Block `request_judgement` calls on the Relay Chain ([polkadot-fellows/runtimes#338](https://github.com/polkadot-fellows/runtimes/pull/338)) + +### Fixed + +- Handle extra erroneous consumer reference when a nomination pool is destroying ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) +- Introduce [Encointer](https://encointer.org) collator selection and send fees to authors instead of treasury ([polkadot-fellows/runtimes#270](https://github.com/polkadot-fellows/runtimes/pull/270)) + ## [1.2.4] 20.05.2024 ### Changed - Kusama chains: allow arbitrary XCM execution ([polkadot-fellows/runtimes#261](https://github.com/polkadot-fellows/runtimes/pull/261)) - Allow everything through XCM SafeCallFilter ([polkadot-fellows/runtimes#285](https://github.com/polkadot-fellows/runtimes/pull/285)) +- Disable Coretime credit purchasing until we have the credit system implemented ([polkadot-fellows/runtimes#312](https://github.com/polkadot-fellows/runtimes/pull/312)) ### Added @@ -59,8 +117,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Remove state-trie-migration pallet from kusama, add state trie migration to V1 on polkadot ([polkadot-fellows/runtimes#170](https://github.com/polkadot-fellows/runtimes/pull/170)) - Introduce chain spec generator ([polkadot-fellows/runtimes#127](https://github.com/polkadot-fellows/runtimes/pull/127)) -- Add [Encointer](https://encointer.org) system parachain runtime, completing [RFC22](https://github.com/polkadot-fellows/RFCs/blob/main/text/ -0022-adopt-encointer-runtime.md) ([polkadot-fellows/runtimes#80](https://github.com/polkadot-fellows/runtimes/pull/80)) +- Add [Encointer](https://encointer.org) system parachain runtime, completing [RFC22](https://github.com/polkadot-fellows/RFCs/blob/main/text/0022-adopt-encointer-runtime.md) ([polkadot-fellows/runtimes#80](https://github.com/polkadot-fellows/runtimes/pull/80)) - Feature for enabling debug prints in the Polkadot and Kusama runtime ([polkadot-fellows/runtimes#85](https://github.com/polkadot-fellows/runtimes/pull/85)) - Added new "Wish for Change" track ([polkadot-fellows/runtimes#184](https://github.com/polkadot-fellows/runtimes/pull/184)) - Enable Coretime and on-demand on Kusama ([polkadot-fellows/runtimes#159](https://github.com/polkadot-fellows/runtimes/pull/159)) diff --git a/Cargo.lock b/Cargo.lock index 98cd39b3c7..ca362d2002 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -261,9 +261,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "approx" @@ -495,6 +495,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -562,7 +571,7 @@ dependencies = [ "frame-support", "kusama-emulated-chain", "parachains-common", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -588,7 +597,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime", + "sp-runtime 32.0.0", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -616,6 +625,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -661,18 +671,18 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", "sp-transaction-pool", "sp-version", - "sp-weights", + "sp-weights 28.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -691,7 +701,7 @@ dependencies = [ "frame-support", "parachains-common", "polkadot-emulated-chain", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -718,7 +728,7 @@ dependencies = [ "polkadot-runtime", "polkadot-runtime-common", "polkadot-system-emulated-network", - "sp-runtime", + "sp-runtime 32.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -745,6 +755,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -788,18 +799,18 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", "sp-transaction-pool", "sp-version", - "sp-weights", + "sp-weights 28.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -828,8 +839,8 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-parachain-info", "staging-xcm", @@ -854,7 +865,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -873,6 +884,43 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-channel" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f2776ead772134d55b62dd45e59a79e21612d85d0af729b8b7d3967d601a62a" +dependencies = [ + "concurrent-queue", + "event-listener 5.3.0", + "event-listener-strategy 0.5.2", + "futures-core", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "async-executor" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +dependencies = [ + "async-lock 3.2.0", + "blocking", + "futures-lite", +] + [[package]] name = "async-io" version = "2.2.1" @@ -908,10 +956,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" dependencies = [ "event-listener 4.0.0", - "event-listener-strategy", + "event-listener-strategy 0.4.0", "pin-project-lite 0.2.13", ] +[[package]] +name = "async-net" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" +dependencies = [ + "async-io", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-process" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" +dependencies = [ + "async-channel 2.3.0", + "async-io", + "async-lock 3.2.0", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener 5.3.0", + "futures-lite", + "rustix 0.38.31", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.31", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.74" @@ -936,6 +1039,18 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "auto_impl" version = "1.2.0" @@ -953,6 +1068,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "getrandom 0.2.12", + "instant", + "rand", +] + [[package]] name = "backtrace" version = "0.3.69" @@ -980,6 +1106,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + [[package]] name = "base64" version = "0.13.1" @@ -992,6 +1124,12 @@ version = "0.21.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64ct" version = "1.6.0" @@ -1053,7 +1191,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ - "bitcoin_hashes", + "bitcoin_hashes 0.11.0", "rand", "rand_core 0.6.4", "serde", @@ -1075,12 +1213,28 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[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" @@ -1127,6 +1281,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" version = "1.0.2" @@ -1135,7 +1299,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1146,7 +1310,7 @@ checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1159,7 +1323,7 @@ dependencies = [ "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1201,6 +1365,20 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "blocking" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +dependencies = [ + "async-channel 2.3.0", + "async-lock 3.2.0", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + [[package]] name = "bounded-collections" version = "0.2.0" @@ -1276,7 +1454,7 @@ dependencies = [ "polkadot-runtime-constants", "snowbridge-core", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "system-parachains-constants", @@ -1294,7 +1472,7 @@ dependencies = [ "polkadot-runtime-constants", "snowbridge-core", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "system-parachains-constants", @@ -1313,8 +1491,8 @@ dependencies = [ "scale-info", "serde", "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -1344,7 +1522,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", + "sp-core 29.0.0", "sp-std", ] @@ -1361,8 +1539,8 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -1394,8 +1572,8 @@ dependencies = [ "parity-util-mem", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -1410,7 +1588,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -1429,12 +1607,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "trie-db", ] @@ -1451,12 +1629,12 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -1476,8 +1654,8 @@ checksum = "86ff4abe93be7bc1663adc41817b1aa3476fbec953ce361537419924310d5dd4" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -1492,8 +1670,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "snowbridge-core", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", ] @@ -1507,7 +1685,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -1540,8 +1718,8 @@ dependencies = [ "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "snowbridge-router-primitives", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1577,6 +1755,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -1626,13 +1805,13 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -1656,7 +1835,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -1689,8 +1868,8 @@ dependencies = [ "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "snowbridge-router-primitives", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1725,6 +1904,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -1774,13 +1954,13 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -1824,10 +2004,10 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core", - "sp-io", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-keyring", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", "staging-xcm", @@ -1862,11 +2042,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "staging-xcm", "staging-xcm-builder", "static_assertions", @@ -2077,6 +2257,7 @@ dependencies = [ "pallet-staking", "parachains-common", "people-kusama-runtime", + "people-polkadot-runtime", "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-constants", @@ -2088,8 +2269,8 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-kusama-runtime", "staging-xcm", ] @@ -2104,6 +2285,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "serde", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -2180,7 +2362,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.0", "terminal_size", ] @@ -2232,7 +2414,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -2263,8 +2445,8 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-system-emulated-network", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -2285,6 +2467,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -2323,14 +2506,14 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "sp-api", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -2432,6 +2615,12 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.3.0" @@ -2489,6 +2678,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -2523,11 +2713,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -2806,9 +2996,9 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-aura", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -2825,8 +3015,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", ] @@ -2854,14 +3044,14 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "sp-inherents", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "staging-xcm", "trie-db", @@ -2890,7 +3080,7 @@ dependencies = [ "frame-system", "pallet-session", "parity-scale-codec", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -2905,8 +3095,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", ] @@ -2929,9 +3119,9 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-executor", @@ -2948,7 +3138,7 @@ dependencies = [ "polkadot-primitives", "sp-api", "sp-consensus-aura", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -2964,9 +3154,9 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "staging-xcm", ] @@ -2980,10 +3170,10 @@ dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 29.0.0", "sp-inherents", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -2992,9 +3182,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b74f9141190b9f4bf96a947ade46da64097b77f1ebfa8d611c81724250e119" dependencies = [ - "sp-externalities", - "sp-runtime-interface", - "sp-trie", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", + "sp-trie 30.0.0", ] [[package]] @@ -3010,8 +3200,8 @@ dependencies = [ "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -3027,10 +3217,10 @@ dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -3131,6 +3321,76 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +dependencies = [ + "darling_core 0.20.8", + "darling_macro 0.20.8", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 2.0.52", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +dependencies = [ + "darling_core 0.20.8", + "quote", + "syn 2.0.52", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -3212,6 +3472,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -3316,21 +3587,21 @@ dependencies = [ [[package]] name = "docify" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" +checksum = "43a2f138ad521dc4a2ced1a4576148a6a610b4c5923933b062a263130a6802ce" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" +checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" dependencies = [ "common-path", - "derive-syn-parse", + "derive-syn-parse 0.2.0", "once_cell", "proc-macro2", "quote", @@ -3347,6 +3618,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + [[package]] name = "dtoa" version = "1.0.9" @@ -3396,6 +3673,7 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] @@ -3439,11 +3717,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.2", + "ed25519", + "hashbrown 0.14.3", + "hex", + "rand_core 0.6.4", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "either" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "elliptic-curve" @@ -3460,6 +3753,7 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", + "serdect", "subtle 2.5.0", "zeroize", ] @@ -3491,8 +3785,8 @@ dependencies = [ "sc-consensus-grandpa", "sp-authority-discovery", "sp-consensus-babe", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "staging-xcm", "xcm-emulator", ] @@ -3503,6 +3797,15 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + [[package]] name = "encointer-balances-tx-payment" version = "6.1.0" @@ -3517,7 +3820,7 @@ dependencies = [ "pallet-encointer-balances", "pallet-encointer-ceremonies", "pallet-transaction-payment", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -3541,7 +3844,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06fb1e51610f1aedf130a9909977943e75de4d44218c60fc73f78b8b410ef872" dependencies = [ "encointer-primitives", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -3551,6 +3854,7 @@ version = "1.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", @@ -3561,6 +3865,7 @@ dependencies = [ "encointer-primitives", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -3571,7 +3876,9 @@ dependencies = [ "log", "pallet-asset-tx-payment", "pallet-aura", + "pallet-authorship", "pallet-balances", + "pallet-collator-selection", "pallet-collective", "pallet-encointer-balances", "pallet-encointer-bazaar", @@ -3588,10 +3895,10 @@ dependencies = [ "pallet-message-queue", "pallet-proxy", "pallet-scheduler", + "pallet-session", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", @@ -3605,11 +3912,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-transaction-pool", @@ -3632,7 +3939,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -3650,9 +3957,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "substrate-geohash", ] @@ -3730,9 +4037,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", "substrate-fixed", ] @@ -3811,6 +4118,17 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "event-listener" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + [[package]] name = "event-listener-strategy" version = "0.4.0" @@ -3821,6 +4139,16 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.0", + "pin-project-lite 0.2.13", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -4017,6 +4345,21 @@ 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 = "12.0.0" @@ -4057,11 +4400,11 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", "sp-std", "sp-storage", "static_assertions", @@ -4101,16 +4444,16 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-database", - "sp-externalities", + "sp-externalities 0.26.0", "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-state-machine", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-storage", - "sp-trie", + "sp-trie 30.0.0", "sp-wasm-interface", "thiserror", "thousands", @@ -4139,10 +4482,10 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", "sp-npos-elections", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -4158,46 +4501,73 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", ] [[package]] name = "frame-metadata" -version = "16.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ "cfg-if", "parity-scale-codec", "scale-info", - "serde", ] [[package]] -name = "frame-remote-externalities" -version = "0.36.0" +name = "frame-metadata" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360bfdb6821372164a65933d9a6d5998f38c722360b59b69d2bf78a87ef58b2a" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ - "futures", - "indicatif", - "jsonrpsee", - "log", + "cfg-if", "parity-scale-codec", + "scale-info", "serde", - "sp-core", - "sp-crypto-hashing", - "sp-io", - "sp-runtime", - "sp-state-machine", - "spinners", - "substrate-rpc-client", - "tokio", - "tokio-retry", +] + +[[package]] +name = "frame-metadata-hash-extension" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb1eec9eb46d3e016c95b2fa875118c04609f2150013c56a894cae00581e265" +dependencies = [ + "array-bytes 6.2.2", + "docify", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 32.0.0", +] + +[[package]] +name = "frame-remote-externalities" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "360bfdb6821372164a65933d9a6d5998f38c722360b59b69d2bf78a87ef58b2a" +dependencies = [ + "futures", + "indicatif", + "jsonrpsee 0.20.3", + "log", + "parity-scale-codec", + "serde", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "spinners", + "substrate-rpc-client", + "tokio", + "tokio-retry", ] [[package]] @@ -4211,7 +4581,7 @@ dependencies = [ "bitflags 1.3.2", "docify", "environmental", - "frame-metadata", + "frame-metadata 16.0.0", "frame-support-procedural", "impl-trait-for-tuples", "k256", @@ -4224,20 +4594,20 @@ dependencies = [ "serde_json", "smallvec", "sp-api", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", "sp-crypto-hashing-proc-macro", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-metadata-ir", - "sp-runtime", + "sp-runtime 32.0.0", "sp-staking", - "sp-state-machine", + "sp-state-machine 0.36.0", "sp-std", "sp-tracing", - "sp-weights", + "sp-weights 28.0.0", "static_assertions", "tt-call", ] @@ -4250,7 +4620,7 @@ checksum = "3bf1d648c4007d421b9677b3c893256913498fff159dc2d85022cdd9cc432f3c" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "expander 2.0.0", "frame-support-procedural-tools", "itertools 0.10.5", @@ -4299,12 +4669,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-version", - "sp-weights", + "sp-weights 28.0.0", ] [[package]] @@ -4318,8 +4688,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -4342,7 +4712,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -4373,9 +4743,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -4404,9 +4774,9 @@ checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -4426,7 +4796,10 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" dependencies = [ + "fastrand", "futures-core", + "futures-io", + "parking", "pin-project-lite 0.2.13", ] @@ -4614,11 +4987,11 @@ dependencies = [ "scale-info", "sp-api", "sp-block-builder", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -4655,7 +5028,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -4717,6 +5090,7 @@ checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash 0.8.8", "allocator-api2", + "serde", ] [[package]] @@ -4746,6 +5120,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[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" @@ -4902,9 +5282,34 @@ dependencies = [ "hyper", "log", "rustls 0.21.10", - "rustls-native-certs", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite 0.2.13", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", "tokio", - "tokio-rustls", + "tokio-native-tls", ] [[package]] @@ -4930,6 +5335,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.2.3" @@ -5061,14 +5472,20 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "indicatif" version = "0.17.7" @@ -5202,6 +5619,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.10" @@ -5226,22 +5652,58 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "json-patch" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" +dependencies = [ + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "jsonpath-rust" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06cc127b7c3d270be504572364f9569761a180b981919dd0d87693a7f5fb7829" +dependencies = [ + "pest", + "pest_derive", + "regex", + "serde_json", + "thiserror", +] + [[package]] name = "jsonrpsee" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ - "jsonrpsee-core", - "jsonrpsee-http-client", + "jsonrpsee-core 0.20.3", + "jsonrpsee-http-client 0.20.3", "jsonrpsee-proc-macros", "jsonrpsee-server", - "jsonrpsee-types", + "jsonrpsee-types 0.20.3", "jsonrpsee-ws-client", "tokio", "tracing", ] +[[package]] +name = "jsonrpsee" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdb12a2381ea5b2e68c3469ec604a007b367778cdb14d09612c8069ebd616ad" +dependencies = [ + "jsonrpsee-client-transport 0.22.5", + "jsonrpsee-core 0.22.5", + "jsonrpsee-http-client 0.22.5", + "jsonrpsee-types 0.22.5", +] + [[package]] name = "jsonrpsee-client-transport" version = "0.20.3" @@ -5250,13 +5712,34 @@ checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-util", "http", - "jsonrpsee-core", + "jsonrpsee-core 0.20.3", + "pin-project", + "rustls-native-certs 0.6.3", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.24.1", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4978087a58c3ab02efc5b07c5e5e2803024536106fd5506f558db172c889b3aa" +dependencies = [ + "futures-util", + "http", + "jsonrpsee-core 0.22.5", "pin-project", - "rustls-native-certs", + "rustls-native-certs 0.7.0", + "rustls-pki-types", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", "tokio-util", "tracing", "url", @@ -5275,7 +5758,7 @@ dependencies = [ "futures-timer", "futures-util", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.20.3", "parking_lot 0.12.1", "rand", "rustc-hash", @@ -5287,6 +5770,29 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-core" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b257e1ec385e07b0255dde0b933f948b5c8b8c28d42afda9587c3a967b896d" +dependencies = [ + "anyhow", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types 0.22.5", + "pin-project", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + [[package]] name = "jsonrpsee-http-client" version = "0.20.3" @@ -5296,8 +5802,28 @@ dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ccf93fc4a0bfe05d851d37d7c32b7f370fe94336b52a2f0efc5f1981895c2e5" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.22.5", + "jsonrpsee-types 0.22.5", "serde", "serde_json", "thiserror", @@ -5329,8 +5855,8 @@ dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", "route-recognizer", "serde", "serde_json", @@ -5357,6 +5883,19 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-types" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "150d6168405890a7a3231a3c74843f58b8959471f6df76078db2619ddee1d07d" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.20.3" @@ -5364,25 +5903,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ "http", - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-client-transport 0.20.3", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", "url", ] [[package]] name = "k256" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2 0.10.8", ] +[[package]] +name = "k8s-openapi" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc3606fd16aca7989db2f84bb25684d0270c6d6fa1dbcd0025af7b4130523a6" +dependencies = [ + "base64 0.21.6", + "bytes", + "chrono", + "serde", + "serde-value", + "serde_json", +] + [[package]] name = "keccak" version = "0.1.4" @@ -5398,6 +5952,99 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" +[[package]] +name = "kube" +version = "0.87.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3499c8d60c763246c7a213f51caac1e9033f46026904cb89bc8951ae8601f26e" +dependencies = [ + "k8s-openapi", + "kube-client", + "kube-core", + "kube-runtime", +] + +[[package]] +name = "kube-client" +version = "0.87.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "033450dfa0762130565890dadf2f8835faedf749376ca13345bcd8ecd6b5f29f" +dependencies = [ + "base64 0.21.6", + "bytes", + "chrono", + "either", + "futures", + "home", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-timeout", + "jsonpath-rust", + "k8s-openapi", + "kube-core", + "pem 3.0.4", + "pin-project", + "rand", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", + "secrecy", + "serde", + "serde_json", + "serde_yaml", + "thiserror", + "tokio", + "tokio-tungstenite", + "tokio-util", + "tower", + "tower-http", + "tracing", +] + +[[package]] +name = "kube-core" +version = "0.87.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5bba93d054786eba7994d03ce522f368ef7d48c88a1826faa28478d85fb63ae" +dependencies = [ + "chrono", + "form_urlencoded", + "http", + "json-patch", + "k8s-openapi", + "once_cell", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "kube-runtime" +version = "0.87.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d8893eb18fbf6bb6c80ef6ee7dd11ec32b1dc3c034c988ac1b3a84d46a230ae" +dependencies = [ + "ahash 0.8.8", + "async-trait", + "backoff", + "derivative", + "futures", + "hashbrown 0.14.3", + "json-patch", + "k8s-openapi", + "kube-client", + "parking_lot 0.12.1", + "pin-project", + "serde", + "serde_json", + "smallvec", + "thiserror", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "kusama-emulated-chain" version = "1.0.0" @@ -5410,7 +6057,7 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "staging-kusama-runtime", ] @@ -5436,9 +6083,9 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", "staging-xcm-builder", ] @@ -5543,12 +6190,12 @@ dependencies = [ "futures-timer", "getrandom 0.2.12", "instant", - "libp2p-allow-block-list", - "libp2p-connection-limits", - "libp2p-core", + "libp2p-allow-block-list 0.1.1", + "libp2p-connection-limits 0.1.0", + "libp2p-core 0.39.2", "libp2p-dns", "libp2p-identify", - "libp2p-identity", + "libp2p-identity 0.1.3", "libp2p-kad", "libp2p-mdns", "libp2p-metrics", @@ -5556,36 +6203,83 @@ dependencies = [ "libp2p-ping", "libp2p-quic", "libp2p-request-response", - "libp2p-swarm", + "libp2p-swarm 0.42.2", "libp2p-tcp", "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", - "multiaddr", + "multiaddr 0.17.1", "pin-project", ] [[package]] -name = "libp2p-allow-block-list" -version = "0.1.1" +name = "libp2p" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" +checksum = "e94495eb319a85b70a68b85e2389a95bb3555c71c49025b78c691a854a7e6464" dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "void", -] - -[[package]] -name = "libp2p-connection-limits" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" + "bytes", + "either", + "futures", + "futures-timer", + "getrandom 0.2.12", + "instant", + "libp2p-allow-block-list 0.2.0", + "libp2p-connection-limits 0.2.1", + "libp2p-core 0.40.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.43.7", + "multiaddr 0.18.1", + "pin-project", + "rw-stream-sink 0.4.0", + "thiserror", +] + +[[package]] +name = "libp2p-allow-block-list" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" +dependencies = [ + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "void", +] + +[[package]] +name = "libp2p-allow-block-list" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55b46558c5c0bf99d3e2a1a38fd54ff5476ca66dd1737b12466a1824dd219311" +dependencies = [ + "libp2p-core 0.40.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.43.7", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f5107ad45cb20b2f6c3628c7b6014b996fcb13a88053f4569c872c6e30abf58" +dependencies = [ + "libp2p-core 0.40.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.43.7", "void", ] @@ -5600,17 +6294,45 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", - "multiaddr", + "multiaddr 0.17.1", "multihash 0.17.0", - "multistream-select", + "multistream-select 0.12.1", + "once_cell", + "parking_lot 0.12.1", + "pin-project", + "quick-protobuf", + "rand", + "rw-stream-sink 0.3.0", + "smallvec", + "thiserror", + "unsigned-varint", + "void", +] + +[[package]] +name = "libp2p-core" +version = "0.40.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd44289ab25e4c9230d9246c475a22241e301b23e8f4061d3bdef304a1a99713" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-identity 0.2.8", + "log", + "multiaddr 0.18.1", + "multihash 0.19.1", + "multistream-select 0.13.0", "once_cell", "parking_lot 0.12.1", "pin-project", "quick-protobuf", "rand", - "rw-stream-sink", + "rw-stream-sink 0.4.0", "smallvec", "thiserror", "unsigned-varint", @@ -5624,7 +6346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ "futures", - "libp2p-core", + "libp2p-core 0.39.2", "log", "parking_lot 0.12.1", "smallvec", @@ -5641,9 +6363,9 @@ dependencies = [ "either", "futures", "futures-timer", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", "log", "lru 0.10.1", "quick-protobuf", @@ -5662,7 +6384,7 @@ dependencies = [ "bs58 0.4.0", "ed25519-dalek", "log", - "multiaddr", + "multiaddr 0.17.1", "multihash 0.17.0", "quick-protobuf", "rand", @@ -5671,6 +6393,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "libp2p-identity" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" +dependencies = [ + "bs58 0.5.0", + "ed25519-dalek", + "hkdf", + "multihash 0.19.1", + "quick-protobuf", + "rand", + "sha2 0.10.8", + "thiserror", + "tracing", + "zeroize", +] + [[package]] name = "libp2p-kad" version = "0.43.3" @@ -5685,9 +6425,9 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", "log", "quick-protobuf", "rand", @@ -5708,9 +6448,9 @@ dependencies = [ "data-encoding", "futures", "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", "log", "rand", "smallvec", @@ -5726,11 +6466,11 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "libp2p-core", + "libp2p-core 0.39.2", "libp2p-identify", "libp2p-kad", "libp2p-ping", - "libp2p-swarm", + "libp2p-swarm 0.42.2", "prometheus-client", ] @@ -5743,8 +6483,8 @@ dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core", - "libp2p-identity", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", "log", "once_cell", "quick-protobuf", @@ -5767,8 +6507,8 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-swarm 0.42.2", "log", "rand", "void", @@ -5784,8 +6524,8 @@ dependencies = [ "futures", "futures-timer", "if-watch", - "libp2p-core", - "libp2p-identity", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -5805,9 +6545,9 @@ dependencies = [ "async-trait", "futures", "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", "rand", "smallvec", ] @@ -5823,8 +6563,8 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core", - "libp2p-identity", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", "libp2p-swarm-derive", "log", "rand", @@ -5833,6 +6573,27 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-swarm" +version = "0.43.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580189e0074af847df90e75ef54f3f30059aedda37ea5a1659e8b9fca05c0141" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.40.1", + "libp2p-identity 0.2.8", + "log", + "multistream-select 0.13.0", + "once_cell", + "rand", + "smallvec", + "void", +] + [[package]] name = "libp2p-swarm-derive" version = "0.32.0" @@ -5854,7 +6615,7 @@ dependencies = [ "futures-timer", "if-watch", "libc", - "libp2p-core", + "libp2p-core 0.39.2", "log", "socket2 0.4.10", "tokio", @@ -5868,8 +6629,8 @@ checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core", - "libp2p-identity", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", "rcgen", "ring 0.16.20", "rustls 0.20.9", @@ -5887,7 +6648,7 @@ checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ "futures", "js-sys", - "libp2p-core", + "libp2p-core 0.39.2", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -5902,11 +6663,11 @@ dependencies = [ "either", "futures", "futures-rustls", - "libp2p-core", + "libp2p-core 0.39.2", "log", "parking_lot 0.12.1", "quicksink", - "rw-stream-sink", + "rw-stream-sink 0.3.0", "soketto", "url", "webpki-roots", @@ -5919,7 +6680,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", - "libp2p-core", + "libp2p-core 0.39.2", "log", "thiserror", "yamux", @@ -6079,9 +6840,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" @@ -6101,6 +6862,15 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "lru" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown 0.14.3", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -6158,7 +6928,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "macro_magic_core_macros", "proc-macro2", "quote", @@ -6275,6 +7045,20 @@ dependencies = [ "hash-db", ] +[[package]] +name = "merkleized-metadata" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f313fcff1d2a4bcaa2deeaa00bf7530d77d5f7bd0467a117dde2e29a75a7a17a" +dependencies = [ + "array-bytes 6.2.2", + "blake3", + "frame-metadata 16.0.0", + "parity-scale-codec", + "scale-decode 0.13.0", + "scale-info", +] + [[package]] name = "merlin" version = "2.0.1" @@ -6310,6 +7094,12 @@ dependencies = [ "thrift", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -6376,9 +7166,9 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -6387,14 +7177,14 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2634b45039e064c343a0a77ed45e03ca027c84e1b250b2f3988af7cde9b7e79e" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -6443,6 +7233,25 @@ dependencies = [ "url", ] +[[package]] +name = "multiaddr" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity 0.2.8", + "multibase", + "multihash 0.19.1", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint", + "url", +] + [[package]] name = "multibase" version = "0.9.1" @@ -6573,6 +7382,20 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "multistream-select" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" +dependencies = [ + "bytes", + "futures", + "log", + "pin-project", + "smallvec", + "unsigned-varint", +] + [[package]] name = "nalgebra" version = "0.32.3" @@ -6615,6 +7438,24 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "netlink-packet-core" version = "0.4.2" @@ -6703,6 +7544,18 @@ dependencies = [ "libc", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -6725,6 +7578,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.4" @@ -6851,12 +7714,50 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.4.1", + "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.52", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -6887,7 +7788,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eedb646674596266dc9bb2b5c7eea7c36b32ecc7777eba0d510196972d72c4fd" dependencies = [ "expander 2.0.0", - "indexmap 2.1.0", + "indexmap 2.2.6", "itertools 0.11.0", "petgraph", "proc-macro-crate 1.3.1", @@ -6905,6 +7806,21 @@ dependencies = [ "num-traits", ] +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "pallet-alliance" version = "28.0.0" @@ -6920,10 +7836,10 @@ dependencies = [ "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -6939,10 +7855,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -6958,7 +7874,7 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -6973,8 +7889,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -6991,9 +7907,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7009,8 +7925,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7026,9 +7942,9 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-aura", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7043,9 +7959,9 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-authority-discovery", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7060,7 +7976,7 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7079,11 +7995,11 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-babe", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -7105,9 +8021,9 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", ] @@ -7125,7 +8041,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7144,7 +8060,7 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -7169,10 +8085,10 @@ dependencies = [ "serde", "sp-api", "sp-consensus-beefy", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", ] @@ -7189,9 +8105,9 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7212,9 +8128,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-consensus-grandpa", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -7232,7 +8148,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7253,9 +8169,9 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -7274,26 +8190,27 @@ dependencies = [ "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-runtime 32.0.0", "sp-std", ] [[package]] name = "pallet-broker" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3626d7e8e49b153b84c74594e1fb4b6d64720b5a9588297d3ba3c049c3b3b9e3" +checksum = "574c52fd629191c374c24a18036acac008ea92142309e5dd05e7f03149a667c3" dependencies = [ "bitvec", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7311,9 +8228,9 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7333,7 +8250,7 @@ dependencies = [ "parity-scale-codec", "rand", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -7350,9 +8267,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7369,8 +8286,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7387,10 +8304,10 @@ dependencies = [ "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7409,11 +8326,11 @@ dependencies = [ "parity-scale-codec", "rand", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-npos-elections", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "strum 0.24.1", ] @@ -7429,7 +8346,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7449,7 +8366,7 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7467,7 +8384,7 @@ dependencies = [ "pallet-encointer-communities", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 29.0.0", "sp-std", ] @@ -7503,10 +8420,10 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7538,8 +8455,8 @@ dependencies = [ "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7557,9 +8474,9 @@ dependencies = [ [[package]] name = "pallet-encointer-faucet" -version = "6.1.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef912a2cdd0f586054d5df1078037ef324fd64515671d6630cfbd1787c4ebe2a" +checksum = "3024bc49c1fd7fffa68f4aa636b199c7a0772690049d0471a6b60d17080024d8" dependencies = [ "approx", "encointer-primitives", @@ -7569,11 +8486,10 @@ dependencies = [ "log", "pallet-encointer-communities", "pallet-encointer-reputation-commitments", - "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7595,8 +8511,8 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7615,7 +8531,7 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7633,8 +8549,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -7652,9 +8568,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7672,11 +8588,11 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -7684,9 +8600,9 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "29.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e1cae19e30e7dc822c419988b30bb1318d79a8d5da92733822d0e84fe760ca" +checksum = "452bba25325b7f0148eeecbde13e7c26dfb677ad46b3f160b359d7643b44c94b" dependencies = [ "enumflags2", "frame-benchmarking", @@ -7695,8 +8611,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7713,10 +8629,10 @@ dependencies = [ "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -7732,10 +8648,10 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-keyring", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7750,7 +8666,7 @@ dependencies = [ "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7766,9 +8682,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7785,12 +8701,12 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", ] [[package]] @@ -7805,10 +8721,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7824,8 +8740,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7843,7 +8759,7 @@ dependencies = [ "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -7860,9 +8776,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -7889,17 +8805,17 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] [[package]] name = "pallet-nomination-pools" -version = "26.0.0" +version = "26.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f14519c1c613d2f8c95c27015864c11a37969a23deeba9f6dbaff4276e1b81c" +checksum = "b62091305ec7426e71c3da2b0944c2df5a804109ee4d2e8f4fe34865e049f8ac" dependencies = [ "frame-support", "frame-system", @@ -7907,9 +8823,9 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", "sp-tracing", @@ -7930,8 +8846,8 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-runtime-interface", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", "sp-staking", "sp-std", ] @@ -7961,7 +8877,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -7986,7 +8902,7 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -8003,9 +8919,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8020,8 +8936,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8038,10 +8954,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8056,8 +8972,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8075,9 +8991,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8094,10 +9010,10 @@ dependencies = [ "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8114,10 +9030,10 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", ] [[package]] @@ -8133,14 +9049,14 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-session", "sp-staking", - "sp-state-machine", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -8156,7 +9072,7 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "rand", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", ] @@ -8174,17 +9090,17 @@ dependencies = [ "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] [[package]] name = "pallet-staking" -version = "29.0.2" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668b7d28c499f0d9f295fad26cf6c342472e21842e3b13bcaaac8536358b2d6c" +checksum = "061b00814eb794a40df4eca7972a7c67b26473cd85cc7c54f5816ae49ad6e11b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8197,9 +9113,9 @@ dependencies = [ "rand_chacha 0.2.2", "scale-info", "serde", - "sp-application-crypto", - "sp-io", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -8223,14 +9139,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "505d45e08bad052f55fb51f00a6b6244d23ee46ffdc8091f6cddf4e3a880319d" dependencies = [ "log", - "sp-arithmetic", + "sp-arithmetic 24.0.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "15.0.0" +version = "15.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237d7b5a10cb6cba727c3e957fb241776302aa3cce589e6759ba53f50129c1a5" +checksum = "e47c73850103db30b61ef170107afe1ef0dab6905c495bd6dfb57b3c1dd81bc7" dependencies = [ "parity-scale-codec", "sp-api", @@ -8249,9 +9165,9 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8267,8 +9183,8 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8286,8 +9202,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-inherents", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-storage", "sp-timestamp", @@ -8295,18 +9211,18 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "29.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39f690f5c287ad34b28ca951ef7fae80b08cc9218d970723b7a70e4d29396872" +checksum = "0b0c408252aefe10cff96af1e54f06f45cb0dd184b4e450e9a2ecf837dfe506e" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8316,15 +9232,15 @@ version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08ef209d2d5d077e325bf49b024fd2eff109a5c2ca0d84ce0d50a65839e6b026" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-rpc", - "sp-runtime", - "sp-weights", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", ] [[package]] @@ -8336,15 +9252,15 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", - "sp-runtime", - "sp-weights", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", ] [[package]] name = "pallet-treasury" -version = "28.0.0" +version = "28.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1605eb5083a2cd172544f33c6e59eca2e23ac49f02f13d1562b1b8a409df9c60" +checksum = "3eca44990d0d759213744f2d1f6fe1fadec1079a3e4e4da40556d6b4e42abbcd" dependencies = [ "docify", "frame-benchmarking", @@ -8355,8 +9271,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8372,7 +9288,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -8387,9 +9303,9 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -8405,7 +9321,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -8421,7 +9337,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -8440,9 +9356,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -8461,8 +9377,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -8485,8 +9401,8 @@ dependencies = [ "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -8506,8 +9422,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -8535,9 +9451,9 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-parachain-info", "staging-xcm", @@ -8565,9 +9481,9 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", "staging-parachain-info", @@ -8576,6 +9492,19 @@ dependencies = [ "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", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + [[package]] name = "parity-bytes" version = "0.1.2" @@ -8598,7 +9527,7 @@ dependencies = [ "memmap2 0.5.10", "parking_lot 0.12.1", "rand", - "siphasher", + "siphasher 0.3.11", "snap", "winapi", ] @@ -8731,6 +9660,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle 2.5.0", +] + [[package]] name = "paste" version = "1.0.14" @@ -8746,6 +9686,16 @@ dependencies = [ "crypto-mac 0.11.0", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "password-hash", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -8762,8 +9712,18 @@ dependencies = [ ] [[package]] -name = "penpal-emulated-chain" -version = "1.0.0" +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + +[[package]] +name = "penpal-emulated-chain" +version = "1.0.0" dependencies = [ "cumulus-primitives-core", "emulated-integration-tests-common", @@ -8772,7 +9732,7 @@ dependencies = [ "parachains-common", "penpal-runtime", "polkadot-emulated-chain", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -8820,11 +9780,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -8847,7 +9807,7 @@ dependencies = [ "kusama-emulated-chain", "parachains-common", "people-kusama-runtime", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -8867,7 +9827,7 @@ dependencies = [ "parity-scale-codec", "people-kusama-runtime", "polkadot-runtime-common", - "sp-runtime", + "sp-runtime 32.0.0", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -8888,6 +9848,7 @@ dependencies = [ "enumflags2", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -8920,11 +9881,113 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime 32.0.0", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "system-parachains-constants", +] + +[[package]] +name = "people-polkadot-emulated-chain" +version = "1.0.0" +dependencies = [ + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "people-polkadot-runtime", + "polkadot-emulated-chain", + "sp-core 29.0.0", +] + +[[package]] +name = "people-polkadot-integration-tests" +version = "1.0.0" +dependencies = [ + "asset-test-utils", + "cumulus-pallet-parachain-system", + "emulated-integration-tests-common", + "frame-support", + "pallet-balances", + "pallet-identity", + "pallet-message-queue", + "parachains-common", + "parity-scale-codec", + "people-polkadot-runtime", + "polkadot-runtime", + "polkadot-runtime-common", + "polkadot-runtime-constants", + "polkadot-system-emulated-network", + "sp-runtime 32.0.0", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "people-polkadot-runtime" +version = "1.0.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "enumflags2", + "frame-benchmarking", + "frame-executive", + "frame-metadata-hash-extension", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-identity", + "pallet-message-queue", + "pallet-multisig", + "pallet-proxy", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "polkadot-runtime-constants", + "scale-info", + "serde", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -8996,7 +10059,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.6", ] [[package]] @@ -9037,6 +10100,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -9115,8 +10189,8 @@ dependencies = [ "polkadot-primitives", "rand", "schnellru", - "sp-core", - "sp-keystore", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9160,9 +10234,9 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "thiserror", "tokio-util", "tracing-gum", @@ -9176,8 +10250,8 @@ checksum = "b6a08e4e014c853b252ecbbe3ccd67b2d33d78e46988d309b8cccf4ac06e25ef" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -9191,7 +10265,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 2.1.0", + "indexmap 2.2.6", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -9201,8 +10275,8 @@ dependencies = [ "polkadot-primitives", "sc-network", "schnellru", - "sp-application-crypto", - "sp-keystore", + "sp-application-crypto 31.0.0", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9221,8 +10295,8 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -9235,8 +10309,8 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "reed-solomon-novelpoly", - "sp-core", - "sp-trie", + "sp-core 29.0.0", + "sp-trie 30.0.0", "thiserror", ] @@ -9256,10 +10330,10 @@ dependencies = [ "rand_chacha 0.3.1", "sc-network", "sc-network-common", - "sp-application-crypto", - "sp-core", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-keystore", + "sp-keystore 0.35.0", "tracing-gum", ] @@ -9300,7 +10374,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core", + "sp-core 29.0.0", "sp-maybe-compressed-blob", "thiserror", "tracing-gum", @@ -9332,10 +10406,10 @@ dependencies = [ "sc-keystore", "schnellru", "schnorrkel 0.11.4", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus", "sp-consensus-slots", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", "tracing-gum", ] @@ -9379,7 +10453,7 @@ dependencies = [ "polkadot-primitives", "polkadot-statement-table", "schnellru", - "sp-keystore", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9394,7 +10468,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", "wasm-timer", @@ -9554,7 +10628,7 @@ dependencies = [ "polkadot-primitives", "rand", "slotmap", - "sp-core", + "sp-core 29.0.0", "sp-maybe-compressed-blob", "sp-wasm-interface", "tempfile", @@ -9575,7 +10649,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sp-keystore", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9599,10 +10673,10 @@ dependencies = [ "sc-executor-common", "sc-executor-wasmtime", "seccompiler", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-externalities", - "sp-io", + "sp-externalities 0.26.0", + "sp-io 31.0.0", "sp-tracing", "thiserror", "tracing-gum", @@ -9638,7 +10712,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "sc-network", - "sp-core", + "sp-core 29.0.0", "thiserror", "tokio", ] @@ -9669,7 +10743,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07f9e67b0f25d695947a15b6fe8ee6f8e83f3dfcbca124a13281c0edd0dc4703" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-trait", "bitvec", "derive_more", @@ -9702,12 +10776,12 @@ dependencies = [ "polkadot-primitives", "schnorrkel 0.11.4", "serde", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-babe", - "sp-core", - "sp-keystore", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "sp-maybe-compressed-blob", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", "zstd 0.12.4", ] @@ -9747,7 +10821,7 @@ dependencies = [ "sp-authority-discovery", "sp-blockchain", "sp-consensus-babe", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -9781,9 +10855,9 @@ dependencies = [ "rand", "sc-client-api", "schnellru", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "thiserror", "tracing-gum", ] @@ -9806,7 +10880,7 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sp-api", - "sp-core", + "sp-core 29.0.0", "tikv-jemalloc-ctl", "tracing-gum", ] @@ -9823,10 +10897,10 @@ dependencies = [ "polkadot-core-primitives", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", ] [[package]] @@ -9844,15 +10918,15 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-authority-discovery", "sp-consensus-slots", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -9863,7 +10937,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb4747cb8faa532e8446b38b74266fd626d6b660fe6b00776dd6c4543cc0457f" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "mmr-rpc", "pallet-transaction-payment-rpc", "polkadot-primitives", @@ -9885,8 +10959,8 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] @@ -9899,6 +10973,7 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-metadata-hash-extension", "frame-remote-externalities", "frame-support", "frame-system", @@ -9960,28 +11035,28 @@ dependencies = [ "separator", "serde_json", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", "sp-storage", "sp-tracing", "sp-transaction-pool", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "staging-xcm", "staging-xcm-builder", @@ -9992,9 +11067,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "8.0.1" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06afbb3bd10245ad1907242a98ddffc3c0c1e209738b8382bc5bcfc1f28c0429" +checksum = "d815f0ff0a69dce7235d42c6e7d5e2b8b7429cba1252b4802ddc7879e2e74d4a" dependencies = [ "bitvec", "frame-benchmarking", @@ -10028,11 +11103,11 @@ dependencies = [ "serde_derive", "slot-range-helper", "sp-api", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-npos-elections", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -10050,9 +11125,9 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-weights 28.0.0", "staging-xcm-builder", ] @@ -10072,9 +11147,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "8.0.1" +version = "8.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bcfd672be236fd1c38c702e7e99fe3f3e54df0ddb8127e542423221d1f50669" +checksum = "b8d37cd3e014b06daf396d1483b5327782a0ebadc816423419665166b75b3e3e" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -10105,13 +11180,13 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", + "sp-io 31.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", @@ -10217,21 +11292,21 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", - "sp-keystore", + "sp-keystore 0.35.0", "sp-mmr-primitives", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", - "sp-state-machine", + "sp-state-machine 0.36.0", "sp-storage", "sp-timestamp", "sp-transaction-pool", "sp-version", - "sp-weights", + "sp-weights 28.0.0", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -10248,14 +11323,14 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 2.1.0", + "indexmap 2.2.6", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore", + "sp-keystore 0.35.0", "sp-staking", "thiserror", "tracing-gum", @@ -10269,7 +11344,7 @@ checksum = "de5e010da3c6a65d8f263d0f825a04d995ffc8a37f886f674fcbbc73bf158d01" dependencies = [ "parity-scale-codec", "polkadot-primitives", - "sp-core", + "sp-core 29.0.0", "tracing-gum", ] @@ -10282,9 +11357,84 @@ dependencies = [ "collectives-polkadot-emulated-chain", "emulated-integration-tests-common", "penpal-emulated-chain", + "people-polkadot-emulated-chain", "polkadot-emulated-chain", ] +[[package]] +name = "polkavm-common" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c99f7eee94e7be43ba37eef65ad0ee8cbaf89b7c00001c3f6d2be985cb1817" + +[[package]] +name = "polkavm-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" + +[[package]] +name = "polkavm-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79fa916f7962348bd1bb1a65a83401675e6fc86c51a0fdbcf92a3108e58e6125" +dependencies = [ + "polkavm-derive-impl-macro 0.8.0", +] + +[[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 0.9.0", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10b2654a8a10a83c260bfb93e97b262cf0017494ab94a65d389e0eda6de6c9c" +dependencies = [ + "polkavm-common 0.8.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" +dependencies = [ + "polkavm-common 0.9.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66" +dependencies = [ + "polkavm-derive-impl 0.8.0", + "syn 2.0.52", +] + +[[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 0.9.0", + "syn 2.0.52", +] + [[package]] name = "polling" version = "3.5.0" @@ -10486,9 +11636,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" dependencies = [ "unicode-ident", ] @@ -10817,7 +11967,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ - "pem", + "pem 1.1.1", "ring 0.16.20", "time", "yasna", @@ -10898,13 +12048,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -10919,9 +12069,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -10940,6 +12090,46 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.6", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite 0.2.13", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + [[package]] name = "resolv-conf" version = "0.7.0" @@ -11191,10 +12381,24 @@ checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.7", - "rustls-webpki", + "rustls-webpki 0.101.7", "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.7", + "rustls-pki-types", + "rustls-webpki 0.102.3", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -11202,7 +12406,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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.1.2", + "rustls-pki-types", "schannel", "security-framework", ] @@ -11216,6 +12433,22 @@ dependencies = [ "base64 0.21.6", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -11226,6 +12459,17 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -11244,6 +12488,17 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "ruzstd" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" +dependencies = [ + "byteorder", + "derive_more", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -11255,6 +12510,17 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "rw-stream-sink" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] + [[package]] name = "ryu" version = "1.0.16" @@ -11295,7 +12561,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357127c91373ed6d1ae582f6e3300ab5b13bcde43bbf270a891f44194ef48b70" dependencies = [ "log", - "sp-core", + "sp-core 29.0.0", "sp-wasm-interface", "thiserror", ] @@ -11310,7 +12576,7 @@ dependencies = [ "futures", "futures-timer", "ip_network", - "libp2p", + "libp2p 0.51.4", "log", "multihash 0.18.1", "multihash-codetable", @@ -11323,9 +12589,9 @@ dependencies = [ "sp-api", "sp-authority-discovery", "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11347,9 +12613,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", ] @@ -11363,10 +12629,10 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", - "sp-trie", + "sp-runtime 32.0.0", + "sp-trie 30.0.0", ] [[package]] @@ -11388,12 +12654,12 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", "sp-genesis-builder", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-io 31.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", ] [[package]] @@ -11421,7 +12687,7 @@ dependencies = [ "fdlimit", "futures", "itertools 0.10.5", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "names", "parity-scale-codec", @@ -11440,11 +12706,11 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-keyring", - "sp-keystore", + "sp-keystore 0.35.0", "sp-panic-handler", - "sp-runtime", + "sp-runtime 32.0.0", "sp-version", "thiserror", "tokio", @@ -11467,14 +12733,14 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 29.0.0", "sp-database", - "sp-externalities", - "sp-runtime", - "sp-state-machine", + "sp-externalities 0.26.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-statement-store", "sp-storage", - "sp-trie", + "sp-trie 30.0.0", "substrate-prometheus-endpoint", ] @@ -11496,13 +12762,13 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-database", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-trie 30.0.0", ] [[package]] @@ -11514,7 +12780,7 @@ dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "mockall", "parking_lot 0.12.1", @@ -11524,9 +12790,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11553,17 +12819,17 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool-api", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11575,19 +12841,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf2b3004672f9eea0d9af6c9b944fa3ef0bc72fd88cea9075cdf6dc96d1439ac" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "sc-consensus-babe", "sc-consensus-epochs", "sc-rpc-api", "serde", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -11598,7 +12864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9ce3ee15eff7fa642791966d427f185184df3c7f4e58893705f3e7781da8ef5" dependencies = [ "array-bytes 6.2.2", - "async-channel", + "async-channel 1.9.0", "async-trait", "fnv", "futures", @@ -11612,16 +12878,16 @@ dependencies = [ "sc-network-sync", "sc-utils", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-keystore", + "sp-keystore 0.35.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -11635,7 +12901,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a1ed5e8ac2cb53c6a248c8f469353f55bd23c72f23fe371ac19c1d46618de1a" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11643,8 +12909,8 @@ dependencies = [ "sc-rpc", "serde", "sp-consensus-beefy", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -11659,7 +12925,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sp-blockchain", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -11693,15 +12959,15 @@ dependencies = [ "sc-utils", "serde_json", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", ] @@ -11714,7 +12980,7 @@ checksum = "697cbd528516561dbc818a8990d5477169e86d9335a0b29207cf6f6a90269e7c" dependencies = [ "finality-grandpa", "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "sc-client-api", @@ -11722,8 +12988,8 @@ dependencies = [ "sc-rpc", "serde", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -11741,14 +13007,14 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", ] [[package]] @@ -11763,12 +13029,12 @@ dependencies = [ "sc-executor-wasmtime", "schnellru", "sp-api", - "sp-core", - "sp-externalities", - "sp-io", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-io 31.0.0", "sp-panic-handler", - "sp-runtime-interface", - "sp-trie", + "sp-runtime-interface 25.0.0", + "sp-trie 30.0.0", "sp-version", "sp-wasm-interface", "tracing", @@ -11801,7 +13067,7 @@ dependencies = [ "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", + "sp-runtime-interface 25.0.0", "sp-wasm-interface", "wasmtime", ] @@ -11821,7 +13087,7 @@ dependencies = [ "sc-network-common", "sc-network-sync", "sp-blockchain", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -11833,9 +13099,9 @@ dependencies = [ "array-bytes 6.2.2", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "thiserror", ] @@ -11851,10 +13117,10 @@ dependencies = [ "bytes", "futures", "futures-timer", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "mixnet", - "multiaddr", + "multiaddr 0.17.1", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -11862,10 +13128,10 @@ dependencies = [ "sc-transaction-pool-api", "sp-api", "sp-consensus", - "sp-core", - "sp-keystore", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "sp-mixnet", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", ] @@ -11876,7 +13142,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f231c7d5e749ec428b4cfa669d759ae76cd3da4f50d7352a2d711acdc7532891" dependencies = [ "array-bytes 6.2.2", - "async-channel", + "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", @@ -11885,7 +13151,7 @@ dependencies = [ "futures", "futures-timer", "ip_network", - "libp2p", + "libp2p 0.51.4", "linked_hash_set", "log", "mockall", @@ -11900,10 +13166,10 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -11919,17 +13185,17 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2f89b0134738cb3d982b6e625ca93ae8dbe83ce2a06e4b6a396e4df09ed3499" dependencies = [ - "async-channel", + "async-channel 1.9.0", "cid", "futures", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "prost 0.12.3", "prost-build", "sc-client-api", "sc-network", "sp-blockchain", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", "unsigned-varint", ] @@ -11943,13 +13209,13 @@ dependencies = [ "async-trait", "bitflags 1.3.2", "futures", - "libp2p-identity", + "libp2p-identity 0.1.3", "parity-scale-codec", "prost-build", "sc-consensus", "sp-consensus", "sp-consensus-grandpa", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -11961,13 +13227,13 @@ dependencies = [ "ahash 0.8.8", "futures", "futures-timer", - "libp2p", + "libp2p 0.51.4", "log", "sc-network", "sc-network-common", "sc-network-sync", "schnellru", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "tracing", ] @@ -11979,9 +13245,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84ef0b212c775f58e0304ec09166089f6b09afddf559b7c2b5702933b3be4" dependencies = [ "array-bytes 6.2.2", - "async-channel", + "async-channel 1.9.0", "futures", - "libp2p-identity", + "libp2p-identity 0.1.3", "log", "parity-scale-codec", "prost 0.12.3", @@ -11989,8 +13255,8 @@ dependencies = [ "sc-client-api", "sc-network", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -12001,12 +13267,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aa9377059deece4e7d419d9ec456f657268c0c603e1cf98df4a920f6da83461" dependencies = [ "array-bytes 6.2.2", - "async-channel", + "async-channel 1.9.0", "async-trait", "fork-tree", "futures", "futures-timer", - "libp2p", + "libp2p 0.51.4", "log", "mockall", "parity-scale-codec", @@ -12019,12 +13285,12 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -12039,7 +13305,7 @@ checksum = "16c9cad4baf348725bd82eadcd1747fc112ec49c76b863755ce79c588fa73fe4" dependencies = [ "array-bytes 6.2.2", "futures", - "libp2p", + "libp2p 0.51.4", "log", "parity-scale-codec", "sc-network", @@ -12047,7 +13313,7 @@ dependencies = [ "sc-network-sync", "sc-utils", "sp-consensus", - "sp-runtime", + "sp-runtime 32.0.0", "substrate-prometheus-endpoint", ] @@ -12064,7 +13330,7 @@ dependencies = [ "futures-timer", "hyper", "hyper-rustls", - "libp2p", + "libp2p 0.51.4", "log", "num_cpus", "once_cell", @@ -12077,11 +13343,11 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "sp-api", - "sp-core", - "sp-externalities", - "sp-keystore", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "threadpool", "tracing", ] @@ -12103,7 +13369,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5acf6d89f062d1334a0c5b67e9dea97666cd47a49acb2696eab55ff1a1bf74" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -12118,11 +13384,11 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core", - "sp-keystore", + "sp-core 29.0.0", + "sp-keystore 0.35.0", "sp-offchain", "sp-rpc", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-statement-store", "sp-version", @@ -12135,7 +13401,7 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9db6aaabfa7e0c27ec15d0f0a11b994cd4bcf86e362f0d9732b4a414d793f0f" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "sc-chain-spec", "sc-mixnet", @@ -12143,9 +13409,9 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core", + "sp-core 29.0.0", "sp-rpc", - "sp-runtime", + "sp-runtime 32.0.0", "sp-version", "thiserror", ] @@ -12157,7 +13423,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "691440bbaddd3bc2675309c965cc75f8bf694f51e0a28039bfc9658299fbc394" dependencies = [ "http", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "serde_json", "substrate-prometheus-endpoint", @@ -12176,7 +13442,7 @@ dependencies = [ "futures", "futures-util", "hex", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -12188,9 +13454,9 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-rpc", - "sp-runtime", + "sp-runtime 32.0.0", "sp-version", "thiserror", "tokio", @@ -12208,7 +13474,7 @@ dependencies = [ "exit-future", "futures", "futures-timer", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -12241,16 +13507,16 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-session", - "sp-state-machine", + "sp-state-machine 0.36.0", "sp-storage", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "static_init", "substrate-prometheus-endpoint", @@ -12270,7 +13536,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -12279,7 +13545,7 @@ version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bc382c7d997f4531eee5e5d57f970eaf2761d722298d7747385a4ad69fa6b12" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "sc-chain-spec", "sc-client-api", @@ -12289,7 +13555,7 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-runtime", + "sp-runtime 32.0.0", "thiserror", ] @@ -12309,9 +13575,9 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", + "sp-io 31.0.0", "sp-std", ] @@ -12323,7 +13589,7 @@ checksum = "0673a93aa0684b606abfc5fce6c882ada7bb5fad8a2ddc66a09a42bcc9664d91" dependencies = [ "chrono", "futures", - "libp2p", + "libp2p 0.51.4", "log", "parking_lot 0.12.1", "pin-project", @@ -12356,14 +13622,14 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-rpc", - "sp-runtime", + "sp-runtime 32.0.0", "sp-tracing", "thiserror", "tracing", - "tracing-log", - "tracing-subscriber", + "tracing-log 0.1.4", + "tracing-subscriber 0.2.25", ] [[package]] @@ -12397,9 +13663,9 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-runtime", + "sp-runtime 32.0.0", "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", @@ -12418,8 +13684,8 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "thiserror", ] @@ -12429,42 +13695,182 @@ version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b1a238f5baa56405db4e440e2d2f697583736fa2e2f1aac345c438a42975f1" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures", "futures-timer", "lazy_static", "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic", + "sp-arithmetic 24.0.0", ] [[package]] -name = "scale-info" -version = "2.10.0" +name = "scale-bits" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "662d10dcd57b1c2a3c41c9cf68f71fb09747ada1ea932ad961aca7e2ca28315f" dependencies = [ - "bitvec", - "cfg-if", - "derive_more", "parity-scale-codec", - "scale-info-derive", + "scale-info", + "scale-type-resolver 0.1.1", "serde", ] [[package]] -name = "scale-info-derive" -version = "2.10.0" +name = "scale-bits" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" +dependencies = [ + "parity-scale-codec", + "scale-type-resolver 0.2.0", +] + +[[package]] +name = "scale-decode" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc79ba56a1c742f5aeeed1f1801f3edf51f7e818f0a54582cac6f131364ea7b" +dependencies = [ + "derive_more", + "parity-scale-codec", + "primitive-types", + "scale-bits 0.5.0", + "scale-decode-derive", + "scale-type-resolver 0.1.1", + "smallvec", +] + +[[package]] +name = "scale-decode" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b12ebca36cec2a3f983c46295b282b35e5f8496346fb859a8776dad5389e5389" +dependencies = [ + "derive_more", + "parity-scale-codec", + "scale-bits 0.6.0", + "scale-type-resolver 0.2.0", + "smallvec", +] + +[[package]] +name = "scale-decode-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5398fdb3c7bea3cb419bac4983aadacae93fe1a7b5f693f4ebd98c3821aad7a5" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-encode" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628800925a33794fb5387781b883b5e14d130fece9af5a63613867b8de07c5c7" +dependencies = [ + "derive_more", + "parity-scale-codec", + "primitive-types", + "scale-bits 0.5.0", + "scale-encode-derive", + "scale-type-resolver 0.1.1", + "smallvec", +] + +[[package]] +name = "scale-encode-derive" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "7a304e1af7cdfbe7a24e08b012721456cc8cecdedadc14b3d10513eada63233c" dependencies = [ + "darling 0.14.4", "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "bitvec", + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", + "serde", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-type-resolver" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10b800069bfd43374e0f96f653e0d46882a2cb16d6d961ac43bea80f26c76843" +dependencies = [ + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-type-resolver" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb" + +[[package]] +name = "scale-typegen" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d470fa75e71b12b3244a4113adc4bc49891f3daba2054703cacd06256066397e" +dependencies = [ + "proc-macro2", + "quote", + "scale-info", + "syn 2.0.52", + "thiserror", +] + +[[package]] +name = "scale-value" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07ccfee963104335c971aaf8b7b0e749be8569116322df23f1f75c4ca9e4a28" +dependencies = [ + "base58", + "blake2 0.10.6", + "derive_more", + "either", + "frame-metadata 15.1.0", + "parity-scale-codec", + "scale-bits 0.5.0", + "scale-decode 0.11.1", + "scale-encode", + "scale-info", + "scale-type-resolver 0.1.1", + "serde", + "yap", +] + [[package]] name = "schannel" version = "0.1.22" @@ -12552,6 +13958,7 @@ dependencies = [ "der", "generic-array 0.14.7", "pkcs8", + "serdect", "subtle 2.5.0", "zeroize", ] @@ -12567,9 +13974,9 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.28.1" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ "secp256k1-sys", ] @@ -12589,6 +13996,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ + "serde", "zeroize", ] @@ -12690,6 +14098,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float 2.10.1", + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -12730,6 +14148,41 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.2.6", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[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" @@ -12859,6 +14312,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "slab" version = "0.4.9" @@ -12883,7 +14342,7 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -12902,6 +14361,114 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +[[package]] +name = "smol" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e635339259e51ef85ac7aa29a1cd991b957047507288697a690e80ab97d07cad" +dependencies = [ + "async-channel 2.3.0", + "async-executor", + "async-fs", + "async-io", + "async-lock 3.2.0", + "async-net", + "async-process", + "blocking", + "futures-lite", +] + +[[package]] +name = "smoldot" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d1eaa97d77be4d026a1e7ffad1bb3b78448763b357ea6f8188d3e6f736a9b9" +dependencies = [ + "arrayvec 0.7.4", + "async-lock 3.2.0", + "atomic-take", + "base64 0.21.6", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "chacha20", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener 4.0.0", + "fnv", + "futures-lite", + "futures-util", + "hashbrown 0.14.3", + "hex", + "hmac 0.12.1", + "itertools 0.12.1", + "libm", + "libsecp256k1", + "merlin 3.0.0", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "poly1305", + "rand", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.11.4", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "siphasher 1.0.1", + "slab", + "smallvec", + "soketto", + "twox-hash", + "wasmi", + "x25519-dalek 2.0.0", + "zeroize", +] + +[[package]] +name = "smoldot-light" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5496f2d116b7019a526b1039ec2247dd172b8670633b1a64a614c9ea12c9d8c7" +dependencies = [ + "async-channel 2.3.0", + "async-lock 3.2.0", + "base64 0.21.6", + "blake2-rfc", + "derive_more", + "either", + "event-listener 4.0.0", + "fnv", + "futures-channel", + "futures-lite", + "futures-util", + "hashbrown 0.14.3", + "hex", + "itertools 0.12.1", + "log", + "lru 0.12.3", + "no-std-net", + "parking_lot 0.12.1", + "pin-project", + "rand", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher 1.0.1", + "slab", + "smol", + "smoldot", + "zeroize", +] + [[package]] name = "snap" version = "1.1.1" @@ -12951,9 +14518,9 @@ dependencies = [ "serde", "snowbridge-ethereum", "snowbridge-milagro-bls", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "ssz_rs", "ssz_rs_derive", @@ -12975,10 +14542,10 @@ dependencies = [ "scale-info", "serde", "snowbridge-beacon-primitives", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13001,9 +14568,9 @@ dependencies = [ "scale-info", "serde", "serde-big-array", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13030,8 +14597,8 @@ checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -13045,7 +14612,7 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-merkle-tree", "sp-api", - "sp-core", + "sp-core 29.0.0", "sp-std", "staging-xcm", ] @@ -13072,9 +14639,9 @@ dependencies = [ "snowbridge-core", "snowbridge-ethereum", "snowbridge-pallet-ethereum-client-fixtures", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "ssz_rs", "ssz_rs_derive", @@ -13093,7 +14660,7 @@ dependencies = [ "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", - "sp-core", + "sp-core 29.0.0", "sp-std", ] @@ -13121,9 +14688,9 @@ dependencies = [ "snowbridge-ethereum", "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-router-primitives", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13142,7 +14709,7 @@ dependencies = [ "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", - "sp-core", + "sp-core 29.0.0", "sp-std", ] @@ -13163,10 +14730,10 @@ dependencies = [ "serde", "snowbridge-core", "snowbridge-outbound-queue-merkle-tree", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", ] @@ -13185,9 +14752,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "snowbridge-core", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13209,9 +14776,9 @@ dependencies = [ "scale-info", "serde", "snowbridge-core", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13229,7 +14796,7 @@ dependencies = [ "log", "parity-scale-codec", "snowbridge-core", - "sp-arithmetic", + "sp-arithmetic 24.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -13294,13 +14861,13 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 29.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-std", "sp-storage", @@ -13321,7 +14888,7 @@ dependencies = [ "parity-scale-codec", "snowbridge-core", "sp-api", - "sp-core", + "sp-core 29.0.0", "sp-std", "staging-xcm", ] @@ -13365,31 +14932,31 @@ dependencies = [ [[package]] name = "sp-api" -version = "27.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef42aa652381ade883c14ffbbb5c0fec36d382d2217b5bace01b8a0e8634778" +checksum = "2e4f8702afd77f14a32733e2b589c02694bf79d0b3a641963c508016208724d0" dependencies = [ "hash-db", "log", "parity-scale-codec", "scale-info", "sp-api-proc-macro", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "sp-metadata-ir", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "thiserror", ] [[package]] name = "sp-api-proc-macro" -version = "15.0.0" +version = "15.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0694be2891593450916d6b53a274d234bccbc86bcbada36ba23fc356989070c7" +checksum = "0301e2f77afb450fbf2b093f8b324c7ad88cc82e5e69bd5dc8658a1f068b2a96" dependencies = [ "Inflector", "blake2 0.10.6", @@ -13409,8 +14976,22 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-std", +] + +[[package]] +name = "sp-application-crypto" +version = "33.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13ca6121c22c8bd3d1dce1f05c479101fd0d7b159bef2a3e8c834138d839c75c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 31.0.0", + "sp-io 33.0.0", "sp-std", ] @@ -13429,6 +15010,21 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-arithmetic" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "910c07fa263b20bf7271fdd4adcb5d3217dfdac14270592e0780223542e7e114" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std", + "static_assertions", +] + [[package]] name = "sp-authority-discovery" version = "27.0.0" @@ -13438,8 +15034,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13451,7 +15047,7 @@ checksum = "1b36ce171caa7eb2bbe682c089f755fdefa71d3702e4fb1ba30d10146aef99d5" dependencies = [ "sp-api", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -13469,8 +15065,8 @@ dependencies = [ "sp-api", "sp-consensus", "sp-database", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "thiserror", ] @@ -13483,10 +15079,10 @@ dependencies = [ "async-trait", "futures", "log", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", "thiserror", ] @@ -13500,10 +15096,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-slots", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "sp-timestamp", ] @@ -13519,11 +15115,11 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-consensus-slots", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "sp-timestamp", ] @@ -13539,12 +15135,12 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-core", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", + "sp-io 31.0.0", "sp-mmr-primitives", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "strum 0.24.1", ] @@ -13561,10 +15157,10 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13594,7 +15190,7 @@ dependencies = [ "bounded-collections", "bs58 0.5.0", "dyn-clonable", - "ed25519-zebra", + "ed25519-zebra 3.1.0", "futures", "hash-db", "hash256-std-hasher", @@ -13615,12 +15211,12 @@ dependencies = [ "serde", "sp-crypto-hashing", "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", + "sp-externalities 0.26.0", + "sp-runtime-interface 25.0.0", "sp-std", "sp-storage", "ss58-registry", - "substrate-bip39", + "substrate-bip39 0.4.5", "thiserror", "tracing", "w3f-bls", @@ -13628,10 +15224,57 @@ dependencies = [ ] [[package]] -name = "sp-crypto-hashing" -version = "0.1.0" +name = "sp-core" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" +checksum = "26d7a0fd8f16dcc3761198fc83be12872f823b37b749bc72a3a6a1f702509366" +dependencies = [ + "array-bytes 6.2.2", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra 3.1.0", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.10.5", + "k256", + "libsecp256k1", + "log", + "merlin 3.0.0", + "parity-bip39", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand", + "scale-info", + "schnorrkel 0.11.4", + "secp256k1", + "secrecy", + "serde", + "sp-crypto-hashing", + "sp-debug-derive", + "sp-externalities 0.27.0", + "sp-runtime-interface 26.0.0", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39 0.5.0", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9927a7f81334ed5b8a98a4a978c81324d12bd9713ec76b5c68fd410174c5eb" dependencies = [ "blake2b_simd", "byteorder", @@ -13685,6 +15328,18 @@ dependencies = [ "sp-storage", ] +[[package]] +name = "sp-externalities" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d6a4572eadd4a63cff92509a210bf425501a0c5e76574b30a366ac77653787" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + [[package]] name = "sp-genesis-builder" version = "0.8.0" @@ -13693,7 +15348,7 @@ checksum = "fd865540ec19479c7349b584ccd78cc34c3f3a628a2a69dbb6365ceec36295ee" dependencies = [ "serde_json", "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -13707,7 +15362,7 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "thiserror", ] @@ -13725,15 +15380,42 @@ dependencies = [ "parity-scale-codec", "rustversion", "secp256k1", - "sp-core", + "sp-core 29.0.0", + "sp-crypto-hashing", + "sp-externalities 0.26.0", + "sp-keystore 0.35.0", + "sp-runtime-interface 25.0.0", + "sp-state-machine 0.36.0", + "sp-std", + "sp-tracing", + "sp-trie 30.0.0", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "33.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e09bba780b55bd9e67979cd8f654a31e4a6cf45426ff371394a65953d2177f2" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.9.1", + "rustversion", + "secp256k1", + "sp-core 31.0.0", "sp-crypto-hashing", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", + "sp-externalities 0.27.0", + "sp-keystore 0.37.0", + "sp-runtime-interface 26.0.0", + "sp-state-machine 0.38.0", "sp-std", "sp-tracing", - "sp-trie", + "sp-trie 32.0.0", "tracing", "tracing-core", ] @@ -13744,8 +15426,8 @@ version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cf0a2f881958466fc92bc9b39bbc2c0d815ded4a21f8f953372b0ac2e11b02" dependencies = [ - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "strum 0.24.1", ] @@ -13757,11 +15439,23 @@ checksum = "444f2d53968b1ce5e908882710ff1f3873fcf3e95f59d57432daf685bbacb959" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", "thiserror", ] +[[package]] +name = "sp-keystore" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbab8b61bd61d5f8625a0c75753b5d5a23be55d3445419acd42caf59cf6236b" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 31.0.0", + "sp-externalities 0.27.0", +] + [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" @@ -13778,7 +15472,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa0b5e87e56c1bb26d9524d48dd127121d630f895bd5914a34f0b017489f7c1d" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", "sp-std", @@ -13793,7 +15487,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto", + "sp-application-crypto 31.0.0", "sp-std", ] @@ -13809,9 +15503,9 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-core", + "sp-core 29.0.0", "sp-debug-derive", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "thiserror", ] @@ -13825,9 +15519,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-core", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13838,8 +15532,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d83b955dce0b6d143bec3f60571311168f362b1c16cf044da7037a407b66c19" dependencies = [ "sp-api", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -13861,7 +15555,7 @@ checksum = "9af4b73fe7ddd88b1641cca90048c4e525e721763199e6fd29c4f590884f4d16" dependencies = [ "rustc-hash", "serde", - "sp-core", + "sp-core 29.0.0", ] [[package]] @@ -13881,12 +15575,37 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", +] + +[[package]] +name = "sp-runtime" +version = "34.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3cb126971e7db2f0fcf8053dce740684c438c7180cfca1959598230f342c58" +dependencies = [ + "docify", + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand", + "scale-info", + "serde", + "simple-mermaid", + "sp-application-crypto 33.0.0", + "sp-arithmetic 25.0.0", + "sp-core 31.0.0", + "sp-io 33.0.0", + "sp-std", + "sp-weights 30.0.0", ] [[package]] @@ -13899,8 +15618,28 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", + "sp-externalities 0.26.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a675ea4858333d4d755899ed5ed780174aa34fec15953428d516af5452295" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.8.0", + "primitive-types", + "sp-externalities 0.27.0", + "sp-runtime-interface-proc-macro 18.0.0", "sp-std", "sp-storage", "sp-tracing", @@ -13922,6 +15661,20 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +dependencies = [ + "Inflector", + "expander 2.0.0", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "sp-session" version = "28.0.0" @@ -13931,9 +15684,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 29.0.0", + "sp-keystore 0.35.0", + "sp-runtime 32.0.0", "sp-staking", "sp-std", ] @@ -13948,8 +15701,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", "sp-std", ] @@ -13965,11 +15718,33 @@ dependencies = [ "parking_lot 0.12.1", "rand", "smallvec", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-panic-handler", + "sp-std", + "sp-trie 30.0.0", + "thiserror", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-state-machine" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1eae0eac8034ba14437e772366336f579398a46d101de13dbb781ab1e35e67c5" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand", + "smallvec", + "sp-core 31.0.0", + "sp-externalities 0.27.0", "sp-panic-handler", "sp-std", - "sp-trie", + "sp-trie 32.0.0", "thiserror", "tracing", "trie-db", @@ -13990,12 +15765,12 @@ dependencies = [ "scale-info", "sha2 0.10.8", "sp-api", - "sp-application-crypto", - "sp-core", + "sp-application-crypto 31.0.0", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-externalities", - "sp-runtime", - "sp-runtime-interface", + "sp-externalities 0.26.0", + "sp-runtime 32.0.0", + "sp-runtime-interface 25.0.0", "sp-std", "thiserror", "x25519-dalek 2.0.0", @@ -14030,7 +15805,7 @@ dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "thiserror", ] @@ -14045,7 +15820,7 @@ dependencies = [ "sp-std", "tracing", "tracing-core", - "tracing-subscriber", + "tracing-subscriber 0.2.25", ] [[package]] @@ -14055,7 +15830,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9742861c5330bdcb42856a6eed3d3745b58ee1c92ca4c9260032ff4e6c387165" dependencies = [ "sp-api", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -14067,11 +15842,11 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 29.0.0", "sp-inherents", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", - "sp-trie", + "sp-trie 30.0.0", ] [[package]] @@ -14090,8 +15865,33 @@ dependencies = [ "rand", "scale-info", "schnellru", - "sp-core", - "sp-externalities", + "sp-core 29.0.0", + "sp-externalities 0.26.0", + "sp-std", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1aa91ad26c62b93d73e65f9ce7ebd04459c4bad086599348846a81988d6faa4" +dependencies = [ + "ahash 0.8.8", + "hash-db", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand", + "scale-info", + "schnellru", + "sp-core 31.0.0", + "sp-externalities 0.27.0", "sp-std", "thiserror", "tracing", @@ -14111,7 +15911,7 @@ dependencies = [ "scale-info", "serde", "sp-crypto-hashing-proc-macro", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", "sp-version-proc-macro", "thiserror", @@ -14154,7 +15954,23 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic", + "sp-arithmetic 24.0.0", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-weights" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9af6c661fe3066b29f9e1d258000f402ff5cc2529a9191972d214e5871d0ba87" +dependencies = [ + "bounded-collections", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 25.0.0", "sp-debug-derive", "sp-std", ] @@ -14244,6 +16060,7 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-executive", + "frame-metadata-hash-extension", "frame-remote-externalities", "frame-support", "frame-system", @@ -14268,7 +16085,6 @@ dependencies = [ "pallet-election-provider-support-benchmarking", "pallet-fast-unstake", "pallet-grandpa", - "pallet-identity", "pallet-indices", "pallet-message-queue", "pallet-mmr", @@ -14307,28 +16123,28 @@ dependencies = [ "separator", "serde_json", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 31.0.0", + "sp-arithmetic 24.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core", + "sp-core 29.0.0", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 31.0.0", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime", + "sp-runtime 32.0.0", "sp-session", "sp-staking", "sp-std", "sp-storage", "sp-tracing", "sp-transaction-pool", - "sp-trie", + "sp-trie 30.0.0", "sp-version", "staging-xcm", "staging-xcm-builder", @@ -14348,7 +16164,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime", + "sp-runtime 32.0.0", "sp-std", ] @@ -14367,15 +16183,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights", + "sp-weights 28.0.0", "xcm-procedural", ] [[package]] name = "staging-xcm-builder" -version = "8.0.1" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f6cfc27c1d45f9a67e20ed3f7e60296299688825350291606add10bf3bbff2" +checksum = "988d765ad5ab3b5cc90bb1dd143153ebdbe2b7600e10d5ef3a7f3e8df1bdac5d" dependencies = [ "frame-support", "frame-system", @@ -14385,11 +16201,11 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -14407,12 +16223,12 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", - "sp-weights", + "sp-weights 28.0.0", "staging-xcm", ] @@ -14463,6 +16279,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strsim" version = "0.11.0" @@ -14517,12 +16339,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", - "pbkdf2", + "pbkdf2 0.8.0", "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "substrate-bip39" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b564c293e6194e8b222e52436bcb99f60de72043c7f845cf6c4406db4df121" +dependencies = [ + "hmac 0.12.1", + "pbkdf2 0.12.2", + "schnorrkel 0.11.4", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "substrate-fixed" version = "0.5.9" @@ -14543,7 +16378,7 @@ checksum = "332f903d2f34703204f0003136c9abbc569d691028279996a1daf8f248a7369f" dependencies = [ "frame-system-rpc-runtime-api", "futures", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "parity-scale-codec", "sc-rpc-api", @@ -14551,8 +16386,8 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 29.0.0", + "sp-runtime 32.0.0", ] [[package]] @@ -14586,11 +16421,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40e5235d8460ec81e9a382345aa80d75e2943f224a332559847344bb62fa13b3" dependencies = [ "async-trait", - "jsonrpsee", + "jsonrpsee 0.20.3", "log", "sc-rpc-api", "serde", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -14599,15 +16434,15 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5768a5d3c76eebfdf94c23a3fde6c832243a043d60561e5ac1a2b475b9ad09f3" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.20.3", "parity-scale-codec", "sc-client-api", "sc-rpc-api", "serde", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-core 29.0.0", + "sp-runtime 32.0.0", + "sp-state-machine 0.36.0", + "sp-trie 30.0.0", "trie-db", ] @@ -14623,16 +16458,25 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "18.0.0" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511bbc2df035f5fe2556d855369a1bbb45df620360391a1f6e3fa1a1d64af79a" +checksum = "4a39a20e17c24ede36b5bd5e7543a4cef8d8a0daf6e1a046dc31832b837a54a0" dependencies = [ + "array-bytes 6.2.2", "build-helper", "cargo_metadata", "console", "filetime", + "frame-metadata 16.0.0", + "merkleized-metadata", + "parity-scale-codec", "parity-wasm", + "sc-executor", + "sp-core 29.0.0", + "sp-io 31.0.0", "sp-maybe-compressed-blob", + "sp-tracing", + "sp-version", "strum 0.24.1", "tempfile", "toml 0.8.10", @@ -14647,10 +16491,138 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] -name = "subtle" -version = "2.5.0" +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subxt" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd68bef23f4de5e513ab4c29af69053e232b098f9c87ab552d7ea153b4a1fbc5" +dependencies = [ + "async-trait", + "base58", + "blake2 0.10.6", + "derivative", + "either", + "frame-metadata 16.0.0", + "futures", + "hex", + "impl-serde", + "instant", + "jsonrpsee 0.22.5", + "parity-scale-codec", + "primitive-types", + "scale-bits 0.5.0", + "scale-decode 0.11.1", + "scale-encode", + "scale-info", + "scale-value", + "serde", + "serde_json", + "sp-core 31.0.0", + "sp-crypto-hashing", + "sp-runtime 34.0.0", + "subxt-lightclient", + "subxt-macro", + "subxt-metadata", + "thiserror", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "subxt-codegen" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d9e2b256b71d31a2629e44eb9cbfd944eb7d577c9e0c8e9802cc3c3943af2d9" +dependencies = [ + "frame-metadata 16.0.0", + "heck", + "hex", + "jsonrpsee 0.22.5", + "parity-scale-codec", + "proc-macro2", + "quote", + "scale-info", + "scale-typegen", + "subxt-metadata", + "syn 2.0.52", + "thiserror", + "tokio", +] + +[[package]] +name = "subxt-lightclient" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d51f1ac12e3be7aafea4d037730a57da4f22f2e9c73955666081ffa2697c6f1" +dependencies = [ + "futures", + "futures-util", + "serde", + "serde_json", + "smoldot-light", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "subxt-macro" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98dc84d7e6a0abd7ed407cce0bf60d7d58004f699460cffb979640717d1ab506" +dependencies = [ + "darling 0.20.8", + "parity-scale-codec", + "proc-macro-error", + "quote", + "scale-typegen", + "subxt-codegen", + "syn 2.0.52", +] + +[[package]] +name = "subxt-metadata" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc10c54028d079a9f1be65188707cd29e5ffd8d0031a2b1346a0941d57b7ab7e" +dependencies = [ + "derive_more", + "frame-metadata 16.0.0", + "hashbrown 0.14.3", + "parity-scale-codec", + "scale-info", + "sp-crypto-hashing", +] + +[[package]] +name = "subxt-signer" +version = "0.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "6ccb59a38fe357fab55247756174435e8626b93929864e8a498635a15e779df8" +dependencies = [ + "bip39", + "cfg-if", + "derive_more", + "hex", + "hmac 0.12.1", + "parity-scale-codec", + "pbkdf2 0.12.2", + "regex", + "schnorrkel 0.11.4", + "secp256k1", + "secrecy", + "sha2 0.10.8", + "sp-crypto-hashing", + "subxt", + "zeroize", +] [[package]] name = "syn" @@ -14686,6 +16658,12 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "synstructure" version = "0.12.6" @@ -14730,7 +16708,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-constants", "smallvec", - "sp-runtime", + "sp-runtime 32.0.0", ] [[package]] @@ -14739,6 +16717,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "target-lexicon" version = "0.12.12" @@ -14785,18 +16774,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" dependencies = [ "proc-macro2", "quote", @@ -14837,7 +16826,7 @@ dependencies = [ "byteorder", "integer-encoding", "log", - "ordered-float", + "ordered-float 1.1.1", "threadpool", ] @@ -14934,6 +16923,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite 0.2.13", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.2.0" @@ -14945,6 +16944,16 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-retry" version = "0.3.0" @@ -14966,6 +16975,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -14978,6 +16998,18 @@ 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", + "tokio", + "tungstenite", +] + [[package]] name = "tokio-util" version = "0.7.10" @@ -14989,6 +17021,7 @@ dependencies = [ "futures-io", "futures-sink", "pin-project-lite 0.2.13", + "slab", "tokio", "tracing", ] @@ -15002,6 +17035,18 @@ 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.10" @@ -15029,7 +17074,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", + "serde", + "serde_spanned", "toml_datetime", "winnow 0.5.33", ] @@ -15040,7 +17087,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "toml_datetime", "winnow 0.5.33", ] @@ -15051,7 +17098,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "toml_datetime", "winnow 0.5.33", ] @@ -15062,7 +17109,7 @@ version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -15079,6 +17126,8 @@ dependencies = [ "futures-util", "pin-project", "pin-project-lite 0.2.13", + "tokio", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -15090,6 +17139,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ + "base64 0.21.6", "bitflags 2.4.1", "bytes", "futures-core", @@ -15097,9 +17147,11 @@ dependencies = [ "http", "http-body", "http-range-header", + "mime", "pin-project-lite 0.2.13", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -15193,6 +17245,17 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-serde" version = "0.1.3" @@ -15222,10 +17285,24 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.1.4", "tracing-serde", ] +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log 0.2.0", +] + [[package]] name = "trie-db" version = "0.28.0" @@ -15306,6 +17383,25 @@ 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", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "twox-hash" version = "1.6.3" @@ -15391,6 +17487,12 @@ dependencies = [ "subtle 2.5.0", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "unsigned-varint" version = "0.7.2" @@ -15424,14 +17526,30 @@ dependencies = [ "form_urlencoded", "idna 0.5.0", "percent-encoding", + "serde", ] +[[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.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "getrandom 0.2.12", +] + [[package]] name = "valuable" version = "0.1.0" @@ -15659,6 +17777,37 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmi" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" +dependencies = [ + "smallvec", + "spin 0.9.8", + "wasmi_arena", + "wasmi_core", + "wasmparser-nostd", +] + +[[package]] +name = "wasmi_arena" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" + +[[package]] +name = "wasmi_core" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", + "paste", +] + [[package]] name = "wasmparser" version = "0.102.0" @@ -15669,6 +17818,15 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -16247,6 +18405,17 @@ dependencies = [ "time", ] +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys 0.4.12", + "rustix 0.38.31", +] + [[package]] name = "xcm-emulator" version = "0.6.0" @@ -16271,11 +18440,11 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 24.0.0", + "sp-core 29.0.0", "sp-crypto-hashing", - "sp-io", - "sp-runtime", + "sp-io 31.0.0", + "sp-runtime 32.0.0", "sp-std", "sp-tracing", "staging-xcm", @@ -16308,6 +18477,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "yap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf" + [[package]] name = "yasna" version = "0.5.2" @@ -16357,6 +18532,141 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "zombienet-configuration" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9ced8f504669bc6c11f95becaaadf84b5eeffb99cf7ef127e64cbf6de50be8e" +dependencies = [ + "anyhow", + "lazy_static", + "multiaddr 0.18.1", + "regex", + "serde", + "serde_json", + "thiserror", + "toml 0.7.8", + "url", + "zombienet-support", +] + +[[package]] +name = "zombienet-orchestrator" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82828a7caf26921fb958f827e7891aec7800922b6080af53bfdc53c46a9291b0" +dependencies = [ + "anyhow", + "futures", + "hex", + "libp2p 0.52.4", + "multiaddr 0.18.1", + "rand", + "reqwest", + "serde_json", + "sha2 0.10.8", + "sp-core 31.0.0", + "subxt", + "subxt-signer", + "thiserror", + "tokio", + "tracing", + "uuid", + "zombienet-configuration", + "zombienet-prom-metrics-parser", + "zombienet-provider", + "zombienet-support", +] + +[[package]] +name = "zombienet-prom-metrics-parser" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aae7bc37efa70ce88df44fe1b8d5671381db13d5458e404b24bccf74e0a38c6" +dependencies = [ + "pest", + "pest_derive", + "thiserror", +] + +[[package]] +name = "zombienet-provider" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e3314ed27e86dc06522197b06985c7cc6f9af8af241a5ad7d24588feb9849a1" +dependencies = [ + "anyhow", + "async-trait", + "flate2", + "futures", + "hex", + "k8s-openapi", + "kube", + "nix 0.27.1", + "regex", + "reqwest", + "serde", + "serde_json", + "serde_yaml", + "sha2 0.10.8", + "tar", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "url", + "uuid", + "zombienet-configuration", + "zombienet-support", +] + +[[package]] +name = "zombienet-sdk" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06e293dc8886bd759ad37db12925d2e46d45dd5c97b659668b15512b947f666d" +dependencies = [ + "async-trait", + "futures", + "lazy_static", + "subxt", + "tokio", + "zombienet-configuration", + "zombienet-orchestrator", + "zombienet-provider", + "zombienet-support", +] + +[[package]] +name = "zombienet-sdk-tests" +version = "0.1.0" +dependencies = [ + "anyhow", + "log", + "subxt", + "tokio", + "tracing-subscriber 0.3.18", + "zombienet-sdk", +] + +[[package]] +name = "zombienet-support" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85abe4a8c3581269f4a0fe010d5924e96e231cad047f358ed8fcad262753f637" +dependencies = [ + "anyhow", + "async-trait", + "futures", + "nix 0.27.1", + "rand", + "regex", + "reqwest", + "thiserror", + "tokio", + "uuid", +] + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" diff --git a/Cargo.toml b/Cargo.toml index 37d5374525..54a5ae2360 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,6 +62,7 @@ enumflags2 = { version = "0.7.7" } frame-benchmarking = { version = "29.0.0", default-features = false } frame-election-provider-support = { version = "29.0.0", default-features = false } frame-executive = { version = "29.0.0", default-features = false } +frame-metadata-hash-extension = { version = "0.1.0", default-features = false } frame-support = { version = "29.0.2", default-features = false } frame-system = { version = "29.0.0", default-features = false } frame-system-benchmarking = { version = "29.0.0", default-features = false } @@ -76,7 +77,7 @@ kusama-polkadot-system-emulated-network = { path = "integration-tests/emulated/n kusama-runtime = { path = "relay/kusama", package = "staging-kusama-runtime" } kusama-runtime-constants = { path = "relay/kusama/constants", default-features = false } kusama-system-emulated-network = { path = "integration-tests/emulated/networks/kusama-system" } -log = { version = "0.4.20", default-features = false } +log = { version = "0.4.21", default-features = false } pallet-alliance = { version = "28.0.0", default-features = false } pallet-asset-conversion = { version = "11.0.0", default-features = false } pallet-asset-conversion-tx-payment = { version = "11.0.0", default-features = false } @@ -96,7 +97,7 @@ pallet-bridge-grandpa = { version = "0.8.0", default-features = false } pallet-bridge-messages = { version = "0.8.0", default-features = false } pallet-bridge-parachains = { version = "0.8.0", default-features = false } pallet-bridge-relayers = { version = "0.8.0", default-features = false } -pallet-broker = { version = "0.7.1", default-features = false } +pallet-broker = { version = "0.7.2", default-features = false } pallet-child-bounties = { version = "28.0.0", default-features = false } pallet-collator-selection = { version = "10.0.2", default-features = false } pallet-collective = { version = "29.0.0", default-features = false } @@ -111,13 +112,13 @@ pallet-encointer-ceremonies = { version = "~6.1.0", default-features = false } pallet-encointer-ceremonies-rpc-runtime-api = { version = "~6.1.0", default-features = false } pallet-encointer-communities = { version = "~6.1.0", default-features = false } pallet-encointer-communities-rpc-runtime-api = { version = "~6.1.0", default-features = false } -pallet-encointer-faucet = { version = "~6.1.0", default-features = false } +pallet-encointer-faucet = { version = "~6.2.0", default-features = false } pallet-encointer-reputation-commitments = { version = "~6.1.0", default-features = false } pallet-encointer-scheduler = { version = "~6.1.0", default-features = false } pallet-fast-unstake = { version = "28.0.0", default-features = false } pallet-glutton = { version = "15.0.0", default-features = false } pallet-grandpa = { version = "29.0.0", default-features = false } -pallet-identity = { version = "29.0.0", default-features = false } +pallet-identity = { version = "29.0.1", default-features = false } pallet-indices = { version = "29.0.0", default-features = false } pallet-insecure-randomness-collective-flip = { version = "17.0.0", default-features = false } pallet-membership = { version = "29.0.0", default-features = false } @@ -128,7 +129,7 @@ pallet-nft-fractionalization = { version = "11.0.0", default-features = false } pallet-nfts = { version = "23.0.0", default-features = false } pallet-nfts-runtime-api = { version = "15.0.0", default-features = false } pallet-nis = { version = "29.0.0", default-features = false } -pallet-nomination-pools = { version = "26.0.0", default-features = false } +pallet-nomination-pools = { version = "26.0.1", default-features = false } pallet-nomination-pools-benchmarking = { version = "27.0.0", default-features = false } pallet-nomination-pools-runtime-api = { version = "24.0.0", default-features = false } pallet-offences = { version = "28.0.0", default-features = false } @@ -143,16 +144,16 @@ pallet-scheduler = { version = "30.0.0", default-features = false } pallet-session = { version = "29.0.0", default-features = false } pallet-session-benchmarking = { version = "29.0.0", default-features = false } pallet-society = { version = "29.0.0", default-features = false } -pallet-staking = { version = "29.0.2", default-features = false } +pallet-staking = { version = "29.0.3", default-features = false } pallet-staking-reward-curve = { version = "11.0.0" } pallet-staking-reward-fn = { version = "20.0.0", default-features = false } -pallet-staking-runtime-api = { version = "15.0.0", default-features = false } +pallet-staking-runtime-api = { version = "15.0.1", default-features = false } pallet-state-trie-migration = { version = "30.0.0", default-features = false } pallet-sudo = { version = "29.0.0", default-features = false } pallet-timestamp = { version = "28.0.0", default-features = false } -pallet-transaction-payment = { version = "29.0.0", default-features = false } +pallet-transaction-payment = { version = "29.0.1", default-features = false } pallet-transaction-payment-rpc-runtime-api = { version = "29.0.0", default-features = false } -pallet-treasury = { version = "28.0.0", default-features = false } +pallet-treasury = { version = "28.0.1", default-features = false } pallet-uniques = { version = "29.0.0", default-features = false } pallet-utility = { version = "29.0.0", default-features = false } pallet-vesting = { version = "29.0.0", default-features = false } @@ -169,12 +170,14 @@ penpal-emulated-chain = { path = "integration-tests/emulated/chains/parachains/t penpal-runtime = { version = "0.15.1" } people-kusama-emulated-chain = { path = "integration-tests/emulated/chains/parachains/people/people-kusama" } people-kusama-runtime = { path = "system-parachains/people/people-kusama" } +people-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/people/people-polkadot" } +people-polkadot-runtime = { path = "system-parachains/people/people-polkadot" } polkadot-core-primitives = { version = "8.0.0", default-features = false } polkadot-emulated-chain = { path = "integration-tests/emulated/chains/relays/polkadot" } polkadot-parachain-primitives = { version = "7.0.0", default-features = false } polkadot-primitives = { version = "8.0.1", default-features = false } polkadot-runtime = { path = "relay/polkadot" } -polkadot-runtime-common = { version = "8.0.1", default-features = false } +polkadot-runtime-common = { version = "8.0.2", default-features = false } polkadot-runtime-constants = { path = "relay/polkadot/constants", default-features = false } polkadot-system-emulated-network = { path = "integration-tests/emulated/networks/polkadot-system" } primitive-types = { version = "0.12.2", default-features = false } @@ -198,7 +201,7 @@ snowbridge-router-primitives = { version = "0.1.0", default-features = false } snowbridge-runtime-common = { version = "0.1.0", default-features = false } snowbridge-runtime-test-common = { version = "0.1.0" } snowbridge-system-runtime-api = { version = "0.1.0", default-features = false } -sp-api = { version = "27.0.0", default-features = false } +sp-api = { version = "27.0.1", default-features = false } sp-application-crypto = { version = "31.0.0", default-features = false } sp-arithmetic = { version = "24.0.0", default-features = false } sp-block-builder = { version = "27.0.0", default-features = false } @@ -222,13 +225,17 @@ sp-trie = { version = "30.0.0" } sp-version = { version = "30.0.0", default-features = false } sp-weights = { version = "28.0.0", default-features = false } static_assertions = { version = "1.1.0" } -substrate-wasm-builder = { version = "18.0.0" } +substrate-wasm-builder = { version = "18.0.1" } system-parachains-constants = { path = "system-parachains/constants", default-features = false } tokio = { version = "1.36.0" } xcm = { version = "8.0.1", default-features = false, package = "staging-xcm" } -xcm-builder = { version = "8.0.1", default-features = false, package = "staging-xcm-builder" } +xcm-builder = { version = "8.0.2", default-features = false, package = "staging-xcm-builder" } xcm-emulator = { version = "0.6.0" } xcm-executor = { version = "8.0.1", default-features = false, package = "staging-xcm-executor" } +anyhow = { version = "1.0.82" } +subxt = { version = "0.35.0", default-features = false } +tracing-subscriber = { version = "0.3.18" } +zombienet-sdk = { version = "0.2" } [workspace] resolver = "2" @@ -241,6 +248,7 @@ members = [ "integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot", "integration-tests/emulated/chains/parachains/collectives/collectives-polkadot", "integration-tests/emulated/chains/parachains/people/people-kusama", + "integration-tests/emulated/chains/parachains/people/people-polkadot", "integration-tests/emulated/chains/parachains/testing/penpal", "integration-tests/emulated/chains/relays/kusama", "integration-tests/emulated/chains/relays/polkadot", @@ -254,6 +262,7 @@ members = [ "integration-tests/emulated/tests/bridges/bridge-hub-polkadot", "integration-tests/emulated/tests/collectives/collectives-polkadot", "integration-tests/emulated/tests/people/people-kusama", + "integration-tests/emulated/tests/people/people-polkadot", "relay/kusama", "relay/kusama/constants", "relay/polkadot", @@ -273,6 +282,8 @@ members = [ "system-parachains/encointer", "system-parachains/gluttons/glutton-kusama", "system-parachains/people/people-kusama", + "system-parachains/people/people-polkadot", + "integration-tests/zombienet", ] [profile.release] diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 030dccbeb9..4d44340016 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -39,6 +39,7 @@ encointer-kusama-runtime = { workspace = true } glutton-kusama-runtime = { workspace = true } coretime-kusama-runtime = { workspace = true } people-kusama-runtime = { workspace = true } +people-polkadot-runtime = { workspace = true } [features] fast-runtime = ["kusama-runtime/fast-runtime", "polkadot-runtime/fast-runtime"] @@ -56,6 +57,7 @@ runtime-benchmarks = [ "pallet-staking/runtime-benchmarks", "parachains-common/runtime-benchmarks", "people-kusama-runtime/runtime-benchmarks", + "people-polkadot-runtime/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "polkadot-runtime/runtime-benchmarks", "runtime-parachains/runtime-benchmarks", diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index c76e20c865..24162a4600 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -20,7 +20,7 @@ use crate::{ system_parachains_specs::{ AssetHubKusamaChainSpec, AssetHubPolkadotChainSpec, BridgeHubKusamaChainSpec, BridgeHubPolkadotChainSpec, CollectivesPolkadotChainSpec, EncointerKusamaChainSpec, - GluttonKusamaChainSpec, + GluttonKusamaChainSpec, PeopleKusamaChainSpec, PeoplePolkadotChainSpec, }, ChainSpec, }; @@ -90,6 +90,10 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result Ok(Box::new(EncointerKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("people-kusama") => + Ok(Box::new(PeopleKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("people-polkadot") => + Ok(Box::new(PeoplePolkadotChainSpec::from_json_file(path)?)), _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), } } diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index 4a72781717..913d976d56 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -84,6 +84,10 @@ fn main() -> Result<(), String> { "people-kusama-local", Box::new(system_parachains_specs::people_kusama_local_testnet_config) as Box<_>, ), + ( + "people-polkadot-local", + Box::new(system_parachains_specs::people_polkadot_local_testnet_config) as Box<_>, + ), ]); if let Some(function) = supported_chains.get(&*cli.chain) { diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 3c2f0c40d2..a3850184f3 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -50,6 +50,8 @@ pub type CoretimeKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extension pub type PeopleKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type PeoplePolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; + const ASSET_HUB_POLKADOT_ED: Balance = asset_hub_polkadot_runtime::ExistentialDeposit::get(); const ASSET_HUB_KUSAMA_ED: Balance = asset_hub_kusama_runtime::ExistentialDeposit::get(); @@ -66,6 +68,8 @@ const CORETIME_KUSAMA_ED: Balance = coretime_kusama_runtime::ExistentialDeposit: const PEOPLE_KUSAMA_ED: Balance = people_kusama_runtime::ExistentialDeposit::get(); +const PEOPLE_POLKADOT_ED: Balance = people_polkadot_runtime::ExistentialDeposit::get(); + /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; @@ -144,6 +148,13 @@ pub fn people_kusama_session_keys(keys: AuraId) -> people_kusama_runtime::Sessio people_kusama_runtime::SessionKeys { aura: keys } } +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn people_polkadot_session_keys(keys: AuraId) -> people_polkadot_runtime::SessionKeys { + people_polkadot_runtime::SessionKeys { aura: keys } +} + // AssetHubPolkadot fn asset_hub_polkadot_genesis( invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>, @@ -562,10 +573,28 @@ fn encointer_kusama_genesis(endowed_accounts: Vec, id: u32) -> serde_ parachain_id: id.into(), ..Default::default() }, + "collatorSelection": encointer_kusama_runtime::CollatorSelectionConfig { + invulnerables: invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ENCOINTER_KUSAMA_ED * 16, + ..Default::default() + }, + "session": asset_hub_kusama_runtime::SessionConfig { + keys: invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_kusama_session_keys(aura), // session keys + ) + }) + .collect(), + }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), }, - "aura": encointer_kusama_runtime::aura_config_for_chain_spec(&["Alice"]), + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` }) } @@ -740,3 +769,77 @@ pub fn people_kusama_local_testnet_config() -> Result, String .build(), )) } + +// PeoplePolkadot +fn people_polkadot_genesis( + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> serde_json::Value { + serde_json::json!({ + "balances": people_polkadot_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, PEOPLE_POLKADOT_ED * 4096 * 4096)) + .collect(), + }, + "parachainInfo": people_polkadot_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + "collatorSelection": people_polkadot_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: PEOPLE_POLKADOT_ED * 16, + ..Default::default() + }, + "session": people_polkadot_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + people_polkadot_session_keys(aura), // session keys + ) + }) + .collect(), + }, + "polkadotXcm": { + "safeXcmVersion": Some(SAFE_XCM_VERSION), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. `aura: Default::default()` + }) +} + +fn people_polkadot_local_genesis(para_id: ParaId) -> serde_json::Value { + crate::system_parachains_specs::people_polkadot_genesis( + // initial collators. + invulnerables(), + testnet_accounts(), + para_id, + ) +} + +pub fn people_polkadot_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 0.into()); + properties.insert("tokenSymbol".into(), "DOT".into()); + properties.insert("tokenDecimals".into(), 10.into()); + + Ok(Box::new( + PeoplePolkadotChainSpec::builder( + people_polkadot_runtime::WASM_BINARY.expect("PeoplePolkadot wasm not available!"), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1004 }, + ) + .with_name("Polkadot People Local") + .with_id("people-polkadot-local") + .with_chain_type(ChainType::Local) + .with_genesis_config_patch(crate::system_parachains_specs::people_polkadot_local_genesis( + 1004.into(), + )) + .with_properties(properties) + .build(), + )) +} diff --git a/integration-tests/emulated/chains/parachains/people/people-kusama/src/lib.rs b/integration-tests/emulated/chains/parachains/people/people-kusama/src/lib.rs index 09e5168ee7..c070d43ce0 100644 --- a/integration-tests/emulated/chains/parachains/people/people-kusama/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/people/people-kusama/src/lib.rs @@ -42,7 +42,6 @@ decl_test_parachains! { PolkadotXcm: people_kusama_runtime::PolkadotXcm, Balances: people_kusama_runtime::Balances, Identity: people_kusama_runtime::Identity, - IdentityMigrator: people_kusama_runtime::IdentityMigrator, } }, } diff --git a/integration-tests/emulated/chains/parachains/people/people-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/people/people-polkadot/Cargo.toml new file mode 100644 index 0000000000..8649747813 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/people/people-polkadot/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "people-polkadot-emulated-chain" +authors.workspace = true +edition.workspace = true +version.workspace = true +license = "Apache-2.0" +description = "People Polkadot emulated chain used for integration tests" +publish = false + +[dependencies] + +# Substrate +sp-core = { workspace = true, default-features = true } +frame-support = { workspace = true, default-features = true } + +# Cumulus +parachains-common = { workspace = true, default-features = true } +cumulus-primitives-core = { workspace = true, default-features = true } +emulated-integration-tests-common = { workspace = true } + +# Local +people-polkadot-runtime = { workspace = true } +polkadot-emulated-chain = { workspace = true } diff --git a/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs new file mode 100644 index 0000000000..557cca546c --- /dev/null +++ b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs @@ -0,0 +1,62 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Substrate +use sp_core::storage::Storage; + +// Cumulus +use cumulus_primitives_core::ParaId; +use emulated_integration_tests_common::{build_genesis_storage, collators, SAFE_XCM_VERSION}; +use parachains_common::Balance; + +pub const PARA_ID: u32 = 1004; +pub const ED: Balance = people_polkadot_runtime::ExistentialDeposit::get(); + +pub fn genesis() -> Storage { + let genesis_config = people_polkadot_runtime::RuntimeGenesisConfig { + system: people_polkadot_runtime::SystemConfig::default(), + parachain_info: people_polkadot_runtime::ParachainInfoConfig { + parachain_id: ParaId::from(PARA_ID), + ..Default::default() + }, + collator_selection: people_polkadot_runtime::CollatorSelectionConfig { + invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ED * 16, + ..Default::default() + }, + session: people_polkadot_runtime::SessionConfig { + keys: collators::invulnerables() + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + people_polkadot_runtime::SessionKeys { aura }, // session keys + ) + }) + .collect(), + }, + polkadot_xcm: people_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + ..Default::default() + }; + + build_genesis_storage( + &genesis_config, + people_polkadot_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), + ) +} diff --git a/integration-tests/emulated/chains/parachains/people/people-polkadot/src/lib.rs b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/lib.rs new file mode 100644 index 0000000000..fe1bab1b10 --- /dev/null +++ b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/lib.rs @@ -0,0 +1,52 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; + +// Substrate +use frame_support::traits::OnInitialize; + +// Cumulus +use emulated_integration_tests_common::{ + impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, + impls::Parachain, xcm_emulator::decl_test_parachains, +}; + +// PeoplePolkadot Parachain declaration +decl_test_parachains! { + pub struct PeoplePolkadot { + genesis = genesis::genesis(), + on_init = { + people_polkadot_runtime::AuraExt::on_initialize(1); + }, + runtime = people_polkadot_runtime, + core = { + XcmpMessageHandler: people_polkadot_runtime::XcmpQueue, + LocationToAccountId: people_polkadot_runtime::xcm_config::LocationToAccountId, + ParachainInfo: people_polkadot_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: people_polkadot_runtime::PolkadotXcm, + Balances: people_polkadot_runtime::Balances, + Identity: people_polkadot_runtime::Identity, + IdentityMigrator: people_polkadot_runtime::IdentityMigrator, + } + }, +} + +// PeoplePolkadot implementation +impl_accounts_helpers_for_parachain!(PeoplePolkadot); +impl_assert_events_helpers_for_parachain!(PeoplePolkadot); diff --git a/integration-tests/emulated/chains/relays/kusama/src/lib.rs b/integration-tests/emulated/chains/relays/kusama/src/lib.rs index 2ac67cdc25..98ab2db269 100644 --- a/integration-tests/emulated/chains/relays/kusama/src/lib.rs +++ b/integration-tests/emulated/chains/relays/kusama/src/lib.rs @@ -36,8 +36,6 @@ decl_test_relay_chains! { XcmPallet: kusama_runtime::XcmPallet, Balances: kusama_runtime::Balances, Hrmp: kusama_runtime::Hrmp, - Identity: kusama_runtime::Identity, - IdentityMigrator: kusama_runtime::IdentityMigrator, Treasury: kusama_runtime::Treasury, AssetRate: kusama_runtime::AssetRate, } diff --git a/integration-tests/emulated/chains/relays/polkadot/src/lib.rs b/integration-tests/emulated/chains/relays/polkadot/src/lib.rs index f207c1dab6..8bf8a354ce 100644 --- a/integration-tests/emulated/chains/relays/polkadot/src/lib.rs +++ b/integration-tests/emulated/chains/relays/polkadot/src/lib.rs @@ -39,6 +39,7 @@ decl_test_relay_chains! { AssetRate: polkadot_runtime::AssetRate, Hrmp: polkadot_runtime::Hrmp, Identity: polkadot_runtime::Identity, + IdentityMigrator: polkadot_runtime::IdentityMigrator, } }, } diff --git a/integration-tests/emulated/networks/polkadot-system/Cargo.toml b/integration-tests/emulated/networks/polkadot-system/Cargo.toml index 9e7c757374..e870ecbf6f 100644 --- a/integration-tests/emulated/networks/polkadot-system/Cargo.toml +++ b/integration-tests/emulated/networks/polkadot-system/Cargo.toml @@ -18,3 +18,4 @@ bridge-hub-polkadot-emulated-chain = { workspace = true } collectives-polkadot-emulated-chain = { workspace = true } penpal-emulated-chain = { workspace = true } polkadot-emulated-chain = { workspace = true } +people-polkadot-emulated-chain = { workspace = true } diff --git a/integration-tests/emulated/networks/polkadot-system/src/lib.rs b/integration-tests/emulated/networks/polkadot-system/src/lib.rs index bed1b549e2..408f651fc9 100644 --- a/integration-tests/emulated/networks/polkadot-system/src/lib.rs +++ b/integration-tests/emulated/networks/polkadot-system/src/lib.rs @@ -17,12 +17,14 @@ pub use asset_hub_polkadot_emulated_chain; pub use bridge_hub_polkadot_emulated_chain; pub use collectives_polkadot_emulated_chain; pub use penpal_emulated_chain; +pub use people_polkadot_emulated_chain; pub use polkadot_emulated_chain; use asset_hub_polkadot_emulated_chain::AssetHubPolkadot; use bridge_hub_polkadot_emulated_chain::BridgeHubPolkadot; use collectives_polkadot_emulated_chain::CollectivesPolkadot; use penpal_emulated_chain::{PenpalA, PenpalB}; +use people_polkadot_emulated_chain::PeoplePolkadot; use polkadot_emulated_chain::Polkadot; // Cumulus @@ -40,6 +42,7 @@ decl_test_networks! { CollectivesPolkadot, PenpalA, PenpalB, + PeoplePolkadot, ], bridge = () }, @@ -51,5 +54,6 @@ decl_test_sender_receiver_accounts_parameter_types! { BridgeHubPolkadotPara { sender: ALICE, receiver: BOB }, CollectivesPolkadotPara { sender: ALICE, receiver: BOB }, PenpalAPara { sender: ALICE, receiver: BOB }, - PenpalBPara { sender: ALICE, receiver: BOB } + PenpalBPara { sender: ALICE, receiver: BOB }, + PeoplePolkadotPara { sender: ALICE, receiver: BOB } } diff --git a/integration-tests/emulated/tests/people/people-kusama/src/tests/mod.rs b/integration-tests/emulated/tests/people/people-kusama/src/tests/mod.rs index 80c00021ca..516ec37cc1 100644 --- a/integration-tests/emulated/tests/people/people-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/tests/people/people-kusama/src/tests/mod.rs @@ -13,5 +13,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -mod reap_identity; mod teleport; diff --git a/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml b/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml new file mode 100644 index 0000000000..b880ee1f05 --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "people-polkadot-integration-tests" +version.workspace = true +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "People Polkadot runtime integration tests with xcm-emulator" +publish = false + +[dependencies] +codec = { workspace = true, default-features = true } + +# Substrate +sp-runtime = { workspace = true, default-features = true } +frame-support = { workspace = true, default-features = true } +pallet-balances = { workspace = true, default-features = true } +pallet-message-queue = { workspace = true, default-features = true } +pallet-identity = { workspace = true, default-features = true } + +# Polkadot +polkadot-runtime-common = { workspace = true, default-features = true } +xcm = { workspace = true, default-features = true } +xcm-executor = { workspace = true } + +# Cumulus +parachains-common = { workspace = true, default-features = true } +emulated-integration-tests-common = { workspace = true } +asset-test-utils = { workspace = true } +cumulus-pallet-parachain-system = { features = [ + "parameterized-consensus-hook", +], workspace = true, default-features = true } + +# Local +polkadot-runtime-constants = { workspace = true, default-features = true } +polkadot-runtime = { workspace = true } +people-polkadot-runtime = { workspace = true } +polkadot-system-emulated-network = { workspace = true } diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/lib.rs b/integration-tests/emulated/tests/people/people-polkadot/src/lib.rs new file mode 100644 index 0000000000..2f80c85e69 --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/src/lib.rs @@ -0,0 +1,61 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub use codec::Encode; + +// Substrate +pub use frame_support::{ + assert_err, assert_ok, + pallet_prelude::Weight, + sp_runtime::{AccountId32, DispatchError, DispatchResult}, + traits::fungibles::Inspect, +}; + +// Polkadot +pub use xcm::{ + prelude::{AccountId32 as AccountId32Junction, *}, + v3::{Error, NetworkId::Polkadot as PolkadotId}, +}; + +// Cumulus +pub use asset_test_utils::xcm_helpers; +pub use emulated_integration_tests_common::{ + xcm_emulator::{ + assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, + }, + xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, +}; +pub use parachains_common::{AccountId, Balance}; +pub use polkadot_system_emulated_network::{ + people_polkadot_emulated_chain::{ + genesis::ED as PEOPLE_KUSAMA_ED, PeoplePolkadotParaPallet as PeoplePolkadotPallet, + }, + polkadot_emulated_chain::{genesis::ED as KUSAMA_ED, PolkadotRelayPallet as PolkadotPallet}, + PenpalAPara as PenpalA, PeoplePolkadotPara as PeoplePolkadot, + PeoplePolkadotParaReceiver as PeoplePolkadotReceiver, + PeoplePolkadotParaSender as PeoplePolkadotSender, PolkadotRelay as Polkadot, + PolkadotRelayReceiver as PolkadotReceiver, PolkadotRelaySender as PolkadotSender, +}; + +pub type RelayToSystemParaTest = Test; +pub type RelayToParaTest = Test; +pub type SystemParaToRelayTest = Test; +pub type SystemParaToParaTest = Test; +pub type ParaToSystemParaTest = Test; + +#[cfg(test)] +mod tests; diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/tests/mod.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/mod.rs new file mode 100644 index 0000000000..80c00021ca --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/mod.rs @@ -0,0 +1,17 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +mod reap_identity; +mod teleport; diff --git a/integration-tests/emulated/tests/people/people-kusama/src/tests/reap_identity.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs similarity index 79% rename from integration-tests/emulated/tests/people/people-kusama/src/tests/reap_identity.rs rename to integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs index 3a55b3e354..fb67e9e0e1 100644 --- a/integration-tests/emulated/tests/people/people-kusama/src/tests/reap_identity.rs +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs @@ -15,8 +15,8 @@ //! # OnReapIdentity Tests //! -//! This file contains the test cases for migrating Identity data away from the Kusama Relay -//! chain and to the Kusama People parachain. This migration is part of the broader Minimal Relay +//! This file contains the test cases for migrating Identity data away from the Polkadot Relay +//! chain and to the Polkadot People parachain. This migration is part of the broader Minimal Relay //! effort: //! https://github.com/polkadot-fellows/RFCs/blob/main/text/0032-minimal-relay.md //! @@ -40,27 +40,27 @@ use crate::*; use frame_support::BoundedVec; -use kusama_runtime::{ - BasicDeposit, ByteDeposit, MaxAdditionalFields, MaxSubAccounts, RuntimeOrigin as KusamaOrigin, - SubAccountDeposit, -}; -use kusama_runtime_constants::currency::*; -use kusama_system_emulated_network::{ - kusama_emulated_chain::KusamaRelayPallet, KusamaRelay, KusamaRelaySender, -}; use pallet_balances::Event as BalancesEvent; use pallet_identity::{legacy::IdentityInfo, Data, Event as IdentityEvent}; -use people_kusama_runtime::people::{ +use people_polkadot_runtime::people::{ BasicDeposit as BasicDepositParachain, ByteDeposit as ByteDepositParachain, IdentityInfo as IdentityInfoParachain, SubAccountDeposit as SubAccountDepositParachain, }; +use polkadot_runtime::{ + xcm_config::CheckAccount, BasicDeposit, ByteDeposit, MaxAdditionalFields, MaxSubAccounts, + RuntimeOrigin as PolkadotOrigin, SubAccountDeposit, +}; +use polkadot_runtime_constants::currency::*; +use polkadot_system_emulated_network::{ + polkadot_emulated_chain::PolkadotRelayPallet, PolkadotRelay, PolkadotRelaySender, +}; type Balance = u128; -type KusamaIdentity = ::Identity; -type KusamaBalances = ::Balances; -type KusamaIdentityMigrator = ::IdentityMigrator; -type PeopleKusamaIdentity = ::Identity; -type PeopleKusamaBalances = ::Balances; +type PolkadotIdentity = ::Identity; +type PolkadotBalances = ::Balances; +type PolkadotIdentityMigrator = ::IdentityMigrator; +type PeoplePolkadotIdentity = ::Identity; +type PeoplePolkadotBalances = ::Balances; #[derive(Clone, Debug)] struct Identity { @@ -168,16 +168,23 @@ fn account_from_u32(id: u32) -> AccountId32 { AccountId32::new(buffer) } +// Initialize the XCM Check Account with the existential deposit. We assume that it exists in +// reality and is necessary in the test because the remote deposit is less than the ED, and we +// cannot teleport (check out) an amount less than ED into a nonexistent account. +fn init_check_account() { + PolkadotRelay::fund_accounts(vec![(CheckAccount::get(), EXISTENTIAL_DEPOSIT)]); +} + // Set up the Relay Chain with an identity. fn set_id_relay(id: &Identity) -> Balance { let mut total_deposit: Balance = 0; // Set identity and Subs on Relay Chain - KusamaRelay::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; + PolkadotRelay::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; - assert_ok!(KusamaIdentity::set_identity( - KusamaOrigin::signed(KusamaRelaySender::get()), + assert_ok!(PolkadotIdentity::set_identity( + PolkadotOrigin::signed(PolkadotRelaySender::get()), Box::new(id.relay.clone()) )); @@ -186,24 +193,24 @@ fn set_id_relay(id: &Identity) -> Balance { .map(|i| (account_from_u32(i), Data::Raw(b"name".to_vec().try_into().unwrap()))) .collect(); - assert_ok!(KusamaIdentity::set_subs( - KusamaOrigin::signed(KusamaRelaySender::get()), + assert_ok!(PolkadotIdentity::set_subs( + PolkadotOrigin::signed(PolkadotRelaySender::get()), subs, )); } - let reserved_balance = KusamaBalances::reserved_balance(KusamaRelaySender::get()); + let reserved_balance = PolkadotBalances::reserved_balance(PolkadotRelaySender::get()); let id_deposit = IdentityOn::Relay(&id.relay).calculate_deposit(); let total_deposit = match id.subs { Subs::Zero => { total_deposit = id_deposit; // No subs assert_expected_events!( - KusamaRelay, + PolkadotRelay, vec![ RuntimeEvent::Identity(IdentityEvent::IdentitySet { .. }) => {}, RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == KusamaRelaySender::get(), + who: *who == PolkadotRelaySender::get(), amount: *amount == id_deposit, }, ] @@ -215,15 +222,15 @@ fn set_id_relay(id: &Identity) -> Balance { total_deposit = sub_account_deposit + IdentityOn::Relay(&id.relay).calculate_deposit(); assert_expected_events!( - KusamaRelay, + PolkadotRelay, vec![ RuntimeEvent::Identity(IdentityEvent::IdentitySet { .. }) => {}, RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == KusamaRelaySender::get(), + who: *who == PolkadotRelaySender::get(), amount: *amount == id_deposit, }, RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == KusamaRelaySender::get(), + who: *who == PolkadotRelaySender::get(), amount: *amount == sub_account_deposit, }, ] @@ -240,15 +247,16 @@ fn set_id_relay(id: &Identity) -> Balance { // Set up the parachain with an identity and (maybe) sub accounts, but with zero deposits. fn assert_set_id_parachain(id: &Identity) { // Set identity and Subs on Parachain with zero deposit - PeopleKusama::execute_with(|| { - let free_bal = PeopleKusamaBalances::free_balance(PeopleKusamaSender::get()); - let reserved_balance = PeopleKusamaBalances::reserved_balance(PeopleKusamaSender::get()); + PeoplePolkadot::execute_with(|| { + let free_bal = PeoplePolkadotBalances::free_balance(PeoplePolkadotSender::get()); + let reserved_balance = + PeoplePolkadotBalances::reserved_balance(PeoplePolkadotSender::get()); // total balance at Genesis should be zero assert_eq!(reserved_balance + free_bal, 0); - assert_ok!(PeopleKusamaIdentity::set_identity_no_deposit( - &PeopleKusamaSender::get(), + assert_ok!(PeoplePolkadotIdentity::set_identity_no_deposit( + &PeoplePolkadotSender::get(), id.para.clone(), )); @@ -260,19 +268,20 @@ fn assert_set_id_parachain(id: &Identity) { (account_from_u32(ii), Data::Raw(b"name".to_vec().try_into().unwrap())) }) .collect(); - assert_ok!(PeopleKusamaIdentity::set_subs_no_deposit( - &PeopleKusamaSender::get(), + assert_ok!(PeoplePolkadotIdentity::set_subs_no_deposit( + &PeoplePolkadotSender::get(), subs, )); }, } // No amount should be reserved as deposit amounts are set to 0. - let reserved_balance = PeopleKusamaBalances::reserved_balance(PeopleKusamaSender::get()); + let reserved_balance = + PeoplePolkadotBalances::reserved_balance(PeoplePolkadotSender::get()); assert_eq!(reserved_balance, 0); - assert!(PeopleKusamaIdentity::identity(PeopleKusamaSender::get()).is_some()); + assert!(PeoplePolkadotIdentity::identity(PeoplePolkadotSender::get()).is_some()); - let (_, sub_accounts) = PeopleKusamaIdentity::subs_of(PeopleKusamaSender::get()); + let (_, sub_accounts) = PeoplePolkadotIdentity::subs_of(PeoplePolkadotSender::get()); match id.subs { Subs::Zero => assert_eq!(sub_accounts.len(), 0), @@ -283,17 +292,17 @@ fn assert_set_id_parachain(id: &Identity) { // Reap the identity on the Relay Chain and assert that the correct things happen there. fn assert_reap_id_relay(total_deposit: Balance, id: &Identity) { - KusamaRelay::execute_with(|| { - type RuntimeEvent = ::RuntimeEvent; - let free_bal_before_reap = KusamaBalances::free_balance(KusamaRelaySender::get()); - let reserved_balance = KusamaBalances::reserved_balance(KusamaRelaySender::get()); + PolkadotRelay::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + let free_bal_before_reap = PolkadotBalances::free_balance(PolkadotRelaySender::get()); + let reserved_balance = PolkadotBalances::reserved_balance(PolkadotRelaySender::get()); assert_eq!(reserved_balance, total_deposit); - assert_ok!(KusamaIdentityMigrator::reap_identity( + assert_ok!(PolkadotIdentityMigrator::reap_identity( // Note: Root for launch testing, Signed once we open migrations. - KusamaOrigin::signed(KusamaRelaySender::get()), - KusamaRelaySender::get() + PolkadotOrigin::signed(PolkadotRelaySender::get()), + PolkadotRelaySender::get() )); let remote_deposit = match id.subs { @@ -302,35 +311,35 @@ fn assert_reap_id_relay(total_deposit: Balance, id: &Identity) { }; assert_expected_events!( - KusamaRelay, + PolkadotRelay, vec![ // `reap_identity` sums the identity and subs deposits and unreserves them in one // call. Therefore, we only expect one `Unreserved` event. RuntimeEvent::Balances(BalancesEvent::Unreserved { who, amount }) => { - who: *who == KusamaRelaySender::get(), + who: *who == PolkadotRelaySender::get(), amount: *amount == total_deposit, }, RuntimeEvent::IdentityMigrator( polkadot_runtime_common::identity_migrator::Event::IdentityReaped { who, }) => { - who: *who == PeopleKusamaSender::get(), + who: *who == PeoplePolkadotSender::get(), }, ] ); // Identity should be gone. - assert!(PeopleKusamaIdentity::identity(KusamaRelaySender::get()).is_none()); + assert!(PeoplePolkadotIdentity::identity(PolkadotRelaySender::get()).is_none()); // Subs should be gone. - let (_, sub_accounts) = KusamaIdentity::subs_of(KusamaRelaySender::get()); + let (_, sub_accounts) = PolkadotIdentity::subs_of(PolkadotRelaySender::get()); assert_eq!(sub_accounts.len(), 0); - let reserved_balance = KusamaBalances::reserved_balance(KusamaRelaySender::get()); + let reserved_balance = PolkadotBalances::reserved_balance(PolkadotRelaySender::get()); assert_eq!(reserved_balance, 0); // Free balance should be greater (i.e. the teleport should work even if 100% of an // account's balance is reserved for Identity). - let free_bal_after_reap = KusamaBalances::free_balance(KusamaRelaySender::get()); + let free_bal_after_reap = PolkadotBalances::free_balance(PolkadotRelaySender::get()); assert!(free_bal_after_reap > free_bal_before_reap); // Implicit: total_deposit > remote_deposit. As in, accounts should always have enough @@ -342,8 +351,9 @@ fn assert_reap_id_relay(total_deposit: Balance, id: &Identity) { // Reaping the identity on the Relay Chain will have sent an XCM program to the parachain. Ensure // that everything happens as expected. fn assert_reap_parachain(id: &Identity) { - PeopleKusama::execute_with(|| { - let reserved_balance = PeopleKusamaBalances::reserved_balance(PeopleKusamaSender::get()); + PeoplePolkadot::execute_with(|| { + let reserved_balance = + PeoplePolkadotBalances::reserved_balance(PeoplePolkadotSender::get()); let id_deposit = IdentityOn::Para(&id.para).calculate_deposit(); let total_deposit = match id.subs { Subs::Zero => id_deposit, @@ -353,25 +363,27 @@ fn assert_reap_parachain(id: &Identity) { assert_eq!(reserved_balance, total_deposit); // Should have at least one ED after in free balance after the reap. - assert!(PeopleKusamaBalances::free_balance(PeopleKusamaSender::get()) >= PEOPLE_KUSAMA_ED); + assert!( + PeoplePolkadotBalances::free_balance(PeoplePolkadotSender::get()) >= PEOPLE_KUSAMA_ED + ); }); } // Assert the events that should happen on the parachain upon reaping an identity on the Relay // Chain. fn assert_reap_events(id_deposit: Balance, id: &Identity) { - type RuntimeEvent = ::RuntimeEvent; + type RuntimeEvent = ::RuntimeEvent; match id.subs { Subs::Zero => { assert_expected_events!( - PeopleKusama, + PeoplePolkadot, vec![ // Deposit and Endowed from teleport RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {}, RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {}, // Amount reserved for identity info RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == PeopleKusamaSender::get(), + who: *who == PeoplePolkadotSender::get(), amount: *amount == id_deposit, }, // Confirmation from Migrator with individual identity and subs deposits @@ -379,7 +391,7 @@ fn assert_reap_events(id_deposit: Balance, id: &Identity) { polkadot_runtime_common::identity_migrator::Event::DepositUpdated { who, identity, subs }) => { - who: *who == PeopleKusamaSender::get(), + who: *who == PeoplePolkadotSender::get(), identity: *identity == id_deposit, subs: *subs == 0, }, @@ -390,19 +402,19 @@ fn assert_reap_events(id_deposit: Balance, id: &Identity) { Subs::Many(n) => { let subs_deposit = n as Balance * SubAccountDepositParachain::get(); assert_expected_events!( - PeopleKusama, + PeoplePolkadot, vec![ // Deposit and Endowed from teleport RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {}, RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {}, // Amount reserved for identity info RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == PeopleKusamaSender::get(), + who: *who == PeoplePolkadotSender::get(), amount: *amount == id_deposit, }, // Amount reserved for subs RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => { - who: *who == PeopleKusamaSender::get(), + who: *who == PeoplePolkadotSender::get(), amount: *amount == subs_deposit, }, // Confirmation from Migrator with individual identity and subs deposits @@ -410,7 +422,7 @@ fn assert_reap_events(id_deposit: Balance, id: &Identity) { polkadot_runtime_common::identity_migrator::Event::DepositUpdated { who, identity, subs }) => { - who: *who == PeopleKusamaSender::get(), + who: *who == PeoplePolkadotSender::get(), identity: *identity == id_deposit, subs: *subs == subs_deposit, }, @@ -421,10 +433,10 @@ fn assert_reap_events(id_deposit: Balance, id: &Identity) { }; } -/// Duplicate of the impl of `ToParachainIdentityReaper` in the Kusama runtime. +/// Duplicate of the impl of `ToParachainIdentityReaper` in the Polkadot runtime. fn calculate_remote_deposit(bytes: u32, subs: u32) -> Balance { // Note: These `deposit` functions and `EXISTENTIAL_DEPOSIT` correspond to the Relay Chain's. - // Pulled in: use kusama_runtime_constants::currency::*; + // Pulled in: use polkadot_runtime_constants::currency::*; let para_basic_deposit = deposit(1, 17) / 100; let para_byte_deposit = deposit(0, 1) / 100; let para_sub_account_deposit = deposit(1, 53) / 100; @@ -467,6 +479,7 @@ fn meaningful_additional() -> BoundedVec<(Data, Data), MaxAdditionalFields> { // Execute a single test case. fn assert_relay_para_flow(id: &Identity) { + init_check_account(); let total_deposit = set_id_relay(id); assert_set_id_parachain(id); assert_reap_id_relay(total_deposit, id); diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs new file mode 100644 index 0000000000..197979170c --- /dev/null +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs @@ -0,0 +1,260 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::*; +use people_polkadot_runtime::xcm_config::XcmConfig as PeoplePolkadotXcmConfig; +use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; + +fn relay_origin_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + Polkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(627_959_000, 7_200))); + + assert_expected_events!( + Polkadot, + vec![ + // Amount to teleport is withdrawn from Sender + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + // Amount to teleport is deposited in Relay's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => { + who: *who == ::XcmPallet::check_account(), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn relay_dest_assertions(t: SystemParaToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + + Polkadot::assert_ump_queue_processed( + true, + Some(PeoplePolkadot::para_id()), + Some(Weight::from_parts(304_266_000, 7_186)), + ); + + assert_expected_events!( + Polkadot, + vec![ + // Amount is withdrawn from Relay Chain's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { + who: *who == ::XcmPallet::check_account(), + amount: *amount == t.args.amount, + }, + // Amount minus fees are deposited in Receiver's account + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { + who: *who == t.receiver.account_id, + }, + ] + ); +} + +fn relay_dest_assertions_fail(_t: SystemParaToRelayTest) { + Polkadot::assert_ump_queue_processed( + false, + Some(PeoplePolkadot::para_id()), + Some(Weight::from_parts(157_718_000, 3_593)), + ); +} + +fn para_origin_assertions(t: SystemParaToRelayTest) { + type RuntimeEvent = ::RuntimeEvent; + + PeoplePolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 600_000_000, + 7_000, + ))); + + PeoplePolkadot::assert_parachain_system_ump_sent(); + + assert_expected_events!( + PeoplePolkadot, + vec![ + // Amount is withdrawn from Sender's account + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn para_dest_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + PeoplePolkadot::assert_dmp_queue_complete(Some(Weight::from_parts(162_456_000, 0))); + + assert_expected_events!( + PeoplePolkadot, + vec![ + // Amount minus fees are deposited in Receiver's account + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { + who: *who == t.receiver.account_id, + }, + ] + ); +} + +fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::limited_teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::limited_teleport_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +/// Limited Teleport of native asset from Relay Chain to the System Parachain should work +#[test] +fn limited_teleport_native_assets_from_relay_to_system_para_works() { + // Init values for Relay Chain + let amount_to_send: Balance = KUSAMA_ED * 1000; + let dest = Polkadot::child_location_of(PeoplePolkadot::para_id()); + let beneficiary_id = PeoplePolkadotReceiver::get(); + let test_args = TestContext { + sender: PolkadotSender::get(), + receiver: PeoplePolkadotReceiver::get(), + args: TestArgs::new_relay(dest, beneficiary_id, amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(para_dest_assertions); + test.set_dispatchable::(relay_limited_teleport_assets); + test.assert(); + + let delivery_fees = Polkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Limited Teleport of native asset from System Parachain to Relay Chain +/// should work when there is enough balance in Relay Chain's `CheckAccount` +#[test] +fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { + // Dependency - Relay Chain's `CheckAccount` should have enough balance + limited_teleport_native_assets_from_relay_to_system_para_works(); + + let amount_to_send: Balance = PEOPLE_KUSAMA_ED * 1000; + let destination = PeoplePolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + // Fund a sender + PeoplePolkadot::fund_accounts(vec![(PeoplePolkadotSender::get(), KUSAMA_ED * 2_000u128)]); + + let test_args = TestContext { + sender: PeoplePolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions); + test.set_dispatchable::(system_para_limited_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + let delivery_fees = PeoplePolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + +/// Limited Teleport of native asset from System Parachain to Relay Chain +/// should't work when there is not enough balance in Relay Chain's `CheckAccount` +#[test] +fn limited_teleport_native_assets_from_system_para_to_relay_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = KUSAMA_ED * 1000; + let destination = PeoplePolkadot::parent_location(); + let beneficiary_id = PolkadotReceiver::get(); + let assets = (Parent, amount_to_send).into(); + + // Fund a sender + PeoplePolkadot::fund_accounts(vec![(PeoplePolkadotSender::get(), KUSAMA_ED * 2_000u128)]); + + let test_args = TestContext { + sender: PeoplePolkadotSender::get(), + receiver: PolkadotReceiver::get(), + args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(para_origin_assertions); + test.set_assertion::(relay_dest_assertions_fail); + test.set_dispatchable::(system_para_limited_teleport_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + let delivery_fees = PeoplePolkadot::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance does not change + assert_eq!(receiver_balance_after, receiver_balance_before); +} diff --git a/integration-tests/zombienet/Cargo.toml b/integration-tests/zombienet/Cargo.toml new file mode 100644 index 0000000000..d72ed9b9e2 --- /dev/null +++ b/integration-tests/zombienet/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "zombienet-sdk-tests" +version = "0.1.0" +edition = "2021" + +[dependencies] +subxt = { features = ["native"] , workspace = true } +tokio = { workspace = true } +tracing-subscriber = { workspace = true } +zombienet-sdk = { workspace = true } +log = { workspace = true, default-features = true } +anyhow = { workspace = true } diff --git a/integration-tests/zombienet/src/environment.rs b/integration-tests/zombienet/src/environment.rs new file mode 100644 index 0000000000..b060b8e20f --- /dev/null +++ b/integration-tests/zombienet/src/environment.rs @@ -0,0 +1,51 @@ +//! Helpers functions to get configuration (e.g. Provider and images) from the env vars +use std::{env, future::Future, pin::Pin}; + +use zombienet_sdk::{LocalFileSystem, Network, NetworkConfig, NetworkConfigExt, OrchestratorError}; + +const DEFAULT_POLKADOT_IMAGE: &str = "docker.io/parity/polkadot:latest"; +const DEFAULT_CUMULUS_IMAGE: &str = "docker.io/parity/polkadot-parachain:latest"; + +#[derive(Debug, Default)] +pub struct Images { + pub polkadot: String, + pub cumulus: String, +} + +pub enum Provider { + Native, + K8s, + Docker, +} + +// Use `docker` as default provider +impl From for Provider { + fn from(value: String) -> Self { + match value.to_ascii_lowercase().as_ref() { + "native" => Provider::Native, + "k8s" => Provider::K8s, + _ => Provider::Docker, // default provider + } + } +} + +pub fn get_images_from_env() -> Images { + let polkadot = env::var("POLKADOT_IMAGE").unwrap_or(DEFAULT_POLKADOT_IMAGE.into()); + let cumulus = env::var("CUMULUS_IMAGE").unwrap_or(DEFAULT_CUMULUS_IMAGE.into()); + Images { polkadot, cumulus } +} + +pub fn get_provider_from_env() -> Provider { + env::var("ZOMBIE_PROVIDER").unwrap_or_default().into() +} + +type SpawnResult = Result, OrchestratorError>; +pub fn get_spawn_fn() -> fn(NetworkConfig) -> Pin + Send>> { + let provider = get_provider_from_env(); + + match provider { + Provider::Native => zombienet_sdk::NetworkConfig::spawn_native, + Provider::K8s => zombienet_sdk::NetworkConfig::spawn_k8s, + Provider::Docker => zombienet_sdk::NetworkConfig::spawn_docker, + } +} diff --git a/integration-tests/zombienet/src/lib.rs b/integration-tests/zombienet/src/lib.rs new file mode 100644 index 0000000000..3da344c952 --- /dev/null +++ b/integration-tests/zombienet/src/lib.rs @@ -0,0 +1,70 @@ +use anyhow::anyhow; +use subxt::{OnlineClient, PolkadotConfig}; +use zombienet_sdk::{NetworkConfig, NetworkConfigBuilder, NetworkNode}; + +pub mod environment; + +pub type Error = Box; + +// Chain generator command template +const CMD_TPL: &str = "chain-spec-generator {{chainName}}"; + +// Relaychain nodes +const ALICE: &str = "alice"; +const BOB: &str = "bob"; +// Collator +const COLLATOR: &str = "collator"; + +pub fn small_network() -> Result { + let images = environment::get_images_from_env(); + let config = NetworkConfigBuilder::new() + .with_relaychain(|r| { + r.with_chain("polkadot-local") + .with_default_command("polkadot") + .with_default_image(images.polkadot.as_str()) + .with_chain_spec_command(CMD_TPL) + .chain_spec_command_is_local(true) + .with_node(|node| node.with_name(ALICE)) + .with_node(|node| node.with_name(BOB)) + }) + .with_parachain(|p| { + p.with_id(2000).cumulus_based(true).with_collator(|n| { + n.with_name(COLLATOR) + .with_command("polkadot-parachain") + .with_image(images.cumulus.as_str()) + }) + }) + .build() + .map_err(|errs| { + let e = errs.iter().fold("".to_string(), |memo, err| format!("{memo} \n {err}")); + anyhow!(e) + })?; + + Ok(config) +} + +pub async fn wait_subxt_client( + node: &NetworkNode, +) -> Result, anyhow::Error> { + log::info!("trying to connect to: {}", node.ws_uri()); + loop { + match node.client::().await { + Ok(cli) => { + log::info!("returning client for: {}", node.ws_uri()); + return Ok(cli); + }, + Err(e) => { + log::trace!("{e:?}"); + if let subxt::Error::Rpc(subxt::error::RpcError::ClientError(ref inner)) = e { + log::trace!("inner: {inner}"); + if inner.to_string().contains("i/o error") { + // The node is not ready to accept connections yet + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + continue; + } + } + return Err(anyhow!("Cannot connect to node : {e:?}")); + }, + }; + } +} diff --git a/integration-tests/zombienet/tests/smoke.rs b/integration-tests/zombienet/tests/smoke.rs new file mode 100644 index 0000000000..7614d3ea0a --- /dev/null +++ b/integration-tests/zombienet/tests/smoke.rs @@ -0,0 +1,39 @@ +use std::time::Instant; +use subxt::ext::futures::StreamExt; +use zombienet_sdk_tests::{environment::get_spawn_fn, small_network, wait_subxt_client}; + +#[tokio::test(flavor = "multi_thread")] +async fn smoke() { + tracing_subscriber::fmt::init(); + + // config and env + let spawn_fn = get_spawn_fn(); + let config = small_network().unwrap(); + + // spawn + let now = Instant::now(); + let network = spawn_fn(config).await.unwrap(); + let elapsed = now.elapsed(); + log::info!("🚀🚀🚀🚀 network deployed in {:.2?}", elapsed); + + let alice = network.get_node("alice").unwrap(); + // wait until the subxt client is ready + let client = wait_subxt_client(alice).await.unwrap(); + + // wait 10 blocks + let mut blocks = client.blocks().subscribe_finalized().await.unwrap().take(10); + + while let Some(block) = blocks.next().await { + log::info!("Block #{}", block.unwrap().header().number); + } + + // wait 10 blocks on the parachain + let collator = network.get_node("collator").unwrap(); + let collator_client = wait_subxt_client(collator).await.unwrap(); + + let mut blocks = collator_client.blocks().subscribe_finalized().await.unwrap().take(10); + + while let Some(block) = blocks.next().await { + log::info!("Parachain Block #{}", block.unwrap().header().number); + } +} diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index e276e2e4c3..b2df38038f 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -53,9 +53,9 @@ pallet-conviction-voting = { workspace = true } pallet-election-provider-multi-phase = { workspace = true } pallet-fast-unstake = { workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } pallet-grandpa = { workspace = true } pallet-nis = { workspace = true } -pallet-identity = { workspace = true } pallet-indices = { workspace = true } pallet-message-queue = { workspace = true } pallet-mmr = { workspace = true } @@ -113,7 +113,7 @@ tokio = { features = ["macros"], workspace = true } sp-tracing = { workspace = true } [build-dependencies] -substrate-wasm-builder = { workspace = true } +substrate-wasm-builder = { workspace = true, optional = true } [features] default = ["std"] @@ -128,6 +128,7 @@ std = [ "frame-benchmarking?/std", "frame-election-provider-support/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -150,7 +151,6 @@ std = [ "pallet-election-provider-support-benchmarking?/std", "pallet-fast-unstake/std", "pallet-grandpa/std", - "pallet-identity/std", "pallet-indices/std", "pallet-message-queue/std", "pallet-mmr/std", @@ -185,6 +185,7 @@ std = [ "polkadot-runtime-common/std", "runtime-parachains/std", "scale-info/std", + "substrate-wasm-builder", "sp-api/std", "sp-application-crypto/std", "sp-arithmetic/std", @@ -225,7 +226,6 @@ runtime-benchmarks = [ "pallet-election-provider-support-benchmarking/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-mmr/runtime-benchmarks", @@ -280,7 +280,6 @@ try-runtime = [ "pallet-election-provider-multi-phase/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-grandpa/try-runtime", - "pallet-identity/try-runtime", "pallet-indices/try-runtime", "pallet-message-queue/try-runtime", "pallet-mmr/try-runtime", @@ -309,10 +308,13 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] diff --git a/relay/kusama/build.rs b/relay/kusama/build.rs index 404ba3f2fd..ed553650ce 100644 --- a/relay/kusama/build.rs +++ b/relay/kusama/build.rs @@ -14,12 +14,17 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use substrate_wasm_builder::WasmBuilder; +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] +fn main() { + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} +#[cfg(all(feature = "std", feature = "metadata-hash"))] fn main() { - WasmBuilder::new() - .with_current_project() - .import_memory() - .export_heap_base() + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) .build() } + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/relay/kusama/src/impls.rs b/relay/kusama/src/impls.rs index 20880646cb..77e7ca941d 100644 --- a/relay/kusama/src/impls.rs +++ b/relay/kusama/src/impls.rs @@ -15,168 +15,10 @@ // along with Polkadot. If not, see . use super::*; -use codec::{Decode, Encode}; use core::marker::PhantomData; -use frame_support::{ - defensive, pallet_prelude::DispatchResult, traits::tokens::ConversionFromAssetBalance, -}; -use frame_system::RawOrigin; -use kusama_runtime_constants::system_parachain::PEOPLE_ID; +use frame_support::traits::tokens::ConversionFromAssetBalance; use polkadot_primitives::Id as ParaId; -use polkadot_runtime_common::identity_migrator::{OnReapIdentity, WeightInfo}; -use xcm::{latest::prelude::*, VersionedXcm}; use xcm_builder::IsChildSystemParachain; -use xcm_executor::traits::TransactAsset; - -/// A type containing the encoding of the People Chain pallets in its runtime. Used to construct any -/// remote calls. The codec index must correspond to the index of `IdentityMigrator` in the -/// `construct_runtime` of the remote chain. -#[derive(Encode, Decode)] -enum PeopleRuntimePallets { - #[codec(index = 248)] - IdentityMigrator(IdentityMigratorCalls), -} - -/// Call encoding for the calls needed from the Identity Migrator pallet. -#[derive(Encode, Decode)] -enum IdentityMigratorCalls { - #[codec(index = 1)] - PokeDeposit(AccountId), -} - -/// Type that implements `OnReapIdentity` that will send the deposit needed to store the same -/// information on a parachain, sends the deposit there, and then updates it. -pub struct ToParachainIdentityReaper(PhantomData<(Runtime, AccountId)>); -impl ToParachainIdentityReaper { - /// Calculate the balance needed on the remote chain based on the `IdentityInfo` and `Subs` on - /// this chain. The total includes: - /// - /// - Identity basic deposit - /// - `IdentityInfo` byte deposit - /// - Sub accounts deposit - /// - 2x existential deposit (1 for account existence, 1 such that the user can transact) - fn calculate_remote_deposit(bytes: u32, subs: u32) -> Balance { - // Remote deposit constants. Parachain uses `deposit / 100` - // Source: - // https://github.com/polkadot-fellows/runtimes/blob/55e97c5/system-parachains/constants/src/kusama.rs#L29 - // - // Parachain Deposit Configuration: - // - // pub const BasicDeposit: Balance = deposit(1, 17); - // pub const ByteDeposit: Balance = deposit(0, 1); - // pub const SubAccountDeposit: Balance = deposit(1, 53); - // pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10; - let para_basic_deposit = deposit(1, 17) / 100; - let para_byte_deposit = deposit(0, 1) / 100; - let para_sub_account_deposit = deposit(1, 53) / 100; - let para_existential_deposit = EXISTENTIAL_DEPOSIT / 10; - - // pallet deposits - let id_deposit = - para_basic_deposit.saturating_add(para_byte_deposit.saturating_mul(bytes as Balance)); - let subs_deposit = para_sub_account_deposit.saturating_mul(subs as Balance); - - id_deposit - .saturating_add(subs_deposit) - .saturating_add(para_existential_deposit.saturating_mul(2)) - } -} - -// Note / Warning: This implementation should only be used in a transactional context. If not, then -// an error could result in assets being burned. -impl OnReapIdentity for ToParachainIdentityReaper -where - Runtime: frame_system::Config + pallet_xcm::Config, - AccountId: Into<[u8; 32]> + Clone + Encode, -{ - fn on_reap_identity(who: &AccountId, fields: u32, subs: u32) -> DispatchResult { - use crate::{ - impls::IdentityMigratorCalls::PokeDeposit, - weights::runtime_common_identity_migrator::WeightInfo as MigratorWeights, - }; - - let total_to_send = Self::calculate_remote_deposit(fields, subs); - - // define asset / destination from relay perspective - let ksm = Asset { id: AssetId(Here.into_location()), fun: Fungible(total_to_send) }; - // People Chain - let destination: Location = Location::new(0, Parachain(PEOPLE_ID)); - - // Do `check_out` accounting since the XCM Executor's `InitiateTeleport` doesn't support - // unpaid teleports. - - // withdraw the asset from `who` - let who_origin = - Junction::AccountId32 { network: None, id: who.clone().into() }.into_location(); - let _withdrawn = xcm_config::LocalAssetTransactor::withdraw_asset(&ksm, &who_origin, None) - .map_err(|err| { - defensive!( - "runtime::on_reap_identity: withdraw_asset(what: {:?}, who_origin: {:?}) error: {:?}", - (&ksm, &who_origin, err) - ); - pallet_xcm::Error::::LowBalance - })?; - - // check out - xcm_config::LocalAssetTransactor::can_check_out( - &destination, - &ksm, - // not used in AssetTransactor - &XcmContext { origin: None, message_id: [0; 32], topic: None }, - ) - .map_err(|err| { - log::error!( - target: "runtime::on_reap_identity", - "can_check_out(destination: {:?}, asset: {:?}, _) error: {:?}", - destination, ksm, err - ); - pallet_xcm::Error::::CannotCheckOutTeleport - })?; - xcm_config::LocalAssetTransactor::check_out( - &destination, - &ksm, - // not used in AssetTransactor - &XcmContext { origin: None, message_id: [0; 32], topic: None }, - ); - - // reanchor - let ksm_reanchored: Assets = - vec![Asset { id: AssetId(Location::new(1, Here)), fun: Fungible(total_to_send) }] - .into(); - - let poke = PeopleRuntimePallets::::IdentityMigrator(PokeDeposit(who.clone())); - let remote_weight_limit = MigratorWeights::::poke_deposit().saturating_mul(2); - - // Actual program to execute on People Chain. - let program: Xcm<()> = Xcm(vec![ - // Unpaid as this is constructed by the system, once per user. The user shouldn't have - // their balance reduced by teleport fees for the favor of migrating. - UnpaidExecution { weight_limit: Unlimited, check_origin: None }, - // Receive the asset into holding. - ReceiveTeleportedAsset(ksm_reanchored), - // Deposit into the user's account. - DepositAsset { - assets: Wild(AllCounted(1)), - beneficiary: Junction::AccountId32 { network: None, id: who.clone().into() } - .into_location(), - }, - // Poke the deposit to reserve the appropriate amount on the parachain. - Transact { - origin_kind: OriginKind::Superuser, - require_weight_at_most: remote_weight_limit, - call: poke.encode().into(), - }, - ]); - - // send - >::send( - RawOrigin::Root.into(), - Box::new(VersionedLocation::V4(destination)), - Box::new(VersionedXcm::V4(program)), - )?; - Ok(()) - } -} // TODO: replace by types from polkadot-sdk https://github.com/paritytech/polkadot-sdk/pull/3659 /// Determines if the given `asset_kind` is a native asset. If it is, returns the balance without diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index bdbe026674..ded3ff7838 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -33,7 +33,7 @@ use polkadot_primitives::{ PARACHAIN_KEY_TYPE_ID, }; use polkadot_runtime_common::{ - auctions, claims, crowdloan, identity_migrator, impl_runtime_weights, + auctions, claims, crowdloan, impl_runtime_weights, impls::{ DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }, @@ -48,6 +48,7 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use runtime_parachains::{ assigner_coretime as parachains_assigner_coretime, assigner_on_demand as parachains_assigner_on_demand, configuration as parachains_configuration, + configuration::ActiveConfigHrmpChannelSizeAndCapacityRatio, coretime, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, @@ -75,18 +76,17 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, EverythingBut, + fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, Everything, InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, PalletId, }; -use frame_system::{EnsureRoot, EnsureSigned}; +use frame_system::EnsureRoot; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; -use pallet_identity::legacy::IdentityInfo; use pallet_session::historical as session_historical; -use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; +use pallet_transaction_payment::{FeeDetails, FungibleAdapter, RuntimeDispatchInfo}; use sp_core::{ConstU128, OpaqueMetadata, H256}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -161,10 +161,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kusama"), impl_name: create_runtime_str!("parity-kusama"), authoring_version: 2, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 25, + transaction_version: 26, state_version: 1, }; @@ -186,19 +186,8 @@ parameter_types! { pub const SS58Prefix: u8 = 2; } -/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation, -/// locking the state of the pallet and preventing further updates to identities and sub-identities. -/// The locked state will be the genesis state of a new system chain and then removed from the Relay -/// Chain. -pub struct IsIdentityCall; -impl Contains for IsIdentityCall { - fn contains(c: &RuntimeCall) -> bool { - matches!(c, RuntimeCall::Identity(_)) - } -} - impl frame_system::Config for Runtime { - type BaseCallFilter = EverythingBut; + type BaseCallFilter = Everything; type BlockWeights = BlockWeights; type BlockLength = BlockLength; type RuntimeOrigin = RuntimeOrigin; @@ -433,7 +422,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = CurrencyAdapter>; + type OnChargeTransaction = FungibleAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; @@ -930,6 +919,7 @@ where frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(tip), + frame_metadata_hash_extension::CheckMetadataHash::new(false), ); let raw_payload = SignedPayload::new(call, extra) .map_err(|e| { @@ -965,45 +955,7 @@ impl claims::Config for Runtime { type VestingSchedule = Vesting; type Prefix = Prefix; type MoveClaimOrigin = EnsureRoot; - type WeightInfo = weights::runtime_common_claims::WeightInfo; -} - -parameter_types! { - // Minimum 100 bytes/KSM deposited (1 CENT/byte) - pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain - pub const ByteDeposit: Balance = deposit(0, 1); - pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain - pub const MaxSubAccounts: u32 = 100; - pub const MaxAdditionalFields: u32 = 100; - pub const MaxRegistrars: u32 = 20; -} - -impl pallet_identity::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BasicDeposit = BasicDeposit; - type ByteDeposit = ByteDeposit; - type SubAccountDeposit = SubAccountDeposit; - type MaxSubAccounts = MaxSubAccounts; - type IdentityInformation = IdentityInfo; - type MaxRegistrars = MaxRegistrars; - type Slashed = Treasury; - type ForceOrigin = EitherOf, GeneralAdmin>; - type RegistrarOrigin = EitherOf, GeneralAdmin>; - type OffchainSignature = Signature; - type SigningPublicKey = ::Signer; - type UsernameAuthorityOrigin = EnsureRoot; - type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; - type MaxSuffixLength = ConstU32<7>; - type MaxUsernameLength = ConstU32<32>; - type WeightInfo = weights::pallet_identity::WeightInfo; -} - -impl identity_migrator::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Reaper = EnsureSigned; - type ReapIdentityHandler = impls::ToParachainIdentityReaper; - type WeightInfo = weights::runtime_common_identity_migrator::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_claims::WeightInfo; } impl pallet_utility::Config for Runtime { @@ -1113,14 +1065,22 @@ parameter_types! { TypeInfo, )] pub enum ProxyType { + #[codec(index = 0)] Any, + #[codec(index = 1)] NonTransfer, + #[codec(index = 2)] Governance, + #[codec(index = 3)] Staking, - IdentityJudgement, + // Index 4 skipped. Formerly `IdentityJudgement`. + #[codec(index = 5)] CancelProxy, + #[codec(index = 6)] Auction, + #[codec(index = 7)] Society, + #[codec(index = 8)] NominationPools, } @@ -1157,7 +1117,6 @@ impl InstanceFilter for ProxyType { RuntimeCall::Whitelist(..) | RuntimeCall::Claims(..) | RuntimeCall::Utility(..) | - RuntimeCall::Identity(..) | RuntimeCall::Society(..) | RuntimeCall::Recovery(pallet_recovery::Call::as_recovered {..}) | RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery {..}) | @@ -1210,11 +1169,6 @@ impl InstanceFilter for ProxyType { ProxyType::NominationPools => { matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..)) }, - ProxyType::IdentityJudgement => matches!( - c, - RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | - RuntimeCall::Utility(..) - ), ProxyType::CancelProxy => { matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, @@ -1341,11 +1295,22 @@ impl pallet_message_queue::Config for Runtime { impl parachains_dmp::Config for Runtime {} +parameter_types! { + pub const HrmpChannelSizeAndCapacityWithSystemRatio: Percent = Percent::from_percent(100); +} + impl parachains_hrmp::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; type ChannelManager = EitherOf, GeneralAdmin>; type Currency = Balances; + // Use the `HrmpChannelSizeAndCapacityWithSystemRatio` ratio from the actual active + // `HostConfiguration` configuration for `hrmp_channel_max_message_size` and + // `hrmp_channel_max_capacity`. + type DefaultChannelSizeAndCapacityWithSystem = ActiveConfigHrmpChannelSizeAndCapacityRatio< + Runtime, + HrmpChannelSizeAndCapacityWithSystemRatio, + >; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } @@ -1427,7 +1392,7 @@ impl paras_registrar::Config for Runtime { type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; type DataDepositPerByte = DataDepositPerByte; - type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_paras_registrar::WeightInfo; } parameter_types! { @@ -1442,7 +1407,7 @@ impl slots::Config for Runtime { type LeasePeriod = LeasePeriod; type LeaseOffset = (); type ForceOrigin = EitherOf, LeaseAdmin>; - type WeightInfo = weights::runtime_common_slots::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_slots::WeightInfo; } parameter_types! { @@ -1463,7 +1428,7 @@ impl crowdloan::Config for Runtime { type Registrar = Registrar; type Auctioneer = Auctions; type MaxMemoLength = MaxMemoLength; - type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_crowdloan::WeightInfo; } parameter_types! { @@ -1482,7 +1447,7 @@ impl auctions::Config for Runtime { type SampleLength = SampleLength; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type InitiateOrigin = EitherOf, AuctionAdmin>; - type WeightInfo = weights::runtime_common_auctions::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_auctions::WeightInfo; } type NisCounterpartInstance = pallet_balances::Instance2; @@ -1672,8 +1637,7 @@ construct_runtime! { // Utility module. Utility: pallet_utility = 24, - // Less simple identity module. - Identity: pallet_identity = 25, + // pallet_identity = 25 (removed post 1.2.4) // Society module. Society: pallet_society = 26, @@ -1755,9 +1719,6 @@ construct_runtime! { // refer to block. See issue #160 for details. Mmr: pallet_mmr = 201, BeefyMmrLeaf: pallet_beefy_mmr = 202, - - // Pallet for migrating Identity to a parachain. To be removed post-migration. - IdentityMigrator: identity_migrator = 248, } } @@ -1781,6 +1742,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); pub struct NominationPoolsMigrationV4OldPallet; @@ -1808,9 +1770,6 @@ pub mod migrations { #[cfg(feature = "try-runtime")] use sp_core::crypto::ByteArray; - // We don't have a limit in the Relay Chain. - const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX; - pub struct GetLegacyLeaseImpl; impl coretime::migration::GetLegacyLease for GetLegacyLeaseImpl { fn get_parachain_lease_in_blocks(para: ParaId) -> Option { @@ -1855,6 +1814,8 @@ pub mod migrations { parameter_types! { pub const StateTrieMigrationName: &'static str = "StateTrieMigration"; pub const ImOnlinePalletName: &'static str = "ImOnline"; + pub const IdentityPalletName: &'static str = "Identity"; + pub const IdentityMigratorPalletName: &'static str = "IdentityMigrator"; } /// Upgrade Session keys to exclude `ImOnline` key. @@ -1873,10 +1834,7 @@ pub mod migrations { log::info!(target: "runtime::session_keys", "Collecting pre-upgrade session keys state"); let key_ids = SessionKeys::key_ids(); frame_support::ensure!( - key_ids - .into_iter() - .find(|&k| *k == sp_core::crypto::key_types::IM_ONLINE) - .is_none(), + !key_ids.iter().any(|k| *k == sp_core::crypto::key_types::IM_ONLINE), "New session keys contain the ImOnline key that should have been removed", ); let storage_key = pallet_session::QueuedKeys::::hashed_key(); @@ -1892,7 +1850,7 @@ pub mod migrations { state.extend_from_slice(keys.get_raw(*key_id)); } }); - frame_support::ensure!(state.len() > 0, "Queued keys are not empty before upgrade"); + frame_support::ensure!(!state.is_empty(), "Queued keys are not empty before upgrade"); Ok(state) } @@ -1923,7 +1881,10 @@ pub mod migrations { new_state.extend_from_slice(keys.get_raw(*key_id)); } }); - frame_support::ensure!(new_state.len() > 0, "Queued keys are not empty after upgrade"); + frame_support::ensure!( + !new_state.is_empty(), + "Queued keys are not empty after upgrade" + ); frame_support::ensure!( old_state == new_state, "Pre-upgrade and post-upgrade keys do not match!" @@ -1961,13 +1922,221 @@ pub mod migrations { ) { log::debug!(target: "runtime", "Cancelling scheduled auctions failed: {:?}", err); } - weights::runtime_common_auctions::WeightInfo::::cancel_auction() + weights::polkadot_runtime_common_auctions::WeightInfo::::cancel_auction() .saturating_add(weights::pallet_scheduler::WeightInfo::::cancel_named( ::MaxScheduledPerBlock::get(), )) } } + /// Migration to remove deprecated judgement proxies. + mod clear_judgement_proxies { + use super::*; + + use frame_support::{ + pallet_prelude::ValueQuery, + storage_alias, + traits::{Currency, ReservableCurrency}, + Twox64Concat, + }; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_proxy::ProxyDefinition; + use sp_runtime::{BoundedVec, Saturating}; + + /// ProxyType including the deprecated `IdentityJudgement`. + #[derive( + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + TypeInfo, + )] + pub enum PrevProxyType { + Any, + NonTransfer, + Governance, + Staking, + IdentityJudgement, + CancelProxy, + Auction, + Society, + NominationPools, + } + + type BalanceOf = <::Currency as Currency< + ::AccountId, + >>::Balance; + + type PrevProxiesValue = ( + BoundedVec>, MaxProxies>, + BalanceOf, + ); + + /// Proxies including the deprecated `IdentityJudgement` type. + #[storage_alias] + pub type Proxies = StorageMap< + pallet_proxy::Pallet, + Twox64Concat, + AccountId, + PrevProxiesValue, + ValueQuery, + >; + + pub struct Migration; + impl OnRuntimeUpgrade for Migration { + /// Compute the expected post-upgrade state for Proxies stroage, and the reserved value + /// for all accounts with a proxy. + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + let mut expected_proxies: BTreeMap> = + BTreeMap::new(); + let mut expected_reserved_amounts: BTreeMap = BTreeMap::new(); + + for (who, (mut proxies, old_deposit)) in + Proxies::::iter().collect::>() + { + let proxies_len_before = proxies.len() as u64; + proxies.retain(|proxy| proxy.proxy_type != PrevProxyType::IdentityJudgement); + let proxies_len_after = proxies.len() as u64; + + let new_deposit = + pallet_proxy::Pallet::::deposit(proxies.len() as u32); + + let current_reserved = + >::reserved_balance(&who); + + // Update the deposit only if proxies were removed and the deposit decreased. + if new_deposit < old_deposit && proxies_len_after < proxies_len_before { + // If there're no proxies left, they should be removed + if proxies.len() > 0 { + expected_proxies.insert(who.clone(), (proxies, new_deposit)); + } + expected_reserved_amounts.insert( + who, + current_reserved.saturating_sub(old_deposit - new_deposit), + ); + } else { + // Deposit should not change. If any proxies needed to be removed, this + // won't impact that. + expected_proxies.insert(who.clone(), (proxies, old_deposit)); + expected_reserved_amounts.insert(who, current_reserved); + } + } + + let pre_upgrade_state = (expected_proxies, expected_reserved_amounts); + Ok(pre_upgrade_state.encode()) + } + + fn on_runtime_upgrade() -> Weight { + let mut reads = 0u64; + let mut writes = 0u64; + let mut proxies_removed_total = 0u64; + + Proxies::::translate( + |who: AccountId, (mut proxies, old_deposit): PrevProxiesValue| { + // Remove filter out IdentityJudgement proxies. + let proxies_len_before = proxies.len() as u64; + proxies + .retain(|proxy| proxy.proxy_type != PrevProxyType::IdentityJudgement); + let proxies_len_after = proxies.len() as u64; + + let deposit = if proxies_len_before > proxies_len_after { + log::info!( + "Removing {} IdentityJudgement proxies for {:?}", + proxies_len_before - proxies_len_after, + &who + ); + proxies_removed_total + .saturating_accrue(proxies_len_before - proxies_len_after); + + let new_deposit = + pallet_proxy::Pallet::::deposit(proxies.len() as u32); + + // Be kind and don't increase the deposit in case it increased (can + // happen if param change). + let deposit = new_deposit.min(old_deposit); + if deposit < old_deposit { + writes.saturating_inc(); + >::unreserve( + &who, + old_deposit - deposit, + ); + } + + deposit + } else { + // Nothing to do, use the old deposit. + old_deposit + }; + + reads.saturating_accrue(proxies_len_before + 1); + writes.saturating_accrue(proxies_len_after + 1); + + // No need to keep the k/v around if there're no proxies left. + match proxies.is_empty() { + true => { + debug_assert_eq!(deposit, 0); + None + }, + false => Some((proxies, deposit)), + } + }, + ); + + log::info!("Removed {} IdentityJudgement proxies in total", proxies_removed_total); + ::DbWeight::get().reads_writes(reads, writes) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + use frame_support::ensure; + use sp_runtime::TryRuntimeError; + + let (expected_proxies, expected_total_reserved): ( + BTreeMap>, + BTreeMap, + ) = Decode::decode(&mut &state[..]).expect("Failed to decode pre-upgrade state"); + + // Check Proxies storage is as expected + for (who, (proxies, deposit)) in Proxies::::iter() { + match expected_proxies.get(&who) { + Some((expected_proxies, expected_deposit)) => { + ensure!(&proxies == expected_proxies, "Unexpected Proxy"); + ensure!(&deposit == expected_deposit, "Unexpected deposit"); + }, + None => { + return Err(TryRuntimeError::Other("Missing Proxy")); + }, + } + } + + // Check the total reserved amounts for every account is as expected + for (who, expected_reserved) in expected_total_reserved.iter() { + let current_reserved = + >::reserved_balance(who); + + ensure!(current_reserved == *expected_reserved, "Reserved balance mismatch"); + } + + // Check there are no extra entries in the expected state that are not in the + // current state + for (who, _) in expected_proxies.iter() { + if !Proxies::::contains_key(who) { + return Err(TryRuntimeError::Other("Extra entry in expected state")); + } + } + + Ok(()) + } + } + } + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( frame_support::migrations::RemovePallet, @@ -1976,8 +2145,6 @@ pub mod migrations { parachains_configuration::migration::v10::MigrateToV10, parachains_configuration::migration::v11::MigrateToV11, pallet_grandpa::migrations::MigrateV4ToV5, - // Migrate Identity pallet for Usernames - pallet_identity::migration::versioned::V0ToV1, parachains_scheduler::migration::MigrateV1ToV2, // Migrate from legacy lease to coretime. Needs to run after configuration v11 coretime::migration::MigrateToCoretime< @@ -1994,6 +2161,16 @@ pub mod migrations { ::DbWeight, >, CancelAuctions, + // Remove `identity` and `identity-migrator`. + frame_support::migrations::RemovePallet< + IdentityPalletName, + ::DbWeight, + >, + frame_support::migrations::RemovePallet< + IdentityMigratorPalletName, + ::DbWeight, + >, + clear_judgement_proxies::Migration, ); /// Migrations/checks that do not need to be versioned and can run on every update. @@ -2019,12 +2196,9 @@ pub type SignedPayload = generic::SignedPayload; mod benches { frame_benchmarking::define_benchmarks!( // Polkadot - // NOTE: Make sure to prefix these with `polkadot_runtime_common::` so - // that the path resolves correctly in the generated file. [polkadot_runtime_common::auctions, Auctions] [polkadot_runtime_common::crowdloan, Crowdloan] [polkadot_runtime_common::claims, Claims] - [polkadot_runtime_common::identity_migrator, IdentityMigrator] [polkadot_runtime_common::slots, Slots] [polkadot_runtime_common::paras_registrar, Registrar] [runtime_parachains::configuration, Configuration] @@ -2049,7 +2223,6 @@ mod benches { [frame_election_provider_support, ElectionProviderBench::] [pallet_fast_unstake, FastUnstake] [pallet_nis, Nis] - [pallet_identity, Identity] [pallet_indices, Indices] [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] @@ -2565,6 +2738,10 @@ sp_api::impl_runtime_apis! { fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page { Staking::api_eras_stakers_page_count(era, account) } + + fn pending_rewards(era: sp_staking::EraIndex, account: AccountId) -> bool { + Staking::api_pending_rewards(era, account) + } } impl sp_genesis_builder::GenesisBuilder for Runtime { diff --git a/relay/kusama/src/weights/mod.rs b/relay/kusama/src/weights/mod.rs index a2a426d424..21d376bcce 100644 --- a/relay/kusama/src/weights/mod.rs +++ b/relay/kusama/src/weights/mod.rs @@ -26,7 +26,6 @@ pub mod pallet_child_bounties; pub mod pallet_conviction_voting; pub mod pallet_election_provider_multi_phase; pub mod pallet_fast_unstake; -pub mod pallet_identity; pub mod pallet_indices; pub mod pallet_message_queue; pub mod pallet_multisig; @@ -47,12 +46,11 @@ pub mod pallet_utility; pub mod pallet_vesting; pub mod pallet_whitelist; pub mod pallet_xcm; -pub mod runtime_common_auctions; -pub mod runtime_common_claims; -pub mod runtime_common_crowdloan; -pub mod runtime_common_identity_migrator; -pub mod runtime_common_paras_registrar; -pub mod runtime_common_slots; +pub mod polkadot_runtime_common_auctions; +pub mod polkadot_runtime_common_claims; +pub mod polkadot_runtime_common_crowdloan; +pub mod polkadot_runtime_common_paras_registrar; +pub mod polkadot_runtime_common_slots; pub mod runtime_parachains_assigner_on_demand; pub mod runtime_parachains_configuration; pub mod runtime_parachains_coretime; diff --git a/relay/kusama/src/weights/runtime_common_auctions.rs b/relay/kusama/src/weights/polkadot_runtime_common_auctions.rs similarity index 92% rename from relay/kusama/src/weights/runtime_common_auctions.rs rename to relay/kusama/src/weights/polkadot_runtime_common_auctions.rs index 3ae18a8155..5830603d5a 100644 --- a/relay/kusama/src/weights/runtime_common_auctions.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_auctions.rs @@ -13,12 +13,13 @@ // 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 `polkadot_runtime_common::auctions` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl polkadot_runtime_common::auctions::WeightInfo for // Proof Size summary in bytes: // Measured: `4` // Estimated: `1493` - // Minimum execution time: 7_667_000 picoseconds. - Weight::from_parts(7_995_000, 0) + // Minimum execution time: 9_260_000 picoseconds. + Weight::from_parts(9_510_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -78,8 +79,8 @@ impl polkadot_runtime_common::auctions::WeightInfo for // Proof Size summary in bytes: // Measured: `695` // Estimated: `6060` - // Minimum execution time: 66_644_000 picoseconds. - Weight::from_parts(69_287_000, 0) + // Minimum execution time: 107_190_000 picoseconds. + Weight::from_parts(121_620_000, 0) .saturating_add(Weight::from_parts(0, 6060)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) @@ -110,8 +111,8 @@ impl polkadot_runtime_common::auctions::WeightInfo for // Proof Size summary in bytes: // Measured: `6946955` // Estimated: `15822990` - // Minimum execution time: 7_034_503_000 picoseconds. - Weight::from_parts(7_143_252_000, 0) + // Minimum execution time: 9_051_931_000 picoseconds. + Weight::from_parts(9_227_043_000, 0) .saturating_add(Weight::from_parts(0, 15822990)) .saturating_add(T::DbWeight::get().reads(3687)) .saturating_add(T::DbWeight::get().writes(3682)) @@ -128,8 +129,8 @@ impl polkadot_runtime_common::auctions::WeightInfo for // Proof Size summary in bytes: // Measured: `177732` // Estimated: `15822990` - // Minimum execution time: 5_483_280_000 picoseconds. - Weight::from_parts(5_678_419_000, 0) + // Minimum execution time: 7_352_693_000 picoseconds. + Weight::from_parts(7_586_335_000, 0) .saturating_add(Weight::from_parts(0, 15822990)) .saturating_add(T::DbWeight::get().reads(3673)) .saturating_add(T::DbWeight::get().writes(3673)) diff --git a/relay/kusama/src/weights/runtime_common_claims.rs b/relay/kusama/src/weights/polkadot_runtime_common_claims.rs similarity index 92% rename from relay/kusama/src/weights/runtime_common_claims.rs rename to relay/kusama/src/weights/polkadot_runtime_common_claims.rs index 30d89a7011..af9c1b92a8 100644 --- a/relay/kusama/src/weights/runtime_common_claims.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_claims.rs @@ -13,12 +13,13 @@ // 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 `polkadot_runtime_common::claims` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -66,8 +67,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `612` // Estimated: `4764` - // Minimum execution time: 179_772_000 picoseconds. - Weight::from_parts(197_595_000, 0) + // Minimum execution time: 181_801_000 picoseconds. + Weight::from_parts(195_321_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -84,8 +85,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `216` // Estimated: `1701` - // Minimum execution time: 11_512_000 picoseconds. - Weight::from_parts(13_403_000, 0) + // Minimum execution time: 11_890_000 picoseconds. + Weight::from_parts(12_420_000, 0) .saturating_add(Weight::from_parts(0, 1701)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(4)) @@ -110,8 +111,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `612` // Estimated: `4764` - // Minimum execution time: 187_398_000 picoseconds. - Weight::from_parts(199_940_000, 0) + // Minimum execution time: 185_201_000 picoseconds. + Weight::from_parts(194_731_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -138,8 +139,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `686` // Estimated: `4764` - // Minimum execution time: 81_793_000 picoseconds. - Weight::from_parts(86_613_000, 0) + // Minimum execution time: 75_611_000 picoseconds. + Weight::from_parts(79_870_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -156,8 +157,8 @@ impl polkadot_runtime_common::claims::WeightInfo for We // Proof Size summary in bytes: // Measured: `440` // Estimated: `3905` - // Minimum execution time: 31_787_000 picoseconds. - Weight::from_parts(35_432_000, 0) + // Minimum execution time: 28_871_000 picoseconds. + Weight::from_parts(31_451_000, 0) .saturating_add(Weight::from_parts(0, 3905)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(7)) diff --git a/relay/kusama/src/weights/runtime_common_crowdloan.rs b/relay/kusama/src/weights/polkadot_runtime_common_crowdloan.rs similarity index 89% rename from relay/kusama/src/weights/runtime_common_crowdloan.rs rename to relay/kusama/src/weights/polkadot_runtime_common_crowdloan.rs index ea9cf9a120..6dfa061100 100644 --- a/relay/kusama/src/weights/runtime_common_crowdloan.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_crowdloan.rs @@ -13,12 +13,13 @@ // 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 `polkadot_runtime_common::crowdloan` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -60,8 +61,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `438` // Estimated: `3903` - // Minimum execution time: 46_789_000 picoseconds. - Weight::from_parts(51_028_000, 0) + // Minimum execution time: 84_580_000 picoseconds. + Weight::from_parts(86_900_000, 0) .saturating_add(Weight::from_parts(0, 3903)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -84,8 +85,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `497` // Estimated: `3962` - // Minimum execution time: 135_300_000 picoseconds. - Weight::from_parts(139_837_000, 0) + // Minimum execution time: 208_191_000 picoseconds. + Weight::from_parts(213_831_000, 0) .saturating_add(Weight::from_parts(0, 3962)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -100,8 +101,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `687` // Estimated: `6196` - // Minimum execution time: 70_040_000 picoseconds. - Weight::from_parts(72_140_000, 0) + // Minimum execution time: 117_641_000 picoseconds. + Weight::from_parts(120_270_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -113,11 +114,11 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `125 + k * (189 ±0)` // Estimated: `138 + k * (189 ±0)` - // Minimum execution time: 46_258_000 picoseconds. - Weight::from_parts(49_158_000, 0) + // Minimum execution time: 95_190_000 picoseconds. + Weight::from_parts(115_630_000, 0) .saturating_add(Weight::from_parts(0, 138)) - // Standard Error: 21_760 - .saturating_add(Weight::from_parts(39_151_058, 0).saturating_mul(k.into())) + // Standard Error: 21_856 + .saturating_add(Weight::from_parts(47_090_016, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -132,8 +133,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `514` // Estimated: `6196` - // Minimum execution time: 43_030_000 picoseconds. - Weight::from_parts(47_333_000, 0) + // Minimum execution time: 70_160_000 picoseconds. + Weight::from_parts(71_870_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -144,8 +145,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `234` // Estimated: `3699` - // Minimum execution time: 22_206_000 picoseconds. - Weight::from_parts(23_970_000, 0) + // Minimum execution time: 35_150_000 picoseconds. + Weight::from_parts(43_160_000, 0) .saturating_add(Weight::from_parts(0, 3699)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -158,8 +159,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `412` // Estimated: `3877` - // Minimum execution time: 29_089_000 picoseconds. - Weight::from_parts(31_068_000, 0) + // Minimum execution time: 57_721_000 picoseconds. + Weight::from_parts(60_670_000, 0) .saturating_add(Weight::from_parts(0, 3877)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,8 +173,8 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `238` // Estimated: `3703` - // Minimum execution time: 20_611_000 picoseconds. - Weight::from_parts(22_158_000, 0) + // Minimum execution time: 40_560_000 picoseconds. + Weight::from_parts(42_320_000, 0) .saturating_add(Weight::from_parts(0, 3703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -203,11 +204,11 @@ impl polkadot_runtime_common::crowdloan::WeightInfo for // Proof Size summary in bytes: // Measured: `163 + n * (356 ±0)` // Estimated: `5385 + n * (2832 ±0)` - // Minimum execution time: 117_484_000 picoseconds. - Weight::from_parts(17_569_702, 0) + // Minimum execution time: 163_171_000 picoseconds. + Weight::from_parts(168_321_000, 0) .saturating_add(Weight::from_parts(0, 5385)) - // Standard Error: 42_632 - .saturating_add(Weight::from_parts(53_393_948, 0).saturating_mul(n.into())) + // Standard Error: 67_691 + .saturating_add(Weight::from_parts(63_637_866, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/kusama/src/weights/runtime_common_paras_registrar.rs b/relay/kusama/src/weights/polkadot_runtime_common_paras_registrar.rs similarity index 91% rename from relay/kusama/src/weights/runtime_common_paras_registrar.rs rename to relay/kusama/src/weights/polkadot_runtime_common_paras_registrar.rs index da7ef411a5..1179c86e00 100644 --- a/relay/kusama/src/weights/runtime_common_paras_registrar.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_paras_registrar.rs @@ -13,12 +13,13 @@ // 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 `polkadot_runtime_common::paras_registrar` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -56,8 +57,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `96` // Estimated: `3561` - // Minimum execution time: 24_391_000 picoseconds. - Weight::from_parts(25_596_000, 0) + // Minimum execution time: 31_540_000 picoseconds. + Weight::from_parts(32_340_000, 0) .saturating_add(Weight::from_parts(0, 3561)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -84,8 +85,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `389` // Estimated: `3854` - // Minimum execution time: 5_993_849_000 picoseconds. - Weight::from_parts(6_011_821_000, 0) + // Minimum execution time: 7_219_003_000 picoseconds. + Weight::from_parts(7_330_365_000, 0) .saturating_add(Weight::from_parts(0, 3854)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) @@ -112,8 +113,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `306` // Estimated: `3771` - // Minimum execution time: 5_996_100_000 picoseconds. - Weight::from_parts(6_054_571_000, 0) + // Minimum execution time: 7_190_134_000 picoseconds. + Weight::from_parts(7_323_625_000, 0) .saturating_add(Weight::from_parts(0, 3771)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) @@ -136,8 +137,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `503` // Estimated: `3968` - // Minimum execution time: 50_060_000 picoseconds. - Weight::from_parts(52_092_000, 0) + // Minimum execution time: 93_270_000 picoseconds. + Weight::from_parts(95_591_000, 0) .saturating_add(Weight::from_parts(0, 3968)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -160,8 +161,8 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `775` // Estimated: `6715` - // Minimum execution time: 57_116_000 picoseconds. - Weight::from_parts(61_543_000, 0) + // Minimum execution time: 98_071_000 picoseconds. + Weight::from_parts(110_881_000, 0) .saturating_add(Weight::from_parts(0, 6715)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(8)) @@ -189,11 +190,11 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `238` // Estimated: `3703` - // Minimum execution time: 32_785_000 picoseconds. - Weight::from_parts(33_247_000, 0) + // Minimum execution time: 39_550_000 picoseconds. + Weight::from_parts(39_990_000, 0) .saturating_add(Weight::from_parts(0, 3703)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(2_232, 0).saturating_mul(b.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(2_266, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -204,11 +205,11 @@ impl polkadot_runtime_common::paras_registrar::WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_970_000 picoseconds. - Weight::from_parts(7_513_782, 0) + // Minimum execution time: 7_420_000 picoseconds. + Weight::from_parts(7_500_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(910, 0).saturating_mul(b.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(803, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/relay/kusama/src/weights/runtime_common_slots.rs b/relay/kusama/src/weights/polkadot_runtime_common_slots.rs similarity index 85% rename from relay/kusama/src/weights/runtime_common_slots.rs rename to relay/kusama/src/weights/polkadot_runtime_common_slots.rs index dccac44368..48d0e6bbd9 100644 --- a/relay/kusama/src/weights/runtime_common_slots.rs +++ b/relay/kusama/src/weights/polkadot_runtime_common_slots.rs @@ -13,12 +13,13 @@ // 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 `polkadot_runtime_common::slots` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl polkadot_runtime_common::slots::WeightInfo for Wei // Proof Size summary in bytes: // Measured: `254` // Estimated: `3719` - // Minimum execution time: 26_919_000 picoseconds. - Weight::from_parts(27_818_000, 0) + // Minimum execution time: 34_210_000 picoseconds. + Weight::from_parts(34_940_000, 0) .saturating_add(Weight::from_parts(0, 3719)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -74,15 +75,15 @@ impl polkadot_runtime_common::slots::WeightInfo for Wei /// The range of component `t` is `[0, 100]`. fn manage_lease_period_start(c: u32, t: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `591 + c * (20 ±0) + t * (234 ±0)` - // Estimated: `4062 + c * (2496 ±0) + t * (2709 ±0)` - // Minimum execution time: 704_222_000 picoseconds. - Weight::from_parts(708_202_000, 0) - .saturating_add(Weight::from_parts(0, 4062)) - // Standard Error: 84_256 - .saturating_add(Weight::from_parts(2_736_859, 0).saturating_mul(c.into())) - // Standard Error: 84_256 - .saturating_add(Weight::from_parts(8_817_667, 0).saturating_mul(t.into())) + // Measured: `480 + c * (20 ±0) + t * (234 ±0)` + // Estimated: `3951 + c * (2496 ±0) + t * (2709 ±0)` + // Minimum execution time: 921_855_000 picoseconds. + Weight::from_parts(938_995_000, 0) + .saturating_add(Weight::from_parts(0, 3951)) + // Standard Error: 110_059 + .saturating_add(Weight::from_parts(3_418_523, 0).saturating_mul(c.into())) + // Standard Error: 110_059 + .saturating_add(Weight::from_parts(11_178_525, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) @@ -100,8 +101,8 @@ impl polkadot_runtime_common::slots::WeightInfo for Wei // Proof Size summary in bytes: // Measured: `2726` // Estimated: `21814` - // Minimum execution time: 119_905_000 picoseconds. - Weight::from_parts(124_276_000, 0) + // Minimum execution time: 176_251_000 picoseconds. + Weight::from_parts(181_651_000, 0) .saturating_add(Weight::from_parts(0, 21814)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(9)) @@ -118,8 +119,8 @@ impl polkadot_runtime_common::slots::WeightInfo for Wei // Proof Size summary in bytes: // Measured: `550` // Estimated: `4015` - // Minimum execution time: 25_135_000 picoseconds. - Weight::from_parts(26_140_000, 0) + // Minimum execution time: 51_250_000 picoseconds. + Weight::from_parts(54_190_000, 0) .saturating_add(Weight::from_parts(0, 4015)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/relay/kusama/src/weights/runtime_parachains_hrmp.rs b/relay/kusama/src/weights/runtime_parachains_hrmp.rs index 0e229ab21d..0f30f1c91c 100644 --- a/relay/kusama/src/weights/runtime_parachains_hrmp.rs +++ b/relay/kusama/src/weights/runtime_parachains_hrmp.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -66,8 +66,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `421` // Estimated: `3886` - // Minimum execution time: 34_128_000 picoseconds. - Weight::from_parts(35_256_000, 0) + // Minimum execution time: 42_630_000 picoseconds. + Weight::from_parts(43_590_000, 0) .saturating_add(Weight::from_parts(0, 3886)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) @@ -86,8 +86,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `411` // Estimated: `3876` - // Minimum execution time: 30_651_000 picoseconds. - Weight::from_parts(31_490_000, 0) + // Minimum execution time: 37_370_000 picoseconds. + Weight::from_parts(38_230_000, 0) .saturating_add(Weight::from_parts(0, 3876)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -106,8 +106,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `524` // Estimated: `3989` - // Minimum execution time: 31_244_000 picoseconds. - Weight::from_parts(32_392_000, 0) + // Minimum execution time: 38_720_000 picoseconds. + Weight::from_parts(39_180_000, 0) .saturating_add(Weight::from_parts(0, 3989)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -130,13 +130,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `231 + e * (100 ±0) + i * (100 ±0)` // Estimated: `3693 + e * (2575 ±0) + i * (2575 ±0)` - // Minimum execution time: 1_177_153_000 picoseconds. - Weight::from_parts(1_192_970_000, 0) + // Minimum execution time: 1_398_677_000 picoseconds. + Weight::from_parts(1_404_458_000, 0) .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 106_710 - .saturating_add(Weight::from_parts(3_503_154, 0).saturating_mul(i.into())) - // Standard Error: 106_710 - .saturating_add(Weight::from_parts(3_480_995, 0).saturating_mul(e.into())) + // Standard Error: 132_665 + .saturating_add(Weight::from_parts(4_185_824, 0).saturating_mul(i.into())) + // Standard Error: 132_665 + .saturating_add(Weight::from_parts(4_236_545, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(e.into()))) @@ -167,11 +167,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `459 + c * (136 ±0)` // Estimated: `1914 + c * (5086 ±0)` - // Minimum execution time: 5_963_000 picoseconds. - Weight::from_parts(5_228_724, 0) + // Minimum execution time: 7_470_000 picoseconds. + Weight::from_parts(7_620_000, 0) .saturating_add(Weight::from_parts(0, 1914)) - // Standard Error: 15_470 - .saturating_add(Weight::from_parts(20_514_191, 0).saturating_mul(c.into())) + // Standard Error: 11_220 + .saturating_add(Weight::from_parts(24_184_130, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -195,11 +195,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `302 + c * (124 ±0)` // Estimated: `1762 + c * (2600 ±0)` - // Minimum execution time: 4_969_000 picoseconds. - Weight::from_parts(7_208_744, 0) + // Minimum execution time: 6_500_000 picoseconds. + Weight::from_parts(6_580_000, 0) .saturating_add(Weight::from_parts(0, 1762)) - // Standard Error: 10_032 - .saturating_add(Weight::from_parts(12_527_166, 0).saturating_mul(c.into())) + // Standard Error: 11_719 + .saturating_add(Weight::from_parts(14_859_948, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -217,11 +217,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `993 + c * (13 ±0)` // Estimated: `4262 + c * (15 ±0)` - // Minimum execution time: 18_800_000 picoseconds. - Weight::from_parts(27_965_586, 0) + // Minimum execution time: 23_070_000 picoseconds. + Weight::from_parts(28_858_348, 0) .saturating_add(Weight::from_parts(0, 4262)) - // Standard Error: 2_135 - .saturating_add(Weight::from_parts(84_530, 0).saturating_mul(c.into())) + // Standard Error: 1_253 + .saturating_add(Weight::from_parts(95_052, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 15).saturating_mul(c.into())) @@ -235,11 +235,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `210 + c * (63 ±0)` // Estimated: `1689 + c * (2538 ±0)` - // Minimum execution time: 3_642_000 picoseconds. - Weight::from_parts(6_869_380, 0) + // Minimum execution time: 4_760_000 picoseconds. + Weight::from_parts(6_559_187, 0) .saturating_add(Weight::from_parts(0, 1689)) - // Standard Error: 3_822 - .saturating_add(Weight::from_parts(3_165_608, 0).saturating_mul(c.into())) + // Standard Error: 2_407 + .saturating_add(Weight::from_parts(3_748_834, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -271,11 +271,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `421 + c * (235 ±0)` // Estimated: `6361 + c * (235 ±0)` - // Minimum execution time: 48_286_000 picoseconds. - Weight::from_parts(50_472_132, 0) + // Minimum execution time: 58_270_000 picoseconds. + Weight::from_parts(59_761_806, 0) .saturating_add(Weight::from_parts(0, 6361)) - // Standard Error: 139_702 - .saturating_add(Weight::from_parts(10_844_067, 0).saturating_mul(c.into())) + // Standard Error: 71_483 + .saturating_add(Weight::from_parts(12_836_993, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 235).saturating_mul(c.into())) @@ -304,8 +304,8 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `421` // Estimated: `6361` - // Minimum execution time: 48_480_000 picoseconds. - Weight::from_parts(49_938_000, 0) + // Minimum execution time: 58_761_000 picoseconds. + Weight::from_parts(59_590_000, 0) .saturating_add(Weight::from_parts(0, 6361)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) @@ -316,10 +316,40 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `230` // Estimated: `3695` - // Minimum execution time: 11_525_000 picoseconds. - Weight::from_parts(12_232_000, 0) + // Minimum execution time: 14_750_000 picoseconds. + Weight::from_parts(15_250_000, 0) .saturating_add(Weight::from_parts(0, 3695)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Paras::ParaLifecycles` (r:2 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequests` (r:2 w:2) + /// Proof: `Hrmp::HrmpOpenChannelRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpChannels` (r:2 w:0) + /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpEgressChannelsIndex` (r:2 w:0) + /// Proof: `Hrmp::HrmpEgressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestCount` (r:2 w:2) + /// Proof: `Hrmp::HrmpOpenChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestsList` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequestsList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpIngressChannelsIndex` (r:2 w:0) + /// Proof: `Hrmp::HrmpIngressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpAcceptedChannelRequestCount` (r:2 w:2) + /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn establish_channel_with_system() -> Weight { + // Proof Size summary in bytes: + // Measured: `421` + // Estimated: `6361` + // Minimum execution time: 95_251_000 picoseconds. + Weight::from_parts(96_051_000, 0) + .saturating_add(Weight::from_parts(0, 6361)) + .saturating_add(T::DbWeight::get().reads(19)) + .saturating_add(T::DbWeight::get().writes(11)) + } } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index b2cf870f7e..c7f8c92b6b 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -50,6 +50,7 @@ pallet-conviction-voting = { workspace = true } pallet-election-provider-multi-phase = { workspace = true } pallet-fast-unstake = { workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } pallet-grandpa = { workspace = true } pallet-identity = { workspace = true } pallet-indices = { workspace = true } @@ -110,7 +111,7 @@ tokio = { features = ["macros"], workspace = true } sp-tracing = { workspace = true } [build-dependencies] -substrate-wasm-builder = { workspace = true } +substrate-wasm-builder = { workspace = true, optional = true } [features] default = ["std"] @@ -125,6 +126,7 @@ std = [ "frame-benchmarking?/std", "frame-election-provider-support/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -180,6 +182,7 @@ std = [ "polkadot-runtime-constants/std", "runtime-parachains/std", "scale-info/std", + "substrate-wasm-builder", "sp-api/std", "sp-application-crypto/std", "sp-arithmetic/std", @@ -298,10 +301,13 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] diff --git a/relay/polkadot/build.rs b/relay/polkadot/build.rs index 428c971bc1..788c2d6962 100644 --- a/relay/polkadot/build.rs +++ b/relay/polkadot/build.rs @@ -6,7 +6,7 @@ // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Substrate is distributed in the hope that it will be useful, +// 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. @@ -14,12 +14,17 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use substrate_wasm_builder::WasmBuilder; +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] +fn main() { + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} +#[cfg(all(feature = "std", feature = "metadata-hash"))] fn main() { - WasmBuilder::new() - .with_current_project() - .import_memory() - .export_heap_base() + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) .build() } + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/relay/polkadot/constants/src/lib.rs b/relay/polkadot/constants/src/lib.rs index 49cc6b3560..58254291f5 100644 --- a/relay/polkadot/constants/src/lib.rs +++ b/relay/polkadot/constants/src/lib.rs @@ -72,7 +72,7 @@ pub mod fee { /// The block saturation level. Fees will be updates based on this value. pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25); - /// Cost of every transaction byte at Kusama relay chain. + /// Cost of every transaction byte at Polkadot relay chain. pub const TRANSACTION_BYTE_FEE: Balance = 10 * super::currency::MILLICENTS; /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the @@ -129,6 +129,8 @@ pub mod system_parachain { pub const COLLECTIVES_ID: u32 = 1001; /// Bridge Hub parachain ID. pub const BRIDGE_HUB_ID: u32 = 1002; + /// People parachain ID. + pub const PEOPLE_ID: u32 = 1004; // System parachains from Polkadot point of view. pub type SystemParachains = IsChildSystemParachain; diff --git a/relay/polkadot/src/impls.rs b/relay/polkadot/src/impls.rs index 8d2d76d224..efce64c99a 100644 --- a/relay/polkadot/src/impls.rs +++ b/relay/polkadot/src/impls.rs @@ -15,10 +15,170 @@ // along with Polkadot. If not, see . use super::*; +use codec::{Decode, Encode}; use core::marker::PhantomData; -use frame_support::traits::{tokens::ConversionFromAssetBalance, Contains}; +use frame_support::{ + defensive, + pallet_prelude::DispatchResult, + traits::{tokens::ConversionFromAssetBalance, Contains}, +}; +use frame_system::RawOrigin; use polkadot_primitives::Id as ParaId; +use polkadot_runtime_common::identity_migrator::{OnReapIdentity, WeightInfo}; +use polkadot_runtime_constants::system_parachain::PEOPLE_ID; +use xcm::{latest::prelude::*, VersionedXcm}; use xcm_builder::IsChildSystemParachain; +use xcm_executor::traits::TransactAsset; + +/// A type containing the encoding of the People Chain pallets in its runtime. Used to construct any +/// remote calls. The codec index must correspond to the index of `IdentityMigrator` in the +/// `construct_runtime` of the remote chain. +#[derive(Encode, Decode)] +enum PeopleRuntimePallets { + #[codec(index = 248)] + IdentityMigrator(IdentityMigratorCalls), +} + +/// Call encoding for the calls needed from the Identity Migrator pallet. +#[derive(Encode, Decode)] +enum IdentityMigratorCalls { + #[codec(index = 1)] + PokeDeposit(AccountId), +} + +/// Type that implements `OnReapIdentity` that will send the deposit needed to store the same +/// information on a parachain, sends the deposit there, and then updates it. +pub struct ToParachainIdentityReaper(PhantomData<(Runtime, AccountId)>); +impl ToParachainIdentityReaper { + /// Calculate the balance needed on the remote chain based on the `IdentityInfo` and `Subs` on + /// this chain. The total includes: + /// + /// - Identity basic deposit + /// - `IdentityInfo` byte deposit + /// - Sub accounts deposit + /// - 2x existential deposit (1 for account existence, 1 such that the user can transact) + fn calculate_remote_deposit(bytes: u32, subs: u32) -> Balance { + // Remote deposit constants. Parachain uses `deposit / 100` + // Source: + // https://github.com/polkadot-fellows/runtimes/blob/b0a3eff/system-parachains/constants/src/polkadot.rs#L70 + // + // Parachain Deposit Configuration: + // + // pub const BasicDeposit: Balance = deposit(1, 17); + // pub const ByteDeposit: Balance = deposit(0, 1); + // pub const SubAccountDeposit: Balance = deposit(1, 53); + // pub const EXISTENTIAL_DEPOSIT: Balance = constants::currency::EXISTENTIAL_DEPOSIT / 10; + let para_basic_deposit = deposit(1, 17) / 100; + let para_byte_deposit = deposit(0, 1) / 100; + let para_sub_account_deposit = deposit(1, 53) / 100; + let para_existential_deposit = EXISTENTIAL_DEPOSIT / 10; + + // pallet deposits + let id_deposit = + para_basic_deposit.saturating_add(para_byte_deposit.saturating_mul(bytes as Balance)); + let subs_deposit = para_sub_account_deposit.saturating_mul(subs as Balance); + + id_deposit + .saturating_add(subs_deposit) + .saturating_add(para_existential_deposit.saturating_mul(2)) + } +} + +// Note / Warning: This implementation should only be used in a transactional context. If not, then +// an error could result in assets being burned. +impl OnReapIdentity for ToParachainIdentityReaper +where + Runtime: frame_system::Config + pallet_xcm::Config, + AccountId: Into<[u8; 32]> + Clone + Encode, +{ + fn on_reap_identity(who: &AccountId, fields: u32, subs: u32) -> DispatchResult { + use crate::{ + impls::IdentityMigratorCalls::PokeDeposit, + weights::polkadot_runtime_common_identity_migrator::WeightInfo as MigratorWeights, + }; + + let total_to_send = Self::calculate_remote_deposit(fields, subs); + + // define asset / destination from relay perspective + let dot = Asset { id: AssetId(Here.into_location()), fun: Fungible(total_to_send) }; + // People Chain + let destination: Location = Location::new(0, Parachain(PEOPLE_ID)); + + // Do `check_out` accounting since the XCM Executor's `InitiateTeleport` doesn't support + // unpaid teleports. + + // withdraw the asset from `who` + let who_origin = + Junction::AccountId32 { network: None, id: who.clone().into() }.into_location(); + let _withdrawn = xcm_config::LocalAssetTransactor::withdraw_asset(&dot, &who_origin, None) + .map_err(|err| { + defensive!( + "runtime::on_reap_identity: withdraw_asset(what: {:?}, who_origin: {:?}) error: {:?}", + (&dot, &who_origin, err) + ); + pallet_xcm::Error::::LowBalance + })?; + + // check out + xcm_config::LocalAssetTransactor::can_check_out( + &destination, + &dot, + // not used in AssetTransactor + &XcmContext { origin: None, message_id: [0; 32], topic: None }, + ) + .map_err(|err| { + log::error!( + target: "runtime::on_reap_identity", + "can_check_out(destination: {:?}, asset: {:?}, _) error: {:?}", + destination, dot, err + ); + pallet_xcm::Error::::CannotCheckOutTeleport + })?; + xcm_config::LocalAssetTransactor::check_out( + &destination, + &dot, + // not used in AssetTransactor + &XcmContext { origin: None, message_id: [0; 32], topic: None }, + ); + + // reanchor + let dot_reanchored: Assets = + vec![Asset { id: AssetId(Location::new(1, Here)), fun: Fungible(total_to_send) }] + .into(); + + let poke = PeopleRuntimePallets::::IdentityMigrator(PokeDeposit(who.clone())); + let remote_weight_limit = MigratorWeights::::poke_deposit().saturating_mul(2); + + // Actual program to execute on People Chain. + let program: Xcm<()> = Xcm(vec![ + // Unpaid as this is constructed by the system, once per user. The user shouldn't have + // their balance reduced by teleport fees for the favor of migrating. + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + // Receive the asset into holding. + ReceiveTeleportedAsset(dot_reanchored), + // Deposit into the user's account. + DepositAsset { + assets: Wild(AllCounted(1)), + beneficiary: Junction::AccountId32 { network: None, id: who.clone().into() } + .into_location(), + }, + // Poke the deposit to reserve the appropriate amount on the parachain. + Transact { + origin_kind: OriginKind::Superuser, + require_weight_at_most: remote_weight_limit, + call: poke.encode().into(), + }, + ]); + + // send + >::send( + RawOrigin::Root.into(), + Box::new(VersionedLocation::V4(destination)), + Box::new(VersionedXcm::V4(program)), + )?; + Ok(()) + } +} // TODO: replace by types from polkadot-sdk https://github.com/paritytech/polkadot-sdk/pull/3659 /// Determines if the given `asset_kind` is a native asset. If it is, returns the balance without @@ -56,3 +216,33 @@ where I::ensure_successful(asset_kind) } } + +#[cfg(feature = "runtime-benchmarks")] +pub mod benchmarks { + use super::{xcm_config::CheckAccount, ExistentialDeposit}; + use crate::Balances; + use frame_support::{ + dispatch::RawOrigin, + traits::{Currency, EnsureOrigin}, + }; + + pub struct InitializeReaperForBenchmarking(core::marker::PhantomData<(A, E)>); + impl, O>> + From>, E: EnsureOrigin> + EnsureOrigin for InitializeReaperForBenchmarking + { + type Success = E::Success; + + fn try_origin(o: O) -> Result { + E::try_origin(o) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + // initialize the XCM Check Account with the existential deposit + Balances::make_free_balance_be(&CheckAccount::get(), ExistentialDeposit::get()); + + // call the real implementation + E::try_successful_origin() + } + } +} diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 387727b54f..a3826f1eac 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -20,9 +20,9 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "512"] -use pallet_transaction_payment::CurrencyAdapter; +use pallet_transaction_payment::FungibleAdapter; use polkadot_runtime_common::{ - auctions, claims, crowdloan, impl_runtime_weights, + auctions, claims, crowdloan, identity_migrator, impl_runtime_weights, impls::{ DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }, @@ -32,7 +32,9 @@ use polkadot_runtime_common::{ use runtime_parachains::{ assigner_parachains as parachains_assigner_parachains, - configuration as parachains_configuration, disputes as parachains_disputes, + configuration as parachains_configuration, + configuration::ActiveConfigHrmpChannelSizeAndCapacityRatio, + disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, inclusion::{AggregateMessageOrigin, UmpQueueId}, @@ -59,8 +61,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Everything, Get, - InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, + fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, EverythingBut, + Get, InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError, WithdrawReasons, }, weights::{ConstantMultiplier, WeightMeter}, @@ -132,6 +134,11 @@ use governance::{ pub mod impls; pub mod xcm_config; +use impls::ToParachainIdentityReaper; + +#[cfg(not(feature = "runtime-benchmarks"))] +use frame_system::EnsureSigned; + pub const LOG_TARGET: &str = "runtime::polkadot"; use polkadot_runtime_common as runtime_common; @@ -148,10 +155,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadot"), impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 0, - spec_version: 1_002_004, + spec_version: 1_002_007, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 25, + transaction_version: 26, state_version: 1, }; @@ -173,8 +180,19 @@ parameter_types! { pub const SS58Prefix: u8 = 0; } +/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation, +/// locking the state of the pallet and preventing further updates to identities and sub-identities. +/// The locked state will be the genesis state of a new system chain and then removed from the Relay +/// Chain. +pub struct IsIdentityCall; +impl Contains for IsIdentityCall { + fn contains(c: &RuntimeCall) -> bool { + matches!(c, RuntimeCall::Identity(_)) + } +} + impl frame_system::Config for Runtime { - type BaseCallFilter = Everything; + type BaseCallFilter = EverythingBut; type BlockWeights = BlockWeights; type BlockLength = BlockLength; type RuntimeOrigin = RuntimeOrigin; @@ -410,7 +428,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = CurrencyAdapter>; + type OnChargeTransaction = FungibleAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; @@ -842,6 +860,17 @@ impl pallet_identity::Config for Runtime { type WeightInfo = weights::pallet_identity::WeightInfo; } +impl identity_migrator::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + #[cfg(not(feature = "runtime-benchmarks"))] + type Reaper = EnsureSigned; + #[cfg(feature = "runtime-benchmarks")] + type Reaper = + impls::benchmarks::InitializeReaperForBenchmarking>; + type ReapIdentityHandler = ToParachainIdentityReaper; + type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo; +} + parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 100 * DOLLARS; @@ -1009,6 +1038,7 @@ where frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(tip), claims::PrevalidateAttests::::new(), + frame_metadata_hash_extension::CheckMetadataHash::new(false), ); let raw_payload = SignedPayload::new(call, extra) .map_err(|e| { @@ -1051,7 +1081,7 @@ impl claims::Config for Runtime { type Prefix = Prefix; /// Only Root can move a claim. type MoveClaimOrigin = EnsureRoot; - type WeightInfo = weights::runtime_common_claims::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_claims::WeightInfo; } parameter_types! { @@ -1365,11 +1395,22 @@ impl pallet_message_queue::Config for Runtime { impl parachains_dmp::Config for Runtime {} +parameter_types! { + pub const HrmpChannelSizeAndCapacityWithSystemRatio: Percent = Percent::from_percent(100); +} + impl parachains_hrmp::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; type ChannelManager = EitherOf, GeneralAdmin>; type Currency = Balances; + // Use the `HrmpChannelSizeAndCapacityWithSystemRatio` ratio from the actual active + // `HostConfiguration` configuration for `hrmp_channel_max_message_size` and + // `hrmp_channel_max_capacity`. + type DefaultChannelSizeAndCapacityWithSystem = ActiveConfigHrmpChannelSizeAndCapacityRatio< + Runtime, + HrmpChannelSizeAndCapacityWithSystemRatio, + >; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } @@ -1428,7 +1469,7 @@ impl paras_registrar::Config for Runtime { type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; type DataDepositPerByte = ParaDataByteDeposit; - type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_paras_registrar::WeightInfo; } parameter_types! { @@ -1449,7 +1490,7 @@ impl slots::Config for Runtime { type LeasePeriod = LeasePeriod; type LeaseOffset = LeaseOffset; type ForceOrigin = EitherOf, LeaseAdmin>; - type WeightInfo = weights::runtime_common_slots::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_slots::WeightInfo; } parameter_types! { @@ -1473,7 +1514,7 @@ impl crowdloan::Config for Runtime { type Registrar = Registrar; type Auctioneer = Auctions; type MaxMemoLength = MaxMemoLength; - type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_crowdloan::WeightInfo; } parameter_types! { @@ -1492,7 +1533,7 @@ impl auctions::Config for Runtime { type SampleLength = SampleLength; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type InitiateOrigin = EitherOf, AuctionAdmin>; - type WeightInfo = weights::runtime_common_auctions::WeightInfo; + type WeightInfo = weights::polkadot_runtime_common_auctions::WeightInfo; } parameter_types! { @@ -1737,6 +1778,9 @@ construct_runtime! { // refer to block. See issue #160 for details. Mmr: pallet_mmr = 201, BeefyMmrLeaf: pallet_beefy_mmr = 202, + + // Pallet for migrating Identity to a parachain. To be removed post-migration. + IdentityMigrator: identity_migrator = 248, } } @@ -1761,6 +1805,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, claims::PrevalidateAttests, + frame_metadata_hash_extension::CheckMetadataHash, ); pub struct NominationPoolsMigrationV4OldPallet; @@ -1910,11 +1955,10 @@ pub type SignedPayload = generic::SignedPayload; mod benches { frame_benchmarking::define_benchmarks!( // Polkadot - // NOTE: Make sure to prefix these with `polkadot_runtime_common::` so - // the that path resolves correctly in the generated file. [polkadot_runtime_common::auctions, Auctions] [polkadot_runtime_common::claims, Claims] [polkadot_runtime_common::crowdloan, Crowdloan] + [polkadot_runtime_common::identity_migrator, IdentityMigrator] [polkadot_runtime_common::slots, Slots] [polkadot_runtime_common::paras_registrar, Registrar] [runtime_parachains::configuration, Configuration] @@ -2037,6 +2081,10 @@ sp_api::impl_runtime_apis! { fn eras_stakers_page_count(era: sp_staking::EraIndex, account: AccountId) -> sp_staking::Page { Staking::api_eras_stakers_page_count(era, account) } + + fn pending_rewards(era: sp_staking::EraIndex, account: AccountId) -> bool { + Staking::api_pending_rewards(era, account) + } } impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { @@ -2785,6 +2833,7 @@ mod test_fees { frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), claims::PrevalidateAttests::::new(), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let uxt = UncheckedExtrinsic { function: call, diff --git a/relay/polkadot/src/weights/mod.rs b/relay/polkadot/src/weights/mod.rs index 2b5daffde6..c4d8c00b0d 100644 --- a/relay/polkadot/src/weights/mod.rs +++ b/relay/polkadot/src/weights/mod.rs @@ -42,11 +42,12 @@ pub mod pallet_utility; pub mod pallet_vesting; pub mod pallet_whitelist; pub mod pallet_xcm; -pub mod runtime_common_auctions; -pub mod runtime_common_claims; -pub mod runtime_common_crowdloan; -pub mod runtime_common_paras_registrar; -pub mod runtime_common_slots; +pub mod polkadot_runtime_common_auctions; +pub mod polkadot_runtime_common_claims; +pub mod polkadot_runtime_common_crowdloan; +pub mod polkadot_runtime_common_identity_migrator; +pub mod polkadot_runtime_common_paras_registrar; +pub mod polkadot_runtime_common_slots; pub mod runtime_parachains_configuration; pub mod runtime_parachains_disputes; pub mod runtime_parachains_disputes_slashing; diff --git a/relay/polkadot/src/weights/runtime_common_auctions.rs b/relay/polkadot/src/weights/polkadot_runtime_common_auctions.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_auctions.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_auctions.rs diff --git a/relay/polkadot/src/weights/runtime_common_claims.rs b/relay/polkadot/src/weights/polkadot_runtime_common_claims.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_claims.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_claims.rs diff --git a/relay/polkadot/src/weights/runtime_common_crowdloan.rs b/relay/polkadot/src/weights/polkadot_runtime_common_crowdloan.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_crowdloan.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_crowdloan.rs diff --git a/relay/kusama/src/weights/runtime_common_identity_migrator.rs b/relay/polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs similarity index 68% rename from relay/kusama/src/weights/runtime_common_identity_migrator.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs index 28c80d1c4c..60d22ae11c 100644 --- a/relay/kusama/src/weights/runtime_common_identity_migrator.rs +++ b/relay/polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs @@ -1,43 +1,40 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 -// 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 . +// 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 `polkadot_runtime_common::identity_migrator` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-02-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-bn-ce5rx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: // ./target/production/polkadot // benchmark // pallet -// --chain=rococo-dev +// --chain=./polkadot-chain-spec.json // --steps=50 // --repeat=20 -// --no-storage-info -// --no-median-slopes -// --no-min-squares // --pallet=polkadot_runtime_common::identity_migrator // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --header=./polkadot/file_header.txt -// --output=./polkadot/runtime/rococo/src/weights/runtime_common_identity_migrator.rs +// --heap-pages=4096 +// --output=./polkadot-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -70,15 +67,13 @@ impl polkadot_runtime_common::identity_migrator::Weight /// The range of component `s` is `[0, 100]`. fn reap_identity(r: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7457 + r * (5 ±0) + s * (32 ±0)` + // Measured: `7522 + r * (5 ±0) + s * (32 ±0)` // Estimated: `11037 + r * (7 ±0) + s * (32 ±0)` - // Minimum execution time: 157_343_000 picoseconds. - Weight::from_parts(159_289_236, 0) + // Minimum execution time: 176_411_000 picoseconds. + Weight::from_parts(182_882_369, 0) .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 16_439 - .saturating_add(Weight::from_parts(224_293, 0).saturating_mul(r.into())) - // Standard Error: 3_367 - .saturating_add(Weight::from_parts(1_383_637, 0).saturating_mul(s.into())) + // Standard Error: 1_902 + .saturating_add(Weight::from_parts(1_581_866, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -95,8 +90,8 @@ impl polkadot_runtime_common::identity_migrator::Weight // Proof Size summary in bytes: // Measured: `7242` // Estimated: `11037` - // Minimum execution time: 114_384_000 picoseconds. - Weight::from_parts(115_741_000, 0) + // Minimum execution time: 142_331_000 picoseconds. + Weight::from_parts(145_781_000, 0) .saturating_add(Weight::from_parts(0, 11037)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/relay/polkadot/src/weights/runtime_common_paras_registrar.rs b/relay/polkadot/src/weights/polkadot_runtime_common_paras_registrar.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_paras_registrar.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_paras_registrar.rs diff --git a/relay/polkadot/src/weights/runtime_common_slots.rs b/relay/polkadot/src/weights/polkadot_runtime_common_slots.rs similarity index 100% rename from relay/polkadot/src/weights/runtime_common_slots.rs rename to relay/polkadot/src/weights/polkadot_runtime_common_slots.rs diff --git a/relay/polkadot/src/weights/runtime_parachains_hrmp.rs b/relay/polkadot/src/weights/runtime_parachains_hrmp.rs index f659eabd53..1f5b4b2aed 100644 --- a/relay/polkadot/src/weights/runtime_parachains_hrmp.rs +++ b/relay/polkadot/src/weights/runtime_parachains_hrmp.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `runtime_parachains::hrmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -64,11 +64,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) fn hrmp_init_open_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `383` - // Estimated: `3848` - // Minimum execution time: 31_219_000 picoseconds. - Weight::from_parts(32_032_000, 0) - .saturating_add(Weight::from_parts(0, 3848)) + // Measured: `417` + // Estimated: `3882` + // Minimum execution time: 38_921_000 picoseconds. + Weight::from_parts(40_100_000, 0) + .saturating_add(Weight::from_parts(0, 3882)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -84,11 +84,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) fn hrmp_accept_open_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `373` - // Estimated: `3838` - // Minimum execution time: 29_955_000 picoseconds. - Weight::from_parts(30_892_000, 0) - .saturating_add(Weight::from_parts(0, 3838)) + // Measured: `407` + // Estimated: `3872` + // Minimum execution time: 37_190_000 picoseconds. + Weight::from_parts(38_030_000, 0) + .saturating_add(Weight::from_parts(0, 3872)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -104,11 +104,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) fn hrmp_close_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `486` - // Estimated: `3951` - // Minimum execution time: 31_156_000 picoseconds. - Weight::from_parts(31_971_000, 0) - .saturating_add(Weight::from_parts(0, 3951)) + // Measured: `520` + // Estimated: `3985` + // Minimum execution time: 38_180_000 picoseconds. + Weight::from_parts(38_790_000, 0) + .saturating_add(Weight::from_parts(0, 3985)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -128,15 +128,15 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `e` is `[0, 127]`. fn force_clean_hrmp(i: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `231 + e * (100 ±0) + i * (100 ±0)` - // Estimated: `3693 + e * (2575 ±0) + i * (2575 ±0)` - // Minimum execution time: 1_206_960_000 picoseconds. - Weight::from_parts(1_214_086_000, 0) - .saturating_add(Weight::from_parts(0, 3693)) - // Standard Error: 111_558 - .saturating_add(Weight::from_parts(4_003_489, 0).saturating_mul(i.into())) - // Standard Error: 111_558 - .saturating_add(Weight::from_parts(3_533_948, 0).saturating_mul(e.into())) + // Measured: `264 + e * (100 ±0) + i * (100 ±0)` + // Estimated: `3726 + e * (2575 ±0) + i * (2575 ±0)` + // Minimum execution time: 1_415_467_000 picoseconds. + Weight::from_parts(1_423_927_000, 0) + .saturating_add(Weight::from_parts(0, 3726)) + // Standard Error: 134_402 + .saturating_add(Weight::from_parts(4_225_111, 0).saturating_mul(i.into())) + // Standard Error: 134_402 + .saturating_add(Weight::from_parts(4_308_273, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(e.into()))) @@ -165,13 +165,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_open(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `459 + c * (136 ±0)` - // Estimated: `1914 + c * (5086 ±0)` - // Minimum execution time: 5_805_000 picoseconds. - Weight::from_parts(5_935_000, 0) - .saturating_add(Weight::from_parts(0, 1914)) - // Standard Error: 9_326 - .saturating_add(Weight::from_parts(21_220_967, 0).saturating_mul(c.into())) + // Measured: `492 + c * (136 ±0)` + // Estimated: `1947 + c * (5086 ±0)` + // Minimum execution time: 7_460_000 picoseconds. + Weight::from_parts(7_710_000, 0) + .saturating_add(Weight::from_parts(0, 1947)) + // Standard Error: 11_432 + .saturating_add(Weight::from_parts(24_532_037, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -193,13 +193,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 128]`. fn force_process_hrmp_close(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `302 + c * (124 ±0)` - // Estimated: `1762 + c * (2600 ±0)` - // Minimum execution time: 4_907_000 picoseconds. - Weight::from_parts(4_991_000, 0) - .saturating_add(Weight::from_parts(0, 1762)) - // Standard Error: 9_039 - .saturating_add(Weight::from_parts(13_113_544, 0).saturating_mul(c.into())) + // Measured: `335 + c * (124 ±0)` + // Estimated: `1795 + c * (2600 ±0)` + // Minimum execution time: 6_510_000 picoseconds. + Weight::from_parts(6_660_000, 0) + .saturating_add(Weight::from_parts(0, 1795)) + // Standard Error: 9_192 + .saturating_add(Weight::from_parts(15_015_541, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -215,13 +215,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 128]`. fn hrmp_cancel_open_request(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `993 + c * (13 ±0)` - // Estimated: `4262 + c * (15 ±0)` - // Minimum execution time: 17_005_000 picoseconds. - Weight::from_parts(26_447_233, 0) - .saturating_add(Weight::from_parts(0, 4262)) - // Standard Error: 2_609 - .saturating_add(Weight::from_parts(161_489, 0).saturating_mul(c.into())) + // Measured: `1026 + c * (13 ±0)` + // Estimated: `4295 + c * (15 ±0)` + // Minimum execution time: 20_840_000 picoseconds. + Weight::from_parts(28_805_122, 0) + .saturating_add(Weight::from_parts(0, 4295)) + // Standard Error: 1_791 + .saturating_add(Weight::from_parts(87_699, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 15).saturating_mul(c.into())) @@ -233,13 +233,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 128]`. fn clean_open_channel_requests(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `210 + c * (63 ±0)` - // Estimated: `1689 + c * (2538 ±0)` - // Minimum execution time: 3_603_000 picoseconds. - Weight::from_parts(3_405_840, 0) - .saturating_add(Weight::from_parts(0, 1689)) - // Standard Error: 3_380 - .saturating_add(Weight::from_parts(3_332_975, 0).saturating_mul(c.into())) + // Measured: `243 + c * (63 ±0)` + // Estimated: `1722 + c * (2538 ±0)` + // Minimum execution time: 4_760_000 picoseconds. + Weight::from_parts(6_580_900, 0) + .saturating_add(Weight::from_parts(0, 1722)) + // Standard Error: 2_207 + .saturating_add(Weight::from_parts(3_764_182, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -269,13 +269,13 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// The range of component `c` is `[0, 1]`. fn force_open_hrmp_channel(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `383 + c * (235 ±0)` - // Estimated: `6323 + c * (235 ±0)` - // Minimum execution time: 45_605_000 picoseconds. - Weight::from_parts(47_241_226, 0) - .saturating_add(Weight::from_parts(0, 6323)) - // Standard Error: 111_463 - .saturating_add(Weight::from_parts(13_425_473, 0).saturating_mul(c.into())) + // Measured: `417 + c * (235 ±0)` + // Estimated: `6357 + c * (235 ±0)` + // Minimum execution time: 55_481_000 picoseconds. + Weight::from_parts(56_521_438, 0) + .saturating_add(Weight::from_parts(0, 6357)) + // Standard Error: 51_617 + .saturating_add(Weight::from_parts(15_539_561, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 235).saturating_mul(c.into())) @@ -302,11 +302,11 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) fn establish_system_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `383` - // Estimated: `6323` - // Minimum execution time: 46_515_000 picoseconds. - Weight::from_parts(47_261_000, 0) - .saturating_add(Weight::from_parts(0, 6323)) + // Measured: `417` + // Estimated: `6357` + // Minimum execution time: 54_501_000 picoseconds. + Weight::from_parts(55_190_000, 0) + .saturating_add(Weight::from_parts(0, 6357)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -314,12 +314,42 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) fn poke_channel_deposits() -> Weight { // Proof Size summary in bytes: - // Measured: `230` - // Estimated: `3695` - // Minimum execution time: 11_836_000 picoseconds. - Weight::from_parts(12_202_000, 0) - .saturating_add(Weight::from_parts(0, 3695)) + // Measured: `263` + // Estimated: `3728` + // Minimum execution time: 14_291_000 picoseconds. + Weight::from_parts(15_030_000, 0) + .saturating_add(Weight::from_parts(0, 3728)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Paras::ParaLifecycles` (r:2 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequests` (r:2 w:2) + /// Proof: `Hrmp::HrmpOpenChannelRequests` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpChannels` (r:2 w:0) + /// Proof: `Hrmp::HrmpChannels` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpEgressChannelsIndex` (r:2 w:0) + /// Proof: `Hrmp::HrmpEgressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestCount` (r:2 w:2) + /// Proof: `Hrmp::HrmpOpenChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpOpenChannelRequestsList` (r:1 w:1) + /// Proof: `Hrmp::HrmpOpenChannelRequestsList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueues` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Dmp::DownwardMessageQueueHeads` (r:2 w:2) + /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpIngressChannelsIndex` (r:2 w:0) + /// Proof: `Hrmp::HrmpIngressChannelsIndex` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Hrmp::HrmpAcceptedChannelRequestCount` (r:2 w:2) + /// Proof: `Hrmp::HrmpAcceptedChannelRequestCount` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn establish_channel_with_system() -> Weight { + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `6357` + // Minimum execution time: 92_531_000 picoseconds. + Weight::from_parts(93_341_000, 0) + .saturating_add(Weight::from_parts(0, 6357)) + .saturating_add(T::DbWeight::get().reads(19)) + .saturating_add(T::DbWeight::get().writes(11)) + } } diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index d4a18b6bde..87fbd6560b 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -139,6 +139,8 @@ parameter_types! { pub DotForCollectives: (AssetFilter, Location) = (Dot::get(), CollectivesLocation::get()); pub BridgeHubLocation: Location = Parachain(BRIDGE_HUB_ID).into_location(); pub DotForBridgeHub: (AssetFilter, Location) = (Dot::get(), BridgeHubLocation::get()); + pub People: Location = Parachain(PEOPLE_ID).into_location(); + pub DotForPeople: (AssetFilter, Location) = (Dot::get(), People::get()); pub const MaxAssetsIntoHolding: u32 = 64; } @@ -147,6 +149,7 @@ pub type TrustedTeleporters = ( xcm_builder::Case, xcm_builder::Case, xcm_builder::Case, + xcm_builder::Case, ); pub struct CollectivesOrFellows; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 6773a28111..d79bedb681 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -25,6 +25,7 @@ polkadot-runtime-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -211,6 +212,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -272,7 +274,10 @@ std = [ "xcm/std", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/build.rs b/system-parachains/asset-hubs/asset-hub-kusama/build.rs index 60f8a12512..ed3ceb02c6 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/build.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) .build() } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 1db5db6900..6af57dad08 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -60,8 +60,8 @@ use frame_support::{ ord_parameter_types, parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, - TransformOrigin, WithdrawReasons, + ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, EnsureOrigin, EnsureOriginWithArg, + Equals, InstanceFilter, TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight}, BoundedVec, PalletId, @@ -112,10 +112,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 14, + transaction_version: 15, state_version: 1, }; @@ -128,10 +128,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 14, + transaction_version: 15, state_version: 0, }; @@ -283,6 +283,27 @@ parameter_types! { /// We allow root to execute privileged asset operations. pub type AssetsForceOrigin = EnsureRoot; +/// Ensure that the proposed asset id is less than `50_000_000` and origin is signed. +pub struct EnsureLessThanAutoIncrement; +impl EnsureOriginWithArg + for EnsureLessThanAutoIncrement +{ + type Success = AccountId; + fn try_origin( + o: RuntimeOrigin, + a: &AssetIdForTrustBackedAssets, + ) -> Result { + if *a >= 50_000_000 { + return Err(o); + } + as EnsureOrigin>::try_origin(o) + } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(_a: &AssetIdForTrustBackedAssets) -> Result { + as EnsureOrigin>::try_successful_origin() + } +} + // Called "Trust Backed" assets because these are generally registered by some account, and users of // the asset assume it has some claimed backing. The pallet is called `Assets` in // `construct_runtime` to avoid breaking changes on storage reads. @@ -294,7 +315,7 @@ impl pallet_assets::Config for Runtime { type AssetId = AssetIdForTrustBackedAssets; type AssetIdParameter = codec::Compact; type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; + type CreateOrigin = EnsureLessThanAutoIncrement; type ForceOrigin = AssetsForceOrigin; type AssetDeposit = AssetDeposit; type MetadataDepositBase = MetadataDepositBase; @@ -1011,6 +1032,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 22928d7405..d852045290 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -27,18 +27,15 @@ use assets_common::{ use frame_support::{ parameter_types, traits::{ - tokens::imbalance::ResolveAssetTo, ConstU32, Contains, Equals, Everything, Nothing, - PalletInfoAccess, + tokens::imbalance::{ResolveAssetTo, ResolveTo}, + ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess, }, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, - ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, + ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor; @@ -323,7 +320,13 @@ impl xcm_executor::Config for XcmConfig { MaxInstructions, >; type Trader = ( - UsingComponents>, + UsingComponents< + WeightToFee, + KsmLocation, + AccountId, + Balances, + ResolveTo, + >, // This trader allows to pay with any assets exchangeable to KSM with // [`AssetConversion`]. cumulus_primitives_utility::SwapFirstAssetTrader< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 842f5d723b..56aa03c2a9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -26,6 +26,7 @@ polkadot-runtime-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -196,6 +197,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -256,7 +258,10 @@ std = [ "xcm/std", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/build.rs b/system-parachains/asset-hubs/asset-hub-polkadot/build.rs index 60f8a12512..e65608baae 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/build.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) .build() } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index e8d5ebeadf..e7de6ca0a8 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -94,8 +94,8 @@ use frame_support::{ parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, NeverEnsureOrigin, - TransformOrigin, WithdrawReasons, + ConstU32, ConstU64, ConstU8, EitherOfDiverse, EnsureOrigin, EnsureOriginWithArg, Equals, + InstanceFilter, NeverEnsureOrigin, TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -146,10 +146,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemint"), impl_name: create_runtime_str!("statemint"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 14, + transaction_version: 15, state_version: 0, }; @@ -301,6 +301,27 @@ parameter_types! { /// We allow root to execute privileged asset operations. pub type AssetsForceOrigin = EnsureRoot; +/// Ensure that the proposed asset id is less than `50_000_000` and origin is signed. +pub struct EnsureLessThanAutoIncrement; +impl EnsureOriginWithArg + for EnsureLessThanAutoIncrement +{ + type Success = AccountId; + fn try_origin( + o: RuntimeOrigin, + a: &AssetIdForTrustBackedAssets, + ) -> Result { + if *a >= 50_000_000 { + return Err(o); + } + as EnsureOrigin>::try_origin(o) + } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin(_a: &AssetIdForTrustBackedAssets) -> Result { + as EnsureOrigin>::try_successful_origin() + } +} + // Called "Trust Backed" assets because these are generally registered by some account, and users of // the asset assume it has some claimed backing. The pallet is called `Assets` in // `construct_runtime` to avoid breaking changes on storage reads. @@ -312,7 +333,7 @@ impl pallet_assets::Config for Runtime { type AssetId = AssetIdForTrustBackedAssets; type AssetIdParameter = codec::Compact; type Currency = Balances; - type CreateOrigin = AsEnsureOriginWithArg>; + type CreateOrigin = EnsureLessThanAutoIncrement; type ForceOrigin = AssetsForceOrigin; type AssetDeposit = AssetDeposit; type MetadataDepositBase = MetadataDepositBase; @@ -993,6 +1014,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 56624c9518..0b52046840 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -27,18 +27,15 @@ use assets_common::{ use frame_support::{ parameter_types, traits::{ - tokens::imbalance::ResolveAssetTo, ConstU32, Contains, Equals, Everything, Nothing, - PalletInfoAccess, + tokens::imbalance::{ResolveAssetTo, ResolveTo}, + ConstU32, Contains, Equals, Everything, Nothing, PalletInfoAccess, }, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, - ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, + ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; @@ -413,7 +410,13 @@ impl xcm_executor::Config for XcmConfig { MaxInstructions, >; type Trader = ( - UsingComponents>, + UsingComponents< + WeightToFee, + DotLocation, + AccountId, + Balances, + ResolveTo, + >, // This trader allows to pay with any assets exchangeable to DOT with // [`AssetConversion`]. cumulus_primitives_utility::SwapFirstAssetTrader< diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 86c1cff6b6..410d201191 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -29,6 +29,7 @@ polkadot-runtime-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -154,6 +155,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -295,7 +297,10 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/build.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/build.rs index 60f8a12512..ed3ceb02c6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/build.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) .build() } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index 36ae75ff32..917e9bf7e6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -102,11 +102,11 @@ frame_support::parameter_types! { /// Transaction fee that is paid at the Kusama BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) - pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 56_374_989_788; + pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 56_375_433_121; /// Transaction fee that is paid at the Kusama BridgeHub for delivering single outbound message confirmation. /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) - pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 53_808_755_240; + pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 53_809_198_573; } /// Compute the total estimated fee that needs to be paid in KSMs by the sender when sending diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 87edaa1da5..a04370ad49 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -57,7 +57,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -69,7 +70,9 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + FellowshipLocation, GovernanceLocation, StakingPot, XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -78,9 +81,7 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; -use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, -}; +use parachains_common::{AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature}; pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ @@ -115,6 +116,7 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, BridgeRejectObsoleteHeadersAndMessages, bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, + frame_metadata_hash_extension::CheckMetadataHash, ); bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { @@ -164,10 +166,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-kusama"), impl_name: create_runtime_str!("bridge-hub-kusama"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 4, + transaction_version: 5, state_version: 1, }; @@ -295,7 +297,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 5a7f15bd38..7ccde658c3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -17,22 +17,19 @@ use super::{ bridge_to_ethereum_config::EthereumNetwork, bridge_to_polkadot_config::ToBridgeHubPolkadotHaulBlobExporter, AccountId, - AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_runtime_common::XcmExportFeeToSibling; @@ -72,6 +69,7 @@ parameter_types! { pub RelayTreasuryPalletAccount: AccountId = LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) .unwrap_or(TreasuryAccount::get()); + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -191,8 +189,13 @@ impl xcm_executor::Config for XcmConfig { RuntimeCall, MaxInstructions, >; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + KsmRelayLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 5859943f36..5521d341c7 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -328,6 +328,7 @@ fn construct_extrinsic( pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubPolkadotMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 74e0f4c4a2..e39745cb1a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -82,6 +82,7 @@ fn construct_extrinsic( pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubPolkadotMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 56126bb031..db4ad96b61 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -29,6 +29,7 @@ polkadot-runtime-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -152,6 +153,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -291,7 +293,10 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/build.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/build.rs index 60f8a12512..e65608baae 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/build.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) .build() } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index 8cfe7b494c..ac289f68c6 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -93,11 +93,11 @@ frame_support::parameter_types! { /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) - pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 16_912_512_364; + pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 16_912_645_364; /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single outbound message confirmation. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) - pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 16_142_641_864; + pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 16_142_774_864; } /// Compute the total estimated fee that needs to be paid in DOTs by the sender when sending diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 7f116fb6a5..0ca3bb2db0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -59,7 +59,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -71,7 +72,9 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + FellowshipLocation, GovernanceLocation, StakingPot, XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -82,9 +85,7 @@ use polkadot_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; -use parachains_common::{ - impls::DealWithFees, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, -}; +use parachains_common::{AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature}; pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ @@ -119,6 +120,7 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, BridgeRejectObsoleteHeadersAndMessages, bridge_to_kusama_config::RefundBridgeHubKusamaMessages, + frame_metadata_hash_extension::CheckMetadataHash, ); bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { @@ -177,10 +179,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bridge-hub-polkadot"), impl_name: create_runtime_str!("bridge-hub-polkadot"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 3, + transaction_version: 4, state_version: 1, }; @@ -308,7 +310,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index e3d3778aac..66c6cb772e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -17,21 +17,19 @@ use super::{ bridge_to_ethereum_config::EthereumNetwork, bridge_to_kusama_config::ToBridgeHubKusamaHaulBlobExporter, AccountId, AllPalletsWithSystem, - Balances, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, + PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::system_parachain; @@ -72,6 +70,7 @@ parameter_types! { pub RelayTreasuryPalletAccount: AccountId = LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) .unwrap_or(TreasuryAccount::get()); + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -209,8 +208,13 @@ impl xcm_executor::Config for XcmConfig { RuntimeCall, MaxInstructions, >; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + DotRelayLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index b0ac089a43..552841e4af 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -328,6 +328,7 @@ fn construct_extrinsic( pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubKusamaMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 0f03bd3415..a2b5628fdb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -83,6 +83,7 @@ fn construct_extrinsic( pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubKusamaMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 93c26766d4..dd9e812969 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -17,6 +17,7 @@ scale-info = { features = ["derive"], workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -174,6 +175,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -231,7 +233,10 @@ std = [ "xcm/std", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/collectives/collectives-polkadot/build.rs b/system-parachains/collectives/collectives-polkadot/build.rs index 60f8a12512..e65608baae 100644 --- a/system-parachains/collectives/collectives-polkadot/build.rs +++ b/system-parachains/collectives/collectives-polkadot/build.rs @@ -13,12 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) .build() } diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 6c7276915c..42d486ac44 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -74,8 +74,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - fungible::HoldConsideration, ConstBool, ConstU16, ConstU32, ConstU64, ConstU8, - EitherOfDiverse, InstanceFilter, LinearStoragePrice, TransformOrigin, + fungible::HoldConsideration, tokens::imbalance::ResolveTo, ConstBool, ConstU16, ConstU32, + ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, LinearStoragePrice, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -85,8 +85,7 @@ use frame_system::{ EnsureRoot, }; use parachains_common::{ - impls::DealWithFees, message_queue::*, AccountId, AuraId, Balance, BlockNumber, Hash, Header, - Nonce, Signature, + message_queue::*, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; use sp_runtime::RuntimeDebug; use system_parachains_constants::{ @@ -95,7 +94,8 @@ use system_parachains_constants::{ SLOT_DURATION, }; use xcm_config::{ - GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin, + GovernanceLocation, LocationToAccountId, StakingPot, TreasurerBodyId, + XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] @@ -119,10 +119,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("collectives"), impl_name: create_runtime_str!("collectives"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 6, + transaction_version: 7, state_version: 0, }; @@ -233,7 +233,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; @@ -749,6 +749,7 @@ pub type SignedExtra = ( frame_system::CheckEra, frame_system::CheckNonce, frame_system::CheckWeight, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 12a408daa5..5f9b7c807c 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -14,22 +14,19 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, Balances, Fellows, ParachainInfo, ParachainSystem, - PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, CollatorSelection, Fellows, ParachainInfo, + ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants::{ @@ -74,6 +71,7 @@ parameter_types! { location: AssetHub::get(), asset_id: (PalletInstance(50), GeneralIndex(1984)).into(), }; + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -213,8 +211,13 @@ impl xcm_executor::Config for XcmConfig { type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + DotLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/coretime/coretime-kusama/Cargo.toml b/system-parachains/coretime/coretime-kusama/Cargo.toml index 14b0b42fe1..27440eb04a 100644 --- a/system-parachains/coretime/coretime-kusama/Cargo.toml +++ b/system-parachains/coretime/coretime-kusama/Cargo.toml @@ -22,6 +22,7 @@ system-parachains-constants = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -98,6 +99,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -206,7 +208,10 @@ experimental = ["pallet-aura/experimental"] fast-runtime = [] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/coretime/coretime-kusama/build.rs b/system-parachains/coretime/coretime-kusama/build.rs index c0f4ba820e..66590b2166 100644 --- a/system-parachains/coretime/coretime-kusama/build.rs +++ b/system-parachains/coretime/coretime-kusama/build.rs @@ -14,13 +14,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build(); + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) + .build() } #[cfg(not(feature = "std"))] diff --git a/system-parachains/coretime/coretime-kusama/src/coretime.rs b/system-parachains/coretime/coretime-kusama/src/coretime.rs index 1bc3487b43..6602f1c227 100644 --- a/system-parachains/coretime/coretime-kusama/src/coretime.rs +++ b/system-parachains/coretime/coretime-kusama/src/coretime.rs @@ -25,13 +25,8 @@ use frame_support::{ OnUnbalanced, }, }; -use pallet_broker::{ - AdaptPrice, CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600, RCBlockNumberOf, -}; -use sp_runtime::{ - traits::{AccountIdConversion, One, Saturating}, - FixedU64, -}; +use pallet_broker::{CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600, RCBlockNumberOf}; +use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; /// A type containing the encoding of the coretime pallet in the Relay chain runtime. Used to @@ -200,40 +195,6 @@ impl CoretimeInterface for CoretimeAllocator { } } -/// Implements the [`AdaptPrice`] trait to control the price changes of bulk coretime. This tweaks -/// the [`pallet_broker::Linear`] implementation which hard-corrects to 0 if cores are offered but -/// not sold for just one sale. The monotonic lead-in is increased in magnitude to enable faster -/// price finding. The change in base price between sales has a lower limit of 0.5 to allow downward -/// pressure to be applied, while keeping a conservative upper limit of 1.2 (movements capped at 20% -/// if cores sell out) to avoid runaway prices in the early sales. The intention is that this will -/// be coupled with a low number of cores per sale and a 100% ideal bulk ratio for the first sales. -pub struct PriceAdapter; -impl AdaptPrice for PriceAdapter { - fn leadin_factor_at(when: FixedU64) -> FixedU64 { - // Start at 5x the base price and decrease to the base price at the end of leadin. - FixedU64::from(5).saturating_sub(FixedU64::from(4) * when) - } - - fn adapt_price(sold: CoreIndex, target: CoreIndex, limit: CoreIndex) -> FixedU64 { - if sold <= target { - // Range of [0.5, 1.0]. - FixedU64::from_rational(1, 2).saturating_add(FixedU64::from_rational( - (sold).into(), - (target.saturating_mul(2)).into(), - )) - } else { - // Range of (1.0, 1.2]. - - // Unchecked math: In this branch we know that sold > target. The limit must be >= sold - // by construction, and thus target must be < limit. - FixedU64::one().saturating_add(FixedU64::from_rational( - (sold - target).into(), - (limit - target).saturating_mul(5).into(), - )) - } - } -} - parameter_types! { pub const BrokerPalletId: PalletId = PalletId(*b"py/broke"); } @@ -253,8 +214,5 @@ impl pallet_broker::Config for Runtime { type WeightInfo = weights::pallet_broker::WeightInfo; type PalletId = BrokerPalletId; type AdminOrigin = EnsureRoot; - #[cfg(feature = "runtime-benchmarks")] - type PriceAdapter = pallet_broker::Linear; - #[cfg(not(feature = "runtime-benchmarks"))] - type PriceAdapter = PriceAdapter; + type PriceAdapter = pallet_broker::CenterTargetPrice; } diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index 2236d41a0f..4df9a13435 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -37,7 +37,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, Contains, + EitherOfDiverse, EverythingBut, InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -48,7 +49,6 @@ use frame_system::{ }; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ - impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, }; @@ -74,7 +74,8 @@ use system_parachains_constants::{ use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::*; use xcm_config::{ - FellowshipLocation, GovernanceLocation, KsmRelayLocation, XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, KsmRelayLocation, StakingPot, + XcmOriginToTransactDispatchOrigin, }; /// The address format for describing accounts. @@ -99,6 +100,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. @@ -132,10 +134,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("coretime-kusama"), impl_name: create_runtime_str!("coretime-kusama"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 0, + transaction_version: 1, state_version: 1, }; @@ -170,9 +172,19 @@ parameter_types! { pub const SS58Prefix: u8 = 2; } +/// Filter out credit purchase calls until the credit system is implemented. Otherwise, users +/// may have chance of locking their funds forever on purchased credits they cannot use. +pub struct IsBrokerCreditPurchaseCall; +impl Contains for IsBrokerCreditPurchaseCall { + fn contains(c: &RuntimeCall) -> bool { + matches!(c, RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. })) + } +} + // Configure FRAME pallets to include in runtime. #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { + type BaseCallFilter = EverythingBut; /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The nonce type for storing how many extrinsics an account has signed. @@ -242,7 +254,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; diff --git a/system-parachains/coretime/coretime-kusama/src/tests.rs b/system-parachains/coretime/coretime-kusama/src/tests.rs index 72e0a7ce71..691d7b8ebc 100644 --- a/system-parachains/coretime/coretime-kusama/src/tests.rs +++ b/system-parachains/coretime/coretime-kusama/src/tests.rs @@ -15,7 +15,7 @@ // limitations under the License. use crate::{ - coretime::{BrokerPalletId, CoretimeBurnAccount, PriceAdapter}, + coretime::{BrokerPalletId, CoretimeBurnAccount}, *, }; use frame_support::{ @@ -25,61 +25,9 @@ use frame_support::{ OnInitialize, }, }; -use pallet_broker::{AdaptPrice, ConfigRecordOf, SaleInfo}; +use pallet_broker::{ConfigRecordOf, SaleInfo}; use parachains_runtimes_test_utils::ExtBuilder; -use sp_runtime::{ - traits::{AccountIdConversion, One}, - FixedU64, -}; - -#[test] -fn adapt_price_no_panic() { - for limit in 0..10 { - for target in 1..10 { - for sold in 0..=limit { - let price = PriceAdapter::adapt_price(sold, target, limit); - - if sold > target { - assert!(price > FixedU64::one()); - } else { - assert!(price <= FixedU64::one()); - } - } - } - } -} - -#[test] -fn adapt_price_bound_check() { - // Using assumptions from pallet implementation i.e. `limit >= sold`. - // Check extremes - let limit = 10; - let target = 5; - - // Maximally sold: `sold == limit` - assert_eq!(PriceAdapter::adapt_price(limit, target, limit), FixedU64::from_float(1.2)); - // Ideally sold: `sold == target` - assert_eq!(PriceAdapter::adapt_price(target, target, limit), FixedU64::one()); - // Minimally sold: `sold == 0` - assert_eq!(PriceAdapter::adapt_price(0, target, limit), FixedU64::from_float(0.5)); - // Optimistic target: `target == limit` - assert_eq!(PriceAdapter::adapt_price(limit, limit, limit), FixedU64::one()); - // Pessimistic target: `target == 0` - assert_eq!(PriceAdapter::adapt_price(limit, 0, limit), FixedU64::from_float(1.2)); -} - -#[test] -fn leadin_price_bound_check() { - // Using assumptions from pallet implementation i.e. `when` in range [0, 1]. - // Linear, therefore we need three points to fully test it - - // Start of leadin: 5x - assert_eq!(PriceAdapter::leadin_factor_at(FixedU64::from(0)), FixedU64::from(5)); - // Midway through leadin: 3x - assert_eq!(PriceAdapter::leadin_factor_at(FixedU64::from_float(0.5)), FixedU64::from(3)); - // End of leadin: 1x - assert_eq!(PriceAdapter::leadin_factor_at(FixedU64::one()), FixedU64::one()); -} +use sp_runtime::traits::AccountIdConversion; fn advance_to(b: BlockNumber) { while System::block_number() < b { @@ -124,14 +72,14 @@ fn bulk_revenue_is_burnt() { let broker_account = BrokerPalletId::get().into_account_truncating(); let coretime_burn_account = CoretimeBurnAccount::get(); let treasury_account = xcm_config::RelayTreasuryPalletAccount::get(); - assert_ok!(Balances::mint_into(&AccountId::from(ALICE), 10 * ed)); + assert_ok!(Balances::mint_into(&AccountId::from(ALICE), 200 * ed)); let alice_balance_before = Balances::balance(&AccountId::from(ALICE)); let treasury_balance_before = Balances::balance(&treasury_account); let broker_balance_before = Balances::balance(&broker_account); let burn_balance_before = Balances::balance(&coretime_burn_account); // Purchase coretime. - assert_ok!(Broker::purchase(RuntimeOrigin::signed(AccountId::from(ALICE)), 5 * ed)); + assert_ok!(Broker::purchase(RuntimeOrigin::signed(AccountId::from(ALICE)), 100 * ed)); // Alice decreases. assert!(Balances::balance(&AccountId::from(ALICE)) < alice_balance_before); diff --git a/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_parachain_system.rs index d5184a66f9..5a7a125934 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_parachain_system.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `cumulus_pallet_parachain_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -61,11 +62,11 @@ impl cumulus_pallet_parachain_system::WeightInfo for We // Proof Size summary in bytes: // Measured: `48` // Estimated: `3517` - // Minimum execution time: 1_990_000 picoseconds. - Weight::from_parts(2_059_000, 0) + // Minimum execution time: 2_720_000 picoseconds. + Weight::from_parts(2_790_000, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 68_248 - .saturating_add(Weight::from_parts(195_544_988, 0).saturating_mul(n.into())) + // Standard Error: 49_364 + .saturating_add(Weight::from_parts(183_502_724, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_xcmp_queue.rs index c85b4bac66..a40662f352 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/cumulus_pallet_xcmp_queue.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +53,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_652_000 picoseconds. - Weight::from_parts(3_817_000, 0) + // Minimum execution time: 4_870_000 picoseconds. + Weight::from_parts(5_020_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -72,8 +73,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `82` // Estimated: `3517` - // Minimum execution time: 10_047_000 picoseconds. - Weight::from_parts(10_631_000, 0) + // Minimum execution time: 12_610_000 picoseconds. + Weight::from_parts(12_910_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -84,8 +85,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 2_276_000 picoseconds. - Weight::from_parts(2_407_000, 0) + // Minimum execution time: 3_050_000 picoseconds. + Weight::from_parts(3_190_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -96,8 +97,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `111` // Estimated: `1596` - // Minimum execution time: 3_162_000 picoseconds. - Weight::from_parts(3_298_000, 0) + // Minimum execution time: 4_220_000 picoseconds. + Weight::from_parts(4_350_000, 0) .saturating_add(Weight::from_parts(0, 1596)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -106,8 +107,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_959_000 picoseconds. - Weight::from_parts(6_149_000, 0) + // Minimum execution time: 7_360_000 picoseconds. + Weight::from_parts(7_570_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -128,8 +129,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65711` // Estimated: `69176` - // Minimum execution time: 111_306_000 picoseconds. - Weight::from_parts(114_008_000, 0) + // Minimum execution time: 108_100_000 picoseconds. + Weight::from_parts(109_810_000, 0) .saturating_add(Weight::from_parts(0, 69176)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -142,8 +143,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65710` // Estimated: `69175` - // Minimum execution time: 55_043_000 picoseconds. - Weight::from_parts(57_438_000, 0) + // Minimum execution time: 52_700_000 picoseconds. + Weight::from_parts(53_500_000, 0) .saturating_add(Weight::from_parts(0, 69175)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/frame_system.rs b/system-parachains/coretime/coretime-kusama/src/weights/frame_system.rs index d98fbcfd28..1d16a46e41 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/frame_system.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/frame_system.rs @@ -13,12 +13,13 @@ // 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 `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -51,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_534_000 picoseconds. - Weight::from_parts(1_596_000, 0) + // Minimum execution time: 2_190_000 picoseconds. + Weight::from_parts(2_280_000, 0) .saturating_add(Weight::from_parts(0, 0)) // Standard Error: 0 - .saturating_add(Weight::from_parts(397, 0).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(351, 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: 4_629_000 picoseconds. - Weight::from_parts(4_730_000, 0) + // Minimum execution time: 5_720_000 picoseconds. + Weight::from_parts(5_850_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_858, 0).saturating_mul(b.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_646, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -76,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 2_652_000 picoseconds. - Weight::from_parts(2_903_000, 0) + // Minimum execution time: 3_690_000 picoseconds. + Weight::from_parts(3_830_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -98,8 +99,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164` // Estimated: `1649` - // Minimum execution time: 102_030_543_000 picoseconds. - Weight::from_parts(107_847_484_000, 0) + // Minimum execution time: 114_377_022_000 picoseconds. + Weight::from_parts(117_335_830_000, 0) .saturating_add(Weight::from_parts(0, 1649)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -111,11 +112,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_551_000 picoseconds. - Weight::from_parts(1_583_000, 0) + // Minimum execution time: 2_250_000 picoseconds. + Weight::from_parts(2_320_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_724 - .saturating_add(Weight::from_parts(790_287, 0).saturating_mul(i.into())) + // Standard Error: 2_328 + .saturating_add(Weight::from_parts(896_259, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -125,11 +126,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_602_000 picoseconds. - Weight::from_parts(1_711_000, 0) + // Minimum execution time: 2_170_000 picoseconds. + Weight::from_parts(2_240_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_316 - .saturating_add(Weight::from_parts(580_348, 0).saturating_mul(i.into())) + // Standard Error: 1_020 + .saturating_add(Weight::from_parts(662_221, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -139,11 +140,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76 + p * (69 ±0)` // Estimated: `77 + p * (70 ±0)` - // Minimum execution time: 3_297_000 picoseconds. - Weight::from_parts(3_360_000, 0) + // Minimum execution time: 4_260_000 picoseconds. + Weight::from_parts(4_360_000, 0) .saturating_add(Weight::from_parts(0, 77)) - // Standard Error: 2_464 - .saturating_add(Weight::from_parts(1_222_851, 0).saturating_mul(p.into())) + // Standard Error: 1_402 + .saturating_add(Weight::from_parts(1_344_948, 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())) @@ -154,8 +155,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_065_000 picoseconds. - Weight::from_parts(17_509_000, 0) + // Minimum execution time: 19_890_000 picoseconds. + Weight::from_parts(21_431_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -177,8 +178,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `186` // Estimated: `1671` - // Minimum execution time: 106_370_746_000 picoseconds. - Weight::from_parts(112_855_514_000, 0) + // Minimum execution time: 116_042_862_000 picoseconds. + Weight::from_parts(119_579_233_000, 0) .saturating_add(Weight::from_parts(0, 1671)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs index 023bb1f0e6..dc51cb17bc 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs @@ -13,12 +13,13 @@ // 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_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 43_492_000 picoseconds. - Weight::from_parts(44_056_000, 0) + // Minimum execution time: 51_470_000 picoseconds. + Weight::from_parts(51_961_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 34_219_000 picoseconds. - Weight::from_parts(35_140_000, 0) + // Minimum execution time: 40_860_000 picoseconds. + Weight::from_parts(41_410_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -76,8 +77,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 12_217_000 picoseconds. - Weight::from_parts(12_619_000, 0) + // Minimum execution time: 14_880_000 picoseconds. + Weight::from_parts(15_320_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -88,8 +89,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 17_105_000 picoseconds. - Weight::from_parts(17_472_000, 0) + // Minimum execution time: 20_661_000 picoseconds. + Weight::from_parts(21_101_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -100,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 44_381_000 picoseconds. - Weight::from_parts(45_303_000, 0) + // Minimum execution time: 53_311_000 picoseconds. + Weight::from_parts(53_800_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -112,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 43_069_000 picoseconds. - Weight::from_parts(43_721_000, 0) + // Minimum execution time: 50_891_000 picoseconds. + Weight::from_parts(51_430_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -124,8 +125,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 14_976_000 picoseconds. - Weight::from_parts(15_440_000, 0) + // Minimum execution time: 18_320_000 picoseconds. + Weight::from_parts(18_730_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -137,11 +138,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 14_257_000 picoseconds. - Weight::from_parts(14_617_000, 0) + // Minimum execution time: 17_170_000 picoseconds. + Weight::from_parts(17_450_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 18_371 - .saturating_add(Weight::from_parts(13_681_919, 0).saturating_mul(u.into())) + // Standard Error: 12_066 + .saturating_add(Weight::from_parts(15_360_202, 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())) @@ -152,8 +153,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1501` - // Minimum execution time: 5_002_000 picoseconds. - Weight::from_parts(5_369_000, 0) + // Minimum execution time: 6_260_000 picoseconds. + Weight::from_parts(6_540_000, 0) .saturating_add(Weight::from_parts(0, 1501)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs index 7cf9e7318f..d0b4b1c09a 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs @@ -13,12 +13,13 @@ // 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_broker` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +53,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_019_000 picoseconds. - Weight::from_parts(2_113_000, 0) + // Minimum execution time: 2_690_000 picoseconds. + Weight::from_parts(2_740_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,8 +64,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `10888` // Estimated: `13506` - // Minimum execution time: 21_802_000 picoseconds. - Weight::from_parts(22_323_000, 0) + // Minimum execution time: 26_700_000 picoseconds. + Weight::from_parts(27_150_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -75,8 +76,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `12090` // Estimated: `13506` - // Minimum execution time: 20_534_000 picoseconds. - Weight::from_parts(21_308_000, 0) + // Minimum execution time: 25_360_000 picoseconds. + Weight::from_parts(25_690_000, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,8 +92,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `466` // Estimated: `1951` - // Minimum execution time: 10_629_000 picoseconds. - Weight::from_parts(10_941_000, 0) + // Minimum execution time: 12_980_000 picoseconds. + Weight::from_parts(13_260_000, 0) .saturating_add(Weight::from_parts(0, 1951)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -120,8 +121,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `12567` // Estimated: `14052` - // Minimum execution time: 112_537_000 picoseconds. - Weight::from_parts(119_546_511, 0) + // Minimum execution time: 139_521_000 picoseconds. + Weight::from_parts(141_961_075, 0) .saturating_add(Weight::from_parts(0, 14052)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(66)) @@ -136,10 +137,10 @@ impl pallet_broker::WeightInfo for WeightInfo { /// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) fn purchase() -> Weight { // Proof Size summary in bytes: - // Measured: `316` + // Measured: `371` // Estimated: `3593` - // Minimum execution time: 32_291_000 picoseconds. - Weight::from_parts(33_428_000, 0) + // Minimum execution time: 38_660_000 picoseconds. + Weight::from_parts(39_130_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -158,10 +159,10 @@ impl pallet_broker::WeightInfo for WeightInfo { /// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`) fn renew() -> Weight { // Proof Size summary in bytes: - // Measured: `434` + // Measured: `489` // Estimated: `4698` - // Minimum execution time: 69_914_000 picoseconds. - Weight::from_parts(78_519_000, 0) + // Minimum execution time: 62_200_000 picoseconds. + Weight::from_parts(63_780_000, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -172,8 +173,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3550` - // Minimum execution time: 12_634_000 picoseconds. - Weight::from_parts(13_156_000, 0) + // Minimum execution time: 15_960_000 picoseconds. + Weight::from_parts(16_250_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -184,8 +185,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3550` - // Minimum execution time: 13_869_000 picoseconds. - Weight::from_parts(14_691_000, 0) + // Minimum execution time: 17_591_000 picoseconds. + Weight::from_parts(17_820_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -196,8 +197,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357` // Estimated: `3550` - // Minimum execution time: 15_415_000 picoseconds. - Weight::from_parts(16_270_000, 0) + // Minimum execution time: 18_870_000 picoseconds. + Weight::from_parts(19_271_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) @@ -214,8 +215,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `936` // Estimated: `4681` - // Minimum execution time: 24_709_000 picoseconds. - Weight::from_parts(25_781_000, 0) + // Minimum execution time: 30_540_000 picoseconds. + Weight::from_parts(31_190_000, 0) .saturating_add(Weight::from_parts(0, 4681)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -234,8 +235,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1002` // Estimated: `5996` - // Minimum execution time: 29_694_000 picoseconds. - Weight::from_parts(31_352_000, 0) + // Minimum execution time: 37_260_000 picoseconds. + Weight::from_parts(37_850_000, 0) .saturating_add(Weight::from_parts(0, 5996)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -251,11 +252,11 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `652` // Estimated: `6196 + m * (2520 ±0)` - // Minimum execution time: 55_764_000 picoseconds. - Weight::from_parts(56_067_599, 0) + // Minimum execution time: 65_170_000 picoseconds. + Weight::from_parts(64_695_259, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 45_065 - .saturating_add(Weight::from_parts(1_490_168, 0).saturating_mul(m.into())) + // Standard Error: 23_709 + .saturating_add(Weight::from_parts(1_568_840, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -267,8 +268,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `3593` - // Minimum execution time: 38_451_000 picoseconds. - Weight::from_parts(39_235_000, 0) + // Minimum execution time: 44_140_000 picoseconds. + Weight::from_parts(44_520_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -281,8 +282,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `465` // Estimated: `3550` - // Minimum execution time: 55_440_000 picoseconds. - Weight::from_parts(65_949_000, 0) + // Minimum execution time: 51_630_000 picoseconds. + Weight::from_parts(57_951_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -297,8 +298,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `463` // Estimated: `3533` - // Minimum execution time: 120_176_000 picoseconds. - Weight::from_parts(135_905_000, 0) + // Minimum execution time: 64_190_000 picoseconds. + Weight::from_parts(77_210_000, 0) .saturating_add(Weight::from_parts(0, 3533)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -315,8 +316,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `857` // Estimated: `3593` - // Minimum execution time: 92_128_000 picoseconds. - Weight::from_parts(106_439_000, 0) + // Minimum execution time: 74_650_000 picoseconds. + Weight::from_parts(87_380_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -329,8 +330,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `957` // Estimated: `4698` - // Minimum execution time: 46_730_000 picoseconds. - Weight::from_parts(66_288_000, 0) + // Minimum execution time: 45_131_000 picoseconds. + Weight::from_parts(50_010_000, 0) .saturating_add(Weight::from_parts(0, 4698)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -348,30 +349,26 @@ impl pallet_broker::WeightInfo for WeightInfo { /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1000]`. - fn request_core_count(n: u32, ) -> Weight { + fn request_core_count(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 18_819_000 picoseconds. - Weight::from_parts(19_830_463, 0) + // Minimum execution time: 22_380_000 picoseconds. + Weight::from_parts(23_219_172, 0) .saturating_add(Weight::from_parts(0, 3539)) - // Standard Error: 44 - .saturating_add(Weight::from_parts(8, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Broker::CoreCountInbox` (r:1 w:1) /// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. - fn process_core_count(n: u32, ) -> Weight { + fn process_core_count(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `266` // Estimated: `1487` - // Minimum execution time: 5_566_000 picoseconds. - Weight::from_parts(6_078_648, 0) + // Minimum execution time: 6_910_000 picoseconds. + Weight::from_parts(7_403_610, 0) .saturating_add(Weight::from_parts(0, 1487)) - // Standard Error: 16 - .saturating_add(Weight::from_parts(47, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -383,10 +380,10 @@ impl pallet_broker::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn process_revenue() -> Weight { // Proof Size summary in bytes: - // Measured: `447` + // Measured: `486` // Estimated: `6196` - // Minimum execution time: 37_255_000 picoseconds. - Weight::from_parts(37_998_000, 0) + // Minimum execution time: 45_160_000 picoseconds. + Weight::from_parts(45_641_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -406,8 +403,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `12514` // Estimated: `13506` - // Minimum execution time: 91_560_000 picoseconds. - Weight::from_parts(98_810_427, 0) + // Minimum execution time: 115_150_000 picoseconds. + Weight::from_parts(116_659_110, 0) .saturating_add(Weight::from_parts(0, 13506)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(65)) @@ -420,8 +417,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3493` - // Minimum execution time: 5_927_000 picoseconds. - Weight::from_parts(6_236_000, 0) + // Minimum execution time: 7_400_000 picoseconds. + Weight::from_parts(7_540_000, 0) .saturating_add(Weight::from_parts(0, 3493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -446,8 +443,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1321` // Estimated: `4786` - // Minimum execution time: 30_690_000 picoseconds. - Weight::from_parts(31_495_000, 0) + // Minimum execution time: 36_030_000 picoseconds. + Weight::from_parts(36_461_000, 0) .saturating_add(Weight::from_parts(0, 4786)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) @@ -456,8 +453,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 180_000 picoseconds. - Weight::from_parts(205_000, 0) + // Minimum execution time: 210_000 picoseconds. + Weight::from_parts(240_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Broker::CoreCountInbox` (r:0 w:1) @@ -466,8 +463,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_694_000 picoseconds. - Weight::from_parts(1_891_000, 0) + // Minimum execution time: 2_250_000 picoseconds. + Weight::from_parts(2_380_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -485,8 +482,8 @@ impl pallet_broker::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `398` // Estimated: `3863` - // Minimum execution time: 12_033_000 picoseconds. - Weight::from_parts(12_490_000, 0) + // Minimum execution time: 14_840_000 picoseconds. + Weight::from_parts(15_220_000, 0) .saturating_add(Weight::from_parts(0, 3863)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_collator_selection.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_collator_selection.rs index 736f9f5229..13c727de69 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_collator_selection.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_collator_selection.rs @@ -13,12 +13,13 @@ // 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_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -55,11 +56,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `197 + b * (79 ±0)` // Estimated: `1188 + b * (2555 ±0)` - // Minimum execution time: 10_981_000 picoseconds. - Weight::from_parts(8_009_860, 0) + // Minimum execution time: 13_960_000 picoseconds. + Weight::from_parts(10_493_437, 0) .saturating_add(Weight::from_parts(0, 1188)) - // Standard Error: 6_961 - .saturating_add(Weight::from_parts(3_156_897, 0).saturating_mul(b.into())) + // Standard Error: 6_620 + .saturating_add(Weight::from_parts(3_919_608, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -78,13 +79,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `795 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 38_210_000 picoseconds. - Weight::from_parts(33_251_219, 0) + // Minimum execution time: 43_321_000 picoseconds. + Weight::from_parts(43_559_960, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 17_183 - .saturating_add(Weight::from_parts(263_833, 0).saturating_mul(b.into())) - // Standard Error: 3_257 - .saturating_add(Weight::from_parts(278_429, 0).saturating_mul(c.into())) + // Standard Error: 3_925 + .saturating_add(Weight::from_parts(40_035, 0).saturating_mul(b.into())) + // Standard Error: 744 + .saturating_add(Weight::from_parts(77_861, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -99,11 +100,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `119 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 10_968_000 picoseconds. - Weight::from_parts(10_603_019, 0) + // Minimum execution time: 13_350_000 picoseconds. + Weight::from_parts(13_522_618, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_677 - .saturating_add(Weight::from_parts(185_183, 0).saturating_mul(b.into())) + // Standard Error: 1_047 + .saturating_add(Weight::from_parts(81_761, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -113,8 +114,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_918_000 picoseconds. - Weight::from_parts(4_125_000, 0) + // Minimum execution time: 5_020_000 picoseconds. + Weight::from_parts(5_180_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -132,13 +133,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0 + c * (182 ±0) + k * (115 ±0)` // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` - // Minimum execution time: 8_964_000 picoseconds. - Weight::from_parts(9_273_000, 0) + // Minimum execution time: 11_190_000 picoseconds. + Weight::from_parts(11_360_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 160_904 - .saturating_add(Weight::from_parts(5_495_918, 0).saturating_mul(c.into())) - // Standard Error: 160_904 - .saturating_add(Weight::from_parts(5_046_443, 0).saturating_mul(k.into())) + // Standard Error: 182_760 + .saturating_add(Weight::from_parts(6_034_800, 0).saturating_mul(c.into())) + // Standard Error: 182_760 + .saturating_add(Weight::from_parts(5_814_526, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) @@ -155,11 +156,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `319 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 23_619_000 picoseconds. - Weight::from_parts(25_104_533, 0) + // Minimum execution time: 30_220_000 picoseconds. + Weight::from_parts(30_766_989, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 2_541 - .saturating_add(Weight::from_parts(220_219, 0).saturating_mul(c.into())) + // Standard Error: 720 + .saturating_add(Weight::from_parts(70_645, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -178,11 +179,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `765 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 31_983_000 picoseconds. - Weight::from_parts(34_539_927, 0) + // Minimum execution time: 40_270_000 picoseconds. + Weight::from_parts(42_085_323, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 3_440 - .saturating_add(Weight::from_parts(262_327, 0).saturating_mul(c.into())) + // Standard Error: 616 + .saturating_add(Weight::from_parts(88_625, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -204,11 +205,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `905 + c * (53 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 47_189_000 picoseconds. - Weight::from_parts(50_256_996, 0) + // Minimum execution time: 58_210_000 picoseconds. + Weight::from_parts(59_954_984, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 4_570 - .saturating_add(Weight::from_parts(307_194, 0).saturating_mul(c.into())) + // Standard Error: 2_080 + .saturating_add(Weight::from_parts(127_318, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -224,11 +225,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `347 + c * (48 ±0)` // Estimated: `6287` - // Minimum execution time: 26_863_000 picoseconds. - Weight::from_parts(29_118_842, 0) + // Minimum execution time: 32_730_000 picoseconds. + Weight::from_parts(33_752_873, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 3_050 - .saturating_add(Weight::from_parts(234_040, 0).saturating_mul(c.into())) + // Standard Error: 752 + .saturating_add(Weight::from_parts(81_088, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -242,8 +243,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `155` // Estimated: `6196` - // Minimum execution time: 38_661_000 picoseconds. - Weight::from_parts(39_178_000, 0) + // Minimum execution time: 45_140_000 picoseconds. + Weight::from_parts(45_591_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -266,11 +267,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 17_778_000 picoseconds. - Weight::from_parts(18_324_000, 0) + // Minimum execution time: 22_660_000 picoseconds. + Weight::from_parts(22_880_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 292_567 - .saturating_add(Weight::from_parts(12_957_061, 0).saturating_mul(c.into())) + // Standard Error: 322_936 + .saturating_add(Weight::from_parts(14_085_936, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_message_queue.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_message_queue.rs index 1ed176a7b2..24016ecad4 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_message_queue.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_message_queue.rs @@ -13,12 +13,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + //! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `223` // Estimated: `6044` - // Minimum execution time: 10_966_000 picoseconds. - Weight::from_parts(11_291_000, 0) + // Minimum execution time: 14_571_000 picoseconds. + Weight::from_parts(14_811_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -68,8 +69,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `218` // Estimated: `6044` - // Minimum execution time: 9_989_000 picoseconds. - Weight::from_parts(10_476_000, 0) + // Minimum execution time: 12_620_000 picoseconds. + Weight::from_parts(13_101_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -80,8 +81,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `6` // Estimated: `3517` - // Minimum execution time: 3_142_000 picoseconds. - Weight::from_parts(3_257_000, 0) + // Minimum execution time: 4_350_000 picoseconds. + Weight::from_parts(4_520_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -92,8 +93,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 4_805_000 picoseconds. - Weight::from_parts(4_975_000, 0) + // Minimum execution time: 6_701_000 picoseconds. + Weight::from_parts(6_870_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -104,8 +105,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 5_042_000 picoseconds. - Weight::from_parts(5_211_000, 0) + // Minimum execution time: 6_900_000 picoseconds. + Weight::from_parts(7_100_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -118,8 +119,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 161_299_000 picoseconds. - Weight::from_parts(163_261_000, 0) + // Minimum execution time: 156_471_000 picoseconds. + Weight::from_parts(157_341_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -131,8 +132,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `171` // Estimated: `3517` - // Minimum execution time: 6_344_000 picoseconds. - Weight::from_parts(6_688_000, 0) + // Minimum execution time: 8_240_000 picoseconds. + Weight::from_parts(8_440_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -145,8 +146,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 52_362_000 picoseconds. - Weight::from_parts(55_035_000, 0) + // Minimum execution time: 55_420_000 picoseconds. + Weight::from_parts(56_000_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -159,8 +160,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 68_626_000 picoseconds. - Weight::from_parts(71_320_000, 0) + // Minimum execution time: 74_411_000 picoseconds. + Weight::from_parts(74_971_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -173,8 +174,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 105_136_000 picoseconds. - Weight::from_parts(107_280_000, 0) + // Minimum execution time: 106_591_000 picoseconds. + Weight::from_parts(107_671_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_multisig.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_multisig.rs index 89321abcc0..afa7543e8e 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_multisig.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_multisig.rs @@ -13,12 +13,13 @@ // 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_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -51,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_627_000 picoseconds. - Weight::from_parts(13_515_477, 0) + // Minimum execution time: 13_080_000 picoseconds. + Weight::from_parts(13_418_390, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(501, 0).saturating_mul(z.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(483, 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`) @@ -65,13 +66,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 37_869_000 picoseconds. - Weight::from_parts(26_279_794, 0) + // Minimum execution time: 42_450_000 picoseconds. + Weight::from_parts(35_101_100, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_228 - .saturating_add(Weight::from_parts(137_932, 0).saturating_mul(s.into())) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_451, 0).saturating_mul(z.into())) + // Standard Error: 426 + .saturating_add(Weight::from_parts(81_884, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_449, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -83,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 25_796_000 picoseconds. - Weight::from_parts(16_023_887, 0) + // Minimum execution time: 27_150_000 picoseconds. + Weight::from_parts(20_132_666, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_011 - .saturating_add(Weight::from_parts(116_753, 0).saturating_mul(s.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_415, 0).saturating_mul(z.into())) + // Standard Error: 265 + .saturating_add(Weight::from_parts(80_739, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_433, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -103,13 +104,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 43_645_000 picoseconds. - Weight::from_parts(28_063_969, 0) + // Minimum execution time: 47_440_000 picoseconds. + Weight::from_parts(37_762_141, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_570 - .saturating_add(Weight::from_parts(203_802, 0).saturating_mul(s.into())) - // Standard Error: 15 - .saturating_add(Weight::from_parts(1_585, 0).saturating_mul(z.into())) + // Standard Error: 386 + .saturating_add(Weight::from_parts(103_015, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_503, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -120,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 25_416_000 picoseconds. - Weight::from_parts(25_801_633, 0) + // Minimum execution time: 32_130_000 picoseconds. + Weight::from_parts(33_376_511, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 1_111 - .saturating_add(Weight::from_parts(136_150, 0).saturating_mul(s.into())) + // Standard Error: 461 + .saturating_add(Weight::from_parts(85_012, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -135,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 14_325_000 picoseconds. - Weight::from_parts(14_692_008, 0) + // Minimum execution time: 17_870_000 picoseconds. + Weight::from_parts(18_763_252, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 864 - .saturating_add(Weight::from_parts(115_902, 0).saturating_mul(s.into())) + // Standard Error: 394 + .saturating_add(Weight::from_parts(79_897, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -150,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 26_955_000 picoseconds. - Weight::from_parts(27_847_198, 0) + // Minimum execution time: 32_441_000 picoseconds. + Weight::from_parts(33_910_925, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 717 - .saturating_add(Weight::from_parts(121_272, 0).saturating_mul(s.into())) + // Standard Error: 492 + .saturating_add(Weight::from_parts(82_020, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_proxy.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_proxy.rs index 1e7c16dbca..150fe9e156 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_proxy.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_proxy.rs @@ -13,12 +13,13 @@ // 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_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -53,11 +54,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 12_090_000 picoseconds. - Weight::from_parts(12_759_632, 0) + // Minimum execution time: 15_340_000 picoseconds. + Weight::from_parts(15_874_275, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 874 - .saturating_add(Weight::from_parts(34_366, 0).saturating_mul(p.into())) + // Standard Error: 877 + .saturating_add(Weight::from_parts(37_948, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -72,13 +73,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 30_913_000 picoseconds. - Weight::from_parts(30_833_144, 0) + // Minimum execution time: 39_530_000 picoseconds. + Weight::from_parts(39_073_941, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 2_064 - .saturating_add(Weight::from_parts(139_309, 0).saturating_mul(a.into())) - // Standard Error: 2_132 - .saturating_add(Weight::from_parts(31_751, 0).saturating_mul(p.into())) + // Standard Error: 1_330 + .saturating_add(Weight::from_parts(163_450, 0).saturating_mul(a.into())) + // Standard Error: 1_374 + .saturating_add(Weight::from_parts(42_060, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -92,13 +93,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 20_803_000 picoseconds. - Weight::from_parts(21_822_858, 0) + // Minimum execution time: 27_361_000 picoseconds. + Weight::from_parts(27_728_711, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_437 - .saturating_add(Weight::from_parts(131_055, 0).saturating_mul(a.into())) - // Standard Error: 1_485 - .saturating_add(Weight::from_parts(3_188, 0).saturating_mul(p.into())) + // Standard Error: 1_202 + .saturating_add(Weight::from_parts(146_859, 0).saturating_mul(a.into())) + // Standard Error: 1_242 + .saturating_add(Weight::from_parts(5_567, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -112,13 +113,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 20_808_000 picoseconds. - Weight::from_parts(21_711_730, 0) + // Minimum execution time: 27_260_000 picoseconds. + Weight::from_parts(27_737_455, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_453 - .saturating_add(Weight::from_parts(131_939, 0).saturating_mul(a.into())) - // Standard Error: 1_502 - .saturating_add(Weight::from_parts(8_858, 0).saturating_mul(p.into())) + // Standard Error: 1_223 + .saturating_add(Weight::from_parts(152_445, 0).saturating_mul(a.into())) + // Standard Error: 1_264 + .saturating_add(Weight::from_parts(5_886, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -134,13 +135,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `386 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 28_183_000 picoseconds. - Weight::from_parts(27_949_286, 0) + // Minimum execution time: 35_440_000 picoseconds. + Weight::from_parts(35_392_709, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 1_397 - .saturating_add(Weight::from_parts(141_388, 0).saturating_mul(a.into())) - // Standard Error: 1_443 - .saturating_add(Weight::from_parts(38_763, 0).saturating_mul(p.into())) + // Standard Error: 1_288 + .saturating_add(Weight::from_parts(160_695, 0).saturating_mul(a.into())) + // Standard Error: 1_331 + .saturating_add(Weight::from_parts(36_057, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -151,11 +152,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_865_000 picoseconds. - Weight::from_parts(20_547_678, 0) + // Minimum execution time: 25_420_000 picoseconds. + Weight::from_parts(25_913_951, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 982 - .saturating_add(Weight::from_parts(45_569, 0).saturating_mul(p.into())) + // Standard Error: 747 + .saturating_add(Weight::from_parts(44_641, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -166,11 +167,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_901_000 picoseconds. - Weight::from_parts(20_808_159, 0) + // Minimum execution time: 25_460_000 picoseconds. + Weight::from_parts(26_029_154, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_686 - .saturating_add(Weight::from_parts(40_503, 0).saturating_mul(p.into())) + // Standard Error: 849 + .saturating_add(Weight::from_parts(57_409, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -181,11 +182,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_056_000 picoseconds. - Weight::from_parts(19_932_678, 0) + // Minimum execution time: 23_240_000 picoseconds. + Weight::from_parts(23_749_249, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_801 - .saturating_add(Weight::from_parts(34_654, 0).saturating_mul(p.into())) + // Standard Error: 766 + .saturating_add(Weight::from_parts(30_295, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -196,11 +197,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4706` - // Minimum execution time: 20_958_000 picoseconds. - Weight::from_parts(21_828_584, 0) + // Minimum execution time: 27_020_000 picoseconds. + Weight::from_parts(27_630_311, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_384 - .saturating_add(Weight::from_parts(13_974, 0).saturating_mul(p.into())) + // Standard Error: 682 + .saturating_add(Weight::from_parts(12_438, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -211,11 +212,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_908_000 picoseconds. - Weight::from_parts(20_744_428, 0) + // Minimum execution time: 23_970_000 picoseconds. + Weight::from_parts(24_804_785, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 1_445 - .saturating_add(Weight::from_parts(42_286, 0).saturating_mul(p.into())) + // Standard Error: 952 + .saturating_add(Weight::from_parts(34_603, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_session.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_session.rs index ac4db9bad5..db0c1c4f5d 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_session.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_session.rs @@ -13,12 +13,13 @@ // 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_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `298` // Estimated: `3763` - // Minimum execution time: 15_800_000 picoseconds. - Weight::from_parts(16_340_000, 0) + // Minimum execution time: 19_421_000 picoseconds. + Weight::from_parts(20_190_000, 0) .saturating_add(Weight::from_parts(0, 3763)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -68,8 +69,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3745` - // Minimum execution time: 11_597_000 picoseconds. - Weight::from_parts(11_925_000, 0) + // Minimum execution time: 14_220_000 picoseconds. + Weight::from_parts(14_740_000, 0) .saturating_add(Weight::from_parts(0, 3745)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_timestamp.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_timestamp.rs index 5b760d39f7..453cedccc8 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_timestamp.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_timestamp.rs @@ -13,12 +13,13 @@ // 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_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -54,8 +55,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `49` // Estimated: `1493` - // Minimum execution time: 5_335_000 picoseconds. - Weight::from_parts(5_604_000, 0) + // Minimum execution time: 6_900_000 picoseconds. + Weight::from_parts(7_130_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 2_726_000 picoseconds. - Weight::from_parts(2_831_000, 0) + // Minimum execution time: 3_740_000 picoseconds. + Weight::from_parts(3_870_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_utility.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_utility.rs index 02a8856791..38df0a55f1 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_utility.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_utility.rs @@ -13,12 +13,13 @@ // 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_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -51,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_830_000 picoseconds. - Weight::from_parts(5_662_849, 0) + // Minimum execution time: 4_910_000 picoseconds. + Weight::from_parts(9_847_776, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4_441 - .saturating_add(Weight::from_parts(2_607_418, 0).saturating_mul(c.into())) + // Standard Error: 585 + .saturating_add(Weight::from_parts(3_239_886, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_631_000 picoseconds. - Weight::from_parts(3_861_000, 0) + // Minimum execution time: 4_650_000 picoseconds. + Weight::from_parts(4_870_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -70,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_714_000 picoseconds. - Weight::from_parts(4_016_000, 0) + // Minimum execution time: 4_860_000 picoseconds. + Weight::from_parts(9_578_327, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_743 - .saturating_add(Weight::from_parts(2_804_652, 0).saturating_mul(c.into())) + // Standard Error: 823 + .saturating_add(Weight::from_parts(3_498_446, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_662_000 picoseconds. - Weight::from_parts(5_833_000, 0) + // Minimum execution time: 6_940_000 picoseconds. + Weight::from_parts(7_120_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -89,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_835_000 picoseconds. - Weight::from_parts(15_718_717, 0) + // Minimum execution time: 4_780_000 picoseconds. + Weight::from_parts(7_643_668, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3_786 - .saturating_add(Weight::from_parts(2_601_313, 0).saturating_mul(c.into())) + // Standard Error: 501 + .saturating_add(Weight::from_parts(3_246_822, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_xcm.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_xcm.rs index df13f6cc66..89348af0c4 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_xcm.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_xcm.rs @@ -13,12 +13,13 @@ // 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_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -62,8 +63,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 19_269_000 picoseconds. - Weight::from_parts(19_923_000, 0) + // Minimum execution time: 24_371_000 picoseconds. + Weight::from_parts(24_741_000, 0) .saturating_add(Weight::from_parts(0, 3539)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) @@ -88,8 +89,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `158` // Estimated: `3623` - // Minimum execution time: 93_428_000 picoseconds. - Weight::from_parts(95_965_000, 0) + // Minimum execution time: 115_921_000 picoseconds. + Weight::from_parts(117_400_000, 0) .saturating_add(Weight::from_parts(0, 3623)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) @@ -114,14 +115,12 @@ impl pallet_xcm::WeightInfo for WeightInfo { Weight::from_parts(18_446_744_073_709_551_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `Benchmark::Override` (r:0 w:0) - /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn execute() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. - Weight::from_parts(18_446_744_073_709_551_000, 0) + // Minimum execution time: 10_790_000 picoseconds. + Weight::from_parts(11_100_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1) @@ -130,8 +129,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_724_000 picoseconds. - Weight::from_parts(5_984_000, 0) + // Minimum execution time: 7_480_000 picoseconds. + Weight::from_parts(7_710_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -141,8 +140,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_884_000 picoseconds. - Weight::from_parts(1_987_000, 0) + // Minimum execution time: 2_560_000 picoseconds. + Weight::from_parts(2_670_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -168,8 +167,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 24_843_000 picoseconds. - Weight::from_parts(25_690_000, 0) + // Minimum execution time: 30_961_000 picoseconds. + Weight::from_parts(31_430_000, 0) .saturating_add(Weight::from_parts(0, 3539)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) @@ -194,8 +193,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `292` // Estimated: `3757` - // Minimum execution time: 27_801_000 picoseconds. - Weight::from_parts(28_480_000, 0) + // Minimum execution time: 34_720_000 picoseconds. + Weight::from_parts(35_640_000, 0) .saturating_add(Weight::from_parts(0, 3757)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -206,8 +205,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_833_000 picoseconds. - Weight::from_parts(1_941_000, 0) + // Minimum execution time: 2_520_000 picoseconds. + Weight::from_parts(2_660_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -217,8 +216,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89` // Estimated: `13454` - // Minimum execution time: 16_236_000 picoseconds. - Weight::from_parts(16_915_000, 0) + // Minimum execution time: 21_330_000 picoseconds. + Weight::from_parts(21_710_000, 0) .saturating_add(Weight::from_parts(0, 13454)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -229,8 +228,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `93` // Estimated: `13458` - // Minimum execution time: 16_325_000 picoseconds. - Weight::from_parts(16_807_000, 0) + // Minimum execution time: 21_260_000 picoseconds. + Weight::from_parts(21_631_000, 0) .saturating_add(Weight::from_parts(0, 13458)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -241,8 +240,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `106` // Estimated: `15946` - // Minimum execution time: 17_677_000 picoseconds. - Weight::from_parts(18_233_000, 0) + // Minimum execution time: 23_770_000 picoseconds. + Weight::from_parts(24_160_000, 0) .saturating_add(Weight::from_parts(0, 15946)) .saturating_add(T::DbWeight::get().reads(6)) } @@ -264,8 +263,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `6082` - // Minimum execution time: 24_773_000 picoseconds. - Weight::from_parts(25_420_000, 0) + // Minimum execution time: 30_860_000 picoseconds. + Weight::from_parts(31_591_000, 0) .saturating_add(Weight::from_parts(0, 6082)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) @@ -276,8 +275,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `136` // Estimated: `11026` - // Minimum execution time: 10_592_000 picoseconds. - Weight::from_parts(10_812_000, 0) + // Minimum execution time: 13_890_000 picoseconds. + Weight::from_parts(14_030_000, 0) .saturating_add(Weight::from_parts(0, 11026)) .saturating_add(T::DbWeight::get().reads(4)) } @@ -287,8 +286,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `100` // Estimated: `13465` - // Minimum execution time: 16_656_000 picoseconds. - Weight::from_parts(16_938_000, 0) + // Minimum execution time: 21_701_000 picoseconds. + Weight::from_parts(22_030_000, 0) .saturating_add(Weight::from_parts(0, 13465)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -311,8 +310,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `13507` - // Minimum execution time: 32_817_000 picoseconds. - Weight::from_parts(33_504_000, 0) + // Minimum execution time: 41_040_000 picoseconds. + Weight::from_parts(41_690_000, 0) .saturating_add(Weight::from_parts(0, 13507)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(4)) @@ -325,8 +324,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `1517` - // Minimum execution time: 3_400_000 picoseconds. - Weight::from_parts(3_523_000, 0) + // Minimum execution time: 4_560_000 picoseconds. + Weight::from_parts(4_680_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -337,8 +336,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `7669` // Estimated: `11134` - // Minimum execution time: 23_736_000 picoseconds. - Weight::from_parts(24_121_000, 0) + // Minimum execution time: 32_320_000 picoseconds. + Weight::from_parts(32_740_000, 0) .saturating_add(Weight::from_parts(0, 11134)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -349,8 +348,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `3555` - // Minimum execution time: 33_797_000 picoseconds. - Weight::from_parts(34_575_000, 0) + // Minimum execution time: 43_440_000 picoseconds. + Weight::from_parts(44_020_000, 0) .saturating_add(Weight::from_parts(0, 3555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index f53808f500..5dea4696fd 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -13,12 +13,13 @@ // 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_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -52,8 +53,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 27_392_000 picoseconds. - Weight::from_parts(27_815_000, 0) + // Minimum execution time: 35_310_000 picoseconds. + Weight::from_parts(35_821_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,8 +65,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `153` // Estimated: `6196` - // Minimum execution time: 36_728_000 picoseconds. - Weight::from_parts(37_540_000, 0) + // Minimum execution time: 47_110_000 picoseconds. + Weight::from_parts(47_550_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -90,8 +91,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `311` // Estimated: `8799` - // Minimum execution time: 91_095_000 picoseconds. - Weight::from_parts(92_337_000, 0) + // Minimum execution time: 113_611_000 picoseconds. + Weight::from_parts(115_171_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(5)) @@ -126,8 +127,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 62_189_000 picoseconds. - Weight::from_parts(63_363_000, 0) + // Minimum execution time: 78_640_000 picoseconds. + Weight::from_parts(79_510_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -136,8 +137,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_638_000 picoseconds. - Weight::from_parts(2_773_000, 0) + // Minimum execution time: 6_350_000 picoseconds. + Weight::from_parts(6_491_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `System::Account` (r:1 w:1) @@ -146,8 +147,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 20_664_000 picoseconds. - Weight::from_parts(21_274_000, 0) + // Minimum execution time: 27_190_000 picoseconds. + Weight::from_parts(27_881_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,8 +173,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `210` // Estimated: `6196` - // Minimum execution time: 68_828_000 picoseconds. - Weight::from_parts(70_142_000, 0) + // Minimum execution time: 85_271_000 picoseconds. + Weight::from_parts(86_631_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -198,8 +199,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `158` // Estimated: `3623` - // Minimum execution time: 40_968_000 picoseconds. - Weight::from_parts(42_250_000, 0) + // Minimum execution time: 51_800_000 picoseconds. + Weight::from_parts(52_580_000, 0) .saturating_add(Weight::from_parts(0, 3623)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 4ab9b07693..72c2bbf87a 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -13,12 +13,13 @@ // 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_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./coretime-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -66,8 +67,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 60_215_000 picoseconds. - Weight::from_parts(61_465_000, 0) + // Minimum execution time: 76_400_000 picoseconds. + Weight::from_parts(77_570_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -76,8 +77,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_241_000 picoseconds. - Weight::from_parts(1_334_000, 0) + // Minimum execution time: 4_570_000 picoseconds. + Weight::from_parts(4_690_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::Queries` (r:1 w:0) @@ -86,8 +87,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `32` // Estimated: `3497` - // Minimum execution time: 6_322_000 picoseconds. - Weight::from_parts(6_545_000, 0) + // Minimum execution time: 10_701_000 picoseconds. + Weight::from_parts(11_010_000, 0) .saturating_add(Weight::from_parts(0, 3497)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -95,56 +96,56 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_527_000 picoseconds. - Weight::from_parts(6_702_000, 0) + // Minimum execution time: 10_500_000 picoseconds. + Weight::from_parts(10_750_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_886_000 picoseconds. - Weight::from_parts(1_983_000, 0) + // Minimum execution time: 5_430_000 picoseconds. + Weight::from_parts(5_580_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_275_000 picoseconds. - Weight::from_parts(1_353_000, 0) + // Minimum execution time: 4_510_000 picoseconds. + Weight::from_parts(4_610_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_255_000 picoseconds. - Weight::from_parts(1_313_000, 0) + // Minimum execution time: 4_470_000 picoseconds. + Weight::from_parts(4_600_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_241_000 picoseconds. - Weight::from_parts(1_313_000, 0) + // Minimum execution time: 4_480_000 picoseconds. + Weight::from_parts(4_590_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_348_000 picoseconds. - Weight::from_parts(1_413_000, 0) + // Minimum execution time: 4_540_000 picoseconds. + Weight::from_parts(4_680_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_241_000 picoseconds. - Weight::from_parts(1_292_000, 0) + // Minimum execution time: 4_490_000 picoseconds. + Weight::from_parts(4_580_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -167,8 +168,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 57_503_000 picoseconds. - Weight::from_parts(59_111_000, 0) + // Minimum execution time: 72_870_000 picoseconds. + Weight::from_parts(73_421_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -179,8 +180,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `3555` - // Minimum execution time: 9_109_000 picoseconds. - Weight::from_parts(9_513_000, 0) + // Minimum execution time: 14_140_000 picoseconds. + Weight::from_parts(14_430_000, 0) .saturating_add(Weight::from_parts(0, 3555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -189,8 +190,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_174_000 picoseconds. - Weight::from_parts(1_232_000, 0) + // Minimum execution time: 4_410_000 picoseconds. + Weight::from_parts(4_560_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) @@ -211,8 +212,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 20_806_000 picoseconds. - Weight::from_parts(21_213_000, 0) + // Minimum execution time: 27_540_000 picoseconds. + Weight::from_parts(28_050_000, 0) .saturating_add(Weight::from_parts(0, 3539)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -223,8 +224,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_056_000 picoseconds. - Weight::from_parts(3_145_000, 0) + // Minimum execution time: 6_830_000 picoseconds. + Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -232,40 +233,40 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_653_000 picoseconds. - Weight::from_parts(1_709_000, 0) + // Minimum execution time: 5_010_000 picoseconds. + Weight::from_parts(5_150_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_317_000 picoseconds. - Weight::from_parts(1_423_000, 0) + // Minimum execution time: 4_620_000 picoseconds. + Weight::from_parts(4_750_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_204_000 picoseconds. - Weight::from_parts(1_266_000, 0) + // Minimum execution time: 4_450_000 picoseconds. + Weight::from_parts(4_540_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_173_000 picoseconds. - Weight::from_parts(1_275_000, 0) + // Minimum execution time: 4_380_000 picoseconds. + Weight::from_parts(4_510_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_416_000 picoseconds. - Weight::from_parts(1_477_000, 0) + // Minimum execution time: 4_650_000 picoseconds. + Weight::from_parts(4_790_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -288,8 +289,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 61_650_000 picoseconds. - Weight::from_parts(63_101_000, 0) + // Minimum execution time: 76_560_000 picoseconds. + Weight::from_parts(77_420_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -298,8 +299,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_526_000 picoseconds. - Weight::from_parts(3_678_000, 0) + // Minimum execution time: 7_500_000 picoseconds. + Weight::from_parts(7_660_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -322,8 +323,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `259` // Estimated: `6196` - // Minimum execution time: 58_391_000 picoseconds. - Weight::from_parts(59_568_000, 0) + // Minimum execution time: 72_671_000 picoseconds. + Weight::from_parts(73_241_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -332,40 +333,40 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_279_000 picoseconds. - Weight::from_parts(1_347_000, 0) + // Minimum execution time: 4_500_000 picoseconds. + Weight::from_parts(4_670_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_240_000 picoseconds. - Weight::from_parts(1_283_000, 0) + // Minimum execution time: 4_400_000 picoseconds. + Weight::from_parts(4_550_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_225_000 picoseconds. - Weight::from_parts(1_323_000, 0) + // Minimum execution time: 4_480_000 picoseconds. + Weight::from_parts(4_590_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_260_000 picoseconds. - Weight::from_parts(1_360_000, 0) + // Minimum execution time: 4_460_000 picoseconds. + Weight::from_parts(4_560_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_158_000 picoseconds. - Weight::from_parts(1_208_000, 0) + // Minimum execution time: 4_360_000 picoseconds. + Weight::from_parts(4_560_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/coretime/coretime-kusama/src/xcm_config.rs b/system-parachains/coretime/coretime-kusama/src/xcm_config.rs index 14961f0166..a24a478e16 100644 --- a/system-parachains/coretime/coretime-kusama/src/xcm_config.rs +++ b/system-parachains/coretime/coretime-kusama/src/xcm_config.rs @@ -15,23 +15,20 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, Balances, Broker, ParachainInfo, ParachainSystem, PolkadotXcm, - PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, - XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, Broker, CollatorSelection, ParachainInfo, + ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ pallet_prelude::PalletInfoAccess, parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; -use parachains_common::{ - impls::ToStakingPot, - xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, - }, +use parachains_common::xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::AccountIdConversion; @@ -62,6 +59,7 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; pub const GovernanceLocation: Location = Location::parent(); pub const FellowshipLocation: Location = Location::parent(); + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -203,8 +201,13 @@ impl xcm_executor::Config for XcmConfig { RuntimeCall, MaxInstructions, >; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + KsmRelayLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index a36eba2f53..1d44d5d5ff 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -10,7 +10,7 @@ version.workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -hex-literal = { optional = true, workspace = true } +hex-literal = { workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } smallvec = { workspace = true } @@ -43,6 +43,7 @@ pallet-encointer-scheduler = { workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -50,6 +51,7 @@ frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } pallet-asset-tx-payment = { workspace = true } pallet-aura = { features = ["experimental"], workspace = true } +pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-collective = { workspace = true } pallet-insecure-randomness-collective-flip = { workspace = true } @@ -57,15 +59,16 @@ pallet-membership = { workspace = true } pallet-message-queue = { workspace = true } pallet-proxy = { workspace = true } pallet-scheduler = { workspace = true } +pallet-session = { workspace = true } pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } pallet-utility = { workspace = true } 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-offchain = { workspace = true } sp-runtime = { workspace = true } @@ -73,7 +76,6 @@ sp-session = { workspace = true } sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } -sp-genesis-builder = { workspace = true } # Polkadot dependencies pallet-xcm = { workspace = true } @@ -88,11 +90,13 @@ cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-parachain-system = { features = [ "parameterized-consensus-hook", ], workspace = true } +cumulus-pallet-session-benchmarking = { optional = true, 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-utility = { workspace = true } +pallet-collator-selection = { workspace = true } parachain-info = { workspace = true } parachains-common = { workspace = true } polkadot-core-primitives = { workspace = true } @@ -113,6 +117,7 @@ system-parachains-constants = { workspace = true, default-features = true } default = ["std"] 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", @@ -122,9 +127,9 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "hex-literal", "pallet-asset-tx-payment/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "pallet-encointer-balances/runtime-benchmarks", "pallet-encointer-bazaar/runtime-benchmarks", @@ -138,7 +143,6 @@ runtime-benchmarks = [ "pallet-proxy/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "parachains-common/runtime-benchmarks", @@ -153,6 +157,7 @@ std = [ "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking?/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-aura/std", @@ -164,6 +169,7 @@ std = [ "encointer-primitives/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -172,7 +178,9 @@ std = [ "log/std", "pallet-asset-tx-payment/std", "pallet-aura/std", + "pallet-authorship/std", "pallet-balances/std", + "pallet-collator-selection/std", "pallet-collective/std", "pallet-encointer-balances/std", "pallet-encointer-bazaar-rpc-runtime-api/std", @@ -189,10 +197,10 @@ std = [ "pallet-message-queue/std", "pallet-proxy/std", "pallet-scheduler/std", + "pallet-session/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", - "pallet-treasury/std", "pallet-utility/std", "pallet-xcm/std", "parachain-info/std", @@ -234,7 +242,9 @@ try-runtime = [ "frame-try-runtime/try-runtime", "pallet-asset-tx-payment/try-runtime", "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-collator-selection/try-runtime", "pallet-collective/try-runtime", "pallet-encointer-balances/try-runtime", "pallet-encointer-bazaar/try-runtime", @@ -248,9 +258,9 @@ try-runtime = [ "pallet-message-queue/try-runtime", "pallet-proxy/try-runtime", "pallet-scheduler/try-runtime", + "pallet-session/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", - "pallet-treasury/try-runtime", "pallet-utility/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", @@ -258,7 +268,10 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/encointer/build.rs b/system-parachains/encointer/build.rs index 256e9fb765..ab41435075 100644 --- a/system-parachains/encointer/build.rs +++ b/system-parachains/encointer/build.rs @@ -14,12 +14,15 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -#[cfg(feature = "std")] +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("KSM", 12) .build() } diff --git a/system-parachains/encointer/src/deal_with_fees.rs b/system-parachains/encointer/src/deal_with_fees.rs deleted file mode 100644 index 3abe942713..0000000000 --- a/system-parachains/encointer/src/deal_with_fees.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2023 Encointer Association -// This file is part of Encointer -// -// Encointer 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. -// -// Encointer 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 Encointer. If not, see . - -use frame_support::traits::{Currency, Imbalance, OnUnbalanced}; -use sp_runtime::sp_std::marker::PhantomData; - -/// Type alias to conveniently refer to the `Currency::NegativeImbalance` associated type. -pub type NegativeImbalance = as Currency< - ::AccountId, ->>::NegativeImbalance; - -/// Moves all the fees to the treasury. -/// -/// This does only handle the native currency. The community currencies are managed by the -/// `pallet-asset-tx-payment`. -pub struct FeesToTreasury(PhantomData); - -impl OnUnbalanced> for FeesToTreasury -where - Runtime: pallet_balances::Config + pallet_treasury::Config, -{ - fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { - if let Some(mut fees) = fees_then_tips.next() { - // no burning, add all fees and tips to the treasury - - if let Some(tips) = fees_then_tips.next() { - tips.merge_into(&mut fees); - } - as OnUnbalanced<_>>::on_unbalanced(fees); - } - } -} diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index a5aee56894..0bfa686116 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -31,15 +31,17 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -mod deal_with_fees; mod migrations_fix; mod weights; pub mod xcm_config; + use codec::{Decode, Encode, MaxEncodedLen}; +use core::marker::PhantomData; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; -use deal_with_fees::FeesToTreasury; -use encointer_balances_tx_payment::{AssetBalanceOf, AssetIdOf, BalanceToCommunityBalance}; +use encointer_balances_tx_payment::{ + AccountIdOf, AssetBalanceOf, AssetIdOf, BalanceToCommunityBalance, +}; pub use encointer_primitives::{ balances::{BalanceEntry, BalanceType, Demurrage}, bazaar::{BusinessData, BusinessIdentifier, OfferingData}, @@ -48,17 +50,16 @@ pub use encointer_primitives::{ communities::{CommunityIdentifier, Location}, scheduler::CeremonyPhaseType, }; -use frame_support::traits::TransformOrigin; -use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; - use frame_support::{ construct_runtime, dispatch::DispatchClass, genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - tokens::{pay::PayFromAccount, ConversionFromAssetBalance, ConversionToAssetBalance}, + fungibles::{Balanced, Credit}, + tokens::{imbalance::ResolveTo, ConversionToAssetBalance}, ConstBool, ConstU64, Contains, EitherOfDiverse, EqualPrivilegeOnly, InstanceFilter, + TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -67,6 +68,7 @@ use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, }; +use pallet_asset_tx_payment::HandleCredit; pub use pallet_encointer_balances::Call as EncointerBalancesCall; pub use pallet_encointer_bazaar::Call as EncointerBazaarCall; pub use pallet_encointer_ceremonies::Call as EncointerCeremoniesCall; @@ -75,6 +77,7 @@ pub use pallet_encointer_faucet::Call as EncointerFaucetCall; pub use pallet_encointer_reputation_commitments::Call as EncointerReputationCommitmentsCall; pub use pallet_encointer_scheduler::Call as EncointerSchedulerCall; use pallet_xcm::{EnsureXcm, IsMajorityOfBody}; +use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; pub use parachains_common::{ impls::DealWithFees, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature, @@ -86,9 +89,9 @@ use sp_core::{crypto::KeyTypeId, ConstU32, OpaqueMetadata}; pub use sp_runtime::BuildStorage; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentityLookup, Verify}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, Perbill, Permill, RuntimeDebug, + ApplyExtrinsicResult, Perbill, RuntimeDebug, }; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -102,7 +105,7 @@ use system_parachains_constants::{ use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::{AssetId as XcmAssetId, BodyId}; -use xcm_config::{KsmLocation, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{KsmLocation, StakingPot, XcmOriginToTransactDispatchOrigin}; /// A type to hold UTC unix epoch [ms] pub type Moment = u64; @@ -122,10 +125,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("encointer-parachain"), impl_name: create_runtime_str!("encointer-parachain"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 1, apis: RUNTIME_API_VERSIONS, - transaction_version: 3, + transaction_version: 4, state_version: 0, }; @@ -172,6 +175,7 @@ impl Default for ProxyType { Self::Any } } + impl InstanceFilter for ProxyType { fn filter(&self, c: &RuntimeCall) -> bool { match self { @@ -239,6 +243,7 @@ parameter_types! { } pub struct BaseFilter; + impl Contains for BaseFilter { fn contains(_c: &RuntimeCall) -> bool { true @@ -318,67 +323,14 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - // `FeesToTreasury is an encointer adaptation. type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; } -pub const ENCOINTER_TREASURY_PALLET_ID: u8 = 43; - -parameter_types! { - pub const ProposalBond: Permill = Permill::from_percent(5); - pub const ProposalBondMinimum: Balance = 100 * MILLICENTS; - pub const ProposalBondMaximum: Balance = 500 * CENTS; - pub const SpendPeriod: BlockNumber = 6 * DAYS; - pub const Burn: Permill = Permill::from_percent(1); - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); - pub const PayoutSpendPeriod: BlockNumber = 30 * DAYS; - pub const MaxApprovals: u32 = 10; - pub TreasuryAccount: AccountId = Treasury::account_id(); -} - -pub struct NoConversion; -impl ConversionFromAssetBalance for NoConversion { - type Error = (); - fn from_asset_balance(balance: Balance, _asset_id: ()) -> Result { - Ok(balance) - } - #[cfg(feature = "runtime-benchmarks")] - fn ensure_successful(_: ()) {} -} - -impl pallet_treasury::Config for Runtime { - type PalletId = TreasuryPalletId; - type Currency = pallet_balances::Pallet; - type ApproveOrigin = MoreThanHalfCouncil; - type RejectOrigin = MoreThanHalfCouncil; - type RuntimeEvent = RuntimeEvent; - type OnSlash = (); //No proposal - type ProposalBond = ProposalBond; - type ProposalBondMinimum = ProposalBondMinimum; - type ProposalBondMaximum = ProposalBondMaximum; - type SpendPeriod = SpendPeriod; //Cannot be 0: Error: Thread 'tokio-runtime-worker' panicked at 'attempt to calculate the - // remainder with a divisor of zero - type Burn = (); //No burn - type BurnDestination = (); //No burn - type SpendFunds = (); //No spend, no bounty - type MaxApprovals = MaxApprovals; - type WeightInfo = weights::pallet_treasury::WeightInfo; - type SpendOrigin = frame_support::traits::NeverEnsureOrigin; //No spend, no bounty - type AssetKind = (); - type Beneficiary = AccountId; - type BeneficiaryLookup = IdentityLookup; - type Paymaster = PayFromAccount; - type BalanceConverter = NoConversion; - type PayoutPeriod = PayoutSpendPeriod; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); -} - impl pallet_utility::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; @@ -590,6 +542,7 @@ type MoreThanHalfCouncil = EitherOfDiverse< >; pub type CouncilCollective = pallet_collective::Instance1; + impl pallet_collective::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type Proposal = RuntimeCall; @@ -617,16 +570,92 @@ impl pallet_membership::Config for Runtime { type WeightInfo = weights::pallet_membership::WeightInfo; } +/// A `HandleCredit` implementation that naively transfers the fees to the block author. +/// Will drop and burn the assets in case the transfer fails. +pub struct AssetsToBlockAuthor(PhantomData); + +impl HandleCredit, pallet_encointer_balances::Pallet> + for AssetsToBlockAuthor +where + R: pallet_authorship::Config + pallet_encointer_balances::Config, + AccountIdOf: From + + Into + + From<[u8; 32]>, +{ + fn handle_credit(credit: Credit, pallet_encointer_balances::Pallet>) { + if let Some(author) = pallet_authorship::Pallet::::author() { + // This only affects fees paid in CC! + + // We will only grant 50% of CC fees to the current block author + // reasoning: If you send 100% to the author, then the author can attempt to increase + // the fee rate by making transactions up to the block limit at zero cost + // (since they pocket the fees). + // In the future, fees might be collected in community treasuries instead of being + // "burned" to dead account 0x00 = 5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM + // See: https://forum.polkadot.network/t/towards-encointer-self-sustainability/4195 + + let half_amount = credit.peek() / 2; + let community_pot = AccountIdOf::::from([0u8; 32]); + + let (author_credit, community_credit) = credit.split(half_amount); + // In case of error: Will drop the result triggering the `OnDrop` of the imbalance. + let _ = pallet_encointer_balances::Pallet::::resolve(&author, author_credit); + let _ = + pallet_encointer_balances::Pallet::::resolve(&community_pot, community_credit); + } + } +} + // Allow fee payment in community currency impl pallet_asset_tx_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Fungibles = pallet_encointer_balances::Pallet; type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter< encointer_balances_tx_payment::BalanceToCommunityBalance, - encointer_balances_tx_payment::BurnCredit, + AssetsToBlockAuthor, >; } +impl pallet_authorship::Config for Runtime { + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (CollatorSelection,); +} + +impl pallet_session::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions; + type NextSessionRotation = pallet_session::PeriodicSessions; + type SessionManager = CollatorSelection; + // Essentially just Aura, but let's be pedantic. + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = weights::pallet_session::WeightInfo; +} + +parameter_types! { + pub const PotId: PalletId = PalletId(*b"PotStake"); + pub const SessionLength: BlockNumber = 6 * HOURS; +} + +impl pallet_collator_selection::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type UpdateOrigin = MoreThanHalfCouncil; + type PotId = PotId; + type MaxCandidates = ConstU32<100>; + type MinEligibleCollators = ConstU32<4>; + type MaxInvulnerables = ConstU32<20>; + // should be a multiple of session or things will get inconsistent + type KickThreshold = Period; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ValidatorRegistration = Session; + type WeightInfo = weights::pallet_collator_selection::WeightInfo; +} + construct_runtime! { pub enum Runtime { // System support stuff. @@ -641,6 +670,10 @@ construct_runtime! { TransactionPayment: pallet_transaction_payment = 11, AssetTxPayment: pallet_asset_tx_payment = 12, + // Collator support. the order of these 5 are important and shall not change. + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, Aura: pallet_aura = 23, AuraExt: cumulus_pallet_aura_ext = 24, @@ -653,7 +686,6 @@ construct_runtime! { // Handy utilities. Utility: pallet_utility = 40, - Treasury: pallet_treasury = 43, Proxy: pallet_proxy = 44, Scheduler: pallet_scheduler = 48, @@ -689,6 +721,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_asset_tx_payment::ChargeAssetTxPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = @@ -703,14 +736,7 @@ parameter_types! { /// Migrations to apply on runtime upgrade. pub type Migrations = ( frame_support::migrations::RemovePallet, - // balances are more tricky. We missed to do the migration to V1 and now we have inconsistent - // state which can't be decoded to V0, yet the StorageVersion is V0. - // the strategy is to: just pretend we're on V1 - migrations_fix::balances::v1::BruteForceToV1, - // then reset to V0 - pallet_balances::migration::ResetInactive, - //then apply the proper migration as we should have done earlier - pallet_balances::migration::MigrateToTrackInactive, + migrations_fix::collator_selection_init::v0::InitInvulnerables, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -733,9 +759,9 @@ mod benches { [pallet_collective, Collective] [pallet_message_queue, MessageQueue] [pallet_membership, Membership] + [pallet_session, SessionBench::] + [pallet_collator_selection, CollatorSelection] [pallet_timestamp, Timestamp] - // todo: treasury will be removed in separate PR, so no need to fix broken benchmarks: https://github.com/polkadot-fellows/runtimes/issues/176 - //[pallet_treasury, Treasury] [pallet_utility, Utility] [pallet_proxy, Proxy] [pallet_encointer_balances, EncointerBalances] @@ -968,6 +994,7 @@ impl_runtime_apis! { 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); @@ -981,7 +1008,8 @@ impl_runtime_apis! { ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; use frame_support::traits::TrackedStorageKey; - + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + impl cumulus_pallet_session_benchmarking::Config for Runtime {} 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> { @@ -1005,8 +1033,6 @@ impl_runtime_apis! { hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), // System Events hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), - // Treasury Account - hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(), ]; let mut batches = Vec::::new(); @@ -1043,17 +1069,6 @@ pub fn aura_config_for_chain_spec(seeds: &[&str]) -> AuraConfig { } } -#[cfg(test)] -mod multiplier_tests { - use super::*; - use frame_support::pallet_prelude::PalletInfoAccess; - - #[test] - fn treasury_pallet_index_is_correct() { - assert_eq!(ENCOINTER_TREASURY_PALLET_ID, ::index() as u8); - } -} - #[test] fn test_ed_is_one_tenth_of_relay() { let relay_ed = kusama_runtime_constants::currency::EXISTENTIAL_DEPOSIT; diff --git a/system-parachains/encointer/src/migrations_fix.rs b/system-parachains/encointer/src/migrations_fix.rs index f5992de5a1..472fbd5852 100644 --- a/system-parachains/encointer/src/migrations_fix.rs +++ b/system-parachains/encointer/src/migrations_fix.rs @@ -17,174 +17,153 @@ // the following are temporary local migration fixes to solve inconsistencies caused by not // migrating Storage at the time of migrating runtime code -pub mod balances { +pub mod collator_selection_init { use frame_support::traits::OnRuntimeUpgrade; - use pallet_balances::*; #[cfg(feature = "try-runtime")] use sp_runtime::TryRuntimeError; /// The log target. - const TARGET: &str = "runtime::fix::balances::migration"; - pub mod v1 { + const TARGET: &str = "runtime::fix::collator_selection_init"; + pub mod v0 { use super::*; - use frame_support::pallet_prelude::*; - pub struct BruteForceToV1(sp_std::marker::PhantomData); - - impl OnRuntimeUpgrade for BruteForceToV1 { + use crate::SessionKeys; + use codec::EncodeLike; + use frame_support::{pallet_prelude::*, traits::Currency}; + use hex_literal::hex; + use log::info; + use parachains_common::impls::BalanceOf; + use sp_core::{crypto::key_types::AURA, sr25519}; + use sp_std::{vec, vec::Vec}; + + const INVULNERABLE_AURA_A: [u8; 32] = + hex!("5e962096da68302d5c47fce0178d72fab503c4f00a3f1df64856748f0d9dd51e"); + const INVULNERABLE_AURA_B: [u8; 32] = + hex!("0cecb8d1c2c744ca4c5cea57f5d6c40238f4dad17afa213672b8b7d43b80a659"); + const INVULNERABLE_AURA_C: [u8; 32] = + hex!("ca1951a3c4e100fb5a899e7bae3ea124491930a72000c5e4b2775fea27ecf05d"); + const INVULNERABLE_AURA_D: [u8; 32] = + hex!("484b443bd95068b860c92b0f66487b78f58234eca0f88e2adbe80bae4807b809"); + const INVULNERABLE_AURA_E: [u8; 32] = + hex!("6c642fb4b571a5685a869cd291fafd575be47a918b231ba28165e5c0cd0cfa15"); + + const INVULNERABLE_ACCOUNT_A: [u8; 32] = + hex!("920534bf448645557bae98bc7f681bd3ebed13d39bee28e10b193d4073357572"); + const INVULNERABLE_ACCOUNT_B: [u8; 32] = + hex!("76bff5abc7a4fce647fab172c9f016af8f5b5f8c3da56a92b619bbc02989fb71"); + const INVULNERABLE_ACCOUNT_C: [u8; 32] = + hex!("c0e021ab805fa956f29661c4380377e5296c5fa5fc16be26ffd516675a66bf6d"); + const INVULNERABLE_ACCOUNT_D: [u8; 32] = + hex!("9c17e9b360d9ca3cf8e42ce015ab649281d42484e7240020a12f5b16acc0d718"); + const INVULNERABLE_ACCOUNT_E: [u8; 32] = + hex!("2c3b7e77d0a8db2e3389669c4bc8112c34d5d1619cf20edc79c12c57a75f8c19"); + + pub struct InitInvulnerables(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for InitInvulnerables + where + T: frame_system::Config + + pallet_collator_selection::Config + + pallet_session::Config + + pallet_balances::Config, + ::AccountId: From<[u8; 32]>, + ::ValidatorId: From<[u8; 32]>, + ::Keys: From, + ::Balance: From, + ::Balance: EncodeLike< + <::Currency as Currency< + ::AccountId, + >>::Balance, + >, + { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, TryRuntimeError> { - Ok(().encode()) + let invulnerables_len = pallet_collator_selection::Invulnerables::::get().len(); + Ok((invulnerables_len as u32).encode()) } fn on_runtime_upgrade() -> Weight { - let onchain_version = Pallet::::on_chain_storage_version(); - if onchain_version >= 1 { - log::warn!( - target: TARGET, - "skipping bruteforce to v1 migration: executed on wrong storage version." + let invulnerables_len = pallet_collator_selection::Invulnerables::::get().len(); + if invulnerables_len > 0 { + info!(target: TARGET, "no need to initialize invulnerables"); + return T::DbWeight::get().reads_writes(1, 0) + } + info!(target: TARGET, "initializing the set of invulnerables"); + + let raw_aura_keys: Vec<[u8; 32]> = vec![ + INVULNERABLE_AURA_A, + INVULNERABLE_AURA_B, + INVULNERABLE_AURA_C, + INVULNERABLE_AURA_D, + INVULNERABLE_AURA_E, + ]; + let raw_account_keys: Vec<[u8; 32]> = vec![ + INVULNERABLE_ACCOUNT_A, + INVULNERABLE_ACCOUNT_B, + INVULNERABLE_ACCOUNT_C, + INVULNERABLE_ACCOUNT_D, + INVULNERABLE_ACCOUNT_E, + ]; + + let validatorids: Vec<::ValidatorId> = + raw_account_keys.iter().map(|&pk| pk.into()).collect(); + + pallet_session::Validators::::put(validatorids); + + let queued_keys: Vec<( + ::ValidatorId, + ::Keys, + )> = raw_account_keys + .iter() + .zip(raw_aura_keys.iter()) + .map(|(&account, &aura)| { + ( + account.into(), + SessionKeys { aura: sr25519::Public::from_raw(aura).into() }.into(), + ) + }) + .collect(); + + pallet_session::QueuedKeys::::put(queued_keys); + + for (&account, &aura) in raw_account_keys.iter().zip(raw_aura_keys.iter()) { + pallet_session::NextKeys::::insert::< + ::ValidatorId, + ::Keys, + >( + account.into(), + SessionKeys { aura: sr25519::Public::from_raw(aura).into() }.into(), ); - return T::DbWeight::get().reads(1) + pallet_session::KeyOwner::::insert::< + _, + ::ValidatorId, + >((AURA, aura.encode()), account.into()); } - log::info!(target: TARGET, "bruteforcing from {:?} to 1", onchain_version); - StorageVersion::new(1).put::>(); - - T::DbWeight::get().reads_writes(1, 1) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: sp_std::vec::Vec) -> Result<(), TryRuntimeError> { - ensure!(StorageVersion::get::>() == 1, "Must upgrade"); - Ok(()) - } - } - } -} -pub mod scheduler { - // this is necessary because migrations from v0 to v3 are no longer available in the scheduler - // pallet code and migrating is only possible from v3. The strategy here is to empty the agenda - // (has been empty since genesis) - use frame_support::traits::OnRuntimeUpgrade; - use frame_system::pallet_prelude::BlockNumberFor; - use pallet_scheduler::*; - use sp_std::vec::Vec; - - #[cfg(feature = "try-runtime")] - use sp_runtime::TryRuntimeError; - /// The log target. - const TARGET: &str = "runtime::fix::scheduler::migration"; + let mut invulnerables: Vec<::AccountId> = + raw_account_keys.iter().map(|&pk| pk.into()).collect(); + invulnerables.sort(); + let invulnerables: BoundedVec<_, T::MaxInvulnerables> = + invulnerables.try_into().unwrap(); + pallet_collator_selection::Invulnerables::::put(invulnerables); - pub mod v1 { - use super::*; - use frame_support::{pallet_prelude::*, traits::schedule}; - - #[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))] - #[derive(Clone, RuntimeDebug, Encode, Decode)] - pub(crate) struct ScheduledV1 { - maybe_id: Option>, - priority: schedule::Priority, - call: Call, - maybe_periodic: Option>, - } + pallet_collator_selection::CandidacyBond::::put::>( + 5_000_000_000_000u128.into(), + ); - #[frame_support::storage_alias] - pub(crate) type Agenda = StorageMap< - Pallet, - Twox64Concat, - BlockNumberFor, - Vec::RuntimeCall, BlockNumberFor>>>, - ValueQuery, - >; - - #[frame_support::storage_alias] - pub(crate) type Lookup = - StorageMap, Twox64Concat, Vec, TaskAddress>>; - } - - pub mod v3 { - use super::*; - use frame_support::pallet_prelude::*; - - #[frame_support::storage_alias] - pub(crate) type Agenda = StorageMap< - Pallet, - Twox64Concat, - BlockNumberFor, - Vec>>, - ValueQuery, - >; - - #[frame_support::storage_alias] - pub(crate) type Lookup = - StorageMap, Twox64Concat, Vec, TaskAddress>>; - } - - pub mod v4 { - use super::*; - use frame_support::pallet_prelude::*; - - #[frame_support::storage_alias] - pub type Agenda = StorageMap< - Pallet, - Twox64Concat, - BlockNumberFor, - BoundedVec< - Option>, - ::MaxScheduledPerBlock, - >, - ValueQuery, - >; - - #[cfg(feature = "try-runtime")] - pub(crate) type TaskName = [u8; 32]; - - #[cfg(feature = "try-runtime")] - #[frame_support::storage_alias] - pub(crate) type Lookup = - StorageMap, Twox64Concat, TaskName, TaskAddress>>; - - /// Migrate the scheduler pallet from V0 to V4 by brute-force emptying the agenda. - #[allow(dead_code)] - pub struct MigrateToV4(sp_std::marker::PhantomData); - - impl OnRuntimeUpgrade for MigrateToV4 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, TryRuntimeError> { - let agendas = v1::Agenda::::iter_keys().count() as u32; - let lookups = v1::Lookup::::iter_keys().count() as u32; - log::info!(target: TARGET, "agendas present which will be dropped: {}/{}...", agendas, lookups); - Ok((agendas, lookups).encode()) - } - - fn on_runtime_upgrade() -> Weight { - let onchain_version = Pallet::::on_chain_storage_version(); - if onchain_version >= 3 { - log::warn!( - target: TARGET, - "skipping v0 to v4 migration: executed on wrong storage version.\ - Expected version < 3, found {:?}", - onchain_version, - ); - return T::DbWeight::get().reads(1) - } - log::info!(target: TARGET, "migrating from {:?} to 4", onchain_version); - let purged_agendas = v1::Agenda::::clear(u32::MAX, None).unique as u64; - let purged_lookups = v1::Lookup::::clear(u32::MAX, None).unique as u64; - StorageVersion::new(4).put::>(); - - T::DbWeight::get() - .reads_writes(purged_agendas + purged_lookups, purged_agendas + purged_lookups) + T::DbWeight::get().reads_writes(0, 4 + 5 * 2) } #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { - ensure!(StorageVersion::get::>() == 4, "Must upgrade"); - - let agendas = Agenda::::iter_keys().count() as u32; - ensure!(agendas == 0, "agenda must be empty after now"); - let lookups = Lookup::::iter_keys().count() as u32; - ensure!(lookups == 0, "agenda must be empty after now"); - + fn post_upgrade(state: sp_std::vec::Vec) -> Result<(), TryRuntimeError> { + let invulnerables_len = + pallet_collator_selection::Invulnerables::::get().len() as u32; + let apriori_invulnerables_len: u32 = Decode::decode(&mut state.as_slice()).expect( + "the state parameter should be something that was generated by pre_upgrade", + ); + ensure!( + invulnerables_len > 0, + "invulnerables are empty after initialization. that should not happen" + ); + info!(target: TARGET, "apriori invulnerables: {}, aposteriori: {}", apriori_invulnerables_len, invulnerables_len); Ok(()) } } diff --git a/system-parachains/encointer/src/weights/mod.rs b/system-parachains/encointer/src/weights/mod.rs index a04c849297..321d486ed6 100644 --- a/system-parachains/encointer/src/weights/mod.rs +++ b/system-parachains/encointer/src/weights/mod.rs @@ -25,6 +25,7 @@ pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; pub mod pallet_balances; +pub mod pallet_collator_selection; pub mod pallet_collective; pub mod pallet_encointer_balances; pub mod pallet_encointer_bazaar; @@ -36,8 +37,8 @@ pub mod pallet_encointer_scheduler; pub mod pallet_membership; pub mod pallet_message_queue; pub mod pallet_proxy; +pub mod pallet_session; pub mod pallet_timestamp; -pub mod pallet_treasury; pub mod pallet_utility; pub mod paritydb_weights; pub mod rocksdb_weights; diff --git a/system-parachains/encointer/src/weights/pallet_collator_selection.rs b/system-parachains/encointer/src/weights/pallet_collator_selection.rs new file mode 100644 index 0000000000..bae142fdca --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_collator_selection.rs @@ -0,0 +1,281 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_collator_selection` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_collator_selection +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights/ +// --header=./file_header.txt + +#![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_collator_selection`. +pub struct WeightInfo(PhantomData); +impl pallet_collator_selection::WeightInfo for WeightInfo { + /// Storage: `Session::NextKeys` (r:20 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 20]`. + fn set_invulnerables(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `196 + b * (79 ±0)` + // Estimated: `1187 + b * (2555 ±0)` + // Minimum execution time: 11_226_000 picoseconds. + Weight::from_parts(8_468_753, 0) + .saturating_add(Weight::from_parts(0, 1187)) + // Standard Error: 5_521 + .saturating_add(Weight::from_parts(3_196_761, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) + } + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, 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 `b` is `[1, 19]`. + /// The range of component `c` is `[1, 99]`. + fn add_invulnerable(b: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `794 + b * (32 ±0) + c * (53 ±0)` + // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` + // Minimum execution time: 38_853_000 picoseconds. + Weight::from_parts(38_821_751, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 10_642 + .saturating_add(Weight::from_parts(102_671, 0).saturating_mul(b.into())) + // Standard Error: 2_017 + .saturating_add(Weight::from_parts(158_479, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[5, 20]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `119 + b * (32 ±0)` + // Estimated: `6287` + // Minimum execution time: 11_265_000 picoseconds. + Weight::from_parts(11_014_480, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_214 + .saturating_add(Weight::from_parts(161_950, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn set_desired_candidates() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_093_000 picoseconds. + Weight::from_parts(4_325_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:100 w:100) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 100]`. + /// The range of component `k` is `[0, 100]`. + fn set_candidacy_bond(c: u32, k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + c * (182 ±0) + k * (115 ±0)` + // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` + // Minimum execution time: 9_449_000 picoseconds. + Weight::from_parts(9_513_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 155_542 + .saturating_add(Weight::from_parts(5_194_785, 0).saturating_mul(c.into())) + // Standard Error: 155_542 + .saturating_add(Weight::from_parts(4_961_103, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into())) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `319 + c * (49 ±0)` + // Estimated: `6287` + // Minimum execution time: 23_774_000 picoseconds. + Weight::from_parts(26_546_147, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 1_740 + .saturating_add(Weight::from_parts(123_165, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[1, 99]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `764 + c * (52 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 31_024_000 picoseconds. + Weight::from_parts(35_079_112, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_113 + .saturating_add(Weight::from_parts(136_243, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `904 + c * (53 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 48_643_000 picoseconds. + Weight::from_parts(53_241_186, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_631 + .saturating_add(Weight::from_parts(156_227, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn leave_intent(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `347 + c * (48 ±0)` + // Estimated: `6287` + // Minimum execution time: 26_974_000 picoseconds. + Weight::from_parts(30_461_854, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 2_180 + .saturating_add(Weight::from_parts(134_254, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + fn note_author() -> Weight { + // Proof Size summary in bytes: + // Measured: `155` + // Estimated: `6196` + // Minimum execution time: 39_365_000 picoseconds. + Weight::from_parts(39_875_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:97 w:97) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + /// The range of component `c` is `[1, 100]`. + fn new_session(r: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` + // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` + // Minimum execution time: 18_553_000 picoseconds. + Weight::from_parts(18_854_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 280_994 + .saturating_add(Weight::from_parts(12_419_756, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into())) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_session.rs b/system-parachains/encointer/src/weights/pallet_session.rs new file mode 100644 index 0000000000..e3579d5aaf --- /dev/null +++ b/system-parachains/encointer/src/weights/pallet_session.rs @@ -0,0 +1,77 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_session` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./asset-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_session +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./asset-hub-kusama-weights/ +// --header=./file_header.txt + +#![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: `297` + // Estimated: `3762` + // Minimum execution time: 15_064_000 picoseconds. + Weight::from_parts(15_441_000, 0) + .saturating_add(Weight::from_parts(0, 3762)) + .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: `279` + // Estimated: `3744` + // Minimum execution time: 10_865_000 picoseconds. + Weight::from_parts(11_276_000, 0) + .saturating_add(Weight::from_parts(0, 3744)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/encointer/src/weights/pallet_treasury.rs b/system-parachains/encointer/src/weights/pallet_treasury.rs deleted file mode 100644 index 52b59a25cd..0000000000 --- a/system-parachains/encointer/src/weights/pallet_treasury.rs +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! Autogenerated weights for `pallet_treasury` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `a3dce7bd4066`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("spec-kusama.json")`, DB CACHE: 1024 - -// Executed Command: -// /builds/polkadot-sdk/target/production/polkadot -// benchmark -// pallet -// --chain=spec-kusama.json -// --pallet=pallet_treasury -// --extrinsic= -// --output=/builds/runtimes/relay/kusama/src/weights -// --header=/builds/bench/header.txt -// --no-median-slopes -// --no-min-squares - -#![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_local() -> Weight { - // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `1887` - // Minimum execution time: 7_563_000 picoseconds. - Weight::from_parts(7_868_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: `107` - // Estimated: `1489` - // Minimum execution time: 16_827_000 picoseconds. - Weight::from_parts(17_262_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:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn reject_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `265` - // Estimated: `3593` - // Minimum execution time: 25_789_000 picoseconds. - Weight::from_parts(26_398_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// 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: `433 + p * (8 ±0)` - // Estimated: `3573` - // Minimum execution time: 5_353_000 picoseconds. - Weight::from_parts(8_423_989, 0) - .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 1_120 - .saturating_add(Weight::from_parts(45_883, 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: `90` - // Estimated: `1887` - // Minimum execution time: 4_075_000 picoseconds. - Weight::from_parts(4_286_000, 0) - .saturating_add(Weight::from_parts(0, 1887)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// 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:99 w:99) - /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:199 w:199) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, 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, 99]`. - fn on_initialize_proposals(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `294 + p * (251 ±0)` - // Estimated: `3593 + p * (5206 ±0)` - // Minimum execution time: 34_895_000 picoseconds. - Weight::from_parts(40_046_318, 0) - .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 6_188 - .saturating_add(Weight::from_parts(25_772_314, 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())) - } - /// Storage: `Treasury::SpendCount` (r:1 w:1) - /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Treasury::Spends` (r:0 w:1) - /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) - fn spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `1489` - // Minimum execution time: 8_598_000 picoseconds. - Weight::from_parts(8_937_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::Spends` (r:1 w:1) - /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) - /// Storage: `XcmPallet::QueryCounter` (r:1 w:1) - /// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) - /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::Queries` (r:0 w:1) - /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn payout() -> Weight { - // Proof Size summary in bytes: - // Measured: `251` - // Estimated: `5318` - // Minimum execution time: 29_981_000 picoseconds. - Weight::from_parts(30_787_000, 0) - .saturating_add(Weight::from_parts(0, 5318)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: `Treasury::Spends` (r:1 w:1) - /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) - /// Storage: `XcmPallet::Queries` (r:1 w:1) - /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn check_status() -> Weight { - // Proof Size summary in bytes: - // Measured: `170` - // Estimated: `5318` - // Minimum execution time: 15_985_000 picoseconds. - Weight::from_parts(16_431_000, 0) - .saturating_add(Weight::from_parts(0, 5318)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Treasury::Spends` (r:1 w:1) - /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`) - fn void_spend() -> Weight { - // Proof Size summary in bytes: - // Measured: `142` - // Estimated: `5318` - // Minimum execution time: 8_515_000 picoseconds. - Weight::from_parts(8_795_000, 0) - .saturating_add(Weight::from_parts(0, 5318)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index 6639eecfb3..dc91215ee9 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -16,12 +16,12 @@ //! Almost identical to ../asset-hubs/asset-hub-kusama use super::{ - AccountId, Balances, FeesToTreasury, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, + AccountId, Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, - traits::{Contains, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, Contains, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; @@ -50,6 +50,7 @@ parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); + pub StakingPot: AccountId = CollatorSelection::account_id(); } /// Type for specifying how a `Location` can be converted into an `AccountId`. This is used @@ -111,6 +112,7 @@ parameter_types! { } pub struct ParentOrParentsPlurality; + impl Contains for ParentOrParentsPlurality { fn contains(location: &Location) -> bool { matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) @@ -153,6 +155,7 @@ parameter_types! { pub type TrustedTeleporters = ConcreteAssetFromSystem; pub struct XcmConfig; + impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; @@ -163,9 +166,13 @@ impl xcm_executor::Config for XcmConfig { type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; - // `FeesToTreasury` is an encointer adaptation - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + KsmLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 5baa7ec3ad..82a33b746b 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -89,7 +89,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("glutton"), impl_name: create_runtime_str!("glutton"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/system-parachains/people/people-kusama/Cargo.toml b/system-parachains/people/people-kusama/Cargo.toml index 58016385c7..dbb81e0135 100644 --- a/system-parachains/people/people-kusama/Cargo.toml +++ b/system-parachains/people/people-kusama/Cargo.toml @@ -19,6 +19,7 @@ scale-info = { features = ["derive"], workspace = true } # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } @@ -94,6 +95,7 @@ std = [ "enumflags2/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", @@ -197,7 +199,10 @@ try-runtime = [ "sp-runtime/try-runtime", ] +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder/metadata-hash"] + # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["sp-api/disable-logging"] +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/people/people-kusama/src/identity_ops.rs b/system-parachains/people/people-kusama/src/identity_ops.rs new file mode 100644 index 0000000000..1c0a5a4352 --- /dev/null +++ b/system-parachains/people/people-kusama/src/identity_ops.rs @@ -0,0 +1,237 @@ +// 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. + +#[frame_support::pallet] +pub mod pallet_identity_ops { + use crate::*; + use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; + use pallet_identity::Judgement; + + /// Weight information for extrinsics in this pallet. + pub trait WeightInfo { + /// Weight for clearing judgement. + fn clear_judgement() -> Weight; + } + + type IdentityPallet = pallet_identity::Pallet; + + #[pallet::pallet] + pub struct Pallet(PhantomData); + + #[pallet::config] + pub trait Config: frame_system::Config { + /// Overarching event type. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + } + + #[pallet::error] + pub enum Error { + /// No judgement to clear. + NotFound, + } + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// The invalid judgements have been cleared. + JudgementsCleared { target: AccountId }, + } + + pub(crate) type Identity = ( + pallet_identity::Registration< + ::Balance, + ::MaxRegistrars, + ::IdentityInformation, + >, + Option::MaxUsernameLength>>, + ); + + /// Alias for `IdentityOf` from `pallet_identity`. + #[frame_support::storage_alias(pallet_name)] + pub(crate) type IdentityOf = + StorageMap; + + #[pallet::call] + impl Pallet { + /// Clear requested judgements that do not have a corresponding deposit reserved. + /// + /// This is successful only if the `target` account has judgements to clear. The transaction + /// fee is refunded to the caller if successful. + #[pallet::call_index(0)] + #[pallet::weight(weights::pallet_identity_ops::WeightInfo::::clear_judgement())] + pub fn clear_judgement( + _origin: OriginFor, + target: AccountId, + ) -> DispatchResultWithPostInfo { + let identity = IdentityPallet::identity(&target).ok_or(Error::::NotFound)?; + let (removed, identity) = Self::do_clear_judgement(&target, identity); + ensure!(removed > 0, Error::::NotFound); + + IdentityOf::insert(&target, identity); + + Self::deposit_event(Event::JudgementsCleared { target }); + + Ok(Pays::No.into()) + } + } + + impl Pallet { + fn do_clear_judgement(account_id: &AccountId, mut identity: Identity) -> (u32, Identity) { + // `subs_of`'s query kind is value option, if non subs the deposit is zero. + let (subs_deposit, _) = IdentityPallet::subs_of(account_id); + // deposit without deposits for judgement request. + let identity_deposit = identity.0.deposit.saturating_add(subs_deposit); + // total reserved balance. + let reserved = Balances::reserved_balance(account_id); + // expected deposit with judgement deposits. + let mut expected_total_deposit = identity_deposit; + // count before cleaning up the judgements. + let judgements_count = identity.0.judgements.len(); + + identity.0.judgements.retain(|(_, judgement)| { + if let Judgement::FeePaid(deposit) = judgement { + expected_total_deposit = expected_total_deposit.saturating_add(*deposit); + reserved >= expected_total_deposit && *deposit > 0 + } else { + true + } + }); + + ((judgements_count - identity.0.judgements.len()) as u32, identity) + } + } + + #[pallet::hooks] + impl Hooks> for Pallet { + #[cfg(feature = "try-runtime")] + fn try_state(_: BlockNumberFor) -> Result<(), sp_runtime::TryRuntimeError> { + use crate::Balance; + use sp_core::crypto::Ss58Codec; + + let mut total_invalid_identity_count = 0; + let mut total_invalid_judgement_count = 0; + let mut identity_count = 0; + IdentityOf::iter().for_each(|(account_id, registration)| { + let (identity, username) = registration; + + let (subs_deposit, _) = IdentityPallet::subs_of(&account_id); + let deposit_wo_judgement = identity.deposit.saturating_add(subs_deposit); + let reserved = Balances::reserved_balance(&account_id); + + let (invalid_judgement_count, expected_total_deposit) = + identity.judgements.iter().fold( + (0, deposit_wo_judgement), + |(count, total_deposit): (u32, Balance), (_, judgement)| { + if let Judgement::FeePaid(deposit) = judgement { + if total_deposit.saturating_add(*deposit) > reserved || + *deposit == 0 + { + return (count + 1, total_deposit.saturating_add(*deposit)) + } + } + (count, total_deposit) + }, + ); + + if expected_total_deposit >= reserved && invalid_judgement_count > 0 { + total_invalid_identity_count += 1; + total_invalid_judgement_count += invalid_judgement_count; + + log::info!( + "account with invalid state: {:?}, expected reserve at least: {:?}, actual: {:?}, invalid judgements: {:?}", + account_id.clone().to_ss58check_with_version(2u8.into()), + expected_total_deposit, + reserved, + invalid_judgement_count, + ); + + assert_eq!( + invalid_judgement_count, + Self::do_clear_judgement(&account_id, (identity, username)).0 + ); + + if deposit_wo_judgement != reserved { + log::warn!( + "unexpected state: {:?}, deposit w/o judgement: {:?}, not equal to the total reserved: {:?}", + account_id.clone().to_ss58check_with_version(2u8.into()), + deposit_wo_judgement, + reserved, + ); + } + } else { + assert_eq!(0, Self::do_clear_judgement(&account_id, (identity, username)).0); + } + if deposit_wo_judgement > reserved { + log::warn!( + "unexpected state: {:?}, deposit w/o judgement: {:?}, greater than the total reserved: {:?}", + account_id.clone().to_ss58check_with_version(2u8.into()), + deposit_wo_judgement, + reserved, + ); + } + identity_count += 1; + }); + + log::info!("total identities processed: {:?}", identity_count); + log::info!("invalid identities: {:?}", total_invalid_identity_count); + log::info!("invalid judgements: {:?}", total_invalid_judgement_count); + + Ok(()) + } + } +} + +#[cfg(feature = "runtime-benchmarks")] +#[frame_benchmarking::v2::benchmarks(where T: pallet_identity_ops::Config)] +mod benchmarks { + use crate::{people::IdentityInfo, *}; + use frame_benchmarking::BenchmarkError; + use frame_system::RawOrigin; + use pallet_identity::{IdentityInformationProvider, Judgement}; + use pallet_identity_ops::{Event, Identity, *}; + use parachains_common::{AccountId, Balance}; + use sp_core::Get; + use sp_runtime::traits::One; + + #[benchmark] + fn clear_judgement() -> Result<(), BenchmarkError> { + let max_registrars = + <::MaxRegistrars as Get>::get(); + let mut judgements = Vec::<(u32, Judgement)>::new(); + for i in 0..max_registrars { + judgements.push((i, Judgement::FeePaid(Balance::one()))); + } + let identity: Identity = ( + pallet_identity::Registration { + deposit: Balance::one(), + judgements: judgements.try_into().unwrap(), + info: IdentityInfo::create_identity_info(), + }, + None, + ); + + let target: AccountId = [1u8; 32].into(); + + IdentityOf::insert(&target, identity); + + #[extrinsic_call] + _(RawOrigin::None, target.clone()); + + crate::System::assert_last_event(Event::::JudgementsCleared { target }.into()); + + Ok(()) + } +} diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index 45bb9568d3..76dfd29c59 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -18,6 +18,7 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +mod identity_ops; pub mod people; mod weights; pub mod xcm_config; @@ -31,8 +32,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, InstanceFilter, - TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -41,14 +42,14 @@ use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, }; +use identity_ops::pallet_identity_ops; use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; use parachains_common::{ - impls::DealWithFees, message_queue::{NarrowOriginToSibling, ParaIdToSibling}, AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use polkadot_runtime_common::{identity_migrator, BlockHashCount, SlowAdjustingFeeUpdate}; +use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use sp_api::impl_runtime_apis; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; @@ -69,8 +70,8 @@ use system_parachains_constants::kusama::{consensus::*, currency::*, fee::Weight use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::BodyId; use xcm_config::{ - FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, XcmConfig, - XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, StakingPot, + XcmConfig, XcmOriginToTransactDispatchOrigin, }; /// The address format for describing accounts. @@ -95,15 +96,24 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +parameter_types! { + pub const IdentityMigratorPalletName: &'static str = "IdentityMigrator"; +} /// Migrations to apply on runtime upgrade. pub type Migrations = ( pallet_collator_selection::migration::v2::MigrationToV2, + // remove `identity-migrator` + frame_support::migrations::RemovePallet< + IdentityMigratorPalletName, + ::DbWeight, + >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -129,10 +139,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("people-kusama"), impl_name: create_runtime_str!("people-kusama"), authoring_version: 1, - spec_version: 1_002_004, + spec_version: 1_002_006, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 0, + transaction_version: 1, state_version: 1, }; @@ -225,7 +235,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = - pallet_transaction_payment::CurrencyAdapter>; + pallet_transaction_payment::FungibleAdapter>; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; @@ -504,12 +514,8 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } -// To be removed after migration is complete. -impl identity_migrator::Config for Runtime { +impl pallet_identity_ops::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Reaper = EnsureRoot; - type ReapIdentityHandler = (); - type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -547,8 +553,8 @@ construct_runtime!( // The main stage. Identity: pallet_identity = 50, - // To migrate deposits - IdentityMigrator: identity_migrator = 248, + // Identity operations pallet. + IdentityOps: pallet_identity_ops = 247, } ); @@ -559,20 +565,21 @@ mod benches { [frame_system, SystemBench::] [pallet_balances, Balances] [pallet_identity, Identity] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_proxy, Proxy] [pallet_session, SessionBench::] [pallet_timestamp, Timestamp] [pallet_utility, Utility] - // Polkadot - [polkadot_runtime_common::identity_migrator, IdentityMigrator] // Cumulus + [cumulus_pallet_parachain_system, ParachainSystem] [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_collator_selection, CollatorSelection] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] + [pallet_identity_ops, IdentityOps] ); } diff --git a/system-parachains/people/people-kusama/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/people/people-kusama/src/weights/cumulus_pallet_parachain_system.rs index fcea5fd1bf..36014a287a 100644 --- a/system-parachains/people/people-kusama/src/weights/cumulus_pallet_parachain_system.rs +++ b/system-parachains/people/people-kusama/src/weights/cumulus_pallet_parachain_system.rs @@ -1,11 +1,12 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // 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 +// 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, @@ -13,41 +14,61 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Need to rerun +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_parachain_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-kusama-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `cumulus_pallet_parachain_system`. pub struct WeightInfo(PhantomData); impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { - /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) - /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) - /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: ParachainSystem ProcessedDownwardMessages (r:0 w:1) - /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MessageQueue Pages (r:0 w:16) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1) + /// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1) + /// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1000) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `12` - // Estimated: `8013` - // Minimum execution time: 1_622_000 picoseconds. - Weight::from_parts(1_709_000, 0) - .saturating_add(Weight::from_parts(0, 8013)) - // Standard Error: 22_138 - .saturating_add(Weight::from_parts(23_923_169, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(4)) + // Estimated: `3517` + // Minimum execution time: 2_110_000 picoseconds. + Weight::from_parts(2_210_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + // Standard Error: 53_320 + .saturating_add(Weight::from_parts(193_333_537, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } } diff --git a/system-parachains/people/people-kusama/src/weights/mod.rs b/system-parachains/people/people-kusama/src/weights/mod.rs index dce959e817..0eee5fa387 100644 --- a/system-parachains/people/people-kusama/src/weights/mod.rs +++ b/system-parachains/people/people-kusama/src/weights/mod.rs @@ -23,6 +23,7 @@ pub mod frame_system; pub mod pallet_balances; pub mod pallet_collator_selection; pub mod pallet_identity; +pub mod pallet_identity_ops; pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_proxy; @@ -31,7 +32,6 @@ pub mod pallet_timestamp; pub mod pallet_utility; pub mod pallet_xcm; pub mod paritydb_weights; -pub mod polkadot_runtime_common_identity_migrator; pub mod rocksdb_weights; pub mod xcm; diff --git a/system-parachains/people/people-kusama/src/weights/pallet_identity_ops.rs b/system-parachains/people/people-kusama/src/weights/pallet_identity_ops.rs new file mode 100644 index 0000000000..f26f114e49 --- /dev/null +++ b/system-parachains/people/people-kusama/src/weights/pallet_identity_ops.rs @@ -0,0 +1,66 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_identity_ops` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-06-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_identity_ops +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-kusama-weights/ +// --header=./file_header.txt + +#![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_ops`. +pub struct WeightInfo(PhantomData); +impl crate::pallet_identity_ops::WeightInfo for WeightInfo { + /// Storage: `Identity::IdentityOf` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `Identity::SubsOf` (r:1 w:0) + /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn clear_judgement() -> Weight { + // Proof Size summary in bytes: + // Measured: `828` + // Estimated: `6723` + // Minimum execution time: 22_170_000 picoseconds. + Weight::from_parts(22_770_000, 0) + .saturating_add(Weight::from_parts(0, 6723)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/people/people-kusama/src/weights/pallet_message_queue.rs b/system-parachains/people/people-kusama/src/weights/pallet_message_queue.rs index fe1911b77a..02ad58d0a2 100644 --- a/system-parachains/people/people-kusama/src/weights/pallet_message_queue.rs +++ b/system-parachains/people/people-kusama/src/weights/pallet_message_queue.rs @@ -1,11 +1,12 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // 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 +// 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, @@ -13,143 +14,169 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Need to rerun +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-kusama-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_message_queue +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-kusama-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_message_queue`. pub struct WeightInfo(PhantomData); impl pallet_message_queue::WeightInfo for WeightInfo { - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn ready_ring_knit() -> Weight { // Proof Size summary in bytes: - // Measured: `189` - // Estimated: `7534` - // Minimum execution time: 13_668_000 picoseconds. - Weight::from_parts(13_668_000, 0) - .saturating_add(Weight::from_parts(0, 7534)) + // Measured: `223` + // Estimated: `6044` + // Minimum execution time: 14_630_000 picoseconds. + Weight::from_parts(15_410_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) fn ready_ring_unknit() -> Weight { // Proof Size summary in bytes: - // Measured: `184` - // Estimated: `7534` - // Minimum execution time: 11_106_000 picoseconds. - Weight::from_parts(11_106_000, 0) - .saturating_add(Weight::from_parts(0, 7534)) + // Measured: `218` + // Estimated: `6044` + // Minimum execution time: 12_680_000 picoseconds. + Weight::from_parts(13_110_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn service_queue_base() -> Weight { // Proof Size summary in bytes: // Measured: `6` // Estimated: `3517` - // Minimum execution time: 4_921_000 picoseconds. - Weight::from_parts(4_921_000, 0) + // Minimum execution time: 4_340_000 picoseconds. + Weight::from_parts(4_470_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_completion() -> Weight { // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 6_879_000 picoseconds. - Weight::from_parts(6_879_000, 0) + // Minimum execution time: 6_730_000 picoseconds. + Weight::from_parts(6_990_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_no_completion() -> Weight { // Proof Size summary in bytes: // Measured: `72` // Estimated: `69050` - // Minimum execution time: 7_564_000 picoseconds. - Weight::from_parts(7_564_000, 0) + // Minimum execution time: 7_030_000 picoseconds. + Weight::from_parts(7_190_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `MessageQueue::BookStateFor` (r:0 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_item() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 59_963_000 picoseconds. - Weight::from_parts(59_963_000, 0) + // Minimum execution time: 158_961_000 picoseconds. + Weight::from_parts(160_341_000, 0) .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:0) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:0) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn bump_service_head() -> Weight { // Proof Size summary in bytes: - // Measured: `99` - // Estimated: `5007` - // Minimum execution time: 7_200_000 picoseconds. - Weight::from_parts(7_200_000, 0) - .saturating_add(Weight::from_parts(0, 5007)) + // Measured: `171` + // Estimated: `3517` + // Minimum execution time: 8_270_000 picoseconds. + Weight::from_parts(8_490_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn reap_page() -> Weight { // Proof Size summary in bytes: // Measured: `65667` - // Estimated: `72567` - // Minimum execution time: 41_366_000 picoseconds. - Weight::from_parts(41_366_000, 0) - .saturating_add(Weight::from_parts(0, 72567)) + // Estimated: `69050` + // Minimum execution time: 55_080_000 picoseconds. + Weight::from_parts(55_891_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_removed() -> Weight { // Proof Size summary in bytes: // Measured: `65667` - // Estimated: `72567` - // Minimum execution time: 60_538_000 picoseconds. - Weight::from_parts(60_538_000, 0) - .saturating_add(Weight::from_parts(0, 72567)) + // Estimated: `69050` + // Minimum execution time: 74_080_000 picoseconds. + Weight::from_parts(74_860_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_updated() -> Weight { // Proof Size summary in bytes: // Measured: `65667` - // Estimated: `72567` - // Minimum execution time: 73_665_000 picoseconds. - Weight::from_parts(73_665_000, 0) - .saturating_add(Weight::from_parts(0, 72567)) + // Estimated: `69050` + // Minimum execution time: 109_091_000 picoseconds. + Weight::from_parts(110_080_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/system-parachains/people/people-kusama/src/weights/xcm/mod.rs b/system-parachains/people/people-kusama/src/weights/xcm/mod.rs index 37ea90fa3b..73e55b8559 100644 --- a/system-parachains/people/people-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/people/people-kusama/src/weights/xcm/mod.rs @@ -59,10 +59,8 @@ impl XcmWeightInfo for PeopleKusamaXcmWeight { fn withdraw_asset(assets: &Assets) -> Weight { assets.weigh_assets(XcmFungibleWeight::::withdraw_asset()) } - // Currently there is no trusted reserve - fn reserve_asset_deposited(_assets: &Assets) -> Weight { - // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 - Weight::from_parts(1_000_000_000_u64, 0) + fn reserve_asset_deposited(assets: &Assets) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::reserve_asset_deposited()) } fn receive_teleported_asset(assets: &Assets) -> Weight { assets.weigh_assets(XcmFungibleWeight::::receive_teleported_asset()) diff --git a/system-parachains/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 56d42a7e27..61e9373bb5 100644 --- a/system-parachains/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/people/people-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -94,6 +94,16 @@ impl WeightInfo { .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub(crate) fn reserve_asset_deposited() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) diff --git a/system-parachains/people/people-kusama/src/xcm_config.rs b/system-parachains/people/people-kusama/src/xcm_config.rs index f76ed06b7e..8cffb3424f 100644 --- a/system-parachains/people/people-kusama/src/xcm_config.rs +++ b/system-parachains/people/people-kusama/src/xcm_config.rs @@ -14,18 +14,17 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, - Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem, + PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use crate::{TransactionByteFee, CENTS}; use frame_support::{ parameter_types, - traits::{ConstU32, Contains, Equals, Everything, Nothing}, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ - impls::ToStakingPot, xcm_config::{ AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, RelayOrOtherSystemParachains, @@ -68,6 +67,7 @@ parameter_types! { pub RelayTreasuryPalletAccount: AccountId = LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) .unwrap_or(TreasuryAccount::get()); + pub StakingPot: AccountId = CollatorSelection::account_id(); } pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< @@ -204,8 +204,13 @@ impl xcm_executor::Config for XcmConfig { RuntimeCall, MaxInstructions, >; - type Trader = - UsingComponents>; + type Trader = UsingComponents< + WeightToFee, + RelayLocation, + AccountId, + Balances, + ResolveTo, + >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/system-parachains/people/people-polkadot/Cargo.toml b/system-parachains/people/people-polkadot/Cargo.toml new file mode 100644 index 0000000000..281c091473 --- /dev/null +++ b/system-parachains/people/people-polkadot/Cargo.toml @@ -0,0 +1,208 @@ +[package] +authors.workspace = true +build = "build.rs" +description = "Polkadot People Parachain Runtime" +edition.workspace = true +license.workspace = true +name = "people-polkadot-runtime" +repository.workspace = true +version.workspace = true + +[dependencies] +enumflags2 = { workspace = true } +serde = { optional = true, features = ["derive"], workspace = true } +codec = { features = ["derive", "max-encoded-len"], workspace = true } +hex-literal = { workspace = true } +log = { workspace = true } +scale-info = { features = ["derive"], workspace = true } + +# Substrate +frame-benchmarking = { optional = true, workspace = true } +frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api = { workspace = true } +frame-try-runtime = { optional = true, workspace = true } +pallet-aura = { features = ["experimental"], workspace = true } +pallet-authorship = { workspace = true } +pallet-balances = { workspace = true } +pallet-identity = { workspace = true } +pallet-message-queue = { workspace = true } +pallet-multisig = { workspace = true } +pallet-proxy = { workspace = true } +pallet-session = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-utility = { workspace = true } +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-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-std = { workspace = true } +sp-storage = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } + +# Polkadot +pallet-xcm = { workspace = true } +pallet-xcm-benchmarks = { optional = true, workspace = true } +polkadot-parachain-primitives = { workspace = true } +polkadot-runtime-common = { workspace = true } +polkadot-runtime-constants = { workspace = true } +xcm = { workspace = true } +xcm-builder = { workspace = true } +xcm-executor = { workspace = true } + +# Cumulus +cumulus-primitives-aura = { workspace = true } +cumulus-pallet-aura-ext = { workspace = true } +cumulus-pallet-parachain-system = { features = [ + "parameterized-consensus-hook", +], workspace = true } +cumulus-pallet-session-benchmarking = { workspace = true } +cumulus-pallet-xcm = { workspace = true } +cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-primitives-core = { workspace = true } +cumulus-primitives-utility = { workspace = true } +pallet-collator-selection = { workspace = true } +parachain-info = { workspace = true } +parachains-common = { workspace = true } +system-parachains-constants = { workspace = true } + +[build-dependencies] +substrate-wasm-builder = { optional = true, workspace = true } + +[features] +default = ["std"] +std = [ + "codec/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-aura/std", + "cumulus-primitives-core/std", + "cumulus-primitives-utility/std", + "enumflags2/std", + "frame-benchmarking?/std", + "frame-executive/std", + "frame-metadata-hash-extension/std", + "frame-support/std", + "frame-system-benchmarking?/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime?/std", + "polkadot-runtime-constants/std", + "log/std", + "pallet-aura/std", + "pallet-authorship/std", + "pallet-balances/std", + "pallet-collator-selection/std", + "pallet-identity/std", + "pallet-message-queue/std", + "pallet-multisig/std", + "pallet-proxy/std", + "pallet-session/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-utility/std", + "pallet-xcm-benchmarks?/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "polkadot-parachain-primitives/std", + "polkadot-runtime-common/std", + "scale-info/std", + "serde", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-storage/std", + "sp-transaction-pool/std", + "sp-version/std", + "substrate-wasm-builder", + "system-parachains-constants/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", +] + +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-balances/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", +] + +try-runtime = [ + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-identity/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-multisig/try-runtime", + "pallet-proxy/try-runtime", + "pallet-session/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-utility/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", + "polkadot-runtime-common/try-runtime", + "sp-runtime/try-runtime", +] + +# Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. +metadata-hash = ["substrate-wasm-builder?/metadata-hash"] + +# A feature that should be enabled when the runtime should be built for on-chain +# deployment. This will disable stuff that shouldn't be part of the on-chain wasm +# to make it smaller, like logging for example. +on-chain-release-build = ["sp-api/disable-logging", "metadata-hash"] diff --git a/system-parachains/people/people-polkadot/build.rs b/system-parachains/people/people-polkadot/build.rs new file mode 100644 index 0000000000..e65608baae --- /dev/null +++ b/system-parachains/people/people-polkadot/build.rs @@ -0,0 +1,29 @@ +// 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. + +#[cfg(all(feature = "std", not(feature = "metadata-hash")))] +fn main() { + substrate_wasm_builder::WasmBuilder::build_using_defaults() +} + +#[cfg(all(feature = "std", feature = "metadata-hash"))] +fn main() { + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("DOT", 10) + .build() +} + +#[cfg(not(feature = "std"))] +fn main() {} diff --git a/system-parachains/people/people-polkadot/src/lib.rs b/system-parachains/people/people-polkadot/src/lib.rs new file mode 100644 index 0000000000..717c1f7b91 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/lib.rs @@ -0,0 +1,986 @@ +// 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. + +#![cfg_attr(not(feature = "std"), no_std)] +#![recursion_limit = "256"] +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +pub mod people; +mod weights; +pub mod xcm_config; + +use codec::{Decode, Encode, MaxEncodedLen}; +use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; +use frame_support::{ + construct_runtime, derive_impl, + dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, + parameter_types, + traits::{ + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, InstanceFilter, TransformOrigin, + }, + weights::{ConstantMultiplier, Weight}, + PalletId, +}; +use frame_system::{ + limits::{BlockLength, BlockWeights}, + EnsureRoot, +}; +use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; +use parachains_common::{ + message_queue::{NarrowOriginToSibling, ParaIdToSibling}, + AccountId, Balance, BlockNumber, Hash, Header, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, + HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, +}; +use polkadot_runtime_common::{identity_migrator, BlockHashCount, SlowAdjustingFeeUpdate}; +use sp_api::impl_runtime_apis; +pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + traits::{BlakeTwo256, Block as BlockT}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, RuntimeDebug, +}; +pub use sp_runtime::{MultiAddress, Perbill, Permill}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; +use system_parachains_constants::polkadot::{consensus::*, currency::*, fee::WeightToFee}; +use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; +use xcm::latest::prelude::BodyId; +use xcm_config::{ + FellowshipLocation, GovernanceLocation, PriceForSiblingParachainDelivery, StakingPot, + XcmConfig, XcmOriginToTransactDispatchOrigin, +}; + +/// 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 an [`sp_runtime::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, + frame_metadata_hash_extension::CheckMetadataHash, +); + +/// Unchecked extrinsic type as expected by this runtime. +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; + +/// Migrations to apply on runtime upgrade. +pub type Migrations = ( + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, +); + +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + Migrations, +>; + +impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + } +} + +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("people-polkadot"), + impl_name: create_runtime_str!("people-polkadot"), + authoring_version: 1, + spec_version: 1_002_007, + impl_version: 0, + apis: RUNTIME_API_VERSIONS, + transaction_version: 0, + state_version: 1, +}; + +/// 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; + pub RuntimeBlockLength: BlockLength = + BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() + .base_block(BlockExecutionWeight::get()) + .for_class(DispatchClass::all(), |weights| { + weights.base_extrinsic = ExtrinsicBaseWeight::get(); + }) + .for_class(DispatchClass::Normal, |weights| { + weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + }) + .for_class(DispatchClass::Operational, |weights| { + weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); + // Operational transactions have some extra reserved space, so that they + // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. + weights.reserved = Some( + MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT + ); + }) + .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) + .build_or_panic(); + pub const SS58Prefix: u8 = 0; +} + +#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Runtime { + type BaseCallFilter = Everything; + type AccountId = AccountId; + type Nonce = Nonce; + type Hash = Hash; + type Block = Block; + type BlockHashCount = BlockHashCount; + type DbWeight = RocksDbWeight; + type Version = Version; + type AccountData = pallet_balances::AccountData; + type SystemWeightInfo = weights::frame_system::WeightInfo; + type SS58Prefix = SS58Prefix; + type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; + type MaxConsumers = ConstU32<16>; +} + +impl pallet_timestamp::Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; + type WeightInfo = weights::pallet_timestamp::WeightInfo; +} + +impl pallet_authorship::Config for Runtime { + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (CollatorSelection,); +} + +parameter_types! { + pub const ExistentialDeposit: Balance = SYSTEM_PARA_EXISTENTIAL_DEPOSIT; +} + +impl pallet_balances::Config for Runtime { + type Balance = Balance; + type DustRemoval = (); + type RuntimeEvent = RuntimeEvent; + 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 RuntimeFreezeReason = RuntimeFreezeReason; + type RuntimeHoldReason = RuntimeHoldReason; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; +} + +parameter_types! { + /// Relay Chain `TransactionByteFee` / 10. + pub const TransactionByteFee: Balance = MILLICENTS; +} + +impl pallet_transaction_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnChargeTransaction = + pallet_transaction_payment::FungibleAdapter>; + type OperationalFeeMultiplier = ConstU8<5>; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; +} + +parameter_types! { + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; +} + +impl cumulus_pallet_parachain_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnSystemEvent = (); + type SelfParaId = parachain_info::Pallet; + type OutboundXcmpMessageSource = XcmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type ReservedDmpWeight = ReservedDmpWeight; + type XcmpMessageHandler = XcmpQueue; + type ReservedXcmpWeight = ReservedXcmpWeight; + type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases; + type ConsensusHook = ConsensusHook; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; +} + +type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< + Runtime, + RELAY_CHAIN_SLOT_DURATION_MILLIS, + BLOCK_PROCESSING_VELOCITY, + UNINCLUDED_SEGMENT_CAPACITY, +>; + +parameter_types! { + pub MessageQueueServiceWeight: Weight = + Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor< + cumulus_primitives_core::AggregateMessageOrigin, + >; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + type WeightInfo = weights::pallet_message_queue::WeightInfo; +} + +impl parachain_info::Config for Runtime {} + +impl cumulus_pallet_aura_ext::Config for Runtime {} + +parameter_types! { + // Fellows pluralistic body. + pub const FellowsBodyId: BodyId = BodyId::Technical; +} + +/// Privileged origin that represents Root or Fellows pluralistic body. +pub type RootOrFellows = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, +>; + +impl cumulus_pallet_xcmp_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ChannelInfo = ParachainSystem; + type VersionWrapper = PolkadotXcm; + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type ControllerOrigin = RootOrFellows; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; + type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; +} + +pub const PERIOD: u32 = 6 * HOURS; +pub const OFFSET: u32 = 0; + +impl pallet_session::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions, ConstU32>; + type NextSessionRotation = pallet_session::PeriodicSessions, ConstU32>; + type SessionManager = CollatorSelection; + // Essentially just Aura, but let's 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; + type SlotDuration = ConstU64; +} + +parameter_types! { + pub const PotId: PalletId = PalletId(*b"PotStake"); + pub const SessionLength: BlockNumber = 6 * HOURS; + // StakingAdmin pluralistic body. + pub const StakingAdminBodyId: BodyId = BodyId::Defense; +} + +/// We allow Root and the `StakingAdmin` to execute privileged collator selection operations. +pub type CollatorSelectionUpdateOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, +>; + +impl pallet_collator_selection::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type UpdateOrigin = CollatorSelectionUpdateOrigin; + type PotId = PotId; + type MaxCandidates = ConstU32<100>; + type MinEligibleCollators = ConstU32<4>; + type MaxInvulnerables = ConstU32<20>; + // should be a multiple of session or things will get inconsistent + type KickThreshold = ConstU32; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ValidatorRegistration = Session; + type WeightInfo = weights::pallet_collator_selection::WeightInfo; +} + +parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = system_para_deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = system_para_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_. + Any, + /// Can execute any call that does not transfer funds or assets. + NonTransfer, + /// Proxy with the ability to reject time-delay proxy announcements. + CancelProxy, + /// Proxy for all Identity pallet calls. + Identity, + /// Proxy for identity registrars. + IdentityJudgement, + /// Collator selection proxy. Can execute calls related to collator selection mechanism. + Collator, +} +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 { .. } | + // `request_judgement` puts up a deposit to transfer to a registrar + RuntimeCall::Identity(pallet_identity::Call::request_judgement { .. }) + ), + ProxyType::CancelProxy => matches!( + c, + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } + ), + ProxyType::Identity => { + matches!( + c, + RuntimeCall::Identity { .. } | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } + ) + }, + ProxyType::IdentityJudgement => matches!( + c, + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Utility(..) | + RuntimeCall::Multisig { .. } + ), + ProxyType::Collator => matches!( + c, + RuntimeCall::CollatorSelection { .. } | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } + ), + } + } + + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::Identity, ProxyType::IdentityJudgement) => true, + (ProxyType::NonTransfer, ProxyType::IdentityJudgement) => true, + (ProxyType::NonTransfer, ProxyType::Collator) => true, + _ => false, + } + } +} + +parameter_types! { + // One storage item; key size 32, value size 8. + pub const ProxyDepositBase: Balance = system_para_deposit(1, 40); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = system_para_deposit(0, 33); + pub const MaxProxies: u16 = 32; + // One storage item; key size 32, value size 16. + pub const AnnouncementDepositBase: Balance = system_para_deposit(1, 48); + pub const AnnouncementDepositFactor: Balance = system_para_deposit(0, 66); + pub const MaxPending: u16 = 32; +} + +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 = MaxProxies; + type WeightInfo = weights::pallet_proxy::WeightInfo; + type MaxPending = MaxPending; + type CallHasher = BlakeTwo256; + type AnnouncementDepositBase = AnnouncementDepositBase; + type AnnouncementDepositFactor = AnnouncementDepositFactor; +} + +impl pallet_utility::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = weights::pallet_utility::WeightInfo; +} + +// To be removed after migration is complete. +impl identity_migrator::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Reaper = EnsureRoot; + type ReapIdentityHandler = (); + type WeightInfo = weights::polkadot_runtime_common_identity_migrator::WeightInfo; +} + +// Create the runtime by composing the FRAME pallets that were previously configured. +construct_runtime!( + pub enum Runtime + { + // System support stuff. + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, + + // Monetary stuff. + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, + + // Collator support. The order of these 5 are important and shall not change. + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, + + // XCM & related + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, + + // Handy utilities. + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 41, + Proxy: pallet_proxy = 42, + + // The main stage. + Identity: pallet_identity = 50, + + // To migrate deposits + IdentityMigrator: identity_migrator = 248, + } +); + +#[cfg(feature = "runtime-benchmarks")] +mod benches { + frame_benchmarking::define_benchmarks!( + // Substrate + [frame_system, SystemBench::] + [pallet_balances, Balances] + [pallet_identity, Identity] + [pallet_message_queue, MessageQueue] + [pallet_multisig, Multisig] + [pallet_proxy, Proxy] + [pallet_session, SessionBench::] + [pallet_timestamp, Timestamp] + [pallet_utility, Utility] + // Polkadot + [polkadot_runtime_common::identity_migrator, IdentityMigrator] + // Cumulus + [cumulus_pallet_parachain_system, ParachainSystem] + [cumulus_pallet_xcmp_queue, XcmpQueue] + [pallet_collator_selection, CollatorSelection] + // XCM + [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] + [pallet_xcm_benchmarks::fungible, XcmBalances] + [pallet_xcm_benchmarks::generic, XcmGeneric] + ); +} + +impl_runtime_apis! { + impl sp_consensus_aura::AuraApi for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION) + } + + fn authorities() -> Vec { + Aura::authorities().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) + } + } + + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block) + } + + fn initialize_block(header: &::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + OpaqueMetadata::new(Runtime::metadata().into()) + } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } + } + + impl sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic, + block_hash: ::Hash, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx, block_hash) + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, KeyTypeId)>> { + SessionKeys::decode_into_raw_public_keys(&encoded) + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { + System::account_nonce(account) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { + fn query_info( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_call_fee_details(call, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl cumulus_primitives_core::CollectCollationInfo for Runtime { + fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { + ParachainSystem::collect_collation_info(header) + } + } + + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + let weight = Executive::try_runtime_upgrade(checks).unwrap(); + (weight, RuntimeBlockWeights::get().max_block) + } + + fn execute_block( + block: Block, + state_root_check: bool, + signature_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. + Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn benchmark_metadata(extra: bool) -> ( + Vec, + Vec, + ) { + use frame_benchmarking::{Benchmarking, BenchmarkList}; + use frame_support::traits::StorageInfoTrait; + use frame_system_benchmarking::Pallet as SystemBench; + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + use pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + + // This is defined once again in dispatch_benchmark, because list_benchmarks! + // and add_benchmarks! are macros exported by define_benchmarks! macros and those types + // are referenced in that call. + type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; + type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + + 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 sp_storage::TrackedStorageKey; + + use frame_system_benchmarking::Pallet as SystemBench; + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } + + 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 pallet_xcm::benchmarking::Pallet as PalletXcmExtrinsiscsBenchmark; + impl pallet_xcm::benchmarking::Config for Runtime { + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + xcm_config::XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >; + fn reachable_dest() -> Option { + Some(Parent.into()) + } + + fn teleportable_asset_and_dest() -> Option<(Asset, Location)> { + // Relay/native token can be teleported between People and Relay. + Some(( + Asset { + fun: Fungible(SYSTEM_PARA_EXISTENTIAL_DEPOSIT), + id: AssetId(Parent.into()) + }, + Parent.into(), + )) + } + + fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { + None + } + + fn get_asset() -> Asset { + Asset { + id: AssetId(Location::parent()), + fun: Fungible(ExistentialDeposit::get()), + } + } + } + + use xcm::latest::prelude::*; + use xcm_config::{PriceForParentDelivery, RelayLocation}; + + parameter_types! { + pub ExistentialDepositAsset: Option = Some(( + RelayLocation::get(), + ExistentialDeposit::get() + ).into()); + } + + impl pallet_xcm_benchmarks::Config for Runtime { + type XcmConfig = XcmConfig; + type AccountIdConverter = xcm_config::LocationToAccountId; + type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper< + XcmConfig, + ExistentialDepositAsset, + PriceForParentDelivery, + >; + fn valid_destination() -> Result { + Ok(RelayLocation::get()) + } + fn worst_case_holding(_depositable_count: u32) -> Assets { + // just concrete assets according to relay chain. + let assets: Vec = vec![ + Asset { + id: AssetId(RelayLocation::get()), + fun: Fungible(1_000_000 * UNITS), + } + ]; + assets.into() + } + } + + parameter_types! { + pub const TrustedTeleporter: Option<(Location, Asset)> = Some(( + RelayLocation::get(), + Asset { fun: Fungible(UNITS), id: AssetId(RelayLocation::get()) }, + )); + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; + pub const TrustedReserve: Option<(Location, Asset)> = None; + } + + impl pallet_xcm_benchmarks::fungible::Config for Runtime { + type TransactAsset = Balances; + + type CheckedAccount = CheckedAccount; + type TrustedTeleporter = TrustedTeleporter; + type TrustedReserve = TrustedReserve; + + fn get_asset() -> Asset { + Asset { + id: AssetId(RelayLocation::get()), + fun: Fungible(UNITS), + } + } + } + + impl pallet_xcm_benchmarks::generic::Config for Runtime { + type RuntimeCall = RuntimeCall; + type TransactAsset = Balances; + + fn worst_case_response() -> (u64, Response) { + (0u64, Response::Version(Default::default())) + } + + fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result<(Location, Junction), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(Location, RuntimeCall), BenchmarkError> { + Ok((RelayLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) + } + + fn subscribe_origin() -> Result { + Ok(RelayLocation::get()) + } + + fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError> { + let origin = RelayLocation::get(); + let assets: Assets = (AssetId(RelayLocation::get()), 1_000 * UNITS).into(); + let ticket = Location::new(0, []); + Ok((origin, ticket, assets)) + } + + fn fee_asset() -> Result { + Ok(Asset { + id: AssetId(RelayLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + + fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn export_message_origin_and_destination( + ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn alias_origin() -> Result<(Location, Location), BenchmarkError> { + Err(BenchmarkError::Skip) + } + } + + type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; + type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + + let whitelist: Vec = vec![ + // Block Number + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), + // Total Issuance + hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), + // Execution Phase + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), + // Event Count + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), + // System Events + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), + ]; + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + add_benchmarks!(params, batches); + + Ok(batches) + } + } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } +} + +cumulus_pallet_parachain_system::register_validate_block! { + Runtime = Runtime, + BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, +} + +#[test] +fn test_ed_is_one_tenth_of_relay() { + let relay_ed = polkadot_runtime_constants::currency::EXISTENTIAL_DEPOSIT; + let people_ed = ExistentialDeposit::get(); + assert_eq!(relay_ed / 10, people_ed); +} diff --git a/system-parachains/people/people-polkadot/src/people.rs b/system-parachains/people/people-polkadot/src/people.rs new file mode 100644 index 0000000000..5f260c9a3d --- /dev/null +++ b/system-parachains/people/people-polkadot/src/people.rs @@ -0,0 +1,229 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use super::*; +use crate::xcm_config::LocationToAccountId; +use codec::{Decode, Encode, MaxEncodedLen}; +use enumflags2::{bitflags, BitFlags}; +use frame_support::{ + parameter_types, CloneNoBound, EqNoBound, PartialEqNoBound, RuntimeDebugNoBound, +}; +use pallet_identity::{Data, IdentityInformationProvider}; +use parachains_common::{impls::ToParentTreasury, DAYS}; +use scale_info::TypeInfo; +use sp_runtime::{ + traits::{AccountIdConversion, Verify}, + RuntimeDebug, +}; +use sp_std::prelude::*; + +parameter_types! { + // 27 | Min encoded size of `Registration` + // - 10 | Min encoded size of `IdentityInfo` + // -----| + // 17 | Min size without `IdentityInfo` (accounted for in byte deposit) + pub const BasicDeposit: Balance = system_para_deposit(1, 17); + pub const ByteDeposit: Balance = system_para_deposit(0, 1); + pub const SubAccountDeposit: Balance = system_para_deposit(1, 53); + pub RelayTreasuryAccount: AccountId = + parachains_common::TREASURY_PALLET_ID.into_account_truncating(); +} + +impl pallet_identity::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type BasicDeposit = BasicDeposit; + type ByteDeposit = ByteDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = ConstU32<100>; + type IdentityInformation = IdentityInfo; + type MaxRegistrars = ConstU32<20>; + type Slashed = ToParentTreasury; + type ForceOrigin = EnsureRoot; + type RegistrarOrigin = EnsureRoot; + type OffchainSignature = Signature; + type SigningPublicKey = ::Signer; + type UsernameAuthorityOrigin = EnsureRoot; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type WeightInfo = weights::pallet_identity::WeightInfo; +} + +/// The fields that we use to identify the owner of an account with. Each corresponds to a field +/// in the `IdentityInfo` struct. +#[bitflags] +#[repr(u64)] +#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug)] +pub enum IdentityField { + Display, + Legal, + Web, + Matrix, + Email, + PgpFingerprint, + Image, + Twitter, + GitHub, + Discord, +} + +/// Information concerning the identity of the controller of an account. +#[derive( + CloneNoBound, + Encode, + Decode, + EqNoBound, + MaxEncodedLen, + PartialEqNoBound, + RuntimeDebugNoBound, + TypeInfo, +)] +#[codec(mel_bound())] +pub struct IdentityInfo { + /// A reasonable display name for the controller of the account. This should be whatever the + /// account is typically known as and should not be confusable with other entities, given + /// reasonable context. + /// + /// Stored as UTF-8. + pub display: Data, + + /// The full legal name in the local jurisdiction of the entity. This might be a bit + /// long-winded. + /// + /// Stored as UTF-8. + pub legal: Data, + + /// A representative website held by the controller of the account. + /// + /// NOTE: `https://` is automatically prepended. + /// + /// Stored as UTF-8. + pub web: Data, + + /// The Matrix (e.g. for Element) handle held by the controller of the account. Previously, + /// this was called `riot`. + /// + /// Stored as UTF-8. + pub matrix: Data, + + /// The email address of the controller of the account. + /// + /// Stored as UTF-8. + pub email: Data, + + /// The PGP/GPG public key of the controller of the account. + pub pgp_fingerprint: Option<[u8; 20]>, + + /// A graphic image representing the controller of the account. Should be a company, + /// organization or project logo or a headshot in the case of a human. + pub image: Data, + + /// The Twitter identity. The leading `@` character may be elided. + pub twitter: Data, + + /// The GitHub username of the controller of the account. + pub github: Data, + + /// The Discord username of the controller of the account. + pub discord: Data, +} + +impl IdentityInformationProvider for IdentityInfo { + type FieldsIdentifier = u64; + + fn has_identity(&self, fields: Self::FieldsIdentifier) -> bool { + self.fields().bits() & fields == fields + } + + #[cfg(feature = "runtime-benchmarks")] + fn create_identity_info() -> Self { + let data = Data::Raw(vec![0; 32].try_into().unwrap()); + + IdentityInfo { + display: data.clone(), + legal: data.clone(), + web: data.clone(), + matrix: data.clone(), + email: data.clone(), + pgp_fingerprint: Some([0; 20]), + image: data.clone(), + twitter: data.clone(), + github: data.clone(), + discord: data, + } + } + + #[cfg(feature = "runtime-benchmarks")] + fn all_fields() -> Self::FieldsIdentifier { + use enumflags2::BitFlag; + IdentityField::all().bits() + } +} + +impl IdentityInfo { + pub(crate) fn fields(&self) -> BitFlags { + let mut res = >::empty(); + if !self.display.is_none() { + res.insert(IdentityField::Display); + } + if !self.legal.is_none() { + res.insert(IdentityField::Legal); + } + if !self.web.is_none() { + res.insert(IdentityField::Web); + } + if !self.matrix.is_none() { + res.insert(IdentityField::Matrix); + } + if !self.email.is_none() { + res.insert(IdentityField::Email); + } + if self.pgp_fingerprint.is_some() { + res.insert(IdentityField::PgpFingerprint); + } + if !self.image.is_none() { + res.insert(IdentityField::Image); + } + if !self.twitter.is_none() { + res.insert(IdentityField::Twitter); + } + if !self.github.is_none() { + res.insert(IdentityField::GitHub); + } + if !self.discord.is_none() { + res.insert(IdentityField::Discord); + } + res + } +} + +/// A `Default` identity. This is given to users who get a username but have not set an identity. +impl Default for IdentityInfo { + fn default() -> Self { + IdentityInfo { + display: Data::None, + legal: Data::None, + web: Data::None, + matrix: Data::None, + email: Data::None, + pgp_fingerprint: None, + image: Data::None, + twitter: Data::None, + github: Data::None, + discord: Data::None, + } + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/block_weights.rs b/system-parachains/people/people-polkadot/src/weights/block_weights.rs new file mode 100644 index 0000000000..b2092d875c --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/block_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, Weight}, + }; + + parameter_types! { + /// Importing a block with 0 Extrinsics. + pub const BlockExecutionWeight: Weight = + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); + } + + #[cfg(test)] + mod test_weights { + use frame_support::weights::constants; + + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::constants::BlockExecutionWeight::get(); + + // At least 100 µs. + assert!( + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 100 µs." + ); + // At most 50 ms. + assert!( + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 50 ms." + ); + } + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_parachain_system.rs new file mode 100644 index 0000000000..f0637269b7 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_parachain_system.rs @@ -0,0 +1,74 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_parachain_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_parachain_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_parachain_system`. +pub struct WeightInfo(PhantomData); +impl cumulus_pallet_parachain_system::WeightInfo for WeightInfo { + /// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1) + /// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1) + /// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1000) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + /// The range of component `n` is `[0, 1000]`. + fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `12` + // Estimated: `3517` + // Minimum execution time: 2_200_000 picoseconds. + Weight::from_parts(2_270_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + // Standard Error: 22_140 + .saturating_add(Weight::from_parts(182_153_021, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs new file mode 100644 index 0000000000..c0d6b4506b --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs @@ -0,0 +1,152 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `cumulus_pallet_xcmp_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=cumulus_pallet_xcmp_queue +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: `76` + // Estimated: `1561` + // Minimum execution time: 5_120_000 picoseconds. + Weight::from_parts(5_300_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn enqueue_xcmp_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `82` + // Estimated: `3517` + // Minimum execution time: 13_990_000 picoseconds. + Weight::from_parts(14_220_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn suspend_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 3_110_000 picoseconds. + Weight::from_parts(3_250_000, 0) + .saturating_add(Weight::from_parts(0, 1561)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn resume_channel() -> Weight { + // Proof Size summary in bytes: + // Measured: `111` + // Estimated: `1596` + // Minimum execution time: 4_280_000 picoseconds. + Weight::from_parts(4_430_000, 0) + .saturating_add(Weight::from_parts(0, 1596)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn take_first_concatenated_xcm() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_310_000 picoseconds. + Weight::from_parts(7_500_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0) + /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) + /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn on_idle_good_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65711` + // Estimated: `69176` + // Minimum execution time: 112_531_000 picoseconds. + Weight::from_parts(113_601_000, 0) + .saturating_add(Weight::from_parts(0, 69176)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) + /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1) + fn on_idle_large_msg() -> Weight { + // Proof Size summary in bytes: + // Measured: `65710` + // Estimated: `69175` + // Minimum execution time: 55_230_000 picoseconds. + Weight::from_parts(55_871_000, 0) + .saturating_add(Weight::from_parts(0, 69175)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/extrinsic_weights.rs b/system-parachains/people/people-polkadot/src/weights/extrinsic_weights.rs new file mode 100644 index 0000000000..332c3b324b --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/extrinsic_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, Weight}, + }; + + parameter_types! { + /// Executing a NO-OP `System::remarks` Extrinsic. + pub const ExtrinsicBaseWeight: Weight = + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); + } + + #[cfg(test)] + mod test_weights { + use frame_support::weights::constants; + + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::constants::ExtrinsicBaseWeight::get(); + + // At least 10 µs. + assert!( + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 10 µs." + ); + // At most 1 ms. + assert!( + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 1 ms." + ); + } + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/frame_system.rs b/system-parachains/people/people-polkadot/src/weights/frame_system.rs new file mode 100644 index 0000000000..cfbe22d34c --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/frame_system.rs @@ -0,0 +1,187 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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 `frame_system` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=frame_system +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_140_000 picoseconds. + Weight::from_parts(2_220_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(352, 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: 5_690_000 picoseconds. + Weight::from_parts(5_780_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_694, 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_690_000 picoseconds. + Weight::from_parts(3_940_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: `127` + // Estimated: `1612` + // Minimum execution time: 118_903_125_000 picoseconds. + Weight::from_parts(123_147_987_000, 0) + .saturating_add(Weight::from_parts(0, 1612)) + .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_200_000 picoseconds. + Weight::from_parts(2_280_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 2_823 + .saturating_add(Weight::from_parts(912_309, 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_260_000 picoseconds. + Weight::from_parts(2_320_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 983 + .saturating_add(Weight::from_parts(663_398, 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: `76 + p * (69 ±0)` + // Estimated: `77 + p * (70 ±0)` + // Minimum execution time: 4_170_000 picoseconds. + Weight::from_parts(4_270_000, 0) + .saturating_add(Weight::from_parts(0, 77)) + // Standard Error: 1_414 + .saturating_add(Weight::from_parts(1_322_415, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) + } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_930_000 picoseconds. + Weight::from_parts(20_060_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `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 apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `149` + // Estimated: `1634` + // Minimum execution time: 116_622_483_000 picoseconds. + Weight::from_parts(119_357_067_000, 0) + .saturating_add(Weight::from_parts(0, 1634)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/mod.rs b/system-parachains/people/people-polkadot/src/weights/mod.rs new file mode 100644 index 0000000000..dce959e817 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/mod.rs @@ -0,0 +1,40 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Expose the auto generated weight files. + +pub mod block_weights; +pub mod cumulus_pallet_parachain_system; +pub mod cumulus_pallet_xcmp_queue; +pub mod extrinsic_weights; +pub mod frame_system; +pub mod pallet_balances; +pub mod pallet_collator_selection; +pub mod pallet_identity; +pub mod pallet_message_queue; +pub mod pallet_multisig; +pub mod pallet_proxy; +pub mod pallet_session; +pub mod pallet_timestamp; +pub mod pallet_utility; +pub mod pallet_xcm; +pub mod paritydb_weights; +pub mod polkadot_runtime_common_identity_migrator; +pub mod rocksdb_weights; +pub mod xcm; + +pub use block_weights::constants::BlockExecutionWeight; +pub use extrinsic_weights::constants::ExtrinsicBaseWeight; +pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs b/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs new file mode 100644 index 0000000000..d9709cf621 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs @@ -0,0 +1,161 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_balances` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_balances +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: 51_240_000 picoseconds. + Weight::from_parts(51_560_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: 40_040_000 picoseconds. + Weight::from_parts(40_511_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: `174` + // Estimated: `3593` + // Minimum execution time: 15_990_000 picoseconds. + Weight::from_parts(16_550_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: `174` + // Estimated: `3593` + // Minimum execution time: 21_570_000 picoseconds. + Weight::from_parts(21_891_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: 52_510_000 picoseconds. + Weight::from_parts(53_180_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: 50_210_000 picoseconds. + Weight::from_parts(50_761_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: `174` + // Estimated: `3593` + // Minimum execution time: 19_360_000 picoseconds. + Weight::from_parts(19_930_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// 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: 17_250_000 picoseconds. + Weight::from_parts(17_370_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 12_266 + .saturating_add(Weight::from_parts(15_362_474, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) + } + /// Storage: `Balances::InactiveIssuance` (r:1 w:0) + /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn force_adjust_total_issuance() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1501` + // Minimum execution time: 6_520_000 picoseconds. + Weight::from_parts(6_841_000, 0) + .saturating_add(Weight::from_parts(0, 1501)) + .saturating_add(T::DbWeight::get().reads(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_collator_selection.rs b/system-parachains/people/people-polkadot/src/weights/pallet_collator_selection.rs new file mode 100644 index 0000000000..7b199a29eb --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_collator_selection.rs @@ -0,0 +1,282 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_collator_selection` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_collator_selection +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_collator_selection`. +pub struct WeightInfo(PhantomData); +impl pallet_collator_selection::WeightInfo for WeightInfo { + /// Storage: `Session::NextKeys` (r:20 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 20]`. + fn set_invulnerables(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `197 + b * (79 ±0)` + // Estimated: `1188 + b * (2555 ±0)` + // Minimum execution time: 14_190_000 picoseconds. + Weight::from_parts(10_937_805, 0) + .saturating_add(Weight::from_parts(0, 1188)) + // Standard Error: 8_677 + .saturating_add(Weight::from_parts(3_916_619, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) + } + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, 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 `b` is `[1, 19]`. + /// The range of component `c` is `[1, 99]`. + fn add_invulnerable(b: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `795 + b * (32 ±0) + c * (53 ±0)` + // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` + // Minimum execution time: 43_670_000 picoseconds. + Weight::from_parts(43_035_011, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 5_966 + .saturating_add(Weight::from_parts(65_164, 0).saturating_mul(b.into())) + // Standard Error: 1_130 + .saturating_add(Weight::from_parts(85_765, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// The range of component `b` is `[5, 20]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `119 + b * (32 ±0)` + // Estimated: `6287` + // Minimum execution time: 13_920_000 picoseconds. + Weight::from_parts(14_097_131, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 847 + .saturating_add(Weight::from_parts(71_905, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn set_desired_candidates() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_050_000 picoseconds. + Weight::from_parts(5_230_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:100 w:100) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[0, 100]`. + /// The range of component `k` is `[0, 100]`. + fn set_candidacy_bond(c: u32, k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + c * (182 ±0) + k * (115 ±0)` + // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` + // Minimum execution time: 11_310_000 picoseconds. + Weight::from_parts(11_580_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 180_859 + .saturating_add(Weight::from_parts(5_976_256, 0).saturating_mul(c.into())) + // Standard Error: 180_859 + .saturating_add(Weight::from_parts(5_764_922, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into())) + } + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn update_bond(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `319 + c * (49 ±0)` + // Estimated: `6287` + // Minimum execution time: 29_880_000 picoseconds. + Weight::from_parts(30_707_589, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 696 + .saturating_add(Weight::from_parts(71_379, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[1, 99]`. + fn register_as_candidate(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `765 + c * (52 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 40_610_000 picoseconds. + Weight::from_parts(42_206_170, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 581 + .saturating_add(Weight::from_parts(89_595, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0) + /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn take_candidate_slot(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `905 + c * (53 ±0)` + // Estimated: `6287 + c * (54 ±0)` + // Minimum execution time: 60_730_000 picoseconds. + Weight::from_parts(62_334_826, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 1_195 + .saturating_add(Weight::from_parts(94_762, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:1) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// The range of component `c` is `[3, 100]`. + fn leave_intent(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `347 + c * (48 ±0)` + // Estimated: `6287` + // Minimum execution time: 32_510_000 picoseconds. + Weight::from_parts(33_664_142, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 793 + .saturating_add(Weight::from_parts(79_554, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + fn note_author() -> Weight { + // Proof Size summary in bytes: + // Measured: `155` + // Estimated: `6196` + // Minimum execution time: 45_790_000 picoseconds. + Weight::from_parts(46_310_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `CollatorSelection::CandidateList` (r:1 w:0) + /// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0) + /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0) + /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0) + /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:97 w:97) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + /// The range of component `c` is `[1, 100]`. + fn new_session(r: u32, c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` + // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` + // Minimum execution time: 22_290_000 picoseconds. + Weight::from_parts(22_510_000, 0) + .saturating_add(Weight::from_parts(0, 6287)) + // Standard Error: 319_996 + .saturating_add(Weight::from_parts(14_036_037, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) + .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into())) + } +} diff --git a/relay/kusama/src/weights/pallet_identity.rs b/system-parachains/people/people-polkadot/src/weights/pallet_identity.rs similarity index 69% rename from relay/kusama/src/weights/pallet_identity.rs rename to system-parachains/people/people-polkadot/src/weights/pallet_identity.rs index c49057bcea..58d787b57f 100644 --- a/relay/kusama/src/weights/pallet_identity.rs +++ b/system-parachains/people/people-polkadot/src/weights/pallet_identity.rs @@ -13,26 +13,27 @@ // 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_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./kusama-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: // ./target/production/polkadot // benchmark // pallet -// --chain=./kusama-chain-spec.json +// --chain=./people-polkadot-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_identity // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./kusama-weights/ +// --output=./people-polkadot-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,31 +54,31 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 7_423_000 picoseconds. - Weight::from_parts(8_143_580, 0) + // Minimum execution time: 10_170_000 picoseconds. + Weight::from_parts(10_910_573, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_398 - .saturating_add(Weight::from_parts(88_352, 0).saturating_mul(r.into())) + // Standard Error: 1_475 + .saturating_add(Weight::from_parts(77_036, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. fn set_identity(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6978 + r * (5 ±0)` - // Estimated: `11037` - // Minimum execution time: 105_465_000 picoseconds. - Weight::from_parts(107_147_454, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 5_835 - .saturating_add(Weight::from_parts(226_100, 0).saturating_mul(r.into())) + // Measured: `442 + r * (5 ±0)` + // Estimated: `4303` + // Minimum execution time: 21_900_000 picoseconds. + Weight::from_parts(22_556_446, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_301 + .saturating_add(Weight::from_parts(73_485, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SubsOf` (r:1 w:1) /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:100 w:100) @@ -86,12 +87,12 @@ impl pallet_identity::WeightInfo for WeightInfo { fn set_subs_new(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `101` - // Estimated: `11037 + s * (2589 ±0)` - // Minimum execution time: 8_211_000 picoseconds. - Weight::from_parts(18_905_719, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 4_828 - .saturating_add(Weight::from_parts(3_171_890, 0).saturating_mul(s.into())) + // Estimated: `6723 + s * (2589 ±0)` + // Minimum execution time: 11_530_000 picoseconds. + Weight::from_parts(26_340_120, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_559 + .saturating_add(Weight::from_parts(3_752_733, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,7 +100,7 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SubsOf` (r:1 w:1) /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:0 w:100) @@ -108,12 +109,12 @@ impl pallet_identity::WeightInfo for WeightInfo { fn set_subs_old(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `194 + p * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 8_234_000 picoseconds. - Weight::from_parts(20_223_382, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 5_672 - .saturating_add(Weight::from_parts(1_403_444, 0).saturating_mul(p.into())) + // Estimated: `6723` + // Minimum execution time: 11_440_000 picoseconds. + Weight::from_parts(26_469_985, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_423 + .saturating_add(Weight::from_parts(1_527_524, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) @@ -121,22 +122,22 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Storage: `Identity::SubsOf` (r:1 w:1) /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:0 w:100) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. fn clear_identity(r: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7070 + r * (5 ±0) + s * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 52_414_000 picoseconds. - Weight::from_parts(54_584_569, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 15_763 - .saturating_add(Weight::from_parts(127_125, 0).saturating_mul(r.into())) - // Standard Error: 3_075 - .saturating_add(Weight::from_parts(1_408_841, 0).saturating_mul(s.into())) + // Measured: `534 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `6723` + // Minimum execution time: 32_480_000 picoseconds. + Weight::from_parts(34_550_972, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_821 + .saturating_add(Weight::from_parts(40_875, 0).saturating_mul(r.into())) + // Standard Error: 745 + .saturating_add(Weight::from_parts(1_506_296, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -144,32 +145,32 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Storage: `Identity::Registrars` (r:1 w:0) /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. fn request_judgement(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6968 + r * (57 ±0)` - // Estimated: `11037` - // Minimum execution time: 74_182_000 picoseconds. - Weight::from_parts(76_026_106, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 3_519 - .saturating_add(Weight::from_parts(111_153, 0).saturating_mul(r.into())) + // Measured: `432 + r * (57 ±0)` + // Estimated: `4303` + // Minimum execution time: 32_880_000 picoseconds. + Weight::from_parts(33_710_626, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_752 + .saturating_add(Weight::from_parts(83_866, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. fn cancel_request(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6999` - // Estimated: `11037` - // Minimum execution time: 71_727_000 picoseconds. - Weight::from_parts(74_452_036, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 4_923 - .saturating_add(Weight::from_parts(153_968, 0).saturating_mul(r.into())) + // Measured: `463` + // Estimated: `4303` + // Minimum execution time: 30_611_000 picoseconds. + Weight::from_parts(31_279_114, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_248 + .saturating_add(Weight::from_parts(51_954, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,11 +181,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_452_000 picoseconds. - Weight::from_parts(5_821_047, 0) + // Minimum execution time: 7_660_000 picoseconds. + Weight::from_parts(8_100_141, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 903 - .saturating_add(Weight::from_parts(72_242, 0).saturating_mul(r.into())) + // Standard Error: 1_070 + .saturating_add(Weight::from_parts(65_495, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -195,11 +196,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_562_000 picoseconds. - Weight::from_parts(7_663_040, 0) + // Minimum execution time: 7_690_000 picoseconds. + Weight::from_parts(8_386_766, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 4_641 - .saturating_add(Weight::from_parts(106_113, 0).saturating_mul(r.into())) + // Standard Error: 1_018 + .saturating_add(Weight::from_parts(70_921, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -210,58 +211,60 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_624_000 picoseconds. - Weight::from_parts(7_571_970, 0) + // Minimum execution time: 7_630_000 picoseconds. + Weight::from_parts(8_157_028, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 4_246 - .saturating_add(Weight::from_parts(109_102, 0).saturating_mul(r.into())) + // Standard Error: 993 + .saturating_add(Weight::from_parts(60_239, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::Registrars` (r:1 w:0) /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn provide_judgement(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7046 + r * (57 ±0)` - // Estimated: `11037` - // Minimum execution time: 95_196_000 picoseconds. - Weight::from_parts(97_067_549, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 4_761 - .saturating_add(Weight::from_parts(106_543, 0).saturating_mul(r.into())) + // Measured: `510 + r * (57 ±0)` + // Estimated: `4303` + // Minimum execution time: 23_890_000 picoseconds. + Weight::from_parts(24_425_598, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_271 + .saturating_add(Weight::from_parts(82_894, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::SubsOf` (r:1 w:1) /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:0 w:100) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. fn kill_identity(r: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7277 + r * (5 ±0) + s * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 67_997_000 picoseconds. - Weight::from_parts(69_029_074, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 17_074 - .saturating_add(Weight::from_parts(224_876, 0).saturating_mul(r.into())) - // Standard Error: 3_331 - .saturating_add(Weight::from_parts(1_380_625, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `773 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `6723` + // Minimum execution time: 98_811_000 picoseconds. + Weight::from_parts(102_874_545, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 8_216 + .saturating_add(Weight::from_parts(87_859, 0).saturating_mul(r.into())) + // Standard Error: 1_603 + .saturating_add(Weight::from_parts(1_538_729, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:1 w:1) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// Storage: `Identity::SubsOf` (r:1 w:1) @@ -270,34 +273,34 @@ impl pallet_identity::WeightInfo for WeightInfo { fn add_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `475 + s * (36 ±0)` - // Estimated: `11037` - // Minimum execution time: 23_603_000 picoseconds. - Weight::from_parts(29_512_485, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 1_432 - .saturating_add(Weight::from_parts(102_477, 0).saturating_mul(s.into())) + // Estimated: `6723` + // Minimum execution time: 30_600_000 picoseconds. + Weight::from_parts(35_674_099, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 1_256 + .saturating_add(Weight::from_parts(59_432, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:1 w:1) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `591 + s * (3 ±0)` - // Estimated: `11037` - // Minimum execution time: 13_906_000 picoseconds. - Weight::from_parts(15_280_673, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 535 - .saturating_add(Weight::from_parts(44_553, 0).saturating_mul(s.into())) + // Estimated: `4303` + // Minimum execution time: 15_420_000 picoseconds. + Weight::from_parts(17_843_179, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 610 + .saturating_add(Weight::from_parts(19_463, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:1 w:1) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// Storage: `Identity::SubsOf` (r:1 w:1) @@ -306,12 +309,12 @@ impl pallet_identity::WeightInfo for WeightInfo { fn remove_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `638 + s * (35 ±0)` - // Estimated: `11037` - // Minimum execution time: 29_544_000 picoseconds. - Weight::from_parts(31_743_453, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 721 - .saturating_add(Weight::from_parts(86_362, 0).saturating_mul(s.into())) + // Estimated: `6723` + // Minimum execution time: 34_870_000 picoseconds. + Weight::from_parts(38_098_506, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 753 + .saturating_add(Weight::from_parts(44_603, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -326,11 +329,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `704 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 22_595_000 picoseconds. - Weight::from_parts(24_344_163, 0) + // Minimum execution time: 25_940_000 picoseconds. + Weight::from_parts(28_496_293, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 615 - .saturating_add(Weight::from_parts(83_224, 0).saturating_mul(s.into())) + // Standard Error: 766 + .saturating_add(Weight::from_parts(49_994, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -340,8 +343,8 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_166_000 picoseconds. - Weight::from_parts(6_519_000, 0) + // Minimum execution time: 7_030_000 picoseconds. + Weight::from_parts(7_370_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -351,8 +354,8 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `80` // Estimated: `3517` - // Minimum execution time: 8_575_000 picoseconds. - Weight::from_parts(9_113_000, 0) + // Minimum execution time: 10_340_000 picoseconds. + Weight::from_parts(10_680_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -364,30 +367,30 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Storage: `Identity::PendingUsernames` (r:1 w:0) /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) fn set_username_for() -> Weight { // Proof Size summary in bytes: // Measured: `80` - // Estimated: `11037` - // Minimum execution time: 65_274_000 picoseconds. - Weight::from_parts(67_397_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) + // Estimated: `4303` + // Minimum execution time: 76_551_000 picoseconds. + Weight::from_parts(77_370_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Identity::PendingUsernames` (r:1 w:1) /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::AccountOfUsername` (r:0 w:1) /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) fn accept_username() -> Weight { // Proof Size summary in bytes: // Measured: `115` - // Estimated: `11037` - // Minimum execution time: 19_299_000 picoseconds. - Weight::from_parts(20_138_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) + // Estimated: `4303` + // Minimum execution time: 23_930_000 picoseconds. + Weight::from_parts(24_590_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -397,8 +400,8 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115` // Estimated: `3550` - // Minimum execution time: 16_264_000 picoseconds. - Weight::from_parts(20_214_000, 0) + // Minimum execution time: 14_430_000 picoseconds. + Weight::from_parts(15_291_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -406,28 +409,28 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Storage: `Identity::AccountOfUsername` (r:1 w:0) /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) fn set_primary_username() -> Weight { // Proof Size summary in bytes: - // Measured: `257` - // Estimated: `11037` - // Minimum execution time: 15_009_000 picoseconds. - Weight::from_parts(15_555_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) + // Measured: `258` + // Estimated: `4303` + // Minimum execution time: 20_460_000 picoseconds. + Weight::from_parts(20_770_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::AccountOfUsername` (r:1 w:1) /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) fn remove_dangling_username() -> Weight { // Proof Size summary in bytes: // Measured: `98` - // Estimated: `11037` - // Minimum execution time: 10_682_000 picoseconds. - Weight::from_parts(11_008_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) + // Estimated: `4303` + // Minimum execution time: 12_460_000 picoseconds. + Weight::from_parts(12_850_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_message_queue.rs b/system-parachains/people/people-polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 0000000000..f91a576921 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,183 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_message_queue +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `223` + // Estimated: `6044` + // Minimum execution time: 14_810_000 picoseconds. + Weight::from_parts(15_050_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `218` + // Estimated: `6044` + // Minimum execution time: 12_990_000 picoseconds. + Weight::from_parts(13_270_000, 0) + .saturating_add(Weight::from_parts(0, 6044)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3517` + // Minimum execution time: 4_460_000 picoseconds. + Weight::from_parts(4_550_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 6_770_000 picoseconds. + Weight::from_parts(6_890_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `72` + // Estimated: `69050` + // Minimum execution time: 7_090_000 picoseconds. + Weight::from_parts(7_170_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::BookStateFor` (r:0 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 155_941_000 picoseconds. + Weight::from_parts(157_871_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:0) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `171` + // Estimated: `3517` + // Minimum execution time: 8_390_000 picoseconds. + Weight::from_parts(8_780_000, 0) + .saturating_add(Weight::from_parts(0, 3517)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `69050` + // Minimum execution time: 55_421_000 picoseconds. + Weight::from_parts(56_290_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `69050` + // Minimum execution time: 74_790_000 picoseconds. + Weight::from_parts(75_821_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `65667` + // Estimated: `69050` + // Minimum execution time: 107_001_000 picoseconds. + Weight::from_parts(107_981_000, 0) + .saturating_add(Weight::from_parts(0, 69050)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_multisig.rs b/system-parachains/people/people-polkadot/src/weights/pallet_multisig.rs new file mode 100644 index 0000000000..ec3ea01a82 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_multisig.rs @@ -0,0 +1,162 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_multisig` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_multisig +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_090_000 picoseconds. + Weight::from_parts(13_559_872, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(473, 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: `263 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 42_160_000 picoseconds. + Weight::from_parts(35_003_454, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 370 + .saturating_add(Weight::from_parts(78_069, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_465, 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: `282` + // Estimated: `6811` + // Minimum execution time: 27_510_000 picoseconds. + Weight::from_parts(20_107_020, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 385 + .saturating_add(Weight::from_parts(81_571, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_442, 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: `388 + s * (33 ±0)` + // Estimated: `6811` + // Minimum execution time: 47_311_000 picoseconds. + Weight::from_parts(37_786_802, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 447 + .saturating_add(Weight::from_parts(102_532, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_507, 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: `263 + s * (2 ±0)` + // Estimated: `6811` + // Minimum execution time: 32_231_000 picoseconds. + Weight::from_parts(33_396_272, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 498 + .saturating_add(Weight::from_parts(83_284, 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: `282` + // Estimated: `6811` + // Minimum execution time: 17_960_000 picoseconds. + Weight::from_parts(18_711_852, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 424 + .saturating_add(Weight::from_parts(80_456, 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: `454 + s * (1 ±0)` + // Estimated: `6811` + // Minimum execution time: 33_150_000 picoseconds. + Weight::from_parts(34_338_146, 0) + .saturating_add(Weight::from_parts(0, 6811)) + // Standard Error: 534 + .saturating_add(Weight::from_parts(81_790, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_proxy.rs b/system-parachains/people/people-polkadot/src/weights/pallet_proxy.rs new file mode 100644 index 0000000000..f0d4a05bd6 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_proxy.rs @@ -0,0 +1,223 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_proxy` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_proxy +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 15_460_000 picoseconds. + Weight::from_parts(16_025_809, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 791 + .saturating_add(Weight::from_parts(31_899, 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: `454 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 39_530_000 picoseconds. + Weight::from_parts(39_017_116, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_364 + .saturating_add(Weight::from_parts(168_242, 0).saturating_mul(a.into())) + // Standard Error: 1_409 + .saturating_add(Weight::from_parts(40_679, 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: `369 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 27_260_000 picoseconds. + Weight::from_parts(27_734_700, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_166 + .saturating_add(Weight::from_parts(160_940, 0).saturating_mul(a.into())) + // Standard Error: 1_205 + .saturating_add(Weight::from_parts(1_830, 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: `369 + a * (68 ±0)` + // Estimated: `5698` + // Minimum execution time: 27_110_000 picoseconds. + Weight::from_parts(27_556_536, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_131 + .saturating_add(Weight::from_parts(161_653, 0).saturating_mul(a.into())) + // Standard Error: 1_168 + .saturating_add(Weight::from_parts(5_215, 0).saturating_mul(p.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: `386 + a * (68 ±0) + p * (37 ±0)` + // Estimated: `5698` + // Minimum execution time: 35_810_000 picoseconds. + Weight::from_parts(35_426_638, 0) + .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 1_167 + .saturating_add(Weight::from_parts(142_989, 0).saturating_mul(a.into())) + // Standard Error: 1_205 + .saturating_add(Weight::from_parts(34_318, 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: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 25_710_000 picoseconds. + Weight::from_parts(26_128_239, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 867 + .saturating_add(Weight::from_parts(44_158, 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: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 25_700_000 picoseconds. + Weight::from_parts(26_214_188, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 903 + .saturating_add(Weight::from_parts(51_793, 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: `127 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 23_280_000 picoseconds. + Weight::from_parts(23_861_316, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 851 + .saturating_add(Weight::from_parts(34_051, 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: `139` + // Estimated: `4706` + // Minimum execution time: 26_780_000 picoseconds. + Weight::from_parts(27_483_607, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 831 + .saturating_add(Weight::from_parts(9_777, 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: `164 + p * (37 ±0)` + // Estimated: `4706` + // Minimum execution time: 24_090_000 picoseconds. + Weight::from_parts(24_764_858, 0) + .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 771 + .saturating_add(Weight::from_parts(35_188, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_session.rs b/system-parachains/people/people-polkadot/src/weights/pallet_session.rs new file mode 100644 index 0000000000..dca8dd1b8f --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_session.rs @@ -0,0 +1,78 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_session` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_session +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: `298` + // Estimated: `3763` + // Minimum execution time: 19_851_000 picoseconds. + Weight::from_parts(20_160_000, 0) + .saturating_add(Weight::from_parts(0, 3763)) + .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: `280` + // Estimated: `3745` + // Minimum execution time: 14_400_000 picoseconds. + Weight::from_parts(14_980_000, 0) + .saturating_add(Weight::from_parts(0, 3745)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_timestamp.rs b/system-parachains/people/people-polkadot/src/weights/pallet_timestamp.rs new file mode 100644 index 0000000000..f42bac65d0 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_timestamp.rs @@ -0,0 +1,72 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_timestamp` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_timestamp +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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`) + /// Storage: `Aura::CurrentSlot` (r:1 w:0) + /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + fn set() -> Weight { + // Proof Size summary in bytes: + // Measured: `49` + // Estimated: `1493` + // Minimum execution time: 7_030_000 picoseconds. + Weight::from_parts(7_290_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn on_finalize() -> Weight { + // Proof Size summary in bytes: + // Measured: `57` + // Estimated: `0` + // Minimum execution time: 3_730_000 picoseconds. + Weight::from_parts(3_810_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_utility.rs b/system-parachains/people/people-polkadot/src/weights/pallet_utility.rs new file mode 100644 index 0000000000..0d29a06cd1 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_utility.rs @@ -0,0 +1,99 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_utility` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_utility +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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: 4_840_000 picoseconds. + Weight::from_parts(19_759_881, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 1_783 + .saturating_add(Weight::from_parts(3_256_436, 0).saturating_mul(c.into())) + } + fn as_derivative() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_690_000 picoseconds. + Weight::from_parts(4_810_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: 4_800_000 picoseconds. + Weight::from_parts(10_130_008, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 810 + .saturating_add(Weight::from_parts(3_493_316, 0).saturating_mul(c.into())) + } + fn dispatch_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_780_000 picoseconds. + Weight::from_parts(6_990_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: 4_770_000 picoseconds. + Weight::from_parts(9_219_590, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 902 + .saturating_add(Weight::from_parts(3_279_047, 0).saturating_mul(c.into())) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_xcm.rs b/system-parachains/people/people-polkadot/src/weights/pallet_xcm.rs new file mode 100644 index 0000000000..e1f6f855be --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/pallet_xcm.rs @@ -0,0 +1,343 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_xcm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_xcm +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/ +// --header=./file_header.txt + +#![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_xcm`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm::WeightInfo for WeightInfo { + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn send() -> Weight { + // Proof Size summary in bytes: + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 22_770_000 picoseconds. + Weight::from_parts(23_410_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn teleport_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 71_851_000 picoseconds. + Weight::from_parts(73_250_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn reserve_transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn execute() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_670_000 picoseconds. + Weight::from_parts(8_910_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_xcm_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_690_000 picoseconds. + Weight::from_parts(7_971_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:0 w:1) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn force_default_xcm_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_670_000 picoseconds. + Weight::from_parts(2_770_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_subscribe_version_notify() -> Weight { + // Proof Size summary in bytes: + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 29_420_000 picoseconds. + Weight::from_parts(30_080_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_unsubscribe_version_notify() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `3720` + // Minimum execution time: 33_950_000 picoseconds. + Weight::from_parts(34_320_000, 0) + .saturating_add(Weight::from_parts(0, 3720)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) + /// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn force_suspension() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_720_000 picoseconds. + Weight::from_parts(2_860_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_supported_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `89` + // Estimated: `13454` + // Minimum execution time: 21_080_000 picoseconds. + Weight::from_parts(21_380_000, 0) + .saturating_add(Weight::from_parts(0, 13454)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_version_notifiers() -> Weight { + // Proof Size summary in bytes: + // Measured: `93` + // Estimated: `13458` + // Minimum execution time: 21_130_000 picoseconds. + Weight::from_parts(21_671_000, 0) + .saturating_add(Weight::from_parts(0, 13458)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:6 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn already_notified_target() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `15946` + // Minimum execution time: 23_400_000 picoseconds. + Weight::from_parts(23_830_000, 0) + .saturating_add(Weight::from_parts(0, 15946)) + .saturating_add(T::DbWeight::get().reads(6)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn notify_current_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `6046` + // Minimum execution time: 29_080_000 picoseconds. + Weight::from_parts(29_690_000, 0) + .saturating_add(Weight::from_parts(0, 6046)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn notify_target_migration_fail() -> Weight { + // Proof Size summary in bytes: + // Measured: `136` + // Estimated: `11026` + // Minimum execution time: 13_850_000 picoseconds. + Weight::from_parts(14_260_000, 0) + .saturating_add(Weight::from_parts(0, 11026)) + .saturating_add(T::DbWeight::get().reads(4)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn migrate_version_notify_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `100` + // Estimated: `13465` + // Minimum execution time: 21_370_000 picoseconds. + Weight::from_parts(21_670_000, 0) + .saturating_add(Weight::from_parts(0, 13465)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn migrate_and_notify_old_targets() -> Weight { + // Proof Size summary in bytes: + // Measured: `106` + // Estimated: `13471` + // Minimum execution time: 39_450_000 picoseconds. + Weight::from_parts(39_870_000, 0) + .saturating_add(Weight::from_parts(0, 13471)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) + /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::Queries` (r:0 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn new_query() -> Weight { + // Proof Size summary in bytes: + // Measured: `32` + // Estimated: `1517` + // Minimum execution time: 4_710_000 picoseconds. + Weight::from_parts(4_850_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:1) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn take_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `7669` + // Estimated: `11134` + // Minimum execution time: 32_190_000 picoseconds. + Weight::from_parts(32_650_000, 0) + .saturating_add(Weight::from_parts(0, 11134)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) + /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn claim_assets() -> Weight { + // Proof Size summary in bytes: + // Measured: `90` + // Estimated: `3555` + // Minimum execution time: 42_130_000 picoseconds. + Weight::from_parts(43_061_000, 0) + .saturating_add(Weight::from_parts(0, 3555)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/paritydb_weights.rs b/system-parachains/people/people-polkadot/src/weights/paritydb_weights.rs new file mode 100644 index 0000000000..4338d928d8 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/paritydb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; + + parameter_types! { + /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights + /// are available for brave runtime engineers who may want to try this out as default. + pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } + + #[cfg(test)] + mod test_db_weights { + use super::constants::ParityDbWeight as W; + use frame_support::weights::constants; + + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } +} diff --git a/system-parachains/people/people-kusama/src/weights/polkadot_runtime_common_identity_migrator.rs b/system-parachains/people/people-polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs similarity index 83% rename from system-parachains/people/people-kusama/src/weights/polkadot_runtime_common_identity_migrator.rs rename to system-parachains/people/people-polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs index eb0d37f2d3..bcd87b2cc1 100644 --- a/system-parachains/people/people-kusama/src/weights/polkadot_runtime_common_identity_migrator.rs +++ b/system-parachains/people/people-polkadot/src/weights/polkadot_runtime_common_identity_migrator.rs @@ -13,26 +13,27 @@ // 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 `polkadot_runtime_common::identity_migrator` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-kusama-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: // ./target/production/polkadot // benchmark // pallet -// --chain=./people-kusama-chain-spec.json +// --chain=./people-polkadot-chain-spec.json // --steps=50 // --repeat=20 // --pallet=polkadot_runtime_common::identity_migrator // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./people-kusama-weights/ +// --output=./people-polkadot-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -60,13 +61,13 @@ impl polkadot_runtime_common::identity_migrator::Weight // Proof Size summary in bytes: // Measured: `741 + r * (5 ±0) + s * (32 ±0)` // Estimated: `6723` - // Minimum execution time: 30_569_000 picoseconds. - Weight::from_parts(28_116_110, 0) + // Minimum execution time: 36_130_000 picoseconds. + Weight::from_parts(38_663_715, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 12_561 - .saturating_add(Weight::from_parts(311_879, 0).saturating_mul(r.into())) - // Standard Error: 2_573 - .saturating_add(Weight::from_parts(1_457_752, 0).saturating_mul(s.into())) + // Standard Error: 4_799 + .saturating_add(Weight::from_parts(49_078, 0).saturating_mul(r.into())) + // Standard Error: 983 + .saturating_add(Weight::from_parts(1_498_325, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -81,8 +82,8 @@ impl polkadot_runtime_common::identity_migrator::Weight // Proof Size summary in bytes: // Measured: `706` // Estimated: `6723` - // Minimum execution time: 41_584_000 picoseconds. - Weight::from_parts(43_230_000, 0) + // Minimum execution time: 51_511_000 picoseconds. + Weight::from_parts(52_060_000, 0) .saturating_add(Weight::from_parts(0, 6723)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/system-parachains/people/people-polkadot/src/weights/rocksdb_weights.rs b/system-parachains/people/people-polkadot/src/weights/rocksdb_weights.rs new file mode 100644 index 0000000000..1d115d963f --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/rocksdb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; + + parameter_types! { + /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout + /// the runtime. + pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } + + #[cfg(test)] + mod test_db_weights { + use super::constants::RocksDbWeight as W; + use frame_support::weights::constants; + + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/xcm/mod.rs b/system-parachains/people/people-polkadot/src/weights/xcm/mod.rs new file mode 100644 index 0000000000..09214d2288 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/xcm/mod.rs @@ -0,0 +1,234 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +mod pallet_xcm_benchmarks_fungible; +mod pallet_xcm_benchmarks_generic; + +use crate::{xcm_config::MaxAssetsIntoHolding, Runtime}; +use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; +use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; +use sp_std::prelude::*; +use xcm::{latest::prelude::*, DoubleEncoded}; + +trait WeighAssets { + fn weigh_assets(&self, weight: Weight) -> Weight; +} + +const MAX_ASSETS: u64 = 100; + +impl WeighAssets for AssetFilter { + fn weigh_assets(&self, weight: Weight) -> Weight { + match self { + Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64), + Self::Wild(asset) => match asset { + All => weight.saturating_mul(MAX_ASSETS), + AllOf { fun, .. } => match fun { + WildFungibility::Fungible => weight, + // Magic number 2 has to do with the fact that we could have up to 2 times + // MaxAssetsIntoHolding in the worst-case scenario. + WildFungibility::NonFungible => + weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64), + }, + AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)), + }, + } + } +} + +impl WeighAssets for Assets { + fn weigh_assets(&self, weight: Weight) -> Weight { + weight.saturating_mul(self.inner().iter().count() as u64) + } +} + +pub struct PeoplePolkadotXcmWeight(core::marker::PhantomData); +impl XcmWeightInfo for PeoplePolkadotXcmWeight { + fn withdraw_asset(assets: &Assets) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::withdraw_asset()) + } + fn reserve_asset_deposited(assets: &Assets) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::reserve_asset_deposited()) + } + fn receive_teleported_asset(assets: &Assets) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::receive_teleported_asset()) + } + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() + } + fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::transfer_asset()) + } + fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::transfer_reserve_asset()) + } + fn transact( + _origin_type: &OriginKind, + _require_weight_at_most: &Weight, + _call: &DoubleEncoded, + ) -> Weight { + XcmGeneric::::transact() + } + fn hrmp_new_channel_open_request( + _sender: &u32, + _max_message_size: &u32, + _max_capacity: &u32, + ) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() + } + fn descend_origin(_who: &InteriorLocation) -> Weight { + XcmGeneric::::descend_origin() + } + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() + } + + fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight { + // Hardcoded till the XCM pallet is fixed + let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0); + let weight = assets.weigh_assets(XcmFungibleWeight::::deposit_asset()); + hardcoded_weight.min(weight) + } + fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::deposit_reserve_asset()) + } + fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight { + Weight::MAX + } + fn initiate_reserve_withdraw( + assets: &AssetFilter, + _reserve: &Location, + _xcm: &Xcm<()>, + ) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::initiate_reserve_withdraw()) + } + fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight { + assets.weigh_assets(XcmFungibleWeight::::initiate_teleport()) + } + fn report_holding(_response_info: &QueryResponseInfo, _assets: &AssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &Assets) -> Weight { + assets.weigh_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &Assets) -> Weight { + assets.weigh_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight { + XcmGeneric::::expect_transact_status() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX + } + fn lock_asset(_: &Asset, _: &Location) -> Weight { + Weight::MAX + } + fn unlock_asset(_: &Asset, _: &Location) -> Weight { + Weight::MAX + } + fn note_unlockable(_: &Asset, _: &Location) -> Weight { + Weight::MAX + } + fn request_unlock(_: &Asset, _: &Location) -> Weight { + Weight::MAX + } + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() + } + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() + } + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() + } + fn alias_origin(_: &Location) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX + } + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs new file mode 100644 index 0000000000..0e88fdcd88 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -0,0 +1,196 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_xcm_benchmarks::fungible` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_xcm_benchmarks::fungible +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --header=./file_header.txt + +#![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_xcm_benchmarks::fungible`. +pub struct WeightInfo(PhantomData); +impl WeightInfo { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + pub(crate) fn withdraw_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `3593` + // Minimum execution time: 33_500_000 picoseconds. + Weight::from_parts(34_110_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`) + pub(crate) fn transfer_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `153` + // Estimated: `6196` + // Minimum execution time: 46_640_000 picoseconds. + Weight::from_parts(47_210_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:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn transfer_reserve_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `223` + // Estimated: `6196` + // Minimum execution time: 70_580_000 picoseconds. + Weight::from_parts(71_501_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub(crate) fn reserve_asset_deposited() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_reserve_withdraw() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 30_191_000 picoseconds. + Weight::from_parts(31_000_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + pub(crate) fn receive_teleported_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_620_000 picoseconds. + Weight::from_parts(3_760_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + pub(crate) fn deposit_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 25_940_000 picoseconds. + Weight::from_parts(26_410_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn deposit_reserve_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `122` + // Estimated: `3593` + // Minimum execution time: 58_880_000 picoseconds. + Weight::from_parts(60_061_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn initiate_teleport() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_220_000 picoseconds. + Weight::from_parts(25_890_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs new file mode 100644 index 0000000000..b87da9230b --- /dev/null +++ b/system-parachains/people/people-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -0,0 +1,354 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// 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_xcm_benchmarks::generic` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-polkadot-chain-spec.json")`, DB CACHE: 1024 + +// Executed Command: +// ./target/production/polkadot +// benchmark +// pallet +// --chain=./people-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_xcm_benchmarks::generic +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./people-polkadot-weights/xcm/pallet_xcm_benchmarks_generic.rs +// --header=./file_header.txt + +#![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_xcm_benchmarks::generic`. +pub struct WeightInfo(PhantomData); +impl WeightInfo { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn report_holding() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 29_021_000 picoseconds. + Weight::from_parts(29_450_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + pub(crate) fn buy_execution() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(1_740_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::Queries` (r:1 w:0) + /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub(crate) fn query_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `32` + // Estimated: `3497` + // Minimum execution time: 8_230_000 picoseconds. + Weight::from_parts(8_410_000, 0) + .saturating_add(Weight::from_parts(0, 3497)) + .saturating_add(T::DbWeight::get().reads(1)) + } + pub(crate) fn transact() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_080_000 picoseconds. + Weight::from_parts(8_320_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn refund_surplus() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_470_000 picoseconds. + Weight::from_parts(2_570_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn set_error_handler() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_560_000 picoseconds. + Weight::from_parts(1_650_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn set_appendix() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_560_000 picoseconds. + Weight::from_parts(1_650_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn clear_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_510_000 picoseconds. + Weight::from_parts(1_600_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn descend_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_660_000 picoseconds. + Weight::from_parts(1_760_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn clear_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_540_000 picoseconds. + Weight::from_parts(1_610_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn report_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_160_000 picoseconds. + Weight::from_parts(26_070_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) + /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub(crate) fn claim_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `90` + // Estimated: `3555` + // Minimum execution time: 11_680_000 picoseconds. + Weight::from_parts(11_990_000, 0) + .saturating_add(Weight::from_parts(0, 3555)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + pub(crate) fn trap() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_560_000 picoseconds. + Weight::from_parts(1_630_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn subscribe_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 23_610_000 picoseconds. + Weight::from_parts(24_350_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) + /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub(crate) fn unsubscribe_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_960_000 picoseconds. + Weight::from_parts(4_140_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + pub(crate) fn burn_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_090_000 picoseconds. + Weight::from_parts(2_200_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn expect_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_710_000 picoseconds. + Weight::from_parts(1_820_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn expect_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_490_000 picoseconds. + Weight::from_parts(1_620_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn expect_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_530_000 picoseconds. + Weight::from_parts(1_620_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn expect_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_760_000 picoseconds. + Weight::from_parts(1_910_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn query_pallet() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 29_350_000 picoseconds. + Weight::from_parts(29_990_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + pub(crate) fn expect_pallet() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_471_000 picoseconds. + Weight::from_parts(4_600_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) + /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) + /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + pub(crate) fn report_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_621_000 picoseconds. + Weight::from_parts(26_120_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + pub(crate) fn clear_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_600_000 picoseconds. + Weight::from_parts(1_700_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn set_topic() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_540_000 picoseconds. + Weight::from_parts(1_630_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn clear_topic() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_500_000 picoseconds. + Weight::from_parts(1_590_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn set_fees_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_550_000 picoseconds. + Weight::from_parts(1_610_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + pub(crate) fn unpaid_execution() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_550_000 picoseconds. + Weight::from_parts(1_610_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/system-parachains/people/people-polkadot/src/xcm_config.rs b/system-parachains/people/people-polkadot/src/xcm_config.rs new file mode 100644 index 0000000000..099c56e123 --- /dev/null +++ b/system-parachains/people/people-polkadot/src/xcm_config.rs @@ -0,0 +1,313 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use super::{ + AccountId, AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem, + PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, +}; +use crate::{TransactionByteFee, CENTS}; +use frame_support::{ + parameter_types, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, +}; +use frame_system::EnsureRoot; +use pallet_xcm::XcmPassthrough; +use parachains_common::{ + xcm_config::{ + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, + }, + TREASURY_PALLET_ID, +}; +use polkadot_parachain_primitives::primitives::Sibling; +use polkadot_runtime_constants::system_parachain; +use sp_runtime::traits::AccountIdConversion; +use xcm::latest::prelude::*; +use xcm_builder::{ + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, + FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeeToAccount, +}; +use xcm_executor::{traits::ConvertLocation, XcmExecutor}; + +parameter_types! { + pub const RootLocation: Location = Location::here(); + pub const RelayLocation: Location = Location::parent(); + pub const RelayNetwork: Option = Some(NetworkId::Polkadot); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); + pub UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())].into(); + pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; + pub const GovernanceLocation: Location = Location::parent(); + pub FellowshipLocation: Location = Location::new(1, Parachain(system_parachain::COLLECTIVES_ID)); + /// The asset ID for the asset that we use to pay for message delivery fees. Just DOT. + pub FeeAssetId: AssetId = AssetId(RelayLocation::get()); + /// The base fee for the message delivery fees. + pub const BaseDeliveryFee: u128 = CENTS.saturating_mul(3); + pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); + pub RelayTreasuryLocation: Location = + (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); + pub RelayTreasuryPalletAccount: AccountId = + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) + .unwrap_or(TreasuryAccount::get()); + pub StakingPot: AccountId = CollatorSelection::account_id(); +} + +pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + BaseDeliveryFee, + TransactionByteFee, + ParachainSystem, +>; + +pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< + FeeAssetId, + BaseDeliveryFee, + TransactionByteFee, + XcmpQueue, +>; + +/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used +/// when determining ownership of accounts for asset transacting and when attempting to use XCM +/// `Transact` in order to determine the dispatch Origin. +pub type LocationToAccountId = ( + // The parent (Relay-chain) origin converts to the parent `AccountId`. + ParentIsPreset, + // Sibling parachain origins convert to AccountId via the `ParaId::into`. + SiblingParachainConvertsVia, + // Straight up local `AccountId32` origins just alias directly to `AccountId`. + AccountId32Aliases, + // Here/local root location to `AccountId`. + HashedDescription, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, +); + +/// 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, + // 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 don't track any teleports of `Balances`. + (), +>; + +/// 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` that can +/// bias 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 that they control. + SovereignSignedViaLocation, + // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when + // recognized. + RelayChainAsNative, + // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when + // recognized. + SiblingParachainAsNative, + // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a + // transaction from the Root origin. + ParentAsSuperuser, + // Native signed account converter; this just converts an `AccountId32` origin into a normal + // `RuntimeOrigin::Signed` origin of the same 32-byte value. + SignedAccountId32AsNative, + // XCM origins can be represented natively under the XCM pallet's `Xcm` origin. + XcmPassthrough, +); + +pub struct LocalPlurality; +impl Contains for LocalPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (0, [Plurality { .. }])) + } +} + +pub struct ParentOrParentsPlurality; +impl Contains for ParentOrParentsPlurality { + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } +} + +/// A location matching the Core Technical Fellowship. +pub struct FellowsPlurality; +impl Contains for FellowsPlurality { + fn contains(location: &Location) -> bool { + matches!( + location.unpack(), + ( + 1, + [ + Parachain(system_parachain::COLLECTIVES_ID), + Plurality { id: BodyId::Technical, .. } + ] + ) + ) + } +} + +pub type Barrier = TrailingSetTopicAsId< + DenyThenTry< + DenyReserveTransferToRelayChain, + ( + // Allow local users to buy weight credit. + TakeWeightCredit, + // Expected responses are OK. + AllowKnownQueryResponses, + WithComputedOrigin< + ( + // If the message is one that immediately attempts to pay for execution, then + // allow it. + AllowTopLevelPaidExecutionFrom, + // Parent and its pluralities (i.e. governance bodies) get free execution. + AllowExplicitUnpaidExecutionFrom<( + ParentOrParentsPlurality, + FellowsPlurality, + Equals, + )>, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, + ), + >, +>; + +/// Locations that will not be charged fees in the executor, neither for execution nor delivery. We +/// only waive fees for system functions, which these locations represent. +pub type WaivedLocations = ( + RelayOrOtherSystemParachains, + Equals, + Equals, + FellowsPlurality, + LocalPlurality, +); + +pub struct XcmConfig; +impl xcm_executor::Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type AssetTransactor = FungibleTransactor; + type OriginConverter = XcmOriginToTransactDispatchOrigin; + // People chain does not recognize a reserve location for any asset. Users must teleport DOT + // where allowed (e.g. with the Relay Chain). + type IsReserve = (); + /// Only allow teleportation of DOT. + type IsTeleporter = ConcreteAssetFromSystem; + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = WeightInfoBounds< + crate::weights::xcm::PeoplePolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + type Trader = UsingComponents< + WeightToFee, + RelayLocation, + AccountId, + Balances, + ResolveTo, + >; + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = XcmFeeManagerFromComponents< + WaivedLocations, + XcmFeeToAccount, + >; + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; +} + +/// Converts a local signed origin into an XCM location. Forms the basis for local origins +/// sending/executing XCMs. +pub type LocalOriginToLocation = SignedToAccountId32; + +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. +pub type XcmRouter = WithUniqueTopic<( + // Two routers - use UMP to communicate with the relay chain: + cumulus_primitives_utility::ParentAsUmp, + // ..and XCMP to communicate with the sibling chains. + XcmpQueue, +)>; + +impl pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + // We want to disallow users sending (arbitrary) XCM programs from this chain. + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = XcmRouter; + // Anyone can execute XCM messages locally. + type ExecuteXcmOrigin = EnsureXcmOrigin; + type XcmExecuteFilter = Everything; + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location. + type Weigher = WeightInfoBounds< + crate::weights::xcm::PeoplePolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + 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 = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; + type AdminOrigin = EnsureRoot; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); +} + +impl cumulus_pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; +} + +#[test] +fn treasury_pallet_account_not_none() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +}