diff --git a/CHANGELOG.md b/CHANGELOG.md index d3ff48aa2..2d39aa194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ 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 56dd4cd69..b071db98a 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.94", ] @@ -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", @@ -1016,7 +999,7 @@ dependencies = [ [[package]] name = "cere-rpc" -version = "7.0.0" +version = "7.1.0" dependencies = [ "jsonrpsee", "node-primitives", @@ -1045,7 +1028,7 @@ dependencies = [ [[package]] name = "cere-runtime" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -1140,7 +1123,7 @@ dependencies = [ [[package]] name = "cere-runtime-common" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-support", "frame-system", @@ -1161,13 +1144,14 @@ dependencies = [ [[package]] name = "cere-service" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-client", "cere-dev-runtime", "cere-rpc", "cere-runtime", "cere-runtime-common", + "frame-benchmarking-cli", "futures", "jsonrpsee", "node-primitives", @@ -1865,7 +1849,7 @@ dependencies = [ [[package]] name = "ddc-primitives" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-support", "frame-system", @@ -2303,7 +2287,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]] @@ -2506,7 +2490,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", ] @@ -2538,8 +2522,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", @@ -2562,8 +2546,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", @@ -2613,7 +2597,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", @@ -2623,8 +2607,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", @@ -2639,8 +2623,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", @@ -2669,8 +2653,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", @@ -2710,12 +2694,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", @@ -2730,7 +2715,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", @@ -2742,7 +2727,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", @@ -2751,8 +2736,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", @@ -2771,8 +2756,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", @@ -2786,7 +2771,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", @@ -2795,8 +2780,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", @@ -3901,9 +3886,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", @@ -3915,13 +3900,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", @@ -3930,7 +3913,7 @@ dependencies = [ "jsonrpsee-types", "parking_lot 0.12.3", "rand", - "rustc-hash", + "rustc-hash 2.1.0", "serde", "serde_json", "thiserror 1.0.69", @@ -3940,9 +3923,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", @@ -3953,11 +3936,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", @@ -3981,11 +3963,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", @@ -4079,7 +4060,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]] @@ -5294,7 +5275,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", @@ -5562,10 +5543,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", @@ -5579,8 +5578,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", @@ -5592,8 +5591,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", @@ -5615,8 +5614,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", @@ -5636,8 +5635,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", @@ -5651,8 +5650,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", @@ -5668,7 +5667,7 @@ dependencies = [ [[package]] name = "pallet-chainbridge" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-support", "frame-system", @@ -5683,8 +5682,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", @@ -5701,8 +5700,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", @@ -5717,8 +5716,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", @@ -5751,7 +5750,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", @@ -5761,7 +5760,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", @@ -5772,8 +5771,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", @@ -5788,7 +5787,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5814,7 +5813,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters-gov" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5849,7 +5848,7 @@ dependencies = [ [[package]] name = "pallet-ddc-customers" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5872,7 +5871,7 @@ dependencies = [ [[package]] name = "pallet-ddc-nodes" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5893,7 +5892,7 @@ dependencies = [ [[package]] name = "pallet-ddc-payouts" -version = "7.0.0" +version = "7.1.0" dependencies = [ "byte-unit", "chrono", @@ -5917,7 +5916,7 @@ dependencies = [ [[package]] name = "pallet-ddc-staking" -version = "7.0.0" +version = "7.1.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5945,21 +5944,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", @@ -5975,8 +5976,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", @@ -5997,8 +5998,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", @@ -6010,8 +6011,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", @@ -6028,7 +6029,7 @@ dependencies = [ [[package]] name = "pallet-erc20" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6047,7 +6048,7 @@ dependencies = [ [[package]] name = "pallet-erc721" -version = "7.0.0" +version = "7.1.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6064,8 +6065,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", @@ -6082,8 +6083,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", @@ -6104,8 +6105,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", @@ -6120,8 +6121,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", @@ -6139,8 +6140,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", @@ -6155,8 +6156,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", @@ -6168,8 +6169,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", @@ -6184,8 +6185,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", @@ -6199,8 +6200,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", @@ -6217,8 +6218,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", @@ -6237,8 +6238,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", @@ -6247,8 +6248,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", @@ -6263,8 +6264,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", @@ -6286,7 +6287,7 @@ dependencies = [ [[package]] name = "pallet-origins" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cere-runtime-common", "frame-benchmarking", @@ -6302,8 +6303,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", @@ -6318,8 +6319,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", @@ -6332,8 +6333,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", @@ -6346,8 +6347,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", @@ -6364,8 +6365,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", @@ -6381,8 +6382,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", @@ -6402,8 +6403,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", @@ -6418,8 +6419,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", @@ -6441,7 +6442,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", @@ -6451,8 +6452,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", @@ -6466,8 +6467,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", @@ -6485,8 +6486,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", @@ -6503,8 +6504,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", @@ -6518,8 +6519,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", @@ -6534,8 +6535,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", @@ -6546,8 +6547,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", @@ -6564,8 +6565,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", @@ -6579,8 +6580,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", @@ -6593,8 +6594,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", @@ -6886,7 +6887,7 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[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", @@ -6897,7 +6898,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", @@ -7405,7 +7406,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", @@ -7424,7 +7425,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", @@ -7440,7 +7441,7 @@ dependencies = [ "bytes", "rand", "ring 0.16.20", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.20.9", "slab", "thiserror 1.0.69", @@ -7458,7 +7459,7 @@ dependencies = [ "bytes", "rand", "ring 0.16.20", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.21.12", "slab", "thiserror 1.0.69", @@ -7672,7 +7673,7 @@ checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ "hashbrown 0.13.2", "log", - "rustc-hash", + "rustc-hash 1.1.0", "slice-group-by", "smallvec", ] @@ -7838,6 +7839,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" @@ -7895,7 +7902,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.14", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -8005,7 +8012,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", @@ -8015,8 +8022,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", @@ -8045,8 +8052,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", @@ -8068,7 +8075,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", @@ -8082,8 +8089,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", @@ -8110,7 +8117,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", @@ -8120,8 +8127,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", @@ -8162,7 +8169,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", @@ -8189,7 +8196,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", @@ -8214,8 +8221,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", @@ -8238,8 +8245,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", @@ -8274,8 +8281,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", @@ -8296,8 +8303,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", @@ -8309,8 +8316,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", @@ -8353,8 +8360,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", @@ -8373,8 +8380,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", @@ -8396,8 +8403,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", @@ -8420,7 +8427,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", @@ -8433,7 +8440,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", @@ -8444,7 +8451,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", @@ -8461,10 +8468,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", @@ -8479,7 +8486,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", @@ -8492,8 +8499,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", @@ -8521,8 +8528,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", @@ -8572,8 +8579,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", @@ -8590,8 +8597,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", @@ -8609,8 +8616,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", @@ -8630,8 +8637,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", @@ -8667,8 +8674,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", @@ -8687,7 +8694,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", @@ -8703,8 +8710,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", @@ -8738,7 +8745,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", @@ -8746,8 +8753,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", @@ -8778,8 +8785,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", @@ -8798,9 +8805,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", @@ -8810,6 +8818,7 @@ dependencies = [ "ip_network", "jsonrpsee", "log", + "sc-rpc-api", "serde", "serde_json", "substrate-prometheus-endpoint", @@ -8820,8 +8829,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", @@ -8852,8 +8861,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", @@ -8917,7 +8926,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", @@ -8927,8 +8936,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", @@ -8946,8 +8955,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", @@ -8967,8 +8976,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", @@ -8987,19 +8996,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", @@ -9018,7 +9026,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", @@ -9029,7 +9037,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", @@ -9056,7 +9064,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", @@ -9072,7 +9080,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", @@ -9567,7 +9575,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", @@ -9589,7 +9597,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", @@ -9603,7 +9611,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", @@ -9615,7 +9623,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", @@ -9629,7 +9637,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", @@ -9641,7 +9649,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", @@ -9650,8 +9658,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", @@ -9670,7 +9678,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", @@ -9685,7 +9693,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", @@ -9703,7 +9711,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", @@ -9719,8 +9727,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", @@ -9731,7 +9739,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", @@ -9777,7 +9785,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", @@ -9790,7 +9798,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", @@ -9800,7 +9808,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", @@ -9809,7 +9817,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", @@ -9819,7 +9827,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", @@ -9828,8 +9836,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", @@ -9841,7 +9849,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", @@ -9854,7 +9862,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", @@ -9880,7 +9888,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", @@ -9890,7 +9898,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", @@ -9901,7 +9909,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", @@ -9910,7 +9918,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", @@ -9920,7 +9928,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", @@ -9931,7 +9939,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", @@ -9944,7 +9952,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", @@ -9954,7 +9962,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", @@ -9964,17 +9972,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", @@ -10000,7 +10008,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", @@ -10019,7 +10027,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", @@ -10031,8 +10039,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", @@ -10045,8 +10053,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", @@ -10059,7 +10067,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", @@ -10079,7 +10087,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", @@ -10103,12 +10111,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", @@ -10120,7 +10128,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", @@ -10131,8 +10139,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", @@ -10143,7 +10151,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", @@ -10152,7 +10160,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", @@ -10166,7 +10174,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", @@ -10189,7 +10197,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", @@ -10206,7 +10214,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", @@ -10216,8 +10224,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", @@ -10229,7 +10237,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", @@ -10294,8 +10302,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", @@ -10306,19 +10314,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", @@ -10333,8 +10343,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", @@ -10466,7 +10476,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", @@ -10478,12 +10488,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", @@ -10503,7 +10513,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", @@ -10516,8 +10526,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", @@ -10534,7 +10544,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", @@ -10542,13 +10552,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", @@ -10660,7 +10671,7 @@ dependencies = [ "getrandom", "once_cell", "rustix 0.38.42", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11062,6 +11073,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", + "time", "tracing", "tracing-core", "tracing-log", @@ -11886,7 +11898,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]] @@ -12251,7 +12263,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 01e4c5be0..c8971a821 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/" @@ -38,7 +38,7 @@ codec = { package = "parity-scale-codec", version = "3.6.12", default-features = 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 } @@ -56,123 +56,123 @@ itertools = { version = "0.13.0", default-features = false, features = ["use_all # 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..9c216ba21 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,47 +18,18 @@ 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(feature = "runtime-benchmarks"))] +pub type HostFunctions = sp_io::SubstrateHostFunctions; +#[cfg(feature = "runtime-benchmarks")] +pub type HostFunctions = + (sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions); + +pub type ChainExecutor = WasmExecutor; +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; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - cere_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - cere_runtime::native_version() - } -} - -/// The native executor instance for Cere Dev. -#[cfg(feature = "cere-dev")] -pub struct CereDevExecutorDispatch; - -#[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() - } -} - pub trait AbstractClient: BlockchainEvents + Sized @@ -102,9 +72,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 5b26c016c..ad18d30b3 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..e0210f83b 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..135669022 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,17 +440,17 @@ 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; + let nonce = ChainNonces::::get(id).unwrap_or_default() + 1; >::insert(id, nonce); nonce } diff --git a/pallets/chainbridge/src/mock.rs b/pallets/chainbridge/src/mock.rs index 08cf5272f..176e948be 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, *}; @@ -20,14 +16,9 @@ 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 ModuleToIndex = (); - // type MaxLocks = MaxLocks; type AccountData = pallet_balances::AccountData; type MaxConsumers = frame_support::traits::ConstU32<16>; } @@ -110,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 788ee0656..a30f1e8e5 100644 --- a/pallets/ddc-clusters-gov/src/lib.rs +++ b/pallets/ddc-clusters-gov/src/lib.rs @@ -150,7 +150,6 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn proposal_of)] pub type ClusterProposal = StorageMap< _, Identity, @@ -161,13 +160,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>; @@ -534,7 +531,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); @@ -579,7 +577,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 7e850c09e..7b723024f 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 e9c1cd123..99a93fed0 100644 --- a/pallets/ddc-clusters/src/lib.rs +++ b/pallets/ddc-clusters/src/lib.rs @@ -138,12 +138,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, @@ -152,7 +150,6 @@ pub mod pallet { >; #[pallet::storage] - #[pallet::getter(fn clusters_nodes)] pub type ClustersNodes = StorageDoubleMap< _, Blake2_128Concat, @@ -164,7 +161,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 19a10c745..1341766aa 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 c28301e24..0a71843eb 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 @@ -482,7 +481,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); diff --git a/pallets/ddc-customers/src/benchmarking.rs b/pallets/ddc-customers/src/benchmarking.rs index 6fc74d348..25ef534d6 100644 --- a/pallets/ddc-customers/src/benchmarking.rs +++ b/pallets/ddc-customers/src/benchmarking.rs @@ -52,7 +52,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 35fbfb4e5..f263be5e2 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] @@ -303,7 +300,7 @@ pub mod pallet { ) -> DispatchResult { let bucket_owner = ensure_signed(origin)?; let cur_bucket_id = - Self::buckets_count().checked_add(1).ok_or(Error::::ArithmeticOverflow)?; + BucketsCount::::get().checked_add(1).ok_or(Error::::ArithmeticOverflow)?; ensure!( >::cluster_exists(&cluster_id), @@ -385,7 +382,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, @@ -447,7 +444,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); @@ -507,7 +504,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; @@ -631,7 +628,7 @@ pub mod pallet { amount: u128, ) -> Result { let actually_charged: BalanceOf; - let mut ledger = Self::ledger(&content_owner).ok_or(Error::::NotOwner)?; + let mut ledger = Ledger::::get(&content_owner).ok_or(Error::::NotOwner)?; let amount_to_deduct = amount.saturated_into::>(); if ledger.active >= amount_to_deduct { @@ -713,7 +710,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); diff --git a/pallets/ddc-customers/src/migration.rs b/pallets/ddc-customers/src/migration.rs index cd2e9c6b0..5a66c8dd9 100644 --- a/pallets/ddc-customers/src/migration.rs +++ b/pallets/ddc-customers/src/migration.rs @@ -97,7 +97,7 @@ impl OnRuntimeUpgrade for MigrateToV1 { 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" diff --git a/pallets/ddc-customers/src/mock.rs b/pallets/ddc-customers/src/mock.rs index 079710ad6..c1635bc91 100644 --- a/pallets/ddc-customers/src/mock.rs +++ b/pallets/ddc-customers/src/mock.rs @@ -8,10 +8,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, @@ -42,10 +40,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 RuntimeEvent = RuntimeEvent; diff --git a/pallets/ddc-customers/src/tests.rs b/pallets/ddc-customers/src/tests.rs index 86d1e0bf9..d9fcd2ad1 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, @@ -66,9 +66,9 @@ fn create_two_buckets_works() { System::assert_last_event(Event::BucketCreated { 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, @@ -78,7 +78,7 @@ fn create_two_buckets_works() { }) ); assert_eq!( - DdcCustomers::buckets(2), + Buckets::::get(2), Some(Bucket { bucket_id: 2, owner_id: account_1, @@ -116,7 +116,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, @@ -154,7 +154,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, @@ -190,7 +190,7 @@ fn charge_content_owner_works() { // Check storage assert_eq!( - DdcCustomers::ledger(account_3), + Ledger::::get(account_3), Some(AccountsLedger { owner: account_3, total: deposit, @@ -218,7 +218,7 @@ fn charge_content_owner_works() { // Check storage assert_eq!( - DdcCustomers::ledger(account_3), + Ledger::::get(account_3), Some(AccountsLedger { owner: account_3, total: deposit - charge1, @@ -236,7 +236,7 @@ fn charge_content_owner_works() { let charge2 = 100u128; let charge_result = DdcCustomers::charge_content_owner(account_3, vault, charge2).unwrap(); assert_eq!( - DdcCustomers::ledger(account_3), + Ledger::::get(account_3), Some(AccountsLedger { owner: account_3, total: 0, @@ -263,7 +263,7 @@ fn charge_content_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, @@ -299,7 +299,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, @@ -326,7 +326,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, @@ -341,7 +341,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); }) } @@ -373,9 +373,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, @@ -466,9 +466,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, @@ -482,9 +482,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, @@ -558,7 +558,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, @@ -569,7 +569,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 83e7ee60b..9b0517182 100644 --- a/pallets/ddc-nodes/src/lib.rs +++ b/pallets/ddc-nodes/src/lib.rs @@ -86,7 +86,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 830ca1149..14d5cec64 100644 --- a/pallets/ddc-nodes/src/mock.rs +++ b/pallets/ddc-nodes/src/mock.rs @@ -6,12 +6,10 @@ 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::IdentityLookup, BuildStorage}; +use sp_runtime::BuildStorage; use crate::{self as pallet_ddc_nodes, *}; @@ -40,15 +38,9 @@ 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 618a01c8e..b6545708f 100644 --- a/pallets/ddc-nodes/src/tests.rs +++ b/pallets/ddc-nodes/src/tests.rs @@ -66,7 +66,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 = @@ -91,7 +91,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 @@ -143,7 +143,7 @@ fn create_storage_node_with_node_creator() { { 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); }) } @@ -198,7 +198,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 f543db269..34537f7a5 100644 --- a/pallets/ddc-payouts/src/lib.rs +++ b/pallets/ddc-payouts/src/lib.rs @@ -270,7 +270,6 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn active_billing_reports)] pub type ActiveBillingReports = StorageDoubleMap< _, Blake2_128Concat, @@ -281,16 +280,13 @@ pub mod pallet { >; #[pallet::storage] - #[pallet::getter(fn authorised_caller)] pub type AuthorisedCaller = StorageValue<_, T::AccountId>; #[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>; @@ -371,7 +367,7 @@ pub mod pallet { end_era: i64, ) -> DispatchResult { let caller = ensure_signed(origin)?; - ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + ensure!(AuthorisedCaller::::get() == Some(caller), Error::::Unauthorised); ensure!( ActiveBillingReports::::try_get(cluster_id, era).is_err(), @@ -403,7 +399,7 @@ pub mod pallet { max_batch_index: BatchIndex, ) -> DispatchResult { let caller = ensure_signed(origin)?; - ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + ensure!(AuthorisedCaller::::get() == Some(caller), Error::::Unauthorised); ensure!(max_batch_index < MaxBatchesCount::get(), Error::::BatchIndexOverflow); @@ -431,7 +427,7 @@ pub mod pallet { payers: Vec<(T::AccountId, CustomerUsage)>, ) -> DispatchResult { let caller = ensure_signed(origin)?; - ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + ensure!(AuthorisedCaller::::get() == Some(caller), Error::::Unauthorised); ensure!( !payers.is_empty() && payers.len() <= MaxBatchSize::get() as usize, @@ -582,7 +578,7 @@ pub mod pallet { era: DdcEra, ) -> DispatchResult { let caller = ensure_signed(origin)?; - ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + ensure!(AuthorisedCaller::::get() == Some(caller), Error::::Unauthorised); let mut billing_report = ActiveBillingReports::::try_get(cluster_id, era) .map_err(|_| Error::::BillingReportDoesNotExist)?; @@ -683,7 +679,7 @@ pub mod pallet { total_node_usage: NodeUsage, ) -> DispatchResult { let caller = ensure_signed(origin)?; - ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + ensure!(AuthorisedCaller::::get() == Some(caller), Error::::Unauthorised); ensure!(max_batch_index < MaxBatchesCount::get(), Error::::BatchIndexOverflow); @@ -715,7 +711,7 @@ pub mod pallet { payees: Vec<(T::AccountId, NodeUsage)>, ) -> DispatchResult { let caller = ensure_signed(origin)?; - ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + ensure!(AuthorisedCaller::::get() == Some(caller), Error::::Unauthorised); ensure!( !payees.is_empty() && payees.len() <= MaxBatchSize::get() as usize, @@ -827,7 +823,7 @@ pub mod pallet { era: DdcEra, ) -> DispatchResult { let caller = ensure_signed(origin)?; - ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + ensure!(AuthorisedCaller::::get() == Some(caller), Error::::Unauthorised); let mut billing_report = ActiveBillingReports::::try_get(cluster_id, era) .map_err(|_| Error::::BillingReportDoesNotExist)?; @@ -878,7 +874,7 @@ pub mod pallet { era: DdcEra, ) -> DispatchResult { let caller = ensure_signed(origin)?; - ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + ensure!(AuthorisedCaller::::get() == Some(caller), Error::::Unauthorised); let mut billing_report = ActiveBillingReports::::try_get(cluster_id, era) .map_err(|_| Error::::BillingReportDoesNotExist)?; diff --git a/pallets/ddc-payouts/src/mock.rs b/pallets/ddc-payouts/src/mock.rs index f6ce144aa..771d88186 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}; @@ -75,10 +74,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 589e94740..e7629c0bd 100644 --- a/pallets/ddc-payouts/src/tests.rs +++ b/pallets/ddc-payouts/src/tests.rs @@ -27,7 +27,7 @@ fn set_authorised_caller_works() { Event::AuthorisedCaller { authorised_caller: dac_account }.into(), ); - assert_eq!(DdcPayouts::authorised_caller().unwrap(), dac_account); + assert_eq!(AuthorisedCaller::::get().unwrap(), dac_account); }) } @@ -98,7 +98,7 @@ 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, State::Initialized); assert_eq!(report.start_era, start_era); assert_eq!(report.end_era, end_era); @@ -182,7 +182,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, State::ChargingCustomers); assert_eq!(report.charging_max_batch_index, max_batch_index); }) @@ -465,7 +465,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).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor).unwrap(); let expected_charge2 = calculate_charge_for_month(cluster_id, usage2.clone()); let mut debt = expected_charge2 - USER2_BALANCE; assert_eq!(user2_debt, debt); @@ -477,7 +477,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); @@ -541,7 +541,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, @@ -561,7 +561,7 @@ fn send_charging_customers_batch_works() { ); assert_eq!(report.state, State::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()); @@ -580,7 +580,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 @@ -601,7 +601,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).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -687,7 +687,7 @@ fn end_charging_customers_works_small_usage_1_hour() { payers1, )); - 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); @@ -748,7 +748,7 @@ fn end_charging_customers_works_small_usage_1_hour() { )); 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, State::CustomersChargedWithFees); let fees = get_fees(&cluster_id); @@ -898,7 +898,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).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - USER2_BALANCE; assert_eq!(user2_debt, debt); @@ -910,7 +910,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); @@ -974,7 +974,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, @@ -994,7 +994,7 @@ fn send_charging_customers_batch_works_for_day() { ); assert_eq!(report.state, State::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()); @@ -1013,7 +1013,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 @@ -1034,7 +1034,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).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -1141,7 +1141,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).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - USER2_BALANCE; assert_eq!(user2_debt, debt); @@ -1153,7 +1153,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); @@ -1217,7 +1217,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, @@ -1237,7 +1237,7 @@ fn send_charging_customers_batch_works_for_day_free_storage() { ); assert_eq!(report.state, State::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()); @@ -1256,7 +1256,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 @@ -1277,7 +1277,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).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -1384,7 +1384,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).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - USER2_BALANCE; assert_eq!(user2_debt, debt); @@ -1396,7 +1396,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); @@ -1460,7 +1460,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, @@ -1480,7 +1480,7 @@ fn send_charging_customers_batch_works_for_day_free_stream() { ); assert_eq!(report.state, State::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()); @@ -1499,7 +1499,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 @@ -1520,7 +1520,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).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -1627,7 +1627,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).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - USER2_BALANCE; assert_eq!(user2_debt, debt); @@ -1639,7 +1639,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); @@ -1703,7 +1703,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, @@ -1723,7 +1723,7 @@ fn send_charging_customers_batch_works_for_day_free_get() { ); assert_eq!(report.state, State::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()); @@ -1742,7 +1742,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 @@ -1763,7 +1763,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).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -1870,7 +1870,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).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - USER2_BALANCE; assert_eq!(user2_debt, debt); @@ -1882,7 +1882,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); @@ -1946,7 +1946,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, @@ -1966,7 +1966,7 @@ fn send_charging_customers_batch_works_for_day_free_put() { ); assert_eq!(report.state, State::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()); @@ -1985,7 +1985,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 @@ -2006,7 +2006,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).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -2113,7 +2113,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).unwrap(); + let user2_debt = DebtorCustomers::::get(cluster_id, user2_debtor).unwrap(); let expected_charge2 = calculate_charge_for_day(cluster_id, usage2.clone()); let mut debt = expected_charge2 - USER2_BALANCE; assert_eq!(user2_debt, debt); @@ -2125,7 +2125,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); @@ -2189,7 +2189,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, @@ -2209,7 +2209,7 @@ fn send_charging_customers_batch_works_for_day_free_storage_stream() { ); assert_eq!(report.state, State::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()); @@ -2228,7 +2228,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 @@ -2249,7 +2249,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).unwrap(); + let user3_debt = DebtorCustomers::::get(cluster_id, user3_debtor).unwrap(); debt = user3_charge - PARTIAL_CHARGE; assert_eq!(user3_debt, debt); @@ -2321,7 +2321,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!(DdcPayouts::send_charging_customers_batch( @@ -2335,7 +2335,7 @@ fn send_charging_customers_batch_works_zero_fees() { let usage5_charge = calculate_charge_for_month(cluster_id, usage5.clone()); let charge5 = calculate_charge_parts_for_month(cluster_id, usage5); 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, @@ -2484,7 +2484,7 @@ fn end_charging_customers_works() { payers, )); - 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 { cluster_id, era, batch_index, customer_id: user1, amount: charge } @@ -2522,7 +2522,7 @@ fn end_charging_customers_works() { let transfers = 3 + 3 + 3 + 3 * 3; // for Currency::transfer assert_eq!(System::events().len(), 5 + 1 + 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, State::CustomersChargedWithFees); let total_left_from_one = (get_fees(&cluster_id).treasury_share + @@ -2658,7 +2658,7 @@ fn end_charging_customers_works_zero_fees() { payers, )); - 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 { cluster_id, era, customer_id: user1, batch_index, amount: charge } @@ -2678,7 +2678,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, State::CustomersChargedWithFees); let fees = get_fees(&cluster_id); @@ -2888,7 +2888,7 @@ fn begin_rewarding_providers_works() { end_era, )); - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, State::Initialized); assert_ok!(DdcPayouts::begin_charging_customers( @@ -2922,7 +2922,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, State::RewardingProviders); }) } @@ -3175,14 +3175,14 @@ fn send_rewarding_providers_batch_works() { payers, )); - let report_before = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report_before = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_ok!(DdcPayouts::end_charging_customers( RuntimeOrigin::signed(dac_account), 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) @@ -3245,7 +3245,7 @@ fn send_rewarding_providers_batch_works() { let balance_node1 = Balances::free_balance(node1); 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::ProviderRewarded { @@ -3336,7 +3336,7 @@ fn send_rewarding_providers_batch_works() { ); 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(node3); assert_eq!(balance_node3, transfer_charge + storage_charge + puts_charge + gets_charge); @@ -3533,7 +3533,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); let balance2 = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance1, balance2); @@ -3546,7 +3546,7 @@ fn send_rewarding_providers_batch_100_nodes_small_usage_works() { 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) @@ -3807,7 +3807,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); let balance2 = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance1, balance2); @@ -3820,7 +3820,7 @@ fn send_rewarding_providers_batch_100_nodes_large_usage_works() { 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) @@ -4081,7 +4081,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); let balance2 = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance1, balance2); @@ -4094,7 +4094,7 @@ fn send_rewarding_providers_batch_100_nodes_small_large_usage_works() { 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) @@ -4314,7 +4314,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); let balance2 = Balances::free_balance(DdcPayouts::account_id()); assert_eq!(balance1, balance2); @@ -4327,7 +4327,7 @@ fn send_rewarding_providers_batch_100_nodes_random_usage_works() { 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) @@ -4630,7 +4630,7 @@ fn end_rewarding_providers_works() { end_era, )); - let mut report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let mut report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, State::Initialized); assert_ok!(DdcPayouts::begin_charging_customers( @@ -4678,7 +4678,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, State::ProvidersRewarded); }) } @@ -4858,7 +4858,7 @@ fn end_billing_report_works() { end_era, )); - let report = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + let report = ActiveBillingReports::::get(cluster_id, era).unwrap(); assert_eq!(report.state, State::Initialized); assert_ok!(DdcPayouts::begin_charging_customers( @@ -4912,7 +4912,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, State::Finalized); diff --git a/pallets/ddc-staking/src/lib.rs b/pallets/ddc-staking/src/lib.rs index ae4ae6d5f..4e8523908 100644 --- a/pallets/ddc-staking/src/lib.rs +++ b/pallets/ddc-staking/src/lib.rs @@ -190,44 +190,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>>; @@ -470,7 +462,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, @@ -490,7 +482,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)?; @@ -580,7 +572,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)?; @@ -639,7 +631,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)?; @@ -657,7 +649,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 @@ -695,11 +687,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) @@ -749,7 +741,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)? @@ -877,7 +869,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, @@ -923,7 +916,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()); diff --git a/pallets/ddc-staking/src/mock.rs b/pallets/ddc-staking/src/mock.rs index 982e826ad..7cf0612a5 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>; @@ -494,7 +489,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 c48f89196..ed85bb376 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), @@ -896,7 +896,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, @@ -909,7 +909,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), @@ -975,7 +975,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, @@ -988,7 +988,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), @@ -1059,7 +1059,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, @@ -1078,11 +1078,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), @@ -1145,7 +1145,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, @@ -1164,11 +1164,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/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 9f20d41e4..3c5d77776 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 Block = Block; 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 78d6beb71..61f2279ed 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -28,7 +28,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); @@ -461,7 +461,8 @@ parameter_types! { pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128); 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)] @@ -1285,61 +1286,164 @@ impl, T: frame_system::Config> GetDdcOrigin } } -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, - } -); +#[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; + + // Start OpenGov. + #[runtime::pallet_index(40)] + pub type ConvictionVoting = pallet_conviction_voting::Pallet; + + #[runtime::pallet_index(41)] + pub type Referenda = pallet_referenda::Pallet; + + #[runtime::pallet_index(42)] + pub type Origins = pallet_origins::Pallet; + + #[runtime::pallet_index(43)] + pub type Whitelist = pallet_whitelist::Pallet; + + // End OpenGov. + #[runtime::pallet_index(44)] + pub type TechComm = pallet_collective::Pallet; + + #[runtime::pallet_index(45)] + pub type DdcClustersGov = pallet_ddc_clusters_gov::Pallet; +} /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; @@ -1755,6 +1859,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 3d7428978..4ceaabc3d 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -27,7 +27,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, @@ -143,7 +143,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, @@ -167,7 +167,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); @@ -456,6 +456,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)] @@ -1287,61 +1289,164 @@ impl, T: frame_system::Config> GetDdcOrigin } } -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, - } -); +#[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; + + // Start OpenGov. + #[runtime::pallet_index(40)] + pub type ConvictionVoting = pallet_conviction_voting::Pallet; + + #[runtime::pallet_index(41)] + pub type Referenda = pallet_referenda::Pallet; + + #[runtime::pallet_index(42)] + pub type Origins = pallet_origins::Pallet; + + #[runtime::pallet_index(43)] + pub type Whitelist = pallet_whitelist::Pallet; + + // End OpenGov. + #[runtime::pallet_index(44)] + pub type TechComm = pallet_collective::Pallet; + + #[runtime::pallet_index(45)] + pub type DdcClustersGov = pallet_ddc_clusters_gov::Pallet; +} /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; @@ -1776,6 +1881,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")]