From 4d53d2e01fe8368893a63d7ec20fcb7375c225cb Mon Sep 17 00:00:00 2001 From: Ayush Kumar Mishra Date: Tue, 7 Jan 2025 13:14:46 +0530 Subject: [PATCH] Feat: Polkadot stable2407 to stable2409 upgrade --- CHANGELOG.md | 4 + Cargo.lock | 686 +++++++++++----------- Cargo.toml | 238 ++++---- node/cli/src/command.rs | 3 +- node/client/Cargo.toml | 2 + node/client/src/lib.rs | 52 +- node/rpc/src/lib.rs | 19 +- node/service/Cargo.toml | 1 + node/service/src/lib.rs | 146 ++--- pallets/chainbridge/src/lib.rs | 16 +- pallets/chainbridge/src/mock.rs | 12 +- pallets/chainbridge/src/tests.rs | 36 +- pallets/ddc-clusters-gov/src/lib.rs | 9 +- pallets/ddc-clusters-gov/src/mock.rs | 5 - pallets/ddc-clusters/src/lib.rs | 4 - pallets/ddc-clusters/src/mock.rs | 9 - pallets/ddc-clusters/src/tests.rs | 9 +- pallets/ddc-customers/src/benchmarking.rs | 2 +- pallets/ddc-customers/src/lib.rs | 23 +- pallets/ddc-customers/src/migration.rs | 4 +- pallets/ddc-customers/src/mock.rs | 5 - pallets/ddc-customers/src/tests.rs | 44 +- pallets/ddc-nodes/src/lib.rs | 1 - pallets/ddc-nodes/src/mock.rs | 7 - pallets/ddc-nodes/src/tests.rs | 6 +- pallets/ddc-payouts/src/lib.rs | 4 - pallets/ddc-payouts/src/mock.rs | 4 - pallets/ddc-payouts/src/tests.rs | 142 ++--- pallets/ddc-staking/src/lib.rs | 32 +- pallets/ddc-staking/src/mock.rs | 7 +- pallets/ddc-staking/src/tests.rs | 74 +-- pallets/ddc-verification/src/lib.rs | 3 - pallets/erc20/src/lib.rs | 3 +- pallets/erc20/src/mock.rs | 5 - pallets/erc20/src/tests.rs | 8 +- pallets/erc721/src/lib.rs | 9 +- pallets/erc721/src/mock.rs | 8 +- pallets/erc721/src/tests.rs | 20 +- runtime/cere-dev/build.rs | 8 +- runtime/cere-dev/src/lib.rs | 239 ++++++-- runtime/cere/build.rs | 8 +- runtime/cere/src/lib.rs | 239 ++++++-- 42 files changed, 1114 insertions(+), 1042 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c00c75df9..6fa0d5c35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [C] Changes is `Cere` Runtime - [D] Changes is `Cere Dev` Runtime +## [7.1.0] + +- [C,D] Update Substrate from `stable2407` to `stable2409`. + ## [7.0.0] - [C,D] Update Substrate from `v1.14` to `stable2407`. diff --git a/Cargo.lock b/Cargo.lock index dd8f1fed1..74ea06c4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,15 +114,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anstream" version = "0.6.18" @@ -571,15 +562,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "beef" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" -dependencies = [ - "serde", -] - [[package]] name = "bincode" version = "1.3.3" @@ -605,7 +587,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.93", ] @@ -871,7 +853,7 @@ dependencies = [ [[package]] name = "cere-cli" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-client", "cere-service", @@ -889,7 +871,7 @@ dependencies = [ [[package]] name = "cere-client" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-dev-runtime", "cere-runtime", @@ -911,6 +893,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-grandpa", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -921,7 +904,7 @@ dependencies = [ [[package]] name = "cere-dev-runtime" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -1017,7 +1000,7 @@ dependencies = [ [[package]] name = "cere-rpc" -version = "7.0.0" +version = "7.1.0" dependencies = [ "jsonrpsee", "node-primitives", @@ -1046,7 +1029,7 @@ dependencies = [ [[package]] name = "cere-runtime" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -1142,7 +1125,7 @@ dependencies = [ [[package]] name = "cere-runtime-common" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-support", "frame-system", @@ -1163,7 +1146,7 @@ dependencies = [ [[package]] name = "cere-service" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-client", "cere-dev-runtime", @@ -1171,6 +1154,7 @@ dependencies = [ "cere-runtime", "cere-runtime-common", "ddc-primitives", + "frame-benchmarking-cli", "futures", "jsonrpsee", "node-primitives", @@ -1904,7 +1888,7 @@ dependencies = [ [[package]] name = "ddc-primitives" -version = "7.0.0" +version = "7.1.0" dependencies = [ "blake2 0.10.6", "frame-support", @@ -2348,7 +2332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2551,7 +2535,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", ] @@ -2583,8 +2567,8 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-support-procedural", @@ -2607,8 +2591,8 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "43.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "Inflector", "array-bytes", @@ -2658,7 +2642,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "14.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", @@ -2668,8 +2652,8 @@ dependencies = [ [[package]] name = "frame-election-provider-support" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2684,8 +2668,8 @@ dependencies = [ [[package]] name = "frame-executive" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "aquamarine", "frame-support", @@ -2714,8 +2698,8 @@ dependencies = [ [[package]] name = "frame-support" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "aquamarine", "array-bytes", @@ -2755,12 +2739,13 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "30.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "30.0.3" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", + "docify", "expander", "frame-support-procedural-tools", "itertools 0.11.0", @@ -2775,7 +2760,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.2.0", @@ -2787,7 +2772,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "proc-macro2", "quote", @@ -2796,8 +2781,8 @@ dependencies = [ [[package]] name = "frame-system" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "cfg-if", "docify", @@ -2816,8 +2801,8 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -2831,7 +2816,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "parity-scale-codec", @@ -2840,8 +2825,8 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "parity-scale-codec", @@ -3961,9 +3946,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b089779ad7f80768693755a031cc14a7766aba707cbe886674e3f79e9b7e47" +checksum = "c5c71d8c1a731cc4227c2f698d377e7848ca12c8a48866fc5e6951c43a4db843" dependencies = [ "jsonrpsee-core", "jsonrpsee-proc-macros", @@ -3975,13 +3960,11 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79712302e737d23ca0daa178e752c9334846b08321d439fd89af9a384f8c830b" +checksum = "f2882f6f8acb9fdaec7cefc4fd607119a9bd709831df7d7672a1d3b644628280" dependencies = [ - "anyhow", "async-trait", - "beef", "bytes", "futures-util", "http 1.2.0", @@ -3990,7 +3973,7 @@ dependencies = [ "jsonrpsee-types", "parking_lot 0.12.3", "rand", - "rustc-hash", + "rustc-hash 2.1.0", "serde", "serde_json", "thiserror 1.0.69", @@ -4000,9 +3983,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7895f186d5921065d96e16bd795e5ca89ac8356ec423fafc6e3d7cf8ec11aee4" +checksum = "c06c01ae0007548e73412c08e2285ffe5d723195bf268bce67b1b77c3bb2a14d" dependencies = [ "heck 0.5.0", "proc-macro-crate 3.2.0", @@ -4013,11 +3996,10 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "654afab2e92e5d88ebd8a39d6074483f3f2bfdf91c5ac57fe285e7127cdd4f51" +checksum = "82ad8ddc14be1d4290cd68046e7d1d37acd408efed6d3ca08aefcc3ad6da069c" dependencies = [ - "anyhow", "futures-util", "http 1.2.0", "http-body 1.0.1", @@ -4041,11 +4023,10 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c465fbe385238e861fdc4d1c85e04ada6c1fd246161d26385c1b311724d2af" +checksum = "a178c60086f24cc35bb82f57c651d0d25d99c4742b4d335de04e97fa1f08a8a1" dependencies = [ - "beef", "http 1.2.0", "serde", "serde_json", @@ -4139,7 +4120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -5354,7 +5335,7 @@ checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "sp-core", "sp-runtime", @@ -5622,10 +5603,28 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "pallet-asset-conversion" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", +] + [[package]] name = "pallet-authority-discovery" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", @@ -5639,8 +5638,8 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", @@ -5652,8 +5651,8 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5675,8 +5674,8 @@ dependencies = [ [[package]] name = "pallet-bags-list" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "aquamarine", "docify", @@ -5696,8 +5695,8 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "frame-benchmarking", @@ -5711,8 +5710,8 @@ dependencies = [ [[package]] name = "pallet-bounties" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5728,7 +5727,7 @@ dependencies = [ [[package]] name = "pallet-chainbridge" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-support", "frame-system", @@ -5743,8 +5742,8 @@ dependencies = [ [[package]] name = "pallet-child-bounties" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5761,8 +5760,8 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5777,8 +5776,8 @@ dependencies = [ [[package]] name = "pallet-contracts" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "bitflags 1.3.2", "environmental", @@ -5811,7 +5810,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "23.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "proc-macro2", "quote", @@ -5821,7 +5820,7 @@ dependencies = [ [[package]] name = "pallet-contracts-uapi" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -5832,8 +5831,8 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5848,7 +5847,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5874,7 +5873,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters-gov" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5909,7 +5908,7 @@ dependencies = [ [[package]] name = "pallet-ddc-customers" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5932,7 +5931,7 @@ dependencies = [ [[package]] name = "pallet-ddc-nodes" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5955,7 +5954,7 @@ dependencies = [ [[package]] name = "pallet-ddc-payouts" -version = "7.0.0" +version = "7.1.0" dependencies = [ "byte-unit", "chrono", @@ -5982,7 +5981,7 @@ dependencies = [ [[package]] name = "pallet-ddc-staking" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -6010,7 +6009,7 @@ dependencies = [ [[package]] name = "pallet-ddc-verification" -version = "7.0.0" +version = "7.1.0" dependencies = [ "array-bytes", "base64ct", @@ -6048,21 +6047,23 @@ dependencies = [ [[package]] name = "pallet-delegated-staking" -version = "4.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "5.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", + "sp-io", "sp-runtime", "sp-staking", ] [[package]] name = "pallet-democracy" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6078,8 +6079,8 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6100,8 +6101,8 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6113,8 +6114,8 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6131,7 +6132,7 @@ dependencies = [ [[package]] name = "pallet-erc20" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6150,7 +6151,7 @@ dependencies = [ [[package]] name = "pallet-erc721" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6167,8 +6168,8 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "frame-benchmarking", @@ -6185,8 +6186,8 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6207,8 +6208,8 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6223,8 +6224,8 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6242,8 +6243,8 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6258,8 +6259,8 @@ dependencies = [ [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "25.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", @@ -6271,8 +6272,8 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6287,8 +6288,8 @@ dependencies = [ [[package]] name = "pallet-multisig" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6302,8 +6303,8 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" -version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "35.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", @@ -6320,8 +6321,8 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" -version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6340,8 +6341,8 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" -version = "32.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "33.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6350,8 +6351,8 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", @@ -6366,8 +6367,8 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6389,7 +6390,7 @@ dependencies = [ [[package]] name = "pallet-origins" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-runtime-common", "frame-benchmarking", @@ -6405,8 +6406,8 @@ dependencies = [ [[package]] name = "pallet-preimage" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6421,8 +6422,8 @@ dependencies = [ [[package]] name = "pallet-proxy" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6435,8 +6436,8 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6449,8 +6450,8 @@ dependencies = [ [[package]] name = "pallet-referenda" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6467,8 +6468,8 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "frame-benchmarking", @@ -6484,8 +6485,8 @@ dependencies = [ [[package]] name = "pallet-session" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", @@ -6505,8 +6506,8 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6521,8 +6522,8 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6544,7 +6545,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", @@ -6554,8 +6555,8 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "frame-benchmarking", @@ -6569,8 +6570,8 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "frame-benchmarking", @@ -6588,8 +6589,8 @@ dependencies = [ [[package]] name = "pallet-tips" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6606,8 +6607,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", @@ -6621,8 +6622,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "41.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6637,8 +6638,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6649,8 +6650,8 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "frame-benchmarking", @@ -6667,8 +6668,8 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6682,8 +6683,8 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6696,8 +6697,8 @@ dependencies = [ [[package]] name = "pallet-whitelist" -version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6999,7 +7000,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "scale-info", @@ -7010,7 +7011,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "bounded-collections", "derive_more 0.99.18", @@ -7570,7 +7571,7 @@ dependencies = [ "pin-project-lite", "quinn-proto 0.9.6", "quinn-udp 0.3.2", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.20.9", "thiserror 1.0.69", "tokio", @@ -7589,7 +7590,7 @@ dependencies = [ "pin-project-lite", "quinn-proto 0.10.6", "quinn-udp 0.4.1", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.21.12", "thiserror 1.0.69", "tokio", @@ -7605,7 +7606,7 @@ dependencies = [ "bytes", "rand", "ring 0.16.20", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.20.9", "slab", "thiserror 1.0.69", @@ -7623,7 +7624,7 @@ dependencies = [ "bytes", "rand", "ring 0.16.20", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.21.12", "slab", "thiserror 1.0.69", @@ -7837,7 +7838,7 @@ checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ "hashbrown 0.13.2", "log", - "rustc-hash", + "rustc-hash 1.1.0", "slice-group-by", "smallvec", ] @@ -8003,6 +8004,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -8060,7 +8067,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.14", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -8170,7 +8177,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "log", "sp-core", @@ -8180,8 +8187,8 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "futures", @@ -8210,8 +8217,8 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "futures", "futures-timer", @@ -8233,7 +8240,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "sp-api", @@ -8247,8 +8254,8 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "docify", @@ -8275,7 +8282,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", @@ -8285,8 +8292,8 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.46.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.47.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "chrono", @@ -8327,7 +8334,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "fnv", "futures", @@ -8354,7 +8361,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "hash-db", "kvdb", @@ -8379,8 +8386,8 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "futures", @@ -8403,8 +8410,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "fork-tree", @@ -8439,8 +8446,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "futures", "jsonrpsee", @@ -8461,8 +8468,8 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8474,8 +8481,8 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.30.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "ahash", "array-bytes", @@ -8518,8 +8525,8 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.30.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "finality-grandpa", "futures", @@ -8538,8 +8545,8 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "futures", @@ -8561,8 +8568,8 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.40.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.40.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -8585,7 +8592,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "polkavm", "sc-allocator", @@ -8598,7 +8605,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "log", "polkavm", @@ -8609,7 +8616,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "anyhow", "cfg-if", @@ -8626,10 +8633,10 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ - "ansi_term", + "console", "futures", "futures-timer", "log", @@ -8644,7 +8651,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "33.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "parking_lot 0.12.3", @@ -8657,8 +8664,8 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.14.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.15.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "arrayvec", @@ -8686,8 +8693,8 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "async-channel", @@ -8737,8 +8744,8 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -8755,8 +8762,8 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "ahash", "futures", @@ -8774,8 +8781,8 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "async-channel", @@ -8795,8 +8802,8 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "async-channel", @@ -8832,8 +8839,8 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "futures", @@ -8852,7 +8859,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.12.1" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "bs58 0.5.1", "ed25519-dalek", @@ -8868,8 +8875,8 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "bytes", @@ -8903,7 +8910,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.18.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8911,8 +8918,8 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "futures", "jsonrpsee", @@ -8943,8 +8950,8 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -8963,9 +8970,10 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "16.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ + "dyn-clone", "forwarded-header-value", "futures", "governor", @@ -8975,6 +8983,7 @@ dependencies = [ "ip_network", "jsonrpsee", "log", + "sc-rpc-api", "serde", "serde_json", "substrate-prometheus-endpoint", @@ -8985,8 +8994,8 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "futures", @@ -9017,8 +9026,8 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.45.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.46.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "directories", @@ -9082,7 +9091,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.36.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "log", "parity-scale-codec", @@ -9092,8 +9101,8 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" -version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9111,8 +9120,8 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "derive_more 0.99.18", "futures", @@ -9132,8 +9141,8 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "25.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "chrono", "futures", @@ -9152,19 +9161,18 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ - "ansi_term", "chrono", + "console", "is-terminal", "lazy_static", "libc", "log", "parity-scale-codec", "parking_lot 0.12.3", - "regex", - "rustc-hash", + "rustc-hash 1.1.0", "sc-client-api", "sc-tracing-proc-macro", "serde", @@ -9183,7 +9191,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", @@ -9194,7 +9202,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "futures", @@ -9221,7 +9229,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "futures", @@ -9237,7 +9245,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-channel", "futures", @@ -9760,7 +9768,7 @@ dependencies = [ [[package]] name = "sp-api" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "hash-db", @@ -9782,7 +9790,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "Inflector", "blake2 0.10.6", @@ -9796,7 +9804,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "scale-info", @@ -9808,7 +9816,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "integer-sqrt", @@ -9822,7 +9830,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "scale-info", @@ -9834,7 +9842,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "sp-api", "sp-inherents", @@ -9843,8 +9851,8 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "37.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "futures", "parity-scale-codec", @@ -9863,7 +9871,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.40.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "futures", @@ -9878,7 +9886,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.40.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "parity-scale-codec", @@ -9896,7 +9904,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "finality-grandpa", "log", @@ -9912,8 +9920,8 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.40.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.40.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "scale-info", @@ -9924,7 +9932,7 @@ dependencies = [ [[package]] name = "sp-core" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "bitflags 1.3.2", @@ -9970,7 +9978,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "blake2b_simd", "byteorder", @@ -9983,7 +9991,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "quote", "sp-crypto-hashing", @@ -9993,7 +10001,7 @@ dependencies = [ [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -10002,7 +10010,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "proc-macro2", "quote", @@ -10012,7 +10020,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "environmental", "parity-scale-codec", @@ -10021,8 +10029,8 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.15.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "0.15.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "scale-info", @@ -10034,7 +10042,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10047,7 +10055,7 @@ dependencies = [ [[package]] name = "sp-io" version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "bytes", "docify", @@ -10073,7 +10081,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "sp-core", "sp-runtime", @@ -10083,7 +10091,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.40.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -10094,7 +10102,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "thiserror 1.0.69", "zstd 0.12.4", @@ -10103,7 +10111,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.7.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -10113,7 +10121,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.12.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "scale-info", @@ -10124,7 +10132,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "scale-info", @@ -10137,7 +10145,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "sp-api", "sp-core", @@ -10147,7 +10155,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "backtrace", "lazy_static", @@ -10157,17 +10165,17 @@ dependencies = [ [[package]] name = "sp-rpc" version = "32.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ - "rustc-hash", + "rustc-hash 1.1.0", "serde", "sp-core", ] [[package]] name = "sp-runtime" -version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "39.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "either", @@ -10193,7 +10201,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10212,7 +10220,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "Inflector", "expander", @@ -10224,8 +10232,8 @@ dependencies = [ [[package]] name = "sp-session" -version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "scale-info", @@ -10238,8 +10246,8 @@ dependencies = [ [[package]] name = "sp-staking" -version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10252,7 +10260,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "hash-db", "log", @@ -10272,7 +10280,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "aes-gcm", "curve25519-dalek", @@ -10296,12 +10304,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" [[package]] name = "sp-storage" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10313,7 +10321,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "parity-scale-codec", @@ -10324,8 +10332,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "17.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "tracing", @@ -10336,7 +10344,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "sp-api", "sp-runtime", @@ -10345,7 +10353,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "async-trait", "parity-scale-codec", @@ -10359,7 +10367,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "ahash", "hash-db", @@ -10382,7 +10390,7 @@ dependencies = [ [[package]] name = "sp-version" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10399,7 +10407,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10409,8 +10417,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "21.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -10422,7 +10430,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -10487,8 +10495,8 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" -version = "14.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "14.2.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "array-bytes", "bounded-collections", @@ -10499,19 +10507,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-runtime", "sp-weights", "xcm-procedural", ] [[package]] name = "staging-xcm-builder" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "log", + "pallet-asset-conversion", "pallet-transaction-payment", "parity-scale-codec", "polkadot-parachain-primitives", @@ -10526,8 +10536,8 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "environmental", "frame-benchmarking", @@ -10659,7 +10669,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -10671,12 +10681,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" [[package]] name = "substrate-frame-rpc-system" -version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "docify", "frame-system-rpc-runtime-api", @@ -10696,7 +10706,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "http-body-util", "hyper 1.5.2", @@ -10709,8 +10719,8 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" -version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10727,7 +10737,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "futures", "tokio", @@ -10735,13 +10745,14 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +version = "24.0.1" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "build-helper", "cargo_metadata", "console", "filetime", + "jobserver", "parity-wasm", "polkavm-linker", "sp-maybe-compressed-blob", @@ -10852,7 +10863,7 @@ dependencies = [ "fastrand", "once_cell", "rustix 0.38.42", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11254,6 +11265,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", + "time", "tracing", "tracing-core", "tracing-log", @@ -12078,7 +12090,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -12443,7 +12455,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "10.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ "Inflector", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 270ad128d..95d9f731c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "7.0.0" +version = "7.1.0" authors = ["Cerebellum-Network"] edition = "2021" homepage = "https://cere.network/" @@ -39,7 +39,7 @@ clap = { version = "4.5.1", features = ["derive"] } futures = { version = "0.3.30" } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } hex-literal = { version = "^0.4.1", default-features = false } -jsonrpsee = { version = "0.23.2", default-features = false, features = ["server"] } +jsonrpsee = { version = "0.24.3", default-features = false, features = ["server"] } lazy_static = { version = "1.5.0", default-features = false } log = { version = "0.4.22", default-features = false } parking_lot = { version = "0.12.1", default-features = false } @@ -58,123 +58,123 @@ scopeguard = { version = "1.2.0", default-features = false } # Substrate Dependencies # Please keey format such that: # dependency-name = { git = "X", tag = "Y", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false, features = ["tuples-96"] } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -node-primitives = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-child-bounties = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-fast-unstake = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-indices = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-nomination-pools = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false, features = ["historical"] } -pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-consensus-epochs = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sc-sync-state = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sc-sync-state-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sp-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-consensus-epochs = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false, features = ["serde"] } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-trie = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2407", default-features = false } -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -substrate-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2407", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false, features = ["tuples-96"] } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +node-primitives = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-fast-unstake = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-indices = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-nomination-pools = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false, features = ["historical"] } +pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-consensus-epochs = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sc-sync-state = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sc-sync-state-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-consensus-epochs = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false, features = ["serde"] } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +substrate-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false } # Cere Dependenies cere-client = { path = "node/client" } diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index 65fe6ff4c..5ca95ab44 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -144,8 +144,7 @@ pub fn run() -> sc_cli::Result<()> { #[cfg(feature = "cere-dev-native")] if chain_spec.is_cere_dev() { return runner.sync_run(|config| { - #[allow(deprecated)] - cmd.run::, ()>(config) + cmd.run_with_spec::, ()>(Some(config.chain_spec)) }); } diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index 95fdd6a27..cb8febb61 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -30,6 +30,7 @@ sp-consensus = { workspace = true, default-features = true } sp-consensus-babe = { workspace = true, default-features = true } sp-consensus-grandpa = { workspace = true, default-features = true } sp-inherents = { workspace = true, default-features = true } +sp-io = { workspace = true, default-features = true } sp-offchain = { workspace = true, default-features = true } sp-runtime = { workspace = true, default-features = true } sp-session = { workspace = true, default-features = true } @@ -45,3 +46,4 @@ cere-runtime = { workspace = true, optional = true } default = ["cere"] cere = ["cere-runtime"] cere-dev = ["cere-dev-runtime"] +runtime-benchmarks = [] diff --git a/node/client/src/lib.rs b/node/client/src/lib.rs index 4b839b8cf..c476f3a10 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -6,8 +6,7 @@ use sc_client_api::{ AuxStore, Backend as BackendT, BlockchainEvents, KeysIter, MerkleValue, PairsIter, UsageProvider, }; -#[allow(deprecated)] -pub use sc_executor::NativeElseWasmExecutor; +use sc_executor::WasmExecutor; use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::BlockStatus; @@ -19,46 +18,19 @@ use sp_runtime::{ use sp_storage::{ChildInfo, StorageData, StorageKey}; pub type FullBackend = sc_service::TFullBackend; -#[allow(deprecated)] -pub type FullClient = - sc_service::TFullClient>; -#[cfg(not(any(feature = "cere", feature = "cere-dev",)))] -compile_error!("at least one runtime feature must be enabled"); - -/// The native executor instance for Cere. -#[cfg(feature = "cere")] -pub struct CereExecutorDispatch; - -#[cfg(feature = "cere")] -impl sc_executor::NativeExecutionDispatch for CereExecutorDispatch { - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; +#[cfg(not(feature = "runtime-benchmarks"))] +pub type HostFunctions = sp_io::SubstrateHostFunctions; - fn dispatch(method: &str, data: &[u8]) -> Option> { - cere_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - cere_runtime::native_version() - } -} +#[cfg(feature = "runtime-benchmarks")] +pub type HostFunctions = + (sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions); -/// The native executor instance for Cere Dev. -#[cfg(feature = "cere-dev")] -pub struct CereDevExecutorDispatch; +pub type ChainExecutor = WasmExecutor; +pub type FullClient = sc_service::TFullClient; -#[cfg(feature = "cere-dev")] -impl sc_executor::NativeExecutionDispatch for CereDevExecutorDispatch { - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - cere_dev_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - cere_dev_runtime::native_version() - } -} +#[cfg(not(any(feature = "cere", feature = "cere-dev",)))] +compile_error!("at least one runtime feature must be enabled"); pub trait AbstractClient: BlockchainEvents @@ -102,9 +74,9 @@ where #[derive(Clone)] pub enum Client { #[cfg(feature = "cere")] - Cere(Arc>), + Cere(Arc>), #[cfg(feature = "cere-dev")] - CereDev(Arc>), + CereDev(Arc>), } macro_rules! with_client { diff --git a/node/rpc/src/lib.rs b/node/rpc/src/lib.rs index c9eb5ac6a..371c8ee0f 100644 --- a/node/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -15,7 +15,6 @@ use sc_consensus_grandpa::{ }; use sc_consensus_grandpa_rpc::Grandpa; use sc_rpc::SubscriptionTaskExecutor; -pub use sc_rpc_api::DenyUnsafe; use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; @@ -55,8 +54,6 @@ pub struct FullDeps { pub select_chain: SC, /// A copy of the chain spec. pub chain_spec: Box, - /// Whether to deny unsafe calls - pub deny_unsafe: DenyUnsafe, /// BABE specific dependencies. pub babe: BabeDeps, /// GRANDPA specific dependencies. @@ -95,7 +92,7 @@ where use substrate_state_trie_migration_rpc::StateMigrationApiServer; let mut io = RpcModule::new(()); - let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa } = deps; + let FullDeps { client, pool, select_chain, chain_spec, babe, grandpa, .. } = deps; let BabeDeps { babe_worker_handle, keystore } = babe; let GrandpaDeps { @@ -106,14 +103,13 @@ where finality_provider, } = grandpa; - io.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; + io.merge(System::new(client.clone(), pool).into_rpc())?; // Making synchronous calls in light client freezes the browser currently, // more context: https://github.com/paritytech/substrate/pull/3480 // These RPCs should use an asynchronous caller instead. io.merge(TransactionPayment::new(client.clone()).into_rpc())?; io.merge( - Babe::new(client.clone(), babe_worker_handle.clone(), keystore, select_chain, deny_unsafe) - .into_rpc(), + Babe::new(client.clone(), babe_worker_handle.clone(), keystore, select_chain).into_rpc(), )?; io.merge( Grandpa::new( @@ -132,14 +128,9 @@ where )?; io.merge( - substrate_state_trie_migration_rpc::StateMigration::new( - client.clone(), - backend, - deny_unsafe, - ) - .into_rpc(), + substrate_state_trie_migration_rpc::StateMigration::new(client.clone(), backend).into_rpc(), )?; - io.merge(Dev::new(client, deny_unsafe).into_rpc())?; + io.merge(Dev::new(client).into_rpc())?; Ok(io) } diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index e2e3f30c4..80f19aff1 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -16,6 +16,7 @@ rand = { workspace = true, default-features = true } serde = { workspace = true, default-features = true } # Substrate dependencies +frame-benchmarking-cli = { workspace = true } node-primitives = { workspace = true } pallet-im-online = { workspace = true } sc-authority-discovery = { workspace = true } diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 01e69fe10..6e2f652b9 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -5,10 +5,12 @@ use std::sync::Arc; #[cfg(not(any(feature = "cere-native", feature = "cere-dev-native",)))] compile_error!("at least one runtime feature must be enabled"); +use cere_client::ChainExecutor; #[cfg(feature = "cere-dev-native")] pub use cere_dev_runtime; #[cfg(feature = "cere-native")] pub use cere_runtime; +use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; use futures::prelude::*; use sc_client_api::{Backend, BlockBackend}; use sc_consensus_babe::SlotProportion; @@ -16,24 +18,19 @@ pub use sc_executor::NativeExecutionDispatch; use sc_network::{service::traits::NetworkService, Event, NetworkBackend, NetworkEventStream}; use sc_service::{ error::Error as ServiceError, Configuration, KeystoreContainer, RpcHandlers, TaskManager, + WarpSyncConfig, }; use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; pub mod chain_spec; -#[cfg(feature = "cere-dev-native")] -pub use cere_client::CereDevExecutorDispatch; -#[cfg(feature = "cere-native")] -pub use cere_client::CereExecutorDispatch; + pub use cere_client::{ AbstractClient, Client, ClientHandle, ExecuteWithClient, FullBackend, FullClient, RuntimeApiCollection, }; pub use chain_spec::{CereChainSpec, CereDevChainSpec}; pub use node_primitives::{Block, BlockNumber}; -#[allow(deprecated)] -use sc_executor::{ - HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY, -}; +use sc_executor::{HeapAllocStrategy, DEFAULT_HEAP_ALLOC_STRATEGY}; pub use sc_service::ChainSpec; use sc_transaction_pool_api::OffchainTransactionPoolFactory; pub use sp_api::ConstructRuntimeApi; @@ -43,40 +40,31 @@ pub use sp_api::ConstructRuntimeApi; const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; type FullSelectChain = sc_consensus::LongestChain; -type FullGrandpaBlockImport = - sc_consensus_grandpa::GrandpaBlockImport< - FullBackend, - Block, - FullClient, - FullSelectChain, - >; - -struct Basics +type FullGrandpaBlockImport = sc_consensus_grandpa::GrandpaBlockImport< + FullBackend, + Block, + FullClient, + FullSelectChain, +>; + +struct Basics where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - ExecutorDispatch: NativeExecutionDispatch + 'static, { task_manager: TaskManager, - client: Arc>, + client: Arc>, backend: Arc, keystore_container: KeystoreContainer, telemetry: Option, } -fn new_partial_basics( +fn new_partial_basics( config: &Configuration, -) -> Result, ServiceError> +) -> Result, ServiceError> where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - ExecutorDispatch: NativeExecutionDispatch + 'static, { let telemetry = config .telemetry_endpoints @@ -90,20 +78,18 @@ where .transpose()?; let heap_pages = config + .executor .default_heap_pages .map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ }); - let wasm = WasmExecutor::builder() - .with_execution_method(config.wasm_method) + let executor = ChainExecutor::builder() + .with_execution_method(config.executor.wasm_method) .with_onchain_heap_alloc_strategy(heap_pages) .with_offchain_heap_alloc_strategy(heap_pages) - .with_max_runtime_instances(config.max_runtime_instances) - .with_runtime_cache_size(config.runtime_cache_size) + .with_max_runtime_instances(config.executor.max_runtime_instances) + .with_runtime_cache_size(config.executor.runtime_cache_size) .build(); - #[allow(deprecated)] - let executor = NativeElseWasmExecutor::::new_with_wasm_executor(wasm); - let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( config, @@ -122,35 +108,27 @@ where } #[allow(clippy::type_complexity)] -fn new_partial( +fn new_partial( config: &Configuration, - Basics { task_manager, backend, client, keystore_container, telemetry }: Basics< - RuntimeApi, - ExecutorDispatch, - >, + Basics { task_manager, backend, client, keystore_container, telemetry }: Basics, ) -> Result< sc_service::PartialComponents< - FullClient, + FullClient, FullBackend, FullSelectChain, sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool>, + sc_transaction_pool::FullPool>, ( impl Fn( - cere_rpc::DenyUnsafe, sc_rpc::SubscriptionTaskExecutor, ) -> Result, sc_service::Error>, ( sc_consensus_babe::BabeBlockImport< Block, - FullClient, - FullGrandpaBlockImport, - >, - sc_consensus_grandpa::LinkHalf< - Block, - FullClient, - FullSelectChain, + FullClient, + FullGrandpaBlockImport, >, + sc_consensus_grandpa::LinkHalf, FullSelectChain>, sc_consensus_babe::BabeLink, ), sc_consensus_grandpa::SharedVoterState, @@ -160,12 +138,8 @@ fn new_partial( ServiceError, > where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - ExecutorDispatch: NativeExecutionDispatch + 'static, { let select_chain = sc_consensus::LongestChain::new(backend.clone()); @@ -239,13 +213,12 @@ where let chain_spec = config.chain_spec.cloned_box(); let rpc_backend = backend.clone(); - let rpc_extensions_builder = move |deny_unsafe, subscription_executor| { + let rpc_extensions_builder = move |subscription_executor| { let deps = cere_rpc::FullDeps { client: client.clone(), pool: pool.clone(), select_chain: select_chain.clone(), chain_spec: chain_spec.cloned_box(), - deny_unsafe, babe: cere_rpc::BabeDeps { babe_worker_handle: babe_worker_handle.clone(), keystore: keystore.clone(), @@ -283,7 +256,7 @@ pub fn build_full::Hash>>( ) -> Result, ServiceError> { #[cfg(feature = "cere-dev-native")] if config.chain_spec.is_cere_dev() { - return new_full::( + return new_full::( config, disable_hardware_benchmarks, |_, _| (), @@ -293,12 +266,8 @@ pub fn build_full::Hash>>( #[cfg(feature = "cere-native")] { - new_full::( - config, - disable_hardware_benchmarks, - |_, _| (), - ) - .map(|full| full.with_client(Client::Cere)) + new_full::(config, disable_hardware_benchmarks, |_, _| ()) + .map(|full| full.with_client(Client::Cere)) } #[cfg(not(feature = "cere-native"))] @@ -326,38 +295,32 @@ impl NewFull { } } -pub fn new_full::Hash>>( +pub fn new_full::Hash>>( config: Configuration, disable_hardware_benchmarks: bool, with_startup_data: impl FnOnce( &sc_consensus_babe::BabeBlockImport< Block, - FullClient, - FullGrandpaBlockImport, + FullClient, + FullGrandpaBlockImport, >, &sc_consensus_babe::BabeLink, ), -) -> Result>>, ServiceError> +) -> Result>>, ServiceError> where - RuntimeApi: ConstructRuntimeApi> - + Send - + Sync - + 'static, + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: RuntimeApiCollection, - ExecutorDispatch: NativeExecutionDispatch + 'static, { - use sc_service::WarpSyncParams; - let hwbench = if !disable_hardware_benchmarks { config.database.path().map(|database_path| { let _ = std::fs::create_dir_all(database_path); - sc_sysinfo::gather_hwbench(Some(database_path)) + sc_sysinfo::gather_hwbench(Some(database_path), &SUBSTRATE_REFERENCE_HARDWARE) }) } else { None }; - let basics = new_partial_basics::(&config)?; + let basics = new_partial_basics::(&config)?; let sc_service::PartialComponents { client, @@ -373,11 +336,12 @@ where let shared_voter_state = rpc_setup; let auth_disc_publish_non_global_ips = config.network.allow_non_globals_in_dht; - let mut net_config = sc_network::config::FullNetworkConfiguration::< - Block, - ::Hash, - N, - >::new(&config.network); + let mut net_config = + sc_network::config::FullNetworkConfiguration::< + Block, + ::Hash, + N, + >::new(&config.network, config.prometheus_config.as_ref().map(|cfg| cfg.registry.clone())); let metrics = N::register_notification_metrics(config.prometheus_registry()); let peer_store_handle = net_config.peer_store_handle(); @@ -408,7 +372,7 @@ where spawn_handle: task_manager.spawn_handle(), import_queue, block_announce_validator_builder: None, - warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)), + warp_sync_config: Some(WarpSyncConfig::WithProvider(warp_sync)), block_relay: None, metrics, })?; @@ -434,7 +398,7 @@ where ); } - let role = config.role.clone(); + let role = config.role; let force_authoring = config.force_authoring; let backoff_authoring_blocks = Some(sc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging::default()); @@ -631,12 +595,12 @@ impl ExecuteWithClient for RevertConsensus { } macro_rules! chain_ops { - ($config:expr; $scope:ident, $executor:ident, $variant:ident) => {{ + ($config:expr; $scope:ident, $variant:ident) => {{ let config = $config; - let basics = new_partial_basics::<$scope::RuntimeApi, $executor>(config)?; + let basics = new_partial_basics::<$scope::RuntimeApi>(config)?; let sc_service::PartialComponents { client, backend, import_queue, task_manager, .. } = - new_partial::<$scope::RuntimeApi, $executor>(&config, basics)?; + new_partial::<$scope::RuntimeApi>(&config, basics)?; Ok((Arc::new(Client::$variant(client)), backend, import_queue, task_manager)) }}; } @@ -650,12 +614,12 @@ pub fn new_chain_ops( > { #[cfg(feature = "cere-dev-native")] if config.chain_spec.is_cere_dev() { - return chain_ops!(config; cere_dev_runtime, CereDevExecutorDispatch, CereDev); + return chain_ops!(config; cere_dev_runtime, CereDev); } #[cfg(feature = "cere-native")] { - chain_ops!(config; cere_runtime, CereExecutorDispatch, Cere) + chain_ops!(config; cere_runtime, Cere) } #[cfg(not(feature = "cere-native"))] diff --git a/pallets/chainbridge/src/lib.rs b/pallets/chainbridge/src/lib.rs index ce71d06ea..12d48340a 100644 --- a/pallets/chainbridge/src/lib.rs +++ b/pallets/chainbridge/src/lib.rs @@ -157,23 +157,19 @@ pub mod pallet { /// All whitelisted chains and their respective transaction counts #[pallet::storage] - #[pallet::getter(fn chains)] pub type ChainNonces = StorageMap<_, Blake2_256, ChainId, DepositNonce>; /// Tracks current relayer set #[pallet::storage] - #[pallet::getter(fn relayers)] pub type Relayers = StorageMap<_, Blake2_256, T::AccountId, bool>; /// Utilized by the bridge software to map resource IDs to actual methods #[pallet::storage] - #[pallet::getter(fn resources)] pub type Resources = StorageMap<_, Blake2_256, ResourceId, Vec>; /// All known proposals. /// The key is the hash of the call and the deposit ID, to ensure it's unique #[pallet::storage] - #[pallet::getter(fn votes)] pub type Votes = StorageDoubleMap< _, Blake2_256, @@ -190,7 +186,6 @@ pub mod pallet { /// Number of votes required for a proposal to execute #[pallet::storage] - #[pallet::getter(fn relayer_threshold)] pub type RelayerThreshold = StorageValue>; @@ -201,7 +196,6 @@ pub mod pallet { /// Number of relayers in set #[pallet::storage] - #[pallet::getter(fn relayer_count)] pub type RelayerCount = StorageValue>; @@ -435,7 +429,7 @@ pub mod pallet { /// Checks if who is a relayer pub fn is_relayer(who: &T::AccountId) -> bool { - Self::relayers(who).unwrap_or(false) + Relayers::::get(who).unwrap_or(false) } /// Provides an AccountId for the pallet. @@ -446,18 +440,18 @@ pub mod pallet { /// Asserts if a resource is registered pub fn resource_exists(id: ResourceId) -> bool { - Self::resources(id).is_some() + Resources::::get(id).is_some() } /// Checks if a chain exists as a whitelisted destination pub fn chain_whitelisted(id: ChainId) -> bool { - Self::chains(id).is_some() + ChainNonces::::get(id).is_some() } /// Increments the deposit nonce for the specified chain ID fn bump_nonce(id: ChainId) -> DepositNonce { - let nonce = Self::chains(id).unwrap_or_default() + 1; - >::insert(id, nonce); + let nonce = ChainNonces::::get(id).unwrap_or_default() + 1; + ChainNonces::::insert(id, nonce); nonce } diff --git a/pallets/chainbridge/src/mock.rs b/pallets/chainbridge/src/mock.rs index dd642f665..2738e5e5a 100644 --- a/pallets/chainbridge/src/mock.rs +++ b/pallets/chainbridge/src/mock.rs @@ -3,11 +3,7 @@ use frame_support::{ }; use frame_system::{self as system}; pub use pallet_balances as balances; -use sp_core::H256; -use sp_runtime::{ - traits::{AccountIdConversion, IdentityLookup}, - BuildStorage, Perbill, -}; +use sp_runtime::{traits::AccountIdConversion, BuildStorage, Perbill}; use crate::{self as bridge, *}; @@ -21,11 +17,7 @@ parameter_types! { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type Nonce = u64; type Block = Block; - type Hash = H256; - type AccountId = u64; - type Lookup = IdentityLookup; type BlockHashCount = BlockHashCount; type AccountData = pallet_balances::AccountData; type MaxConsumers = frame_support::traits::ConstU32<16>; @@ -109,7 +101,7 @@ pub fn new_test_ext_initialized( t.execute_with(|| { // Set and check threshold assert_ok!(Bridge::set_threshold(RuntimeOrigin::root(), TEST_THRESHOLD)); - assert_eq!(Bridge::relayer_threshold(), TEST_THRESHOLD); + assert_eq!(RelayerThreshold::::get(), TEST_THRESHOLD); // Add relayers assert_ok!(Bridge::add_relayer(RuntimeOrigin::root(), RELAYER_A)); assert_ok!(Bridge::add_relayer(RuntimeOrigin::root(), RELAYER_B)); diff --git a/pallets/chainbridge/src/tests.rs b/pallets/chainbridge/src/tests.rs index 3263718b3..8c48a0166 100644 --- a/pallets/chainbridge/src/tests.rs +++ b/pallets/chainbridge/src/tests.rs @@ -82,13 +82,13 @@ fn setup_resources() { let method2 = "Pallet.do_somethingElse".as_bytes().to_vec(); assert_ok!(Bridge::set_resource(RuntimeOrigin::root(), id, method.clone())); - assert_eq!(Bridge::resources(id), Some(method)); + assert_eq!(Resources::::get(id), Some(method)); assert_ok!(Bridge::set_resource(RuntimeOrigin::root(), id, method2.clone())); - assert_eq!(Bridge::resources(id), Some(method2)); + assert_eq!(Resources::::get(id), Some(method2)); assert_ok!(Bridge::remove_resource(RuntimeOrigin::root(), id)); - assert_eq!(Bridge::resources(id), None); + assert_eq!(Resources::::get(id), None); }) } @@ -233,12 +233,12 @@ fn asset_transfer_invalid_chain() { fn add_remove_relayer() { new_test_ext().execute_with(|| { assert_ok!(Bridge::set_threshold(RuntimeOrigin::root(), TEST_THRESHOLD,)); - assert_eq!(Bridge::relayer_count(), 0); + assert_eq!(RelayerCount::::get(), 0); assert_ok!(Bridge::add_relayer(RuntimeOrigin::root(), RELAYER_A)); assert_ok!(Bridge::add_relayer(RuntimeOrigin::root(), RELAYER_B)); assert_ok!(Bridge::add_relayer(RuntimeOrigin::root(), RELAYER_C)); - assert_eq!(Bridge::relayer_count(), 3); + assert_eq!(RelayerCount::::get(), 3); // Already exists assert_noop!( @@ -248,12 +248,12 @@ fn add_remove_relayer() { // Confirm removal assert_ok!(Bridge::remove_relayer(RuntimeOrigin::root(), RELAYER_B)); - assert_eq!(Bridge::relayer_count(), 2); + assert_eq!(RelayerCount::::get(), 2); assert_noop!( Bridge::remove_relayer(RuntimeOrigin::root(), RELAYER_B), Error::::RelayerInvalid ); - assert_eq!(Bridge::relayer_count(), 2); + assert_eq!(RelayerCount::::get(), 2); assert_events(vec![ RuntimeEvent::Bridge(Event::RelayerAdded(RELAYER_A)), @@ -285,7 +285,7 @@ fn create_sucessful_proposal() { r_id, Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal.clone())).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal.clone())).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![], @@ -302,7 +302,7 @@ fn create_sucessful_proposal() { r_id, Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal.clone())).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal.clone())).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![RELAYER_B], @@ -319,7 +319,7 @@ fn create_sucessful_proposal() { r_id, Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal)).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal)).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A, RELAYER_C], votes_against: vec![RELAYER_B], @@ -355,7 +355,7 @@ fn create_unsucessful_proposal() { r_id, Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal.clone())).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal.clone())).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![], @@ -372,7 +372,7 @@ fn create_unsucessful_proposal() { r_id, Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal.clone())).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal.clone())).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![RELAYER_B], @@ -389,7 +389,7 @@ fn create_unsucessful_proposal() { r_id, Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal)).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal)).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![RELAYER_B, RELAYER_C], @@ -427,7 +427,7 @@ fn execute_after_threshold_change() { r_id, Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal.clone())).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal.clone())).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![], @@ -447,7 +447,7 @@ fn execute_after_threshold_change() { Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal)).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal)).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![], @@ -485,7 +485,7 @@ fn proposal_expires() { r_id, Box::new(proposal.clone()) )); - let prop = Bridge::votes(src_id, (prop_id, proposal.clone())).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal.clone())).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![], @@ -510,7 +510,7 @@ fn proposal_expires() { ); // Proposal state should remain unchanged - let prop = Bridge::votes(src_id, (prop_id, proposal.clone())).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal.clone())).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![], @@ -529,7 +529,7 @@ fn proposal_expires() { ), Error::::ProposalExpired ); - let prop = Bridge::votes(src_id, (prop_id, proposal)).unwrap(); + let prop = Votes::::get(src_id, (prop_id, proposal)).unwrap(); let expected = ProposalVotes { votes_for: vec![RELAYER_A], votes_against: vec![], diff --git a/pallets/ddc-clusters-gov/src/lib.rs b/pallets/ddc-clusters-gov/src/lib.rs index f86e4f64c..85660c1bc 100644 --- a/pallets/ddc-clusters-gov/src/lib.rs +++ b/pallets/ddc-clusters-gov/src/lib.rs @@ -148,7 +148,6 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn proposal_of)] pub type ClusterProposal = StorageMap< _, Identity, @@ -159,13 +158,11 @@ pub mod pallet { /// Votes on a given cluster proposal, if it is ongoing. #[pallet::storage] - #[pallet::getter(fn voting)] pub type ClusterProposalVoting = StorageMap<_, Identity, ClusterId, Votes>, OptionQuery>; /// Public referendums initiated by clusters #[pallet::storage] - #[pallet::getter(fn submission_depositor)] pub type SubmissionDeposits = StorageMap<_, Identity, ReferendumIndex, SubmissionDeposit, OptionQuery>; @@ -532,7 +529,8 @@ pub mod pallet { cluster_id: ClusterId, approve: bool, ) -> Result { - let mut voting = Self::voting(cluster_id).ok_or(Error::::ProposalMissing)?; + let mut voting = + ClusterProposalVoting::::get(cluster_id).ok_or(Error::::ProposalMissing)?; let position_yes = voting.ayes.iter().position(|a| a == &voter_id); let position_no = voting.nays.iter().position(|a| a == &voter_id); @@ -577,7 +575,8 @@ pub mod pallet { /// Close a vote that is either approved, disapproved or whose voting period has ended. fn do_close(cluster_id: ClusterId, caller_id: T::AccountId) -> DispatchResultWithPostInfo { - let voting = Self::voting(cluster_id).ok_or(Error::::ProposalMissing)?; + let voting = + ClusterProposalVoting::::get(cluster_id).ok_or(Error::::ProposalMissing)?; let mut no_votes = voting.nays.len() as MemberCount; let mut yes_votes = voting.ayes.len() as MemberCount; diff --git a/pallets/ddc-clusters-gov/src/mock.rs b/pallets/ddc-clusters-gov/src/mock.rs index 94457eb43..ff8edd276 100644 --- a/pallets/ddc-clusters-gov/src/mock.rs +++ b/pallets/ddc-clusters-gov/src/mock.rs @@ -18,7 +18,6 @@ use frame_support::{ fungible::HoldConsideration, ConstBool, ConstU32, ConstU64, EnsureOriginWithArg, EqualPrivilegeOnly, LinearStoragePrice, Nothing, }, - weights::constants::RocksDbWeight, PalletId, }; use frame_system::{ @@ -30,7 +29,6 @@ use pallet_ddc_clusters::cluster::Cluster; use pallet_ddc_nodes::StorageNode; use pallet_referenda::Curve; use parking_lot::{ReentrantMutex, ReentrantMutexGuard}; -use sp_core::H256; use sp_io::TestExternalities; use sp_runtime::{ traits::{Convert, IdentifyAccount, IdentityLookup, Verify}, @@ -87,10 +85,7 @@ impl Convert> for Test { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type DbWeight = RocksDbWeight; - type Nonce = u64; type Block = Block; - type Hash = H256; type AccountId = AccountId; type Lookup = IdentityLookup; type BlockHashCount = ConstU64<250>; diff --git a/pallets/ddc-clusters/src/lib.rs b/pallets/ddc-clusters/src/lib.rs index ed86010ea..6f556d104 100644 --- a/pallets/ddc-clusters/src/lib.rs +++ b/pallets/ddc-clusters/src/lib.rs @@ -141,12 +141,10 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn clusters)] pub type Clusters = StorageMap<_, Blake2_128Concat, ClusterId, Cluster>; #[pallet::storage] - #[pallet::getter(fn clusters_protocol_params)] pub type ClustersGovParams = StorageMap< _, Twox64Concat, @@ -155,7 +153,6 @@ pub mod pallet { >; #[pallet::storage] - #[pallet::getter(fn clusters_nodes)] pub type ClustersNodes = StorageDoubleMap< _, Blake2_128Concat, @@ -167,7 +164,6 @@ pub mod pallet { >; #[pallet::storage] - #[pallet::getter(fn clusters_nodes_stats)] pub type ClustersNodesStats = StorageMap<_, Twox64Concat, ClusterId, ClusterNodesStats>; diff --git a/pallets/ddc-clusters/src/mock.rs b/pallets/ddc-clusters/src/mock.rs index d4c3174bd..aee0edb4d 100644 --- a/pallets/ddc-clusters/src/mock.rs +++ b/pallets/ddc-clusters/src/mock.rs @@ -9,14 +9,12 @@ use ddc_primitives::{ use frame_support::{ construct_runtime, derive_impl, parameter_types, traits::{ConstBool, ConstU32, ConstU64, Nothing}, - weights::constants::RocksDbWeight, }; use frame_system::{ mocking::{MockBlock, MockUncheckedExtrinsic}, EnsureSigned, }; use pallet_contracts as contracts; -use sp_core::H256; use sp_io::TestExternalities; use sp_runtime::{ testing::TestXt, @@ -149,20 +147,13 @@ parameter_types! { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type DbWeight = RocksDbWeight; type Nonce = u64; type Block = Block; - type Hash = H256; type AccountId = AccountId; type BlockHashCount = ConstU64<250>; type AccountData = pallet_balances::AccountData; type MaxConsumers = ConstU32<16>; type Lookup = IdentityLookup; - type SingleBlockMigrations = (); - type MultiBlockMigrator = (); - type PreInherents = (); - type PostInherents = (); - type PostTransactions = (); } impl pallet_balances::Config for Test { diff --git a/pallets/ddc-clusters/src/tests.rs b/pallets/ddc-clusters/src/tests.rs index f5f6e1758..df0b894c0 100644 --- a/pallets/ddc-clusters/src/tests.rs +++ b/pallets/ddc-clusters/src/tests.rs @@ -50,14 +50,13 @@ fn create_cluster_works() { cluster_protocol_params.clone() )); - let created_cluster = DdcClusters::clusters(cluster_id).unwrap(); + let created_cluster = Clusters::::get(cluster_id).unwrap(); assert_eq!(created_cluster.cluster_id, cluster_id); assert_eq!(created_cluster.manager_id, cluster_manager_id); assert_eq!(created_cluster.reserve_id, cluster_reserve_id); assert_eq!(created_cluster.props.node_provider_auth_contract, Some(auth_contract.clone())); - let created_cluster_protocol_params = - DdcClusters::clusters_protocol_params(cluster_id).unwrap(); + let created_cluster_protocol_params = ClustersGovParams::::get(cluster_id).unwrap(); assert_eq!( created_cluster_protocol_params.treasury_share, cluster_protocol_params.treasury_share @@ -565,7 +564,7 @@ fn set_cluster_params_works() { }, )); - let updated_cluster = DdcClusters::clusters(cluster_id).unwrap(); + let updated_cluster = Clusters::::get(cluster_id).unwrap(); assert_eq!(updated_cluster.props.node_provider_auth_contract, Some(auth_contract_2)); assert_eq!(updated_cluster.props.erasure_coding_required, 4); assert_eq!(updated_cluster.props.erasure_coding_total, 6); @@ -621,7 +620,7 @@ fn set_last_validated_era_works() { assert_ok!(>::set_last_paid_era(&cluster_id, era_id)); - let updated_cluster = DdcClusters::clusters(cluster_id).unwrap(); + let updated_cluster = Clusters::::get(cluster_id).unwrap(); assert_eq!(updated_cluster.last_paid_era, era_id); // Checking that event was emitted diff --git a/pallets/ddc-customers/src/benchmarking.rs b/pallets/ddc-customers/src/benchmarking.rs index 423eeb2a6..effa16508 100644 --- a/pallets/ddc-customers/src/benchmarking.rs +++ b/pallets/ddc-customers/src/benchmarking.rs @@ -53,7 +53,7 @@ benchmarks! { whitelist_account!(user); }: _(RawOrigin::Signed(user), cluster_id, bucket_params) verify { - assert_eq!(Pallet::::buckets_count(), 1); + assert_eq!(BucketsCount::::get(), 1); } deposit { diff --git a/pallets/ddc-customers/src/lib.rs b/pallets/ddc-customers/src/lib.rs index 2d0835607..1ac0b287f 100644 --- a/pallets/ddc-customers/src/lib.rs +++ b/pallets/ddc-customers/src/lib.rs @@ -159,7 +159,6 @@ pub mod pallet { /// Map from all (unlocked) "owner" accounts to the info regarding the staking. #[pallet::storage] - #[pallet::getter(fn ledger)] pub type Ledger = StorageMap<_, Blake2_128Concat, T::AccountId, AccountsLedger>; #[pallet::type_value] @@ -168,13 +167,11 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn buckets_count)] pub type BucketsCount = StorageValue>; /// Map from bucket ID to the bucket structure #[pallet::storage] - #[pallet::getter(fn buckets)] pub type Buckets = StorageMap<_, Twox64Concat, BucketId, Bucket, OptionQuery>; #[pallet::event] @@ -323,7 +320,7 @@ pub mod pallet { ) -> DispatchResult { let bucket_owner = ensure_signed(origin)?; let bucket_id = - Self::buckets_count().checked_add(1).ok_or(Error::::ArithmeticOverflow)?; + BucketsCount::::get().checked_add(1).ok_or(Error::::ArithmeticOverflow)?; Self::do_create_bucket(cluster_id, bucket_id, bucket_owner, bucket_params)?; @@ -389,7 +386,7 @@ pub mod pallet { #[pallet::compact] value: BalanceOf, ) -> DispatchResult { let owner = ensure_signed(origin)?; - let mut ledger = Self::ledger(&owner).ok_or(Error::::NotOwner)?; + let mut ledger = Ledger::::get(&owner).ok_or(Error::::NotOwner)?; ensure!( ledger.unlocking.len() < MaxUnlockingChunks::get() as usize, Error::::NoMoreChunks, @@ -451,7 +448,7 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::withdraw_unlocked_deposit_kill())] pub fn withdraw_unlocked_deposit(origin: OriginFor) -> DispatchResultWithPostInfo { let owner = ensure_signed(origin)?; - let mut ledger = Self::ledger(&owner).ok_or(Error::::NotOwner)?; + let mut ledger = Ledger::::get(&owner).ok_or(Error::::NotOwner)?; let (owner, old_total) = (ledger.owner.clone(), ledger.total); let current_block = >::block_number(); ledger = ledger.consolidate_unlocked(current_block); @@ -511,7 +508,7 @@ pub mod pallet { bucket_params: BucketParams, ) -> DispatchResult { let owner = ensure_signed(origin)?; - let mut bucket = Self::buckets(bucket_id).ok_or(Error::::NoBucketWithId)?; + let mut bucket = Buckets::::get(bucket_id).ok_or(Error::::NoBucketWithId)?; ensure!(bucket.owner_id == owner, Error::::NotBucketOwner); bucket.is_public = bucket_params.is_public; @@ -689,7 +686,7 @@ pub mod pallet { impl BucketManager for Pallet { fn get_bucket_owner_id(bucket_id: BucketId) -> Result { - let bucket = Self::buckets(bucket_id).ok_or(Error::::BucketDoesNotExist)?; + let bucket = Buckets::::get(bucket_id).ok_or(Error::::BucketDoesNotExist)?; Ok(bucket.owner_id) } @@ -698,7 +695,7 @@ pub mod pallet { bucket_id: BucketId, content_owner: &T::AccountId, ) -> Result, DispatchError> { - let bucket = Self::buckets(bucket_id).ok_or(Error::::NoBucketWithId)?; + let bucket = Buckets::::get(bucket_id).ok_or(Error::::NoBucketWithId)?; ensure!(bucket.owner_id == *content_owner, Error::::NotBucketOwner); ensure!(bucket.cluster_id == *cluster_id, Error::::ClusterMismatch); @@ -711,7 +708,7 @@ pub mod pallet { bucket_owner: T::AccountId, payable_usage: &BucketUsage, ) -> DispatchResult { - let mut bucket = Self::buckets(bucket_id).ok_or(Error::::NoBucketWithId)?; + let mut bucket = Buckets::::get(bucket_id).ok_or(Error::::NoBucketWithId)?; ensure!(bucket.owner_id == bucket_owner, Error::::NotBucketOwner); let total_usage = if let Some(mut total_usage) = bucket.total_customers_usage { total_usage.transferred_bytes += payable_usage.transferred_bytes; @@ -763,7 +760,7 @@ pub mod pallet { amount: u128, ) -> Result { let actually_charged: BalanceOf; - let mut ledger = Self::ledger(&bucket_owner).ok_or(Error::::NotOwner)?; + let mut ledger = Ledger::::get(&bucket_owner).ok_or(Error::::NotOwner)?; let amount_to_deduct = amount.saturated_into::>(); if ledger.active >= amount_to_deduct { @@ -845,7 +842,7 @@ pub mod pallet { fn deposit_extra(owner: T::AccountId, amount: u128) -> Result<(), DispatchError> { let max_additional = amount.saturated_into::>(); - let mut ledger = Self::ledger(&owner).ok_or(Error::::NotOwner)?; + let mut ledger = Ledger::::get(&owner).ok_or(Error::::NotOwner)?; let owner_balance = ::Currency::free_balance(&owner); let extra = owner_balance.min(max_additional); @@ -870,7 +867,7 @@ pub mod pallet { impl CustomerVisitor for Pallet { fn get_bucket_owner(bucket_id: &BucketId) -> Result { - let bucket = Self::buckets(bucket_id).ok_or(Error::::NoBucketWithId)?; + let bucket = Buckets::::get(bucket_id).ok_or(Error::::NoBucketWithId)?; Ok(bucket.owner_id) } } diff --git a/pallets/ddc-customers/src/migration.rs b/pallets/ddc-customers/src/migration.rs index 7479ac393..2e9ab6e3c 100644 --- a/pallets/ddc-customers/src/migration.rs +++ b/pallets/ddc-customers/src/migration.rs @@ -115,13 +115,13 @@ pub mod v1 { let (prev_bucket_id, prev_count): (u64, u64) = Decode::decode(&mut &prev_state[..]) .expect("pre_upgrade provides a valid state; qed"); - let post_bucket_id = Pallet::::buckets_count(); + let post_bucket_id = BucketsCount::::get(); ensure!( prev_bucket_id == post_bucket_id, "the last bucket ID before and after the migration should be the same" ); - let post_count = Buckets::::iter().count() as u64; + let post_count = BucketsCount::::get(); ensure!( prev_count == post_count, "the bucket count before and after the migration should be the same" diff --git a/pallets/ddc-customers/src/mock.rs b/pallets/ddc-customers/src/mock.rs index d27f4c2e3..b5ca11de3 100644 --- a/pallets/ddc-customers/src/mock.rs +++ b/pallets/ddc-customers/src/mock.rs @@ -9,10 +9,8 @@ use ddc_primitives::{ use frame_support::{ construct_runtime, derive_impl, parameter_types, traits::{ConstU32, ConstU64}, - weights::constants::RocksDbWeight, }; use frame_system::mocking::MockBlock; -use sp_core::H256; use sp_io::TestExternalities; use sp_runtime::{ traits::IdentityLookup, BuildStorage, DispatchError, DispatchResult, Perquintill, @@ -43,10 +41,7 @@ parameter_types! { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type DbWeight = RocksDbWeight; - type Nonce = u64; type Block = Block; - type Hash = H256; type AccountId = AccountId; type Lookup = IdentityLookup; type BlockHashCount = ConstU64<250>; diff --git a/pallets/ddc-customers/src/tests.rs b/pallets/ddc-customers/src/tests.rs index db15de423..27fc85bb2 100644 --- a/pallets/ddc-customers/src/tests.rs +++ b/pallets/ddc-customers/src/tests.rs @@ -21,9 +21,9 @@ fn create_bucket_works() { )); // Check storage - assert_eq!(DdcCustomers::buckets_count(), 1); + assert_eq!(BucketsCount::::get(), 1); assert_eq!( - DdcCustomers::buckets(1), + Buckets::::get(1), Some(Bucket { bucket_id: 1, owner_id: account_1, @@ -67,9 +67,9 @@ fn create_two_buckets_works() { System::assert_last_event(Event::BucketCreated { cluster_id, bucket_id: 2u64 }.into()); // Check storage - assert_eq!(DdcCustomers::buckets_count(), 2); + assert_eq!(BucketsCount::::get(), 2); assert_eq!( - DdcCustomers::buckets(1), + Buckets::::get(1), Some(Bucket { bucket_id: 1, owner_id: account_1, @@ -80,7 +80,7 @@ fn create_two_buckets_works() { }) ); assert_eq!( - DdcCustomers::buckets(2), + Buckets::::get(2), Some(Bucket { bucket_id: 2, owner_id: account_1, @@ -119,7 +119,7 @@ fn deposit_and_deposit_extra_works() { // Check storage assert_eq!( - DdcCustomers::ledger(account_1), + Ledger::::get(account_1), Some(AccountsLedger { owner: account_1, total: amount1, @@ -157,7 +157,7 @@ fn deposit_and_deposit_extra_works() { // Check storage assert_eq!( - DdcCustomers::ledger(account_1), + Ledger::::get(account_1), Some(AccountsLedger { owner: account_1, total: amount1 + extra_amount2, @@ -202,7 +202,7 @@ fn charge_bucket_owner_works() { // Check storage assert_eq!( - DdcCustomers::ledger(account_3), + Ledger::::get(account_3), Some(AccountsLedger { owner: account_3, total: deposit, @@ -230,7 +230,7 @@ fn charge_bucket_owner_works() { // Check storage assert_eq!( - DdcCustomers::ledger(account_3), + Ledger::::get(account_3), Some(AccountsLedger { owner: account_3, total: deposit - charge1, @@ -248,7 +248,7 @@ fn charge_bucket_owner_works() { let charge2 = 100u128; let charge_result = DdcCustomers::charge_bucket_owner(account_3, vault, charge2).unwrap(); assert_eq!( - DdcCustomers::ledger(account_3), + Ledger::::get(account_3), Some(AccountsLedger { owner: account_3, total: 0, @@ -275,7 +275,7 @@ fn charge_bucket_owner_works() { assert_ok!(DdcCustomers::deposit_extra(RuntimeOrigin::signed(account_3), deposit)); assert_eq!( - DdcCustomers::ledger(account_3), + Ledger::::get(account_3), Some(AccountsLedger { owner: account_3, total: deposit, @@ -313,7 +313,7 @@ fn unlock_and_withdraw_deposit_works() { let unlocking_chunks = vec![UnlockChunk { value: 1, block: 11 }]; // Check storage assert_eq!( - DdcCustomers::ledger(1), + Ledger::::get(1), Some(AccountsLedger { owner: account_1, total: 35_u128, @@ -340,7 +340,7 @@ fn unlock_and_withdraw_deposit_works() { assert_ok!(DdcCustomers::withdraw_unlocked_deposit(RuntimeOrigin::signed(account_1))); // Check storage assert_eq!( - DdcCustomers::ledger(1), + Ledger::::get(1), Some(AccountsLedger { owner: account_1, total: 3_u128, @@ -355,7 +355,7 @@ fn unlock_and_withdraw_deposit_works() { assert_ok!(DdcCustomers::withdraw_unlocked_deposit(RuntimeOrigin::signed(account_1))); // Check storage - assert_eq!(DdcCustomers::ledger(account_1), None); + assert_eq!(Ledger::::get(account_1), None); }) } @@ -387,9 +387,9 @@ fn set_bucket_params_works() { update_bucket_params.clone() )); - assert_eq!(DdcCustomers::buckets_count(), 1); + assert_eq!(BucketsCount::::get(), 1); assert_eq!( - DdcCustomers::buckets(1), + Buckets::::get(1), Some(Bucket { bucket_id, owner_id: bucket_owner, @@ -481,9 +481,9 @@ fn remove_bucket_works() { ); // Check storage bucket is not removed - assert_eq!(DdcCustomers::buckets_count(), 1); + assert_eq!(BucketsCount::::get(), 1); assert_eq!( - DdcCustomers::buckets(1), + Buckets::::get(1), Some(Bucket { bucket_id: 1, owner_id: account_1, @@ -498,9 +498,9 @@ fn remove_bucket_works() { assert_ok!(DdcCustomers::remove_bucket(RuntimeOrigin::signed(account_1), bucket_id_1)); // Check storage bucket is removed - assert_eq!(DdcCustomers::buckets_count(), 1); + assert_eq!(BucketsCount::::get(), 1); assert_eq!( - DdcCustomers::buckets(1), + Buckets::::get(1), Some(Bucket { bucket_id: 1, owner_id: account_1, @@ -575,7 +575,7 @@ fn remove_bucket_checks_with_multiple_buckets_works() { // Verify whether bucket has been removed assert_eq!( - DdcCustomers::buckets(bucket_id_1), + Buckets::::get(bucket_id_1), Some(Bucket { bucket_id: bucket_id_1, owner_id: account_1, @@ -587,7 +587,7 @@ fn remove_bucket_checks_with_multiple_buckets_works() { ); assert_eq!( - DdcCustomers::buckets(bucket_id_2), + Buckets::::get(bucket_id_2), Some(Bucket { bucket_id: bucket_id_2, owner_id: account_2, diff --git a/pallets/ddc-nodes/src/lib.rs b/pallets/ddc-nodes/src/lib.rs index f33734f2b..df472d824 100644 --- a/pallets/ddc-nodes/src/lib.rs +++ b/pallets/ddc-nodes/src/lib.rs @@ -99,7 +99,6 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn storage_nodes)] pub type StorageNodes = StorageMap<_, Blake2_128Concat, StorageNodePubKey, StorageNode>; diff --git a/pallets/ddc-nodes/src/mock.rs b/pallets/ddc-nodes/src/mock.rs index 8a3063416..71f422742 100644 --- a/pallets/ddc-nodes/src/mock.rs +++ b/pallets/ddc-nodes/src/mock.rs @@ -6,10 +6,8 @@ use ddc_primitives::traits::staking::{StakingVisitor, StakingVisitorError}; use frame_support::{ construct_runtime, derive_impl, parameter_types, traits::{ConstU32, ConstU64}, - weights::constants::RocksDbWeight, }; use frame_system::mocking::{MockBlock, MockUncheckedExtrinsic}; -use sp_core::H256; use sp_io::TestExternalities; use sp_runtime::{ traits::{IdentifyAccount, IdentityLookup, Verify}, @@ -44,15 +42,10 @@ parameter_types! { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type DbWeight = RocksDbWeight; - type Nonce = u64; type Block = Block; - type Hash = H256; type AccountId = AccountId; type Lookup = IdentityLookup; - type BlockHashCount = ConstU64<250>; type AccountData = pallet_balances::AccountData; - type MaxConsumers = ConstU32<16>; } impl pallet_balances::Config for Test { diff --git a/pallets/ddc-nodes/src/tests.rs b/pallets/ddc-nodes/src/tests.rs index 2af986cc7..6c7516e40 100644 --- a/pallets/ddc-nodes/src/tests.rs +++ b/pallets/ddc-nodes/src/tests.rs @@ -68,7 +68,7 @@ fn create_storage_node_works() { NodeParams::StorageParams(storage_node_params.clone()) )); - let created_storage_node = DdcNodes::storage_nodes(&node_pub_key).unwrap(); + let created_storage_node = StorageNodes::::get(&node_pub_key).unwrap(); let expected_host: BoundedVec = storage_node_params.clone().host.try_into().unwrap(); let expected_domain: BoundedVec = @@ -93,7 +93,7 @@ fn create_storage_node_works() { { assert_eq!(cluster_id, None); } - let storage_node = DdcNodes::storage_nodes(&node_pub_key).unwrap(); + let storage_node = StorageNodes::::get(&node_pub_key).unwrap(); assert_eq!(storage_node.pub_key, node_pub_key); // Node already exists @@ -167,7 +167,7 @@ fn set_storage_node_params_works() { NodeParams::StorageParams(updated_params.clone()) )); - let updated_storage_node = DdcNodes::storage_nodes(&node_pub_key).unwrap(); + let updated_storage_node = StorageNodes::::get(&node_pub_key).unwrap(); let expected_host: BoundedVec = updated_params.host.try_into().unwrap(); let expected_domain: BoundedVec = updated_params.domain.try_into().unwrap(); diff --git a/pallets/ddc-payouts/src/lib.rs b/pallets/ddc-payouts/src/lib.rs index 9520e3f58..12df628fc 100644 --- a/pallets/ddc-payouts/src/lib.rs +++ b/pallets/ddc-payouts/src/lib.rs @@ -261,7 +261,6 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn active_billing_reports)] pub type ActiveBillingReports = StorageDoubleMap< _, Blake2_128Concat, @@ -272,12 +271,10 @@ pub mod pallet { >; #[pallet::storage] - #[pallet::getter(fn debtor_customers)] pub type DebtorCustomers = StorageDoubleMap<_, Blake2_128Concat, ClusterId, Blake2_128Concat, T::AccountId, u128>; #[pallet::storage] - #[pallet::getter(fn owing_providers)] pub type OwingProviders = StorageDoubleMap<_, Blake2_128Concat, ClusterId, Blake2_128Concat, T::AccountId, u128>; @@ -360,7 +357,6 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn billing_fingerprints)] pub type BillingFingerprints = StorageMap<_, Blake2_128Concat, Fingerprint, BillingFingerprint>; diff --git a/pallets/ddc-payouts/src/mock.rs b/pallets/ddc-payouts/src/mock.rs index db8a7f548..d4df17952 100644 --- a/pallets/ddc-payouts/src/mock.rs +++ b/pallets/ddc-payouts/src/mock.rs @@ -16,7 +16,6 @@ use frame_election_provider_support::SortedListProvider; use frame_support::{ construct_runtime, derive_impl, parameter_types, traits::{ConstU32, ConstU64, ExistenceRequirement, Randomness}, - weights::constants::RocksDbWeight, PalletId, }; use frame_system::mocking::{MockBlock, MockUncheckedExtrinsic}; @@ -76,10 +75,7 @@ impl Randomness for MockRandomness { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type DbWeight = RocksDbWeight; - type Nonce = u64; type Block = Block; - type Hash = H256; type AccountId = AccountId; type Lookup = IdentityLookup; type BlockHashCount = ConstU64<250>; diff --git a/pallets/ddc-payouts/src/tests.rs b/pallets/ddc-payouts/src/tests.rs index efa5d90c3..e40bc3ac3 100644 --- a/pallets/ddc-payouts/src/tests.rs +++ b/pallets/ddc-payouts/src/tests.rs @@ -169,10 +169,10 @@ fn begin_billing_report_works() { System::assert_last_event(Event::BillingReportInitialized { cluster_id, era }.into()); - let report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, PayoutState::Initialized); - let fingerprint = DdcPayouts::billing_fingerprints(fingerprint).unwrap(); + let fingerprint = BillingFingerprints::::get(fingerprint).unwrap(); assert_eq!(fingerprint.start_era, start_era); assert_eq!(fingerprint.end_era, end_era); @@ -246,7 +246,7 @@ fn begin_charging_customers_works() { System::assert_last_event(Event::ChargingStarted { cluster_id, era }.into()); - let report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, PayoutState::ChargingCustomers); assert_eq!(report.charging_max_batch_index, max_charging_batch_index); }) @@ -558,7 +558,7 @@ fn send_charging_customers_batch_works() { )); let usage4_charge = calculate_charge_for_month(cluster_id, usage4.clone()); - let user2_debt = DdcPayouts::debtor_customers(cluster_id, user2_debtor.clone()).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor.clone()).unwrap(); let expected_charge2 = calculate_charge_for_month(cluster_id, usage2.clone()); let mut debt = expected_charge2 - CUSTOMER2_BALANCE; assert_eq!(user2_debt, debt); @@ -570,7 +570,7 @@ fn send_charging_customers_batch_works() { charge2.gets = ratio * charge2.gets; charge2.puts = ratio * charge2.puts; - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge4 = calculate_charge_parts_for_month(cluster_id, usage4); assert_eq!(charge2.puts + charge4.puts, report.total_customer_charge.puts); assert_eq!(charge2.gets + charge4.gets, report.total_customer_charge.gets); @@ -638,7 +638,7 @@ fn send_charging_customers_batch_works() { .into(), ); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge1 = calculate_charge_parts_for_month(cluster_id, usage1); assert_eq!( charge1.puts + before_total_customer_charge.puts, @@ -658,7 +658,7 @@ fn send_charging_customers_batch_works() { ); assert_eq!(report.state, PayoutState::ChargingCustomers); - let user1_debt = DdcPayouts::debtor_customers(cluster_id, user1); + let user1_debt = DebtorCustomers::::get(cluster_id, user1); assert_eq!(user1_debt, None); let balance_before = Balances::free_balance(DdcPayouts::account_id()); @@ -677,7 +677,7 @@ fn send_charging_customers_batch_works() { let user3_charge = calculate_charge_for_month(cluster_id, usage3.clone()); let charge3 = calculate_charge_parts_for_month(cluster_id, usage3); let ratio = Perquintill::from_rational(PARTIAL_CHARGE, user3_charge); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!( ratio * charge3.puts + before_total_customer_charge.puts, report.total_customer_charge.puts @@ -698,7 +698,7 @@ fn send_charging_customers_batch_works() { let balance = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance, balance_before + PARTIAL_CHARGE); - let user3_debt = DdcPayouts::debtor_customers(cluster_id, user3_debtor.clone()).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor.clone()).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -808,7 +808,7 @@ fn end_charging_customers_works_small_usage_1_hour() { MMRProof::default(), )); - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); let usage6_charge = calculate_charge_for_hour(cluster_id, usage6.clone()); let usage7_charge = calculate_charge_for_hour(cluster_id, usage7.clone()); let charge6 = calculate_charge_parts_for_hour(cluster_id, usage6); @@ -867,7 +867,7 @@ fn end_charging_customers_works_small_usage_1_hour() { assert_ok!(>::end_charging_customers(cluster_id, era,)); System::assert_has_event(Event::ChargingFinished { cluster_id, era }.into()); - let report_after = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_after = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report_after.state, PayoutState::CustomersChargedWithFees); let fees = get_fees(&cluster_id); @@ -1045,7 +1045,7 @@ fn send_charging_customers_batch_works_for_day() { )); let usage4_charge = calculate_charge_for_day(cluster_id, usage4.clone()); - let user2_debt = DdcPayouts::debtor_customers(cluster_id, user2_debtor.clone()).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor.clone()).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - CUSTOMER2_BALANCE; assert_eq!(user2_debt, debt); @@ -1057,7 +1057,7 @@ fn send_charging_customers_batch_works_for_day() { charge2.gets = ratio * charge2.gets; charge2.puts = ratio * charge2.puts; - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge4 = calculate_charge_parts_for_day(cluster_id, usage4); assert_eq!(charge2.puts + charge4.puts, report.total_customer_charge.puts); assert_eq!(charge2.gets + charge4.gets, report.total_customer_charge.gets); @@ -1125,7 +1125,7 @@ fn send_charging_customers_batch_works_for_day() { .into(), ); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge1 = calculate_charge_parts_for_day(cluster_id, usage1); assert_eq!( charge1.puts + before_total_customer_charge.puts, @@ -1145,7 +1145,7 @@ fn send_charging_customers_batch_works_for_day() { ); assert_eq!(report.state, PayoutState::ChargingCustomers); - let user1_debt = DdcPayouts::debtor_customers(cluster_id, user1); + let user1_debt = DebtorCustomers::::get(cluster_id, user1); assert_eq!(user1_debt, None); let balance_before = Balances::free_balance(DdcPayouts::account_id()); @@ -1164,7 +1164,7 @@ fn send_charging_customers_batch_works_for_day() { let user3_charge = calculate_charge_for_day(cluster_id, usage3.clone()); let charge3 = calculate_charge_parts_for_day(cluster_id, usage3); let ratio = Perquintill::from_rational(PARTIAL_CHARGE, user3_charge); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!( ratio * charge3.puts + before_total_customer_charge.puts, report.total_customer_charge.puts @@ -1185,7 +1185,7 @@ fn send_charging_customers_batch_works_for_day() { let balance = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance, balance_before + PARTIAL_CHARGE); - let user3_debt = DdcPayouts::debtor_customers(cluster_id, user3_debtor.clone()).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor.clone()).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -1322,7 +1322,7 @@ fn send_charging_customers_batch_works_for_day_free_storage() { )); let usage4_charge = calculate_charge_for_day(cluster_id, usage4.clone()); - let user2_debt = DdcPayouts::debtor_customers(cluster_id, user2_debtor.clone()).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor.clone()).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - CUSTOMER2_BALANCE; assert_eq!(user2_debt, debt); @@ -1334,7 +1334,7 @@ fn send_charging_customers_batch_works_for_day_free_storage() { charge2.gets = ratio * charge2.gets; charge2.puts = ratio * charge2.puts; - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge4 = calculate_charge_parts_for_day(cluster_id, usage4); assert_eq!(charge2.puts + charge4.puts, report.total_customer_charge.puts); assert_eq!(charge2.gets + charge4.gets, report.total_customer_charge.gets); @@ -1402,7 +1402,7 @@ fn send_charging_customers_batch_works_for_day_free_storage() { .into(), ); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge1 = calculate_charge_parts_for_day(cluster_id, usage1); assert_eq!( charge1.puts + before_total_customer_charge.puts, @@ -1422,7 +1422,7 @@ fn send_charging_customers_batch_works_for_day_free_storage() { ); assert_eq!(report.state, PayoutState::ChargingCustomers); - let user1_debt = DdcPayouts::debtor_customers(cluster_id, user1); + let user1_debt = DebtorCustomers::::get(cluster_id, user1); assert_eq!(user1_debt, None); let balance_before = Balances::free_balance(DdcPayouts::account_id()); @@ -1441,7 +1441,7 @@ fn send_charging_customers_batch_works_for_day_free_storage() { let user3_charge = calculate_charge_for_day(cluster_id, usage3.clone()); let charge3 = calculate_charge_parts_for_day(cluster_id, usage3); let ratio = Perquintill::from_rational(PARTIAL_CHARGE, user3_charge); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!( ratio * charge3.puts + before_total_customer_charge.puts, report.total_customer_charge.puts @@ -1462,7 +1462,7 @@ fn send_charging_customers_batch_works_for_day_free_storage() { let balance = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance, balance_before + PARTIAL_CHARGE); - let user3_debt = DdcPayouts::debtor_customers(cluster_id, user3_debtor.clone()).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor.clone()).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -1599,7 +1599,7 @@ fn send_charging_customers_batch_works_for_day_free_stream() { )); let usage4_charge = calculate_charge_for_day(cluster_id, usage4.clone()); - let user2_debt = DdcPayouts::debtor_customers(cluster_id, user2_debtor.clone()).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor.clone()).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - CUSTOMER2_BALANCE; assert_eq!(user2_debt, debt); @@ -1611,7 +1611,7 @@ fn send_charging_customers_batch_works_for_day_free_stream() { charge2.gets = ratio * charge2.gets; charge2.puts = ratio * charge2.puts; - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge4 = calculate_charge_parts_for_day(cluster_id, usage4); assert_eq!(charge2.puts + charge4.puts, report.total_customer_charge.puts); assert_eq!(charge2.gets + charge4.gets, report.total_customer_charge.gets); @@ -1679,7 +1679,7 @@ fn send_charging_customers_batch_works_for_day_free_stream() { .into(), ); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge1 = calculate_charge_parts_for_day(cluster_id, usage1); assert_eq!( charge1.puts + before_total_customer_charge.puts, @@ -1699,7 +1699,7 @@ fn send_charging_customers_batch_works_for_day_free_stream() { ); assert_eq!(report.state, PayoutState::ChargingCustomers); - let user1_debt = DdcPayouts::debtor_customers(cluster_id, user1); + let user1_debt = DebtorCustomers::::get(cluster_id, user1); assert_eq!(user1_debt, None); let balance_before = Balances::free_balance(DdcPayouts::account_id()); @@ -1718,7 +1718,7 @@ fn send_charging_customers_batch_works_for_day_free_stream() { let user3_charge = calculate_charge_for_day(cluster_id, usage3.clone()); let charge3 = calculate_charge_parts_for_day(cluster_id, usage3); let ratio = Perquintill::from_rational(PARTIAL_CHARGE, user3_charge); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!( ratio * charge3.puts + before_total_customer_charge.puts, report.total_customer_charge.puts @@ -1739,7 +1739,7 @@ fn send_charging_customers_batch_works_for_day_free_stream() { let balance = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance, balance_before + PARTIAL_CHARGE); - let user3_debt = DdcPayouts::debtor_customers(cluster_id, user3_debtor.clone()).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor.clone()).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -1878,7 +1878,7 @@ fn send_charging_customers_batch_works_for_day_free_get() { )); let usage4_charge = calculate_charge_for_day(cluster_id, usage4.clone()); - let user2_debt = DdcPayouts::debtor_customers(cluster_id, user2_debtor.clone()).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor.clone()).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - CUSTOMER2_BALANCE; assert_eq!(user2_debt, debt); @@ -1890,7 +1890,7 @@ fn send_charging_customers_batch_works_for_day_free_get() { charge2.gets = ratio * charge2.gets; charge2.puts = ratio * charge2.puts; - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge4 = calculate_charge_parts_for_day(cluster_id, usage4); assert_eq!(charge2.puts + charge4.puts, report.total_customer_charge.puts); assert_eq!(charge2.gets + charge4.gets, report.total_customer_charge.gets); @@ -1958,7 +1958,7 @@ fn send_charging_customers_batch_works_for_day_free_get() { .into(), ); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge1 = calculate_charge_parts_for_day(cluster_id, usage1); assert_eq!( charge1.puts + before_total_customer_charge.puts, @@ -1978,7 +1978,7 @@ fn send_charging_customers_batch_works_for_day_free_get() { ); assert_eq!(report.state, PayoutState::ChargingCustomers); - let user1_debt = DdcPayouts::debtor_customers(cluster_id, user1); + let user1_debt = DebtorCustomers::::get(cluster_id, user1); assert_eq!(user1_debt, None); let balance_before = Balances::free_balance(DdcPayouts::account_id()); @@ -1997,7 +1997,7 @@ fn send_charging_customers_batch_works_for_day_free_get() { let user3_charge = calculate_charge_for_day(cluster_id, usage3.clone()); let charge3 = calculate_charge_parts_for_day(cluster_id, usage3); let ratio = Perquintill::from_rational(PARTIAL_CHARGE, user3_charge); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!( ratio * charge3.puts + before_total_customer_charge.puts, report.total_customer_charge.puts @@ -2018,7 +2018,7 @@ fn send_charging_customers_batch_works_for_day_free_get() { let balance = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance, balance_before + PARTIAL_CHARGE); - let user3_debt = DdcPayouts::debtor_customers(cluster_id, user3_debtor.clone()).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor.clone()).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -2156,7 +2156,7 @@ fn send_charging_customers_batch_works_for_day_free_put() { )); let usage4_charge = calculate_charge_for_day(cluster_id, usage4.clone()); - let user2_debt = DdcPayouts::debtor_customers(cluster_id, user2_debtor.clone()).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor.clone()).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - CUSTOMER2_BALANCE; assert_eq!(user2_debt, debt); @@ -2168,7 +2168,7 @@ fn send_charging_customers_batch_works_for_day_free_put() { charge2.gets = ratio * charge2.gets; charge2.puts = ratio * charge2.puts; - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge4 = calculate_charge_parts_for_day(cluster_id, usage4); assert_eq!(charge2.puts + charge4.puts, report.total_customer_charge.puts); assert_eq!(charge2.gets + charge4.gets, report.total_customer_charge.gets); @@ -2236,7 +2236,7 @@ fn send_charging_customers_batch_works_for_day_free_put() { .into(), ); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge1 = calculate_charge_parts_for_day(cluster_id, usage1); assert_eq!( charge1.puts + before_total_customer_charge.puts, @@ -2256,7 +2256,7 @@ fn send_charging_customers_batch_works_for_day_free_put() { ); assert_eq!(report.state, PayoutState::ChargingCustomers); - let user1_debt = DdcPayouts::debtor_customers(cluster_id, user1); + let user1_debt = DebtorCustomers::::get(cluster_id, user1); assert_eq!(user1_debt, None); let balance_before = Balances::free_balance(DdcPayouts::account_id()); @@ -2275,7 +2275,7 @@ fn send_charging_customers_batch_works_for_day_free_put() { let user3_charge = calculate_charge_for_day(cluster_id, usage3.clone()); let charge3 = calculate_charge_parts_for_day(cluster_id, usage3); let ratio = Perquintill::from_rational(PARTIAL_CHARGE, user3_charge); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!( ratio * charge3.puts + before_total_customer_charge.puts, report.total_customer_charge.puts @@ -2296,7 +2296,7 @@ fn send_charging_customers_batch_works_for_day_free_put() { let balance = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance, balance_before + PARTIAL_CHARGE); - let user3_debt = DdcPayouts::debtor_customers(cluster_id, user3_debtor.clone()).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor.clone()).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -2433,7 +2433,7 @@ fn send_charging_customers_batch_works_for_day_free_storage_stream() { )); let usage4_charge = calculate_charge_for_day(cluster_id, usage4.clone()); - let user2_debt = DdcPayouts::debtor_customers(cluster_id, user2_debtor.clone()).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor.clone()).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - CUSTOMER2_BALANCE; assert_eq!(user2_debt, debt); @@ -2445,7 +2445,7 @@ fn send_charging_customers_batch_works_for_day_free_storage_stream() { charge2.gets = ratio * charge2.gets; charge2.puts = ratio * charge2.puts; - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge4 = calculate_charge_parts_for_day(cluster_id, usage4); assert_eq!(charge2.puts + charge4.puts, report.total_customer_charge.puts); assert_eq!(charge2.gets + charge4.gets, report.total_customer_charge.gets); @@ -2513,7 +2513,7 @@ fn send_charging_customers_batch_works_for_day_free_storage_stream() { .into(), ); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge1 = calculate_charge_parts_for_day(cluster_id, usage1); assert_eq!( charge1.puts + before_total_customer_charge.puts, @@ -2533,7 +2533,7 @@ fn send_charging_customers_batch_works_for_day_free_storage_stream() { ); assert_eq!(report.state, PayoutState::ChargingCustomers); - let user1_debt = DdcPayouts::debtor_customers(cluster_id, user1); + let user1_debt = DebtorCustomers::::get(cluster_id, user1); assert_eq!(user1_debt, None); let balance_before = Balances::free_balance(DdcPayouts::account_id()); @@ -2552,7 +2552,7 @@ fn send_charging_customers_batch_works_for_day_free_storage_stream() { let user3_charge = calculate_charge_for_day(cluster_id, usage3.clone()); let charge3 = calculate_charge_parts_for_day(cluster_id, usage3); let ratio = Perquintill::from_rational(PARTIAL_CHARGE, user3_charge); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!( ratio * charge3.puts + before_total_customer_charge.puts, report.total_customer_charge.puts @@ -2573,7 +2573,7 @@ fn send_charging_customers_batch_works_for_day_free_storage_stream() { let balance = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance, balance_before + PARTIAL_CHARGE); - let user3_debt = DdcPayouts::debtor_customers(cluster_id, user3_debtor.clone()).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor.clone()).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -2665,7 +2665,7 @@ fn send_charging_customers_batch_works_zero_fees() { assert_eq!(System::events().len(), 3); // batch 1 - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); let before_total_customer_charge = report.total_customer_charge; let balance_before = Balances::free_balance(DdcPayouts::account_id()); assert_ok!(>::send_charging_customers_batch( @@ -2679,7 +2679,7 @@ fn send_charging_customers_batch_works_zero_fees() { let usage5_charge = calculate_charge_for_month(cluster_id, usage1.clone()); let charge5 = calculate_charge_parts_for_month(cluster_id, usage1); let balance = Balances::free_balance(DdcPayouts::account_id()); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(balance, usage5_charge + balance_before); assert_eq!( charge5.puts + before_total_customer_charge.puts, @@ -2870,7 +2870,7 @@ fn end_charging_customers_works() { MMRProof::default(), )); - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge = calculate_charge_for_month(cluster_id, usage1); System::assert_last_event( Event::Charged { @@ -2911,7 +2911,7 @@ fn end_charging_customers_works() { let transfers = 3 + 3 + 3 * 3; // for Currency::transfer assert_eq!(System::events().len(), 7 + 2 + 3 + transfers); - let report_after = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_after = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report_after.state, PayoutState::CustomersChargedWithFees); let total_left_from_one = (get_fees(&cluster_id).treasury_share + @@ -3066,7 +3066,7 @@ fn end_charging_customers_works_zero_fees() { MMRProof::default(), )); - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); let charge = calculate_charge_for_month(cluster_id, usage1); System::assert_last_event( Event::Charged { @@ -3089,7 +3089,7 @@ fn end_charging_customers_works_zero_fees() { System::assert_has_event(Event::ChargingFinished { cluster_id, era }.into()); assert_eq!(System::events().len(), 5 + 1); - let report_after = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_after = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report_after.state, PayoutState::CustomersChargedWithFees); let fees = get_fees(&cluster_id); @@ -3292,7 +3292,7 @@ fn begin_rewarding_providers_works() { fingerprint )); - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, PayoutState::Initialized); assert_ok!(>::begin_charging_customers( @@ -3319,7 +3319,7 @@ fn begin_rewarding_providers_works() { System::assert_last_event(Event::RewardingStarted { cluster_id, era }.into()); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, PayoutState::RewardingProviders); }) } @@ -3590,10 +3590,10 @@ fn send_rewarding_providers_batch_works() { payers1_batch_proof, )); - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_ok!(>::end_charging_customers(cluster_id, era,)); - let report_after = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_after = ActiveBillingReports::::get(cluster_id, era).unwrap(); let total_left_from_one = (get_fees(&cluster_id).treasury_share + get_fees(&cluster_id).validators_share + get_fees(&cluster_id).cluster_reserve_share) @@ -3652,7 +3652,7 @@ fn send_rewarding_providers_batch_works() { let balance_node1 = Balances::free_balance(NODE_PROVIDER1_KEY_32.clone()); assert_eq!(balance_node1, transfer_charge + storage_charge + puts_charge + gets_charge); - let mut report_reward = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report_reward = ActiveBillingReports::::get(cluster_id, era).unwrap(); System::assert_has_event( Event::Rewarded { @@ -3731,7 +3731,7 @@ fn send_rewarding_providers_batch_works() { Perquintill::from_rational(node_usage3.number_of_gets, cluster_usage.number_of_gets); gets_charge = ratio3_gets * report_after.total_customer_charge.gets; - report_reward = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report_reward = ActiveBillingReports::::get(cluster_id, era).unwrap(); let balance_node3 = Balances::free_balance(NODE_PROVIDER3_KEY_32.clone()); assert_eq!(balance_node3, transfer_charge + storage_charge + puts_charge + gets_charge); @@ -3990,7 +3990,7 @@ fn send_rewarding_providers_batch_100_nodes_small_usage_works() { batch_user_index += 1; } - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); let balance1 = Balances::free_balance(report_before.vault.clone()); let balance2 = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance1, balance2); @@ -3999,7 +3999,7 @@ fn send_rewarding_providers_batch_100_nodes_small_usage_works() { assert_ok!(>::end_charging_customers(cluster_id, era,)); - let report_after = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_after = ActiveBillingReports::::get(cluster_id, era).unwrap(); let total_left_from_one = (get_fees(&cluster_id).treasury_share + get_fees(&cluster_id).validators_share + get_fees(&cluster_id).cluster_reserve_share) @@ -4312,7 +4312,7 @@ fn send_rewarding_providers_batch_100_nodes_large_usage_works() { batch_user_index += 1; } - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); let balance1 = Balances::free_balance(report_before.vault.clone()); let balance2 = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance1, balance2); @@ -4321,7 +4321,7 @@ fn send_rewarding_providers_batch_100_nodes_large_usage_works() { assert_ok!(>::end_charging_customers(cluster_id, era,)); - let report_after = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_after = ActiveBillingReports::::get(cluster_id, era).unwrap(); let total_left_from_one = (get_fees(&cluster_id).treasury_share + get_fees(&cluster_id).validators_share + get_fees(&cluster_id).cluster_reserve_share) @@ -4597,7 +4597,7 @@ fn send_rewarding_providers_batch_100_nodes_small_large_usage_works() { batch_user_index += 1; } - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); let balance1 = Balances::free_balance(report_before.vault.clone()); let balance2 = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance1, balance2); @@ -4606,7 +4606,7 @@ fn send_rewarding_providers_batch_100_nodes_small_large_usage_works() { assert_ok!(>::end_charging_customers(cluster_id, era,)); - let report_after = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_after = ActiveBillingReports::::get(cluster_id, era).unwrap(); let total_left_from_one = (get_fees(&cluster_id).treasury_share + get_fees(&cluster_id).validators_share + get_fees(&cluster_id).cluster_reserve_share) @@ -4899,7 +4899,7 @@ fn send_rewarding_providers_batch_100_nodes_random_usage_works() { batch_user_index += 1; } - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); let balance1 = Balances::free_balance(report_before.vault.clone()); let balance2 = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance1, balance2); @@ -4908,7 +4908,7 @@ fn send_rewarding_providers_batch_100_nodes_random_usage_works() { assert_ok!(>::end_charging_customers(cluster_id, era,)); - let report_after = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_after = ActiveBillingReports::::get(cluster_id, era).unwrap(); let total_left_from_one = (get_fees(&cluster_id).treasury_share + get_fees(&cluster_id).validators_share + get_fees(&cluster_id).cluster_reserve_share) @@ -5215,7 +5215,7 @@ fn end_rewarding_providers_works() { fingerprint )); - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, PayoutState::Initialized); assert_ok!(>::begin_charging_customers( @@ -5254,7 +5254,7 @@ fn end_rewarding_providers_works() { System::assert_last_event(Event::RewardingFinished { cluster_id, era }.into()); - report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, PayoutState::ProvidersRewarded); }) } @@ -5474,7 +5474,7 @@ fn end_billing_report_works() { fingerprint )); - let report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, PayoutState::Initialized); assert_ok!(>::begin_charging_customers( @@ -5515,7 +5515,7 @@ fn end_billing_report_works() { System::assert_last_event(Event::BillingReportFinalized { cluster_id, era }.into()); - let report_end = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_end = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert!(report_end.rewarding_processed_batches.is_empty()); assert!(report_end.charging_processed_batches.is_empty()); assert_eq!(report_end.state, PayoutState::Finalized); diff --git a/pallets/ddc-staking/src/lib.rs b/pallets/ddc-staking/src/lib.rs index 4896e97b6..25d33fd89 100644 --- a/pallets/ddc-staking/src/lib.rs +++ b/pallets/ddc-staking/src/lib.rs @@ -188,44 +188,36 @@ pub mod pallet { /// Map from all locked "stash" accounts to the controller account. #[pallet::storage] - #[pallet::getter(fn bonded)] pub type Bonded = StorageMap<_, Twox64Concat, T::AccountId, T::AccountId>; /// Map from all (unlocked) "controller" accounts to the info regarding the staking. #[pallet::storage] - #[pallet::getter(fn ledger)] pub type Ledger = StorageMap<_, Blake2_128Concat, T::AccountId, StakingLedger, T>>; /// The map of (wannabe) Storage nodes participants stash keys to the DDC cluster ID they /// wish to participate into. #[pallet::storage] - #[pallet::getter(fn storages)] pub type Storages = StorageMap<_, Twox64Concat, T::AccountId, ClusterId>; /// Map from DDC node ID to the node operator stash account. #[pallet::storage] - #[pallet::getter(fn nodes)] pub type Nodes = StorageMap<_, Twox64Concat, NodePubKey, T::AccountId>; /// Map from operator stash account to DDC node ID. #[pallet::storage] - #[pallet::getter(fn providers)] pub type Providers = StorageMap<_, Twox64Concat, T::AccountId, NodePubKey>; /// Map of Storage node provider stash accounts that aim to leave a cluster #[pallet::storage] - #[pallet::getter(fn leaving_storages)] pub type LeavingStorages = StorageMap<_, Twox64Concat, T::AccountId, ClusterId>; /// Map from all clusters locked "stash" accounts to the controller account. #[pallet::storage] - #[pallet::getter(fn cluster_bonded)] pub type ClusterBonded = StorageMap<_, Twox64Concat, T::AccountId, T::AccountId>; /// Map of all clusters staking ledgers. #[pallet::storage] - #[pallet::getter(fn cluster_ledger)] pub type ClusterLedger = StorageMap<_, Blake2_128Concat, T::AccountId, StakingLedger, T>>; @@ -468,7 +460,7 @@ pub mod pallet { #[pallet::compact] value: BalanceOf, ) -> DispatchResult { let controller = ensure_signed(origin)?; - let mut ledger = Self::ledger(&controller).ok_or(Error::::NotController)?; + let mut ledger = Ledger::::get(&controller).ok_or(Error::::NotController)?; ensure!( ledger.unlocking.len() < MaxUnlockingChunks::get() as usize, @@ -488,7 +480,7 @@ pub mod pallet { ledger.active = Zero::zero(); } - let min_active_bond = if let Some(cluster_id) = Self::storages(&ledger.stash) { + let min_active_bond = if let Some(cluster_id) = Storages::::get(&ledger.stash) { let bond_size = T::ClusterProtocol::get_bond_size(&cluster_id, NodeType::Storage) .map_err(|_| Error::::NoClusterGovParams)?; @@ -578,7 +570,7 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::withdraw_unbonded())] pub fn withdraw_unbonded(origin: OriginFor) -> DispatchResult { let controller = ensure_signed(origin)?; - let mut ledger = Self::ledger(&controller).ok_or(Error::::NotController)?; + let mut ledger = Ledger::::get(&controller).ok_or(Error::::NotController)?; let (stash, old_total) = (ledger.stash.clone(), ledger.total); let node_pub_key = >::get(stash.clone()).ok_or(Error::::BadState)?; @@ -637,7 +629,7 @@ pub mod pallet { Error::::NoCluster ); - let ledger = Self::ledger(&controller).ok_or(Error::::NotController)?; + let ledger = Ledger::::get(&controller).ok_or(Error::::NotController)?; // Retrieve the respective bond size from Cluster Visitor let bond_size = T::ClusterProtocol::get_bond_size(&cluster_id, NodeType::Storage) .map_err(|_| Error::::NoClusterGovParams)?; @@ -655,7 +647,7 @@ pub mod pallet { ); // Is it an attempt to cancel a previous "chill"? - if let Some(current_cluster) = Self::storages(stash) { + if let Some(current_cluster) = Storages::::get(stash) { // Switching the cluster is prohibited. The user should chill first. ensure!(current_cluster == cluster_id, Error::::AlreadyInRole); // Cancel previous "chill" attempts @@ -693,11 +685,11 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::chill())] pub fn chill(origin: OriginFor) -> DispatchResult { let controller = ensure_signed(origin)?; - let ledger = Self::ledger(&controller).ok_or(Error::::NotController)?; + let ledger = Ledger::::get(&controller).ok_or(Error::::NotController)?; let current_block = >::block_number(); // Extract delay from the cluster settings. - let (cluster, delay) = if let Some(cluster) = Self::storages(&ledger.stash) { + let (cluster, delay) = if let Some(cluster) = Storages::::get(&ledger.stash) { let chill_delay = T::ClusterProtocol::get_chill_delay(&cluster, NodeType::Storage) .map_err(|_| Error::::NoClusterGovParams)?; (cluster, chill_delay) @@ -747,7 +739,7 @@ pub mod pallet { controller: ::Source, ) -> DispatchResult { let stash = ensure_signed(origin)?; - let old_controller = Self::bonded(&stash).ok_or(Error::::NotStash)?; + let old_controller = Bonded::::get(&stash).ok_or(Error::::NotStash)?; let controller = T::Lookup::lookup(controller)?; if >::contains_key(&controller) { Err(Error::::AlreadyPaired)? @@ -875,7 +867,8 @@ pub mod pallet { ensure!(controller == cluster_controller, Error::::NotController); - let mut ledger = Self::cluster_ledger(&controller).ok_or(Error::::NotController)?; + let mut ledger = + ClusterLedger::::get(&controller).ok_or(Error::::NotController)?; ensure!( ledger.unlocking.len() < MaxUnlockingChunks::get() as usize, Error::::NoMoreChunks, @@ -921,7 +914,8 @@ pub mod pallet { let controller = T::ClusterManager::get_manager_account_id(&cluster_id)?; ensure!(controller == cluster_controller, Error::::NotController); - let mut ledger = Self::cluster_ledger(&controller).ok_or(Error::::NotController)?; + let mut ledger = + ClusterLedger::::get(&controller).ok_or(Error::::NotController)?; let (stash, old_total) = (ledger.stash.clone(), ledger.total); ledger = ledger.consolidate_unlocked(>::block_number()); @@ -1154,7 +1148,7 @@ pub mod pallet { } fn stash_by_ctrl(controller: &T::AccountId) -> Result { - Self::ledger(controller) + Ledger::::get(controller) .map(|l| l.stash) .ok_or(StakingVisitorError::ControllerDoesNotExist) } diff --git a/pallets/ddc-staking/src/mock.rs b/pallets/ddc-staking/src/mock.rs index 7b46bed9e..853938660 100644 --- a/pallets/ddc-staking/src/mock.rs +++ b/pallets/ddc-staking/src/mock.rs @@ -9,7 +9,6 @@ use ddc_primitives::{ use frame_support::{ construct_runtime, derive_impl, traits::{ConstBool, ConstU32, ConstU64, Nothing}, - weights::constants::RocksDbWeight, }; use frame_system::{ mocking::{MockBlock, MockUncheckedExtrinsic}, @@ -17,7 +16,6 @@ use frame_system::{ }; use pallet_ddc_clusters::cluster::Cluster; use pallet_ddc_nodes::StorageNode; -use sp_core::H256; use sp_io::TestExternalities; use sp_runtime::{ traits::{Convert, IdentifyAccount, IdentityLookup, Verify}, @@ -69,10 +67,7 @@ type BalanceOf = <::Currency as Currency< #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type DbWeight = RocksDbWeight; - type Nonce = u64; type Block = Block; - type Hash = H256; type AccountId = AccountId; type Lookup = IdentityLookup; type BlockHashCount = ConstU64<250>; @@ -493,7 +488,7 @@ fn check_ledgers() { fn assert_ledger_consistent(controller: AccountId) { // ensures ledger.total == ledger.active + sum(ledger.unlocking). - let ledger = DdcStaking::ledger(controller.clone()).expect("Not a controller."); + let ledger = Ledger::::get(controller.clone()).expect("Not a controller."); let real_total: Balance = ledger.unlocking.iter().fold(ledger.active, |a, c| a + c.value); assert_eq!(real_total, ledger.total); assert!( diff --git a/pallets/ddc-staking/src/tests.rs b/pallets/ddc-staking/src/tests.rs index e80eed4a5..8db86871d 100644 --- a/pallets/ddc-staking/src/tests.rs +++ b/pallets/ddc-staking/src/tests.rs @@ -8,7 +8,7 @@ use frame_support::{assert_noop, assert_ok, traits::ReservableCurrency}; use pallet_balances::Error as BalancesError; use pallet_ddc_clusters::{ cluster::{Cluster, ClusterProps}, - Error as ClustersError, + Clusters, Error as ClustersError, }; use super::{mock::*, *}; @@ -37,20 +37,20 @@ fn basic_setup_works() { ExtBuilder.build_and_execute(clusters, nodes, clusters_bonds, nodes_bondes, || { // Account 11 is stashed and locked, and account 10 is the controller assert_eq!( - DdcStaking::bonded(AccountId::from(NODE_STASH_1)), + Bonded::::get(AccountId::from(NODE_STASH_1)), Some(AccountId::from(NODE_CONTROLLER_1)) ); // Account 21 is stashed and locked, and account 20 is the controller assert_eq!( - DdcStaking::bonded(AccountId::from(NODE_STASH_2)), + Bonded::::get(AccountId::from(NODE_STASH_2)), Some(AccountId::from(NODE_CONTROLLER_2)) ); // Account 1 is not a stashed - assert_eq!(DdcStaking::bonded(AccountId::from(USER_KEY_1)), None); + assert_eq!(Bonded::::get(AccountId::from(USER_KEY_1)), None); // Account 10 controls the stash from account 11, which is 100 units assert_eq!( - DdcStaking::ledger(AccountId::from(NODE_CONTROLLER_1)), + Ledger::::get(AccountId::from(NODE_CONTROLLER_1)), Some(StakingLedger { stash: AccountId::from(NODE_STASH_1), total: 100, @@ -61,7 +61,7 @@ fn basic_setup_works() { ); // Account 20 controls the stash from account 21, which is 100 units assert_eq!( - DdcStaking::ledger(AccountId::from(NODE_CONTROLLER_2)), + Ledger::::get(AccountId::from(NODE_CONTROLLER_2)), Some(StakingLedger { stash: AccountId::from(NODE_STASH_2), total: 100, @@ -71,7 +71,7 @@ fn basic_setup_works() { }) ); // Account 1 does not control any stash - assert_eq!(DdcStaking::ledger(AccountId::from(USER_KEY_1)), None); + assert_eq!(Ledger::::get(AccountId::from(USER_KEY_1)), None); }); } @@ -81,7 +81,7 @@ fn change_controller_works() { ExtBuilder.build_and_execute(clusters, nodes, clusters_bonds, nodes_bondes, || { // 10 and 11 are bonded as stash controller. assert_eq!( - DdcStaking::bonded(AccountId::from(NODE_STASH_1)), + Bonded::::get(AccountId::from(NODE_STASH_1)), Some(AccountId::from(NODE_CONTROLLER_1)) ); @@ -103,7 +103,7 @@ fn change_controller_works() { Error::::AlreadyPaired ); assert_eq!( - DdcStaking::bonded(AccountId::from(NODE_STASH_1)), + Bonded::::get(AccountId::from(NODE_STASH_1)), Some(AccountId::from(USER_KEY_3)) ); @@ -250,7 +250,7 @@ fn set_node_works() { System::set_block_number(1); // 10 and 11 are bonded as stash controller. assert_eq!( - DdcStaking::bonded(AccountId::from(NODE_STASH_1)), + Bonded::::get(AccountId::from(NODE_STASH_1)), Some(AccountId::from(NODE_CONTROLLER_1)) ); @@ -427,11 +427,11 @@ fn staking_should_work() { // Account 4 controls the stash from account 3, which is 1500 units, 3 is a Storage // participant, 5 is a DDC node. assert_eq!( - DdcStaking::bonded(AccountId::from(USER_KEY_3)), + Bonded::::get(AccountId::from(USER_KEY_3)), Some(AccountId::from(USER_KEY_4)) ); assert_eq!( - DdcStaking::ledger(AccountId::from(USER_KEY_4)), + Ledger::::get(AccountId::from(USER_KEY_4)), Some(StakingLedger { stash: AccountId::from(USER_KEY_3), total: 1500, @@ -441,11 +441,11 @@ fn staking_should_work() { }) ); assert_eq!( - DdcStaking::storages(AccountId::from(USER_KEY_3)), + Storages::::get(AccountId::from(USER_KEY_3)), Some(ClusterId::from(CLUSTER_ID)) ); assert_eq!( - DdcStaking::nodes(NodePubKey::StoragePubKey(StorageNodePubKey::new(NODE_KEY_5))), + Nodes::::get(NodePubKey::StoragePubKey(StorageNodePubKey::new(NODE_KEY_5))), Some(AccountId::from(USER_KEY_3)) ); @@ -463,7 +463,7 @@ fn staking_should_work() { // TestClusterProtocol::get_chill_delay(&ClusterId::from([1; 20]), NodeType::Storage) // .unwrap_or(10_u64); assert_eq!( - DdcStaking::ledger(AccountId::from(USER_KEY_4)), + Ledger::::get(AccountId::from(USER_KEY_4)), Some(StakingLedger { stash: AccountId::from(USER_KEY_3), total: 1500, @@ -499,7 +499,7 @@ fn staking_should_work() { // Ledger is not changed until we make another call to `chill`. assert_eq!( - DdcStaking::ledger(AccountId::from(USER_KEY_4)), + Ledger::::get(AccountId::from(USER_KEY_4)), Some(StakingLedger { stash: AccountId::from(USER_KEY_3), total: 1500, @@ -514,7 +514,7 @@ fn staking_should_work() { System::assert_last_event(Event::Chilled(AccountId::from(USER_KEY_3)).into()); // Account 3 is no longer a Storage participant. - assert_eq!(DdcStaking::storages(AccountId::from(USER_KEY_3)), None); + assert_eq!(Storages::::get(AccountId::from(USER_KEY_3)), None); }); } @@ -569,8 +569,8 @@ fn storage_full_unbonding_works() { )); System::assert_last_event(Event::Activated(provider_stash.clone()).into()); - assert_eq!(DdcStaking::storages(provider_stash.clone()), Some(cluster_id)); - assert_eq!(DdcStaking::nodes(node_pub_key), Some(provider_stash.clone())); + assert_eq!(Storages::::get(provider_stash.clone()), Some(cluster_id)); + assert_eq!(Nodes::::get(node_pub_key), Some(provider_stash.clone())); // Set block timestamp. Timestamp::set_timestamp(System::block_number() * BLOCK_TIME + INIT_TIMESTAMP); @@ -593,7 +593,7 @@ fn storage_full_unbonding_works() { System::assert_last_event(Event::Chilled(provider_stash.clone()).into()); // Account is no longer a Storage participant. - assert_eq!(DdcStaking::storages(provider_stash.clone()), None); + assert_eq!(Storages::::get(provider_stash.clone()), None); // Start unbonding all tokens assert_ok!(DdcStaking::unbond( @@ -601,7 +601,7 @@ fn storage_full_unbonding_works() { storage_bond_size )); System::assert_has_event(Event::LeaveSoon(provider_stash.clone()).into()); - assert_eq!(DdcStaking::leaving_storages(provider_stash.clone()), Some(cluster_id)); + assert_eq!(LeavingStorages::::get(provider_stash.clone()), Some(cluster_id)); System::assert_last_event( Event::Unbonded(provider_stash.clone(), storage_bond_size).into(), ); @@ -619,7 +619,7 @@ fn storage_full_unbonding_works() { System::assert_has_event( Event::Withdrawn(provider_stash.clone(), storage_bond_size).into(), ); - assert_eq!(DdcStaking::leaving_storages(provider_stash.clone()), None); + assert_eq!(LeavingStorages::::get(provider_stash.clone()), None); System::assert_last_event(Event::Left(provider_stash).into()); }); } @@ -742,12 +742,12 @@ fn bond_cluster_works() { )); assert_eq!( - DdcStaking::cluster_bonded(AccountId::from(CLUSTER_STASH)), + ClusterBonded::::get(AccountId::from(CLUSTER_STASH)), Some(AccountId::from(CLUSTER_CONTROLLER)) ); assert_eq!( - DdcStaking::cluster_ledger(AccountId::from(CLUSTER_CONTROLLER)), + ClusterLedger::::get(AccountId::from(CLUSTER_CONTROLLER)), Some(StakingLedger { stash: AccountId::from(CLUSTER_STASH), total: 50, @@ -760,7 +760,7 @@ fn bond_cluster_works() { System::assert_has_event(Event::Bonded(AccountId::from(CLUSTER_STASH), 50).into()); assert_eq!( - DdcClusters::clusters(ClusterId::from(CLUSTER_ID)), + Clusters::::get(ClusterId::from(CLUSTER_ID)), Some(Cluster { cluster_id: ClusterId::from(CLUSTER_ID), manager_id: AccountId::from(CLUSTER_CONTROLLER), @@ -897,7 +897,7 @@ fn unbond_bonded_cluster_works() { unlocking.push(chunk); assert_eq!( - DdcStaking::cluster_ledger(AccountId::from(USER_KEY_1)), + ClusterLedger::::get(AccountId::from(USER_KEY_1)), Some(StakingLedger { stash: AccountId::from(USER_KEY_1), total: 50, @@ -910,7 +910,7 @@ fn unbond_bonded_cluster_works() { System::assert_has_event(Event::Unbonded(AccountId::from(USER_KEY_1), 50).into()); assert_eq!( - DdcClusters::clusters(ClusterId::from(BONDED_CLUSTER_ID)), + Clusters::::get(ClusterId::from(BONDED_CLUSTER_ID)), Some(Cluster { cluster_id: ClusterId::from(BONDED_CLUSTER_ID), manager_id: AccountId::from(USER_KEY_1), @@ -977,7 +977,7 @@ fn unbond_activated_cluster_works() { let chunk = UnlockChunk { value: 50u128, block: 3u64 }; unlocking.push(chunk); assert_eq!( - DdcStaking::cluster_ledger(AccountId::from(USER_KEY_1)), + ClusterLedger::::get(AccountId::from(USER_KEY_1)), Some(StakingLedger { stash: AccountId::from(USER_KEY_1), total: 50, @@ -990,7 +990,7 @@ fn unbond_activated_cluster_works() { System::assert_has_event(Event::Unbonded(AccountId::from(USER_KEY_1), 50).into()); assert_eq!( - DdcClusters::clusters(ClusterId::from(ACTIVATED_CLUSTER_ID)), + Clusters::::get(ClusterId::from(ACTIVATED_CLUSTER_ID)), Some(Cluster { cluster_id: ClusterId::from(ACTIVATED_CLUSTER_ID), manager_id: AccountId::from(USER_KEY_1), @@ -1062,7 +1062,7 @@ fn withdraw_unbonded_cluster_works() { let chunk = UnlockChunk { value: 50u128, block: 3u64 }; unlocking.push(chunk); assert_eq!( - DdcStaking::cluster_ledger(AccountId::from(USER_KEY_1)), + ClusterLedger::::get(AccountId::from(USER_KEY_1)), Some(StakingLedger { stash: AccountId::from(USER_KEY_1), total: 50, @@ -1081,11 +1081,11 @@ fn withdraw_unbonded_cluster_works() { System::assert_last_event(Event::Withdrawn(AccountId::from(USER_KEY_1), 50).into()); - assert_eq!(DdcStaking::cluster_ledger(AccountId::from(USER_KEY_1)), None); - assert_eq!(DdcStaking::cluster_bonded(AccountId::from(USER_KEY_1)), None); + assert_eq!(ClusterLedger::::get(AccountId::from(USER_KEY_1)), None); + assert_eq!(ClusterBonded::::get(AccountId::from(USER_KEY_1)), None); assert_eq!( - DdcClusters::clusters(ClusterId::from(BONDED_CLUSTER_ID)), + Clusters::::get(ClusterId::from(BONDED_CLUSTER_ID)), Some(Cluster { cluster_id: ClusterId::from(BONDED_CLUSTER_ID), manager_id: AccountId::from(USER_KEY_1), @@ -1149,7 +1149,7 @@ fn withdraw_activated_cluster_works() { let chunk = UnlockChunk { value: 50u128, block: 3u64 }; unlocking.push(chunk); assert_eq!( - DdcStaking::cluster_ledger(AccountId::from(USER_KEY_1)), + ClusterLedger::::get(AccountId::from(USER_KEY_1)), Some(StakingLedger { stash: AccountId::from(USER_KEY_1), total: 50, @@ -1168,11 +1168,11 @@ fn withdraw_activated_cluster_works() { System::assert_last_event(Event::Withdrawn(AccountId::from(USER_KEY_1), 50).into()); - assert_eq!(DdcStaking::cluster_ledger(AccountId::from(USER_KEY_1)), None); - assert_eq!(DdcStaking::cluster_bonded(AccountId::from(USER_KEY_1)), None); + assert_eq!(ClusterLedger::::get(AccountId::from(USER_KEY_1)), None); + assert_eq!(ClusterBonded::::get(AccountId::from(USER_KEY_1)), None); assert_eq!( - DdcClusters::clusters(ClusterId::from(ACTIVATED_CLUSTER_ID)), + Clusters::::get(ClusterId::from(ACTIVATED_CLUSTER_ID)), Some(Cluster { cluster_id: ClusterId::from(ACTIVATED_CLUSTER_ID), manager_id: AccountId::from(USER_KEY_1), diff --git a/pallets/ddc-verification/src/lib.rs b/pallets/ddc-verification/src/lib.rs index 09580f4a4..cd63a9d70 100644 --- a/pallets/ddc-verification/src/lib.rs +++ b/pallets/ddc-verification/src/lib.rs @@ -594,7 +594,6 @@ pub mod pallet { /// Era validations #[pallet::storage] - #[pallet::getter(fn era_validations)] pub type EraValidations = StorageDoubleMap< _, Blake2_128Concat, @@ -606,12 +605,10 @@ pub mod pallet { /// List of validators. #[pallet::storage] - #[pallet::getter(fn validator_set)] pub type ValidatorSet = StorageValue<_, Vec, ValueQuery>; /// Validator stash key mapping #[pallet::storage] - #[pallet::getter(fn get_stash_for_ddc_validator)] pub type ValidatorToStashKey = StorageMap<_, Identity, T::AccountId, T::AccountId>; /// Era activity of a node. diff --git a/pallets/erc20/src/lib.rs b/pallets/erc20/src/lib.rs index 239251f12..da2d0ce4b 100644 --- a/pallets/erc20/src/lib.rs +++ b/pallets/erc20/src/lib.rs @@ -12,6 +12,7 @@ use frame_system::{ensure_signed, pallet_prelude::*}; pub use pallet::*; use pallet_chainbridge as bridge; use pallet_erc721 as erc721; +use pallet_erc721::Tokens; use sp_arithmetic::traits::SaturatedConversion; use sp_core::U256; use sp_std::prelude::*; @@ -121,7 +122,7 @@ pub mod pallet { ) -> DispatchResult { let source = ensure_signed(origin)?; ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); - match >::tokens(token_id) { + match Tokens::::get(token_id) { Some(token) => { >::burn_token(source, token_id)?; let resource_id = T::Erc721Id::get(); diff --git a/pallets/erc20/src/mock.rs b/pallets/erc20/src/mock.rs index cafb4b697..eba354731 100644 --- a/pallets/erc20/src/mock.rs +++ b/pallets/erc20/src/mock.rs @@ -23,13 +23,8 @@ parameter_types! { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type Origin = Origin; - type Call = Call; - type Nonce = u64; type Block = u64; - type Hash = H256; type AccountId = u64; - type Lookup = IdentityLookup; type Event = Event; type BlockHashCount = BlockHashCount; type MaximumBlockWeight = MaximumBlockWeight; diff --git a/pallets/erc20/src/tests.rs b/pallets/erc20/src/tests.rs index 5643698da..f892b8630 100644 --- a/pallets/erc20/src/tests.rs +++ b/pallets/erc20/src/tests.rs @@ -84,7 +84,7 @@ fn transfer_erc721() { // Create a token assert_ok!(Erc721::mint(Origin::root(), RELAYER_A, token_id, metadata.clone())); assert_eq!( - Erc721::tokens(token_id).unwrap(), + Tokens::::get(token_id).unwrap(), Erc721Token { id: token_id, metadata: metadata.clone() } ); @@ -107,7 +107,7 @@ fn transfer_erc721() { )); // Ensure token no longer exists - assert_eq!(Erc721::tokens(token_id), None); + assert_eq!(Tokens::::get(token_id), None); // Transfer should fail as token doesn't exist assert_noop!( @@ -198,7 +198,7 @@ fn mint_erc721() { let bridge_id: u64 = Bridge::account_id(); // Token doesn't yet exist - assert_eq!(Erc721::tokens(token_id), None); + assert_eq!(Tokens::::get(token_id), None); // Mint assert_ok!(Example::mint_erc721( Origin::signed(bridge_id), @@ -208,7 +208,7 @@ fn mint_erc721() { )); // Ensure token exists assert_eq!( - Erc721::tokens(token_id).unwrap(), + Tokens::::get(token_id).unwrap(), Erc721Token { id: token_id, metadata: metadata.clone() } ); // Cannot mint same token diff --git a/pallets/erc721/src/lib.rs b/pallets/erc721/src/lib.rs index 655277074..e71a2fc74 100644 --- a/pallets/erc721/src/lib.rs +++ b/pallets/erc721/src/lib.rs @@ -49,12 +49,10 @@ pub mod pallet { /// Maps tokenId to Erc721 object #[pallet::storage] - #[pallet::getter(fn tokens)] pub type Tokens = StorageMap<_, Blake2_256, TokenId, Erc721Token>; /// Maps tokenId to owner #[pallet::storage] - #[pallet::getter(fn owner_of)] pub type TokenOwner = StorageMap<_, Blake2_256, TokenId, T::AccountId>; #[pallet::type_value] @@ -63,7 +61,6 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn token_count)] pub type TokenCount = StorageValue>; @@ -123,7 +120,7 @@ pub mod pallet { pub fn burn(origin: OriginFor, id: TokenId) -> DispatchResult { ensure_root(origin)?; - let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; + let owner = TokenOwner::::get(id).ok_or(Error::::TokenIdDoesNotExist)?; Self::burn_token(owner, id)?; @@ -151,7 +148,7 @@ pub mod pallet { /// Modifies ownership of a token pub fn transfer_from(from: T::AccountId, to: T::AccountId, id: TokenId) -> DispatchResult { // Check from is owner and token exists - let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; + let owner = TokenOwner::::get(id).ok_or(Error::::TokenIdDoesNotExist)?; ensure!(owner == from, Error::::NotOwner); // Update owner >::insert(id, to.clone()); @@ -163,7 +160,7 @@ pub mod pallet { /// Deletes a token from the system. pub fn burn_token(from: T::AccountId, id: TokenId) -> DispatchResult { - let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; + let owner = TokenOwner::::get(id).ok_or(Error::::TokenIdDoesNotExist)?; ensure!(owner == from, Error::::NotOwner); >::remove(id); diff --git a/pallets/erc721/src/mock.rs b/pallets/erc721/src/mock.rs index 711e2ec4f..a7ec7e8f5 100644 --- a/pallets/erc721/src/mock.rs +++ b/pallets/erc721/src/mock.rs @@ -4,8 +4,8 @@ use frame_support::{derive_impl, ord_parameter_types, parameter_types, weights:: use frame_system::{self as system}; pub use pallet_balances as balances; use pallet_chainbridge as bridge; -use sp_core::{hashing::blake2_128, H256}; -use sp_runtime::{testing::Header, traits::IdentityLookup, BuildStorage, Perbill}; +use sp_core::hashing::blake2_128; +use sp_runtime::{testing::Header, BuildStorage, Perbill}; use crate::{self as erc721, Config}; @@ -18,12 +18,8 @@ parameter_types! { #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type Nonce = u64; type Block = Block; - type Hash = H256; type AccountId = u64; - type Lookup = IdentityLookup; - type BlockHashCount = BlockHashCount; type AccountData = balances::AccountData; type MaxConsumers = frame_support::traits::ConstU32<16>; } diff --git a/pallets/erc721/src/tests.rs b/pallets/erc721/src/tests.rs index e4bfb0ca0..e881a6679 100644 --- a/pallets/erc721/src/tests.rs +++ b/pallets/erc721/src/tests.rs @@ -18,10 +18,10 @@ fn mint_burn_tokens() { assert_ok!(Erc721::mint(RuntimeOrigin::root(), USER_A, id_a, metadata_a.clone())); assert_eq!( - Erc721::tokens(id_a).unwrap(), + Tokens::::get(id_a).unwrap(), Erc721Token { id: id_a, metadata: metadata_a.clone() } ); - assert_eq!(Erc721::token_count(), 1.into()); + assert_eq!(TokenCount::::get(), 1.into()); assert_noop!( Erc721::mint(RuntimeOrigin::root(), USER_A, id_a, metadata_a), Error::::TokenAlreadyExists @@ -29,22 +29,22 @@ fn mint_burn_tokens() { assert_ok!(Erc721::mint(RuntimeOrigin::root(), USER_A, id_b, metadata_b.clone())); assert_eq!( - Erc721::tokens(id_b).unwrap(), + Tokens::::get(id_b).unwrap(), Erc721Token { id: id_b, metadata: metadata_b.clone() } ); - assert_eq!(Erc721::token_count(), 2.into()); + assert_eq!(TokenCount::::get(), 2.into()); assert_noop!( Erc721::mint(RuntimeOrigin::root(), USER_A, id_b, metadata_b), Error::::TokenAlreadyExists ); assert_ok!(Erc721::burn(RuntimeOrigin::root(), id_a)); - assert_eq!(Erc721::token_count(), 1.into()); + assert_eq!(TokenCount::::get(), 1.into()); assert!(!>::contains_key(id_a)); assert!(!>::contains_key(id_a)); assert_ok!(Erc721::burn(RuntimeOrigin::root(), id_b)); - assert_eq!(Erc721::token_count(), 0.into()); + assert_eq!(TokenCount::::get(), 0.into()); assert!(!>::contains_key(id_b)); assert!(!>::contains_key(id_b)); }) @@ -62,15 +62,15 @@ fn transfer_tokens() { assert_ok!(Erc721::mint(RuntimeOrigin::root(), USER_A, id_b, metadata_b)); assert_ok!(Erc721::transfer(RuntimeOrigin::signed(USER_A), USER_B, id_a)); - assert_eq!(Erc721::owner_of(id_a).unwrap(), USER_B); + assert_eq!(TokenOwner::::get(id_a).unwrap(), USER_B); assert_ok!(Erc721::transfer(RuntimeOrigin::signed(USER_A), USER_C, id_b)); - assert_eq!(Erc721::owner_of(id_b).unwrap(), USER_C); + assert_eq!(TokenOwner::::get(id_b).unwrap(), USER_C); assert_ok!(Erc721::transfer(RuntimeOrigin::signed(USER_B), USER_A, id_a)); - assert_eq!(Erc721::owner_of(id_a).unwrap(), USER_A); + assert_eq!(TokenOwner::::get(id_a).unwrap(), USER_A); assert_ok!(Erc721::transfer(RuntimeOrigin::signed(USER_C), USER_A, id_b)); - assert_eq!(Erc721::owner_of(id_b).unwrap(), USER_A); + assert_eq!(TokenOwner::::get(id_b).unwrap(), USER_A); }) } diff --git a/runtime/cere-dev/build.rs b/runtime/cere-dev/build.rs index b773ed9cf..2b3e7664a 100644 --- a/runtime/cere-dev/build.rs +++ b/runtime/cere-dev/build.rs @@ -15,12 +15,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use substrate_wasm_builder::WasmBuilder; - fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() + substrate_wasm_builder::WasmBuilder::build_using_defaults(); } diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 02f5d4833..0af6d2e52 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -31,7 +31,7 @@ use frame_election_provider_support::{ bounds::ElectionBoundsBuilder, onchain, BalancingConfig, SequentialPhragmen, VoteWeight, }; use frame_support::{ - construct_runtime, derive_impl, + derive_impl, dispatch::DispatchClass, genesis_builder_helper::{build_state, get_preset}, pallet_prelude::Get, @@ -155,7 +155,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 70000, + spec_version: 71000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 24, @@ -179,7 +179,7 @@ type NegativeImbalance = >::NegativeImbalance; pub struct DealWithFees; impl OnUnbalanced for DealWithFees { - fn on_unbalanceds(mut fees_then_tips: impl Iterator) { + fn on_unbalanceds(mut fees_then_tips: impl Iterator) { if let Some(fees) = fees_then_tips.next() { // for fees, 50% to treasury, 50% to author let mut split = fees.ration(50, 50); @@ -469,6 +469,8 @@ parameter_types! { pub MaximumMultiplier: Multiplier = Bounded::max_value(); } +// Can't use `FungibleAdapter` here until Treasury pallet migrates to fungibles +// impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; #[allow(deprecated)] @@ -910,7 +912,7 @@ impl pallet_contracts::Config for Runtime { type InstantiateOrigin = EnsureSigned; type Debug = (); type Environment = (); - type Migrations = (pallet_contracts::migration::v16::Migration,); + type Migrations = (); type ApiVersion = (); type Xcm = (); } @@ -1342,62 +1344,167 @@ impl pallet_ddc_verification::Config for Runtime { type BucketManager = DdcCustomers; } -construct_runtime!( - pub enum Runtime - { - System: frame_system, - Utility: pallet_utility, - Babe: pallet_babe, - Timestamp: pallet_timestamp, - // Authorship must be before session in order to note author in the correct session and era - // for im-online and staking. - Authorship: pallet_authorship, - Indices: pallet_indices, - Balances: pallet_balances, - TransactionPayment: pallet_transaction_payment, - ElectionProviderMultiPhase: pallet_election_provider_multi_phase, - Staking: pallet_staking, - Session: pallet_session, - Grandpa: pallet_grandpa, - Treasury: pallet_treasury, - Contracts: pallet_contracts, - Sudo: pallet_sudo, - ImOnline: pallet_im_online, - AuthorityDiscovery: pallet_authority_discovery, - Offences: pallet_offences, - Historical: pallet_session_historical::{Pallet}, - RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip, - Identity: pallet_identity, - Recovery: pallet_recovery, - Vesting: pallet_vesting, - Preimage: pallet_preimage, - Scheduler: pallet_scheduler, - Proxy: pallet_proxy, - Multisig: pallet_multisig, - Bounties: pallet_bounties, - VoterList: pallet_bags_list::, - ChildBounties: pallet_child_bounties, - NominationPools: pallet_nomination_pools, - FastUnstake: pallet_fast_unstake, - ChainBridge: pallet_chainbridge::{Pallet, Call, Storage, Event}, - Erc721: pallet_erc721::{Pallet, Call, Storage, Event}, - Erc20: pallet_erc20::{Pallet, Call, Storage, Event}, - DdcStaking: pallet_ddc_staking, - DdcCustomers: pallet_ddc_customers, - DdcNodes: pallet_ddc_nodes, - DdcClusters: pallet_ddc_clusters, - DdcPayouts: pallet_ddc_payouts, - DdcVerification: pallet_ddc_verification, - // Start OpenGov. - ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event}, - Referenda: pallet_referenda::{Pallet, Call, Storage, Event}, - Origins: pallet_origins::{Origin}, - Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event}, - // End OpenGov. - TechComm: pallet_collective::, - DdcClustersGov: pallet_ddc_clusters_gov, - } -); +#[frame_support::runtime] +mod runtime { + #[runtime::runtime] + #[runtime::derive( + RuntimeCall, + RuntimeEvent, + RuntimeError, + RuntimeOrigin, + RuntimeFreezeReason, + RuntimeHoldReason, + RuntimeSlashReason, + RuntimeLockId, + RuntimeTask + )] + pub struct Runtime; + + #[runtime::pallet_index(0)] + pub type System = frame_system::Pallet; + + #[runtime::pallet_index(1)] + pub type Utility = pallet_utility::Pallet; + + #[runtime::pallet_index(2)] + pub type Babe = pallet_babe::Pallet; + + #[runtime::pallet_index(3)] + pub type Timestamp = pallet_timestamp::Pallet; + + // Authorship must be before session in order to note author in the correct session and era + // for im-online and staking. + #[runtime::pallet_index(4)] + pub type Authorship = pallet_authorship::Pallet; + + #[runtime::pallet_index(5)] + pub type Indices = pallet_indices::Pallet; + + #[runtime::pallet_index(6)] + pub type Balances = pallet_balances::Pallet; + + #[runtime::pallet_index(7)] + pub type TransactionPayment = pallet_transaction_payment::Pallet; + + #[runtime::pallet_index(8)] + pub type ElectionProviderMultiPhase = pallet_election_provider_multi_phase::Pallet; + + #[runtime::pallet_index(9)] + pub type Staking = pallet_staking::Pallet; + + #[runtime::pallet_index(10)] + pub type Session = pallet_session::Pallet; + + #[runtime::pallet_index(11)] + pub type Grandpa = pallet_grandpa::Pallet; + + #[runtime::pallet_index(12)] + pub type Treasury = pallet_treasury::Pallet; + + #[runtime::pallet_index(13)] + pub type Contracts = pallet_contracts::Pallet; + + #[runtime::pallet_index(14)] + pub type Sudo = pallet_sudo::Pallet; + + #[runtime::pallet_index(15)] + pub type ImOnline = pallet_im_online::Pallet; + + #[runtime::pallet_index(16)] + pub type AuthorityDiscovery = pallet_authority_discovery::Pallet; + + #[runtime::pallet_index(17)] + pub type Offences = pallet_offences::Pallet; + + #[runtime::pallet_index(18)] + pub type Historical = pallet_session_historical::Pallet; + + #[runtime::pallet_index(19)] + pub type RandomnessCollectiveFlip = pallet_insecure_randomness_collective_flip::Pallet; + + #[runtime::pallet_index(20)] + pub type Identity = pallet_identity::Pallet; + + #[runtime::pallet_index(21)] + pub type Recovery = pallet_recovery::Pallet; + + #[runtime::pallet_index(22)] + pub type Vesting = pallet_vesting::Pallet; + + #[runtime::pallet_index(23)] + pub type Preimage = pallet_preimage::Pallet; + + #[runtime::pallet_index(24)] + pub type Scheduler = pallet_scheduler::Pallet; + + #[runtime::pallet_index(25)] + pub type Proxy = pallet_proxy::Pallet; + + #[runtime::pallet_index(26)] + pub type Multisig = pallet_multisig::Pallet; + + #[runtime::pallet_index(27)] + pub type Bounties = pallet_bounties::Pallet; + + #[runtime::pallet_index(28)] + pub type VoterList = pallet_bags_list::Pallet; + + #[runtime::pallet_index(29)] + pub type ChildBounties = pallet_child_bounties::Pallet; + + #[runtime::pallet_index(30)] + pub type NominationPools = pallet_nomination_pools::Pallet; + + #[runtime::pallet_index(31)] + pub type FastUnstake = pallet_fast_unstake::Pallet; + + #[runtime::pallet_index(32)] + pub type ChainBridge = pallet_chainbridge::Pallet; + + #[runtime::pallet_index(33)] + pub type Erc721 = pallet_erc721::Pallet; + + #[runtime::pallet_index(34)] + pub type Erc20 = pallet_erc20::Pallet; + + #[runtime::pallet_index(35)] + pub type DdcStaking = pallet_ddc_staking::Pallet; + + #[runtime::pallet_index(36)] + pub type DdcCustomers = pallet_ddc_customers::Pallet; + + #[runtime::pallet_index(37)] + pub type DdcNodes = pallet_ddc_nodes::Pallet; + + #[runtime::pallet_index(38)] + pub type DdcClusters = pallet_ddc_clusters::Pallet; + + #[runtime::pallet_index(39)] + pub type DdcPayouts = pallet_ddc_payouts::Pallet; + + #[runtime::pallet_index(40)] + pub type DdcVerification = pallet_ddc_verification::Pallet; + + // Start OpenGov. + #[runtime::pallet_index(41)] + pub type ConvictionVoting = pallet_conviction_voting::Pallet; + + #[runtime::pallet_index(42)] + pub type Referenda = pallet_referenda::Pallet; + + #[runtime::pallet_index(43)] + pub type Origins = pallet_origins::Pallet; + + #[runtime::pallet_index(44)] + pub type Whitelist = pallet_whitelist::Pallet; + + // End OpenGov. + #[runtime::pallet_index(45)] + pub type TechComm = pallet_collective::Pallet; + + #[runtime::pallet_index(46)] + pub type DdcClustersGov = pallet_ddc_clusters_gov::Pallet; +} /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; @@ -1434,10 +1541,7 @@ pub type SignedPayload = generic::SignedPayload; pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Runtime migrations -type Migrations = ( - pallet_staking::migrations::v15::MigrateV14ToV15, - pallet_contracts::Migration, -); +type Migrations = (); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -1816,6 +1920,13 @@ impl_runtime_apis! { fn member_needs_delegate_migration(member: AccountId) -> bool { NominationPools::api_member_needs_delegate_migration(member) } + + fn member_total_balance(member: AccountId) -> Balance { + NominationPools::api_member_total_balance(member) + } + fn pool_balance(pool_id: pallet_nomination_pools::PoolId) -> Balance { + NominationPools::api_pool_balance(pool_id) + } } #[cfg(feature = "try-runtime")] diff --git a/runtime/cere/build.rs b/runtime/cere/build.rs index b773ed9cf..2b3e7664a 100644 --- a/runtime/cere/build.rs +++ b/runtime/cere/build.rs @@ -15,12 +15,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use substrate_wasm_builder::WasmBuilder; - fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() + substrate_wasm_builder::WasmBuilder::build_using_defaults(); } diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index fc682d3d6..9de8562e5 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -30,7 +30,7 @@ use frame_election_provider_support::{ bounds::ElectionBoundsBuilder, onchain, BalancingConfig, SequentialPhragmen, VoteWeight, }; use frame_support::{ - construct_runtime, derive_impl, + derive_impl, dispatch::DispatchClass, genesis_builder_helper::{build_state, get_preset}, pallet_prelude::Get, @@ -148,7 +148,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 70000, + spec_version: 71000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 24, @@ -172,7 +172,7 @@ type NegativeImbalance = >::NegativeImbalance; pub struct DealWithFees; impl OnUnbalanced for DealWithFees { - fn on_unbalanceds(mut fees_then_tips: impl Iterator) { + fn on_unbalanceds(mut fees_then_tips: impl Iterator) { if let Some(fees) = fees_then_tips.next() { // for fees, 50% to treasury, 50% to author let mut split = fees.ration(50, 50); @@ -462,6 +462,8 @@ parameter_types! { pub MaximumMultiplier: Multiplier = Bounded::max_value(); } +// Can't use `FungibleAdapter` here until Treasury pallet migrates to fungibles +// impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; #[allow(deprecated)] @@ -929,7 +931,7 @@ impl pallet_contracts::Config for Runtime { type InstantiateOrigin = EnsureSigned; type Debug = (); type Environment = (); - type Migrations = (pallet_contracts::migration::v16::Migration,); + type Migrations = (); type ApiVersion = (); type Xcm = (); } @@ -1362,62 +1364,167 @@ impl pallet_ddc_verification::Config for Runtime { type BucketManager = DdcCustomers; } -construct_runtime!( - pub enum Runtime - { - System: frame_system, - Utility: pallet_utility, - Babe: pallet_babe, - Timestamp: pallet_timestamp, - // Authorship must be before session in order to note author in the correct session and era - // for im-online and staking. - Authorship: pallet_authorship, - Indices: pallet_indices, - Balances: pallet_balances, - TransactionPayment: pallet_transaction_payment, - ElectionProviderMultiPhase: pallet_election_provider_multi_phase, - Staking: pallet_staking, - Session: pallet_session, - Grandpa: pallet_grandpa, - Treasury: pallet_treasury, - Contracts: pallet_contracts, - Sudo: pallet_sudo, - ImOnline: pallet_im_online, - AuthorityDiscovery: pallet_authority_discovery, - Offences: pallet_offences, - Historical: pallet_session_historical::{Pallet}, - RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip, - Identity: pallet_identity, - Recovery: pallet_recovery, - Vesting: pallet_vesting, - Preimage: pallet_preimage, - Scheduler: pallet_scheduler, - Proxy: pallet_proxy, - Multisig: pallet_multisig, - Bounties: pallet_bounties, - VoterList: pallet_bags_list::, - ChildBounties: pallet_child_bounties, - NominationPools: pallet_nomination_pools, - FastUnstake: pallet_fast_unstake, - ChainBridge: pallet_chainbridge::{Pallet, Call, Storage, Event}, - Erc721: pallet_erc721::{Pallet, Call, Storage, Event}, - Erc20: pallet_erc20::{Pallet, Call, Storage, Event}, - DdcStaking: pallet_ddc_staking, - DdcCustomers: pallet_ddc_customers, - DdcNodes: pallet_ddc_nodes, - DdcClusters: pallet_ddc_clusters, - DdcPayouts: pallet_ddc_payouts, - // Start OpenGov. - ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event}, - Referenda: pallet_referenda::{Pallet, Call, Storage, Event}, - Origins: pallet_origins::{Origin}, - Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event}, - // End OpenGov. - TechComm: pallet_collective::, - DdcClustersGov: pallet_ddc_clusters_gov, - DdcVerification: pallet_ddc_verification, - } -); +#[frame_support::runtime] +mod runtime { + #[runtime::runtime] + #[runtime::derive( + RuntimeCall, + RuntimeEvent, + RuntimeError, + RuntimeOrigin, + RuntimeFreezeReason, + RuntimeHoldReason, + RuntimeSlashReason, + RuntimeLockId, + RuntimeTask + )] + pub struct Runtime; + + #[runtime::pallet_index(0)] + pub type System = frame_system::Pallet; + + #[runtime::pallet_index(1)] + pub type Utility = pallet_utility::Pallet; + + #[runtime::pallet_index(2)] + pub type Babe = pallet_babe::Pallet; + + #[runtime::pallet_index(3)] + pub type Timestamp = pallet_timestamp::Pallet; + + // Authorship must be before session in order to note author in the correct session and era + // for im-online and staking. + #[runtime::pallet_index(4)] + pub type Authorship = pallet_authorship::Pallet; + + #[runtime::pallet_index(5)] + pub type Indices = pallet_indices::Pallet; + + #[runtime::pallet_index(6)] + pub type Balances = pallet_balances::Pallet; + + #[runtime::pallet_index(7)] + pub type TransactionPayment = pallet_transaction_payment::Pallet; + + #[runtime::pallet_index(8)] + pub type ElectionProviderMultiPhase = pallet_election_provider_multi_phase::Pallet; + + #[runtime::pallet_index(9)] + pub type Staking = pallet_staking::Pallet; + + #[runtime::pallet_index(10)] + pub type Session = pallet_session::Pallet; + + #[runtime::pallet_index(11)] + pub type Grandpa = pallet_grandpa::Pallet; + + #[runtime::pallet_index(12)] + pub type Treasury = pallet_treasury::Pallet; + + #[runtime::pallet_index(13)] + pub type Contracts = pallet_contracts::Pallet; + + #[runtime::pallet_index(14)] + pub type Sudo = pallet_sudo::Pallet; + + #[runtime::pallet_index(15)] + pub type ImOnline = pallet_im_online::Pallet; + + #[runtime::pallet_index(16)] + pub type AuthorityDiscovery = pallet_authority_discovery::Pallet; + + #[runtime::pallet_index(17)] + pub type Offences = pallet_offences::Pallet; + + #[runtime::pallet_index(18)] + pub type Historical = pallet_session_historical::Pallet; + + #[runtime::pallet_index(19)] + pub type RandomnessCollectiveFlip = pallet_insecure_randomness_collective_flip::Pallet; + + #[runtime::pallet_index(20)] + pub type Identity = pallet_identity::Pallet; + + #[runtime::pallet_index(21)] + pub type Recovery = pallet_recovery::Pallet; + + #[runtime::pallet_index(22)] + pub type Vesting = pallet_vesting::Pallet; + + #[runtime::pallet_index(23)] + pub type Preimage = pallet_preimage::Pallet; + + #[runtime::pallet_index(24)] + pub type Scheduler = pallet_scheduler::Pallet; + + #[runtime::pallet_index(25)] + pub type Proxy = pallet_proxy::Pallet; + + #[runtime::pallet_index(26)] + pub type Multisig = pallet_multisig::Pallet; + + #[runtime::pallet_index(27)] + pub type Bounties = pallet_bounties::Pallet; + + #[runtime::pallet_index(28)] + pub type VoterList = pallet_bags_list::Pallet; + + #[runtime::pallet_index(29)] + pub type ChildBounties = pallet_child_bounties::Pallet; + + #[runtime::pallet_index(30)] + pub type NominationPools = pallet_nomination_pools::Pallet; + + #[runtime::pallet_index(31)] + pub type FastUnstake = pallet_fast_unstake::Pallet; + + #[runtime::pallet_index(32)] + pub type ChainBridge = pallet_chainbridge::Pallet; + + #[runtime::pallet_index(33)] + pub type Erc721 = pallet_erc721::Pallet; + + #[runtime::pallet_index(34)] + pub type Erc20 = pallet_erc20::Pallet; + + #[runtime::pallet_index(35)] + pub type DdcStaking = pallet_ddc_staking::Pallet; + + #[runtime::pallet_index(36)] + pub type DdcCustomers = pallet_ddc_customers::Pallet; + + #[runtime::pallet_index(37)] + pub type DdcNodes = pallet_ddc_nodes::Pallet; + + #[runtime::pallet_index(38)] + pub type DdcClusters = pallet_ddc_clusters::Pallet; + + #[runtime::pallet_index(39)] + pub type DdcPayouts = pallet_ddc_payouts::Pallet; + + #[runtime::pallet_index(40)] + pub type DdcVerification = pallet_ddc_verification::Pallet; + + // Start OpenGov. + #[runtime::pallet_index(41)] + pub type ConvictionVoting = pallet_conviction_voting::Pallet; + + #[runtime::pallet_index(42)] + pub type Referenda = pallet_referenda::Pallet; + + #[runtime::pallet_index(43)] + pub type Origins = pallet_origins::Pallet; + + #[runtime::pallet_index(44)] + pub type Whitelist = pallet_whitelist::Pallet; + + // End OpenGov. + #[runtime::pallet_index(45)] + pub type TechComm = pallet_collective::Pallet; + + #[runtime::pallet_index(46)] + pub type DdcClustersGov = pallet_ddc_clusters_gov::Pallet; +} /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; @@ -1470,10 +1577,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic, - pallet_contracts::Migration, -); +type Migrations = (); pub mod migrations { use super::*; @@ -1875,6 +1979,13 @@ impl_runtime_apis! { fn member_needs_delegate_migration(member: AccountId) -> bool { NominationPools::api_member_needs_delegate_migration(member) } + + fn member_total_balance(member: AccountId) -> Balance { + NominationPools::api_member_total_balance(member) + } + fn pool_balance(pool_id: pallet_nomination_pools::PoolId) -> Balance { + NominationPools::api_pool_balance(pool_id) + } } #[cfg(feature = "try-runtime")]