diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 73f7d2b72..0c19d98be 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,6 +3,7 @@ ### Types of Changes +- [ ] Tech Debt (Code improvements) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) diff --git a/.maintain/frame-weight-template.hbs b/.maintain/frame-weight-template.hbs index ad0077736..91758c810 100644 --- a/.maintain/frame-weight-template.hbs +++ b/.maintain/frame-weight-template.hbs @@ -47,10 +47,10 @@ impl WeightInfo for SubstrateWeight { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - Weight::from_ref_time({{underscore benchmark.base_weight}}_u64) + Weight::from_parts({{underscore benchmark.base_weight}}_u64, 0) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}}_u64).saturating_mul({{cw.name}} as u64)) + .saturating_add(Weight::from_parts({{underscore cw.slope}}_u64, 0).saturating_mul({{cw.name}} as u64)) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64)) @@ -82,10 +82,10 @@ impl WeightInfo for () { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - Weight::from_ref_time({{underscore benchmark.base_weight}}_u64) + Weight::from_parts({{underscore benchmark.base_weight}}_u64, 0) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}}_u64).saturating_mul({{cw.name}} as u64)) + .saturating_add(Weight::from_parts({{underscore cw.slope}}_u64, 0).saturating_mul({{cw.name}} as u64)) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64)) diff --git a/CHANGELOG.md b/CHANGELOG.md index cad26f016..fb0d9c868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,11 +12,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [vNext] ### Changed +- ... -- Changes in `pallet-ddc-payouts::begin_billing_report` crate to accept start and end of the era. +### Added +- ... + +## [4.8.8] +### Changed + +- [C,D] Updated Substrate to polkadot-v0.9.40 - More explicit events in `pallet-ddc-payouts` and `pallet-ddc-customers` -- ... +- Introduce a burn rate of 0.058% daily to bring inflation down. +- More explicit events in `pallet-ddc-payouts` about batch index ## [4.8.7] @@ -24,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [C,D] Updated Substrate to polkadot-v0.9.38 - [C] Added pallet-preimage to support democracy functionality. +- Changes in `pallet-ddc-payouts::begin_billing_report` crate to accept start and end of the era. ## [4.8.6] diff --git a/Cargo.lock b/Cargo.lock index 5686ef836..02c4ce11f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -321,6 +321,17 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + [[package]] name = "async-io" version = "2.2.2" @@ -619,6 +630,18 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "bounded-collections" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bs58" version = "0.4.0" @@ -671,6 +694,12 @@ dependencies = [ "utf8-width", ] +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" + [[package]] name = "byteorder" version = "1.5.0" @@ -714,15 +743,16 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.14.2" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", "semver 1.0.21", "serde", "serde_json", + "thiserror", ] [[package]] @@ -746,18 +776,9 @@ dependencies = [ "subtle", ] -[[package]] -name = "cere" -version = "4.8.7" -dependencies = [ - "cere-cli", - "sc-cli", - "substrate-build-script-utils", -] - [[package]] name = "cere-cli" -version = "4.8.7" +version = "4.8.8" dependencies = [ "cere-client", "cere-service", @@ -772,7 +793,7 @@ dependencies = [ [[package]] name = "cere-client" -version = "4.8.7" +version = "4.8.8" dependencies = [ "cere-dev-runtime", "cere-runtime", @@ -792,7 +813,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-finality-grandpa", + "sp-consensus-grandpa", "sp-inherents", "sp-offchain", "sp-runtime", @@ -804,11 +825,10 @@ dependencies = [ [[package]] name = "cere-dev-runtime" -version = "4.8.7" +version = "4.8.8" dependencies = [ - "cere-dev-runtime-constants", "cere-runtime-common", - "ddc-traits", + "ddc-primitives", "frame-benchmarking", "frame-election-provider-support", "frame-executive", @@ -847,6 +867,7 @@ dependencies = [ "pallet-identity", "pallet-im-online", "pallet-indices", + "pallet-insecure-randomness-collective-flip", "pallet-membership", "pallet-multisig", "pallet-nomination-pools", @@ -856,7 +877,6 @@ dependencies = [ "pallet-offences-benchmarking", "pallet-preimage", "pallet-proxy", - "pallet-randomness-collective-flip", "pallet-recovery", "pallet-scheduler", "pallet-session", @@ -892,17 +912,9 @@ dependencies = [ "substrate-wasm-builder", ] -[[package]] -name = "cere-dev-runtime-constants" -version = "4.8.7" -dependencies = [ - "node-primitives", - "sp-runtime", -] - [[package]] name = "cere-rpc" -version = "4.8.7" +version = "4.8.8" dependencies = [ "jsonrpsee", "node-primitives", @@ -912,8 +924,8 @@ dependencies = [ "sc-consensus-babe", "sc-consensus-babe-rpc", "sc-consensus-epochs", - "sc-finality-grandpa", - "sc-finality-grandpa-rpc", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", "sc-rpc", "sc-rpc-api", "sc-sync-state-rpc", @@ -931,11 +943,10 @@ dependencies = [ [[package]] name = "cere-runtime" -version = "4.8.7" +version = "4.8.8" dependencies = [ "cere-runtime-common", - "cere-runtime-constants", - "ddc-traits", + "ddc-primitives", "frame-benchmarking", "frame-election-provider-support", "frame-executive", @@ -974,6 +985,7 @@ dependencies = [ "pallet-identity", "pallet-im-online", "pallet-indices", + "pallet-insecure-randomness-collective-flip", "pallet-membership", "pallet-multisig", "pallet-nomination-pools", @@ -983,7 +995,6 @@ dependencies = [ "pallet-offences-benchmarking", "pallet-preimage", "pallet-proxy", - "pallet-randomness-collective-flip", "pallet-recovery", "pallet-scheduler", "pallet-session", @@ -1021,7 +1032,7 @@ dependencies = [ [[package]] name = "cere-runtime-common" -version = "4.8.7" +version = "4.8.8" dependencies = [ "frame-support", "node-primitives", @@ -1029,22 +1040,15 @@ dependencies = [ "sp-runtime", ] -[[package]] -name = "cere-runtime-constants" -version = "4.8.7" -dependencies = [ - "node-primitives", -] - [[package]] name = "cere-service" -version = "4.8.7" +version = "4.8.8" dependencies = [ "cere-client", "cere-dev-runtime", - "cere-dev-runtime-constants", "cere-rpc", "cere-runtime", + "cere-runtime-common", "futures", "jsonrpsee", "node-primitives", @@ -1056,9 +1060,9 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-babe", + "sc-consensus-grandpa", "sc-consensus-slots", "sc-executor", - "sc-finality-grandpa", "sc-network", "sc-network-common", "sc-rpc", @@ -1072,8 +1076,8 @@ dependencies = [ "sp-authority-discovery", "sp-blockchain", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-runtime", "sp-timestamp", "sp-transaction-storage-proof", @@ -1325,18 +1329,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd" +checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74" +checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" dependencies = [ "arrayvec 0.7.4", "bumpalo", @@ -1346,6 +1350,7 @@ dependencies = [ "cranelift-entity", "cranelift-isle", "gimli 0.26.2", + "hashbrown 0.12.3", "log", "regalloc2", "smallvec", @@ -1354,33 +1359,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f" +checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc" +checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" [[package]] name = "cranelift-entity" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" +checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a" +checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" dependencies = [ "cranelift-codegen", "log", @@ -1390,15 +1395,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470" +checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" [[package]] name = "cranelift-native" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318" +checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" dependencies = [ "cranelift-codegen", "libc", @@ -1407,9 +1412,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.88.2" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b" +checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1698,24 +1703,14 @@ dependencies = [ [[package]] name = "ddc-primitives" -version = "4.8.7" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "ddc-traits" -version = "4.8.7" +version = "4.8.8" dependencies = [ - "ddc-primitives", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "serde", + "sp-core", "sp-runtime", "sp-std", ] @@ -2122,17 +2117,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - [[package]] name = "errno" version = "0.3.8" @@ -2143,16 +2127,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -2189,6 +2163,19 @@ dependencies = [ "futures", ] +[[package]] +name = "expander" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -2317,7 +2304,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", ] @@ -2340,7 +2327,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-support-procedural", @@ -2365,7 +2352,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "array-bytes", @@ -2412,7 +2399,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -2423,7 +2410,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2440,7 +2427,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -2469,7 +2456,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "log", @@ -2485,9 +2472,10 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bitflags 1.3.2", + "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", @@ -2517,7 +2505,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "cfg-expr", @@ -2532,7 +2520,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -2544,7 +2532,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -2554,7 +2542,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "log", @@ -2572,7 +2560,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -2587,7 +2575,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-api", @@ -2596,7 +2584,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "parity-scale-codec", @@ -2605,6 +2593,15 @@ dependencies = [ "sp-std", ] +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + [[package]] name = "fs2" version = "0.4.3" @@ -2615,6 +2612,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs4" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +dependencies = [ + "rustix 0.38.30", + "windows-sys 0.48.0", +] + [[package]] name = "funty" version = "2.0.0" @@ -2900,9 +2907,9 @@ dependencies = [ [[package]] name = "hash-db" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" [[package]] name = "hash256-std-hasher" @@ -2927,6 +2934,9 @@ name = "hashbrown" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.2", +] [[package]] name = "hashbrown" @@ -3304,9 +3314,14 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "0.7.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.3", + "libc", + "windows-sys 0.48.0", +] [[package]] name = "ip_network" @@ -4152,19 +4167,18 @@ dependencies = [ [[package]] name = "linregress" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", - "statrs", ] [[package]] name = "linux-raw-sys" -version = "0.0.46" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" @@ -4309,23 +4323,13 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memory-db" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ "hash-db", - "hashbrown 0.12.3", ] [[package]] @@ -4511,9 +4515,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.27.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ "approx", "matrixmultiply", @@ -4521,17 +4525,15 @@ dependencies = [ "num-complex", "num-rational", "num-traits", - "rand 0.8.5", - "rand_distr", "simba", "typenum", ] [[package]] name = "nalgebra-macros" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -4622,26 +4624,13 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", -] - -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.7.1", - "pin-utils", + "memoffset", ] [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-system", "parity-scale-codec", @@ -4732,7 +4721,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -4839,7 +4827,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -4855,7 +4843,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -4869,7 +4857,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4893,7 +4881,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4913,7 +4901,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4928,7 +4916,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4945,7 +4933,7 @@ dependencies = [ [[package]] name = "pallet-chainbridge" -version = "4.8.7" +version = "4.8.8" dependencies = [ "frame-support", "frame-system", @@ -4961,7 +4949,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4980,7 +4968,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4997,9 +4985,10 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bitflags 1.3.2", + "environmental", "frame-benchmarking", "frame-support", "frame-system", @@ -5026,10 +5015,11 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", "sp-weights", @@ -5038,7 +5028,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -5047,10 +5037,9 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters" -version = "4.8.7" +version = "4.8.8" dependencies = [ "ddc-primitives", - "ddc-traits", "frame-benchmarking", "frame-support", "frame-system", @@ -5058,7 +5047,7 @@ dependencies = [ "pallet-balances", "pallet-contracts", "pallet-ddc-nodes", - "pallet-randomness-collective-flip", + "pallet-insecure-randomness-collective-flip", "pallet-timestamp", "parity-scale-codec", "scale-info", @@ -5073,10 +5062,9 @@ dependencies = [ [[package]] name = "pallet-ddc-customers" -version = "4.8.7" +version = "4.8.8" dependencies = [ "ddc-primitives", - "ddc-traits", "frame-benchmarking", "frame-support", "frame-system", @@ -5096,10 +5084,9 @@ dependencies = [ [[package]] name = "pallet-ddc-nodes" -version = "4.8.7" +version = "4.8.8" dependencies = [ "ddc-primitives", - "ddc-traits", "frame-benchmarking", "frame-support", "frame-system", @@ -5118,12 +5105,11 @@ dependencies = [ [[package]] name = "pallet-ddc-payouts" -version = "4.8.7" +version = "4.8.8" dependencies = [ "byte-unit", "chrono", "ddc-primitives", - "ddc-traits", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -5143,10 +5129,9 @@ dependencies = [ [[package]] name = "pallet-ddc-staking" -version = "4.8.7" +version = "4.8.8" dependencies = [ "ddc-primitives", - "ddc-traits", "frame-benchmarking", "frame-support", "frame-system", @@ -5167,7 +5152,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5185,7 +5170,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5208,7 +5193,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5221,7 +5206,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5238,7 +5223,7 @@ dependencies = [ [[package]] name = "pallet-erc20" -version = "4.8.7" +version = "4.8.8" dependencies = [ "frame-support", "frame-system", @@ -5256,7 +5241,7 @@ dependencies = [ [[package]] name = "pallet-erc721" -version = "4.8.7" +version = "4.8.8" dependencies = [ "frame-support", "frame-system", @@ -5273,7 +5258,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5291,7 +5276,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5302,8 +5287,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-application-crypto", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-io", "sp-runtime", "sp-session", @@ -5314,7 +5299,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5330,7 +5315,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5350,7 +5335,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5364,10 +5349,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-insecure-randomness-collective-flip" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5384,7 +5383,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5400,7 +5399,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5417,7 +5416,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5437,8 +5436,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "pallet-nomination-pools", "parity-scale-codec", "sp-api", "sp-std", @@ -5447,7 +5447,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5464,7 +5464,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5488,7 +5488,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5505,7 +5505,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5517,24 +5517,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-randomness-collective-flip" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "safe-mix", - "scale-info", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5549,7 +5535,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5566,7 +5552,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5587,7 +5573,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5603,7 +5589,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5617,7 +5603,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5640,7 +5626,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -5651,7 +5637,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5665,7 +5651,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5683,7 +5669,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5702,7 +5688,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5718,7 +5704,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5734,7 +5720,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5746,7 +5732,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5763,7 +5749,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5779,7 +5765,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6491,16 +6477,6 @@ dependencies = [ "getrandom 0.2.12", ] -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -6621,9 +6597,9 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.3.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ "fxhash", "log", @@ -6675,6 +6651,18 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "region" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" +dependencies = [ + "bitflags 1.3.2", + "libc", + "mach", + "winapi", +] + [[package]] name = "resolv-conf" version = "0.7.0" @@ -6767,7 +6755,7 @@ dependencies = [ "log", "netlink-packet-route", "netlink-proto", - "nix 0.24.3", + "nix", "thiserror", "tokio", ] @@ -6843,16 +6831,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.35.16" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5363f616a5244fd47fc1dd0a0b24c28a5c0154f5010c16332a7ad6f78f2e8b62" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", - "errno 0.2.8", + "errno", "io-lifetimes", "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", ] [[package]] @@ -6862,7 +6850,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ "bitflags 2.4.1", - "errno 0.3.8", + "errno", "libc", "linux-raw-sys 0.4.12", "windows-sys 0.52.0", @@ -6968,6 +6956,15 @@ dependencies = [ "rustc_version 0.2.3", ] +[[package]] +name = "safe_arch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -6980,7 +6977,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "sp-core", @@ -6991,7 +6988,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -7004,6 +7001,7 @@ dependencies = [ "prost-build", "rand 0.8.5", "sc-client-api", + "sc-network", "sc-network-common", "sp-api", "sp-authority-discovery", @@ -7018,7 +7016,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "futures-timer", @@ -7041,7 +7039,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7051,28 +7049,31 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "memmap2", "sc-chain-spec-derive", - "sc-network-common", + "sc-client-api", + "sc-executor", + "sc-network", "sc-telemetry", "serde", "serde_json", + "sp-blockchain", "sp-core", "sp-runtime", + "sp-state-machine", ] [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -7083,7 +7084,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "chrono", @@ -7123,7 +7124,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "fnv", "futures", @@ -7149,7 +7150,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "kvdb", @@ -7175,7 +7176,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -7200,7 +7201,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "fork-tree", @@ -7218,6 +7219,7 @@ dependencies = [ "sc-consensus-slots", "sc-keystore", "sc-telemetry", + "scale-info", "schnorrkel", "sp-api", "sp-application-crypto", @@ -7238,7 +7240,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "jsonrpsee", @@ -7260,7 +7262,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7270,10 +7272,70 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "sc-consensus-grandpa" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "ahash 0.8.2", + "array-bytes", + "async-trait", + "dyn-clone", + "finality-grandpa", + "fork-tree", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-telemetry", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-grandpa-rpc" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "finality-grandpa", + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus-grandpa", + "sc-rpc", + "serde", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -7296,7 +7358,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "lru", "parity-scale-codec", @@ -7320,7 +7382,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -7333,7 +7395,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "sc-allocator", @@ -7346,13 +7408,14 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "anyhow", "cfg-if", "libc", "log", "once_cell", - "rustix 0.35.16", + "rustix 0.36.17", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -7360,76 +7423,17 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "sc-finality-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "ahash 0.8.2", - "array-bytes", - "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-telemetry", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-finality-grandpa", - "sp-keystore", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-finality-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "finality-grandpa", - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-finality-grandpa", - "sc-rpc", - "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", -] - [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "futures", "futures-timer", "log", "sc-client-api", + "sc-network", "sc-network-common", "sp-blockchain", "sp-runtime", @@ -7438,7 +7442,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "async-trait", @@ -7453,12 +7457,12 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", + "async-channel", "async-trait", "asynchronous-codec", - "backtrace", "bytes", "either", "fnv", @@ -7466,8 +7470,10 @@ dependencies = [ "futures-timer", "ip_network", "libp2p", + "linked_hash_set", "log", "lru", + "mockall", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", @@ -7495,7 +7501,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "cid", "futures", @@ -7504,6 +7510,7 @@ dependencies = [ "prost", "prost-build", "sc-client-api", + "sc-network", "sc-network-common", "sp-blockchain", "sp-runtime", @@ -7514,33 +7521,35 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "array-bytes", "async-trait", "bitflags 1.3.2", "bytes", "futures", "futures-timer", "libp2p", - "linked_hash_set", "parity-scale-codec", "prost-build", "sc-consensus", "sc-peerset", + "sc-utils", "serde", "smallvec", "sp-blockchain", "sp-consensus", - "sp-finality-grandpa", + "sp-consensus-grandpa", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ahash 0.8.2", "futures", @@ -7548,6 +7557,7 @@ dependencies = [ "libp2p", "log", "lru", + "sc-network", "sc-network-common", "sc-peerset", "sp-runtime", @@ -7558,7 +7568,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "futures", @@ -7568,6 +7578,7 @@ dependencies = [ "prost", "prost-build", "sc-client-api", + "sc-network", "sc-network-common", "sc-peerset", "sp-blockchain", @@ -7579,12 +7590,13 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "async-trait", "fork-tree", "futures", + "futures-timer", "libp2p", "log", "lru", @@ -7594,6 +7606,7 @@ dependencies = [ "prost-build", "sc-client-api", "sc-consensus", + "sc-network", "sc-network-common", "sc-peerset", "sc-utils", @@ -7601,8 +7614,8 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-consensus", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", @@ -7611,7 +7624,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "futures", @@ -7619,6 +7632,7 @@ dependencies = [ "log", "parity-scale-codec", "pin-project", + "sc-network", "sc-network-common", "sc-peerset", "sc-utils", @@ -7630,7 +7644,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "bytes", @@ -7646,6 +7660,7 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "sc-client-api", + "sc-network", "sc-network-common", "sc-peerset", "sc-utils", @@ -7660,7 +7675,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "libp2p", @@ -7673,7 +7688,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7682,7 +7697,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "jsonrpsee", @@ -7712,7 +7727,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7731,7 +7746,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "http", "jsonrpsee", @@ -7746,7 +7761,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "futures", @@ -7772,7 +7787,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "directories", @@ -7838,7 +7853,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "parity-scale-codec", @@ -7849,12 +7864,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "clap", + "fs4", "futures", "log", - "nix 0.26.4", "sc-client-db", "sc-utils", "sp-core", @@ -7865,7 +7880,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7873,7 +7888,7 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", - "sc-finality-grandpa", + "sc-consensus-grandpa", "serde", "serde_json", "sp-blockchain", @@ -7884,7 +7899,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "libc", @@ -7903,7 +7918,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "chrono", "futures", @@ -7922,7 +7937,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "atty", @@ -7953,7 +7968,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -7964,7 +7979,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -7991,7 +8006,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -8005,15 +8020,16 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "backtrace", + "async-channel", "futures", "futures-timer", "lazy_static", "log", "parking_lot 0.12.1", "prometheus", + "sp-arithmetic", ] [[package]] @@ -8367,14 +8383,15 @@ dependencies = [ [[package]] name = "simba" -version = "0.5.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ "approx", "num-complex", "num-traits", "paste", + "wide", ] [[package]] @@ -8467,7 +8484,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "log", @@ -8485,9 +8502,11 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "Inflector", "blake2", + "expander", "proc-macro-crate 1.1.3", "proc-macro2", "quote", @@ -8497,7 +8516,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -8510,7 +8529,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "integer-sqrt", "num-traits", @@ -8524,7 +8543,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -8537,7 +8556,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-api", @@ -8549,7 +8568,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "log", @@ -8567,25 +8586,40 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-version", "thiserror", ] +[[package]] +name = "sp-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "merlin", @@ -8605,10 +8639,28 @@ dependencies = [ "sp-timestamp", ] +[[package]] +name = "sp-consensus-grandpa" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" +dependencies = [ + "finality-grandpa", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -8620,7 +8672,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -8633,12 +8685,13 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes", "base58", "bitflags 1.3.2", "blake2", + "bounded-collections", "dyn-clonable", "ed25519-zebra", "futures", @@ -8675,9 +8728,9 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.8", @@ -8689,7 +8742,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -8700,7 +8753,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -8709,7 +8762,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -8719,7 +8772,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "environmental", "parity-scale-codec", @@ -8727,32 +8780,15 @@ dependencies = [ "sp-storage", ] -[[package]] -name = "sp-finality-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "finality-grandpa", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", + "scale-info", "sp-core", "sp-runtime", "sp-std", @@ -8762,7 +8798,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bytes", "ed25519 1.5.3", @@ -8787,7 +8823,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "lazy_static", "sp-core", @@ -8798,7 +8834,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -8815,7 +8851,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "thiserror", "zstd", @@ -8824,7 +8860,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -8838,7 +8874,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "sp-api", "sp-core", @@ -8848,7 +8884,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "backtrace", "lazy_static", @@ -8858,7 +8894,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "rustc-hash", "serde", @@ -8868,7 +8904,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "either", "hash256-std-hasher", @@ -8890,7 +8926,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -8908,7 +8944,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -8920,7 +8956,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -8934,7 +8970,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -8946,7 +8982,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "log", @@ -8966,12 +9002,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8984,7 +9020,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures-timer", @@ -8999,7 +9035,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-std", @@ -9011,7 +9047,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "sp-api", "sp-runtime", @@ -9020,7 +9056,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "log", @@ -9036,7 +9072,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ahash 0.8.2", "hash-db", @@ -9059,7 +9095,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9076,7 +9112,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -9087,8 +9123,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -9100,7 +9137,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -9199,19 +9236,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "statrs" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" -dependencies = [ - "approx", - "lazy_static", - "nalgebra", - "num-traits", - "rand 0.8.5", -] - [[package]] name = "strsim" version = "0.10.0" @@ -9275,7 +9299,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "platforms 2.0.0", ] @@ -9283,7 +9307,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -9302,7 +9326,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hyper", "log", @@ -9314,7 +9338,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "jsonrpsee", @@ -9327,7 +9351,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "log", @@ -9346,7 +9370,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "substrate-test-utils-derive", @@ -9356,7 +9380,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9367,7 +9391,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "build-helper", @@ -9853,12 +9877,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.24.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "log", "rustc-hex", "smallvec", @@ -9866,9 +9890,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ "hash-db", ] @@ -9928,8 +9952,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "async-trait", "clap", "frame-remote-externalities", "hex", @@ -9941,14 +9966,19 @@ dependencies = [ "serde", "serde_json", "sp-api", + "sp-consensus-aura", + "sp-consensus-babe", "sp-core", "sp-debug-derive", "sp-externalities", + "sp-inherents", "sp-io", "sp-keystore", "sp-rpc", "sp-runtime", "sp-state-machine", + "sp-timestamp", + "sp-transaction-storage-proof", "sp-version", "sp-weights", "substrate-rpc-client", @@ -10372,6 +10402,7 @@ dependencies = [ "memory_units", "num-rational", "num-traits", + "region", ] [[package]] @@ -10387,11 +10418,12 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.89.1" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ "indexmap 1.9.3", + "url", ] [[package]] @@ -10405,9 +10437,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" +checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" dependencies = [ "anyhow", "bincode", @@ -10428,23 +10460,23 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-asm-macros" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882" +checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" dependencies = [ "anyhow", "base64 0.13.1", @@ -10452,19 +10484,19 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.35.16", + "rustix 0.36.17", "serde", - "sha2 0.9.9", + "sha2 0.10.8", "toml", - "windows-sys 0.36.1", + "windows-sys 0.42.0", "zstd", ] [[package]] name = "wasmtime-cranelift" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6" +checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" dependencies = [ "anyhow", "cranelift-codegen", @@ -10483,9 +10515,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" +checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" dependencies = [ "anyhow", "cranelift-entity", @@ -10502,9 +10534,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" +checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -10515,32 +10547,42 @@ dependencies = [ "log", "object 0.29.0", "rustc-demangle", - "rustix 0.35.16", "serde", "target-lexicon", - "thiserror", "wasmtime-environ", "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-jit-debug" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" +checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.35.16", + "rustix 0.36.17", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-runtime" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" +checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" dependencies = [ "anyhow", "cc", @@ -10550,22 +10592,21 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset", "paste", "rand 0.8.5", - "rustix 0.35.16", - "thiserror", + "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-types" -version = "1.0.2" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" +checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" dependencies = [ "cranelift-entity", "serde", @@ -10819,7 +10860,7 @@ dependencies = [ "lazy_static", "libc", "log", - "nix 0.24.3", + "nix", "rand 0.8.5", "thiserror", "tokio", @@ -10838,6 +10879,16 @@ dependencies = [ "rustix 0.38.30", ] +[[package]] +name = "wide" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b31891d644eba1789fb6715f27fbc322e4bdf2ecdc412ede1993246159271613" +dependencies = [ + "bytemuck", + "safe_arch", +] + [[package]] name = "widestring" version = "1.0.2" @@ -10903,19 +10954,6 @@ dependencies = [ "windows-targets 0.52.0", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -10931,6 +10969,15 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -10949,6 +10996,21 @@ dependencies = [ "windows-targets 0.52.0", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -10997,12 +11059,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -11021,12 +11077,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -11045,12 +11095,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -11069,12 +11113,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -11111,12 +11149,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" diff --git a/Cargo.toml b/Cargo.toml index 49a9dc167..6b4758b80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,42 +1,182 @@ -[[bin]] -name = "cere" -path = "src/main.rs" - -[package] -name = "cere" -version = "4.8.7" -build = "build.rs" +[workspace.package] +version = "4.8.8" +authors = ["Cerebellum-Network"] edition = "2021" +homepage = "https://cere.network/" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" -[dependencies] -cere-cli = { path = "cli", features = ["cere-dev-native"] } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } - -[build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } - [workspace] members = [ - "cli", + "node/cli", "node/client", + "node/rpc", "node/service", - "rpc", - "runtime/cere", - "runtime/cere-dev", "pallets/chainbridge", - "pallets/ddc-staking", - "pallets/erc721", - "pallets/erc20", + "pallets/ddc-clusters", "pallets/ddc-customers", "pallets/ddc-nodes", - "pallets/ddc-clusters", + "pallets/ddc-staking", + "pallets/erc20", + "pallets/erc721", "primitives", + "runtime/cere", + "runtime/cere-dev", ] +resolver = "2" + +[workspace.dependencies] +# 3rd-party dependencies +byte-unit = { version = "4.0.19", default-features = false, features = ["u128"] } +chrono = { version = "0.4.31", default-features = false } +clap = { version = "4.0.15", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } +futures = { version = "0.3.21" } +hex-literal = { version = "^0.3.1", default-features = false } +jsonrpsee = { version = "0.16.2", default-features = false, features = ["server"] } +lazy_static = { version = "1.4.0", default-features = false } +log = { version = "0.4.17", default-features = false } +parking_lot = { version = "0.12.1", default-features = false } +rand = { version = "0.8", default-features = false } +rand_chacha = { version = "0.2", default-features = false } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } +serde = { version = "1.0.136", default-features = false, features = ["derive"] } +static_assertions = { version = "1.1.0" } +url = { version = "2.4.1" } + +# Substrate Dependencies +# Please keey format such that: +# dependency-name = { git = "X", branch = "Y", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +node-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-contracts = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-fast-unstake = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-indices = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false, features = ["historical"] } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-society = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-consensus-slots = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-network-common = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-rpc-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sc-sync-state = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sc-sysinfo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-telemetry = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-consensus-epochs = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-rpc-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } + +# Cere Dependenies +cere-client = { path = "node/client" } +cere-dev-runtime = { path = "runtime/cere-dev" } +cere-rpc = { path = "node/rpc" } +cere-runtime = { path = "runtime/cere" } +cere-runtime-common = { path = "runtime/common", default-features = false } +cere-service = { path = "node/service" } +ddc-primitives = { path = "primitives", default-features = false } +pallet-chainbridge = { path = "pallets/chainbridge", default-features = false } +pallet-ddc-clusters = { path = "pallets/ddc-clusters", default-features = false } +pallet-ddc-customers = { path = "pallets/ddc-customers", default-features = false } +pallet-ddc-nodes = { path = "pallets/ddc-nodes", default-features = false } +pallet-ddc-payouts = { path = "pallets/ddc-payouts", default-features = false } +pallet-ddc-staking = { path = "pallets/ddc-staking", default-features = false } +pallet-erc20 = { path = "pallets/erc20", default-features = false } +pallet-erc721 = { path = "pallets/erc721", default-features = false } [profile.release] panic = "unwind" - -[features] -runtime-benchmarks = ["cere-cli/runtime-benchmarks"] -try-runtime = ["cere-cli/try-runtime"] diff --git a/build.rs b/build.rs deleted file mode 100644 index e3bfe3116..000000000 --- a/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; - -fn main() { - generate_cargo_keys(); - - rerun_if_git_head_changed(); -} diff --git a/cli/Cargo.toml b/cli/Cargo.toml deleted file mode 100644 index b2a9bae55..000000000 --- a/cli/Cargo.toml +++ /dev/null @@ -1,43 +0,0 @@ -[package] -name = "cere-cli" -version = "4.8.7" -edition = "2021" - -[package.metadata.wasm-pack.profile.release] -# `wasm-opt` has some problems on Linux, see -# https://github.com/rustwasm/wasm-pack/issues/781 etc. -wasm-opt = false - -[lib] -crate-type = ["cdylib", "rlib"] - -[dependencies] -clap = { version = "4.0.15", features = ["derive"], optional = true } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" } -sc-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" } -sc-service = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.38" } -url = "2.4.1" - -# Local -cere-client = { path = "../node/client", optional = true } -cere-service = { path = "../node/service", default-features = false, optional = true } - -[build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } - -[features] -default = ["cli", "cere-native"] -cli = [ - "clap", - "sc-cli", - "sc-service", - "frame-benchmarking-cli", - "try-runtime-cli", - "cere-client", -] -runtime-benchmarks = ["cere-service/runtime-benchmarks"] -try-runtime = ["cere-service/try-runtime"] - -cere-native = ["cere-service/cere-native"] -cere-dev-native = ["cere-service/cere-dev-native"] diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml new file mode 100644 index 000000000..b6b286d67 --- /dev/null +++ b/node/cli/Cargo.toml @@ -0,0 +1,50 @@ +[package] +name = "cere-cli" +version = "4.8.8" +edition = "2021" + +[package.metadata.wasm-pack.profile.release] +# `wasm-opt` has some problems on Linux, see +# https://github.com/rustwasm/wasm-pack/issues/781 etc. +wasm-opt = false + +[lib] +crate-type = ["cdylib", "rlib"] + +[[bin]] +name = "cere" +path = "src/main.rs" + +[dependencies] +# 3rd-party dependencies +clap = { workspace = true, optional = true } +url = { workspace = true } + +# Substrate dependencies +frame-benchmarking-cli = { workspace = true, optional = true } +sc-cli = { workspace = true, optional = true } +sc-service = { workspace = true, optional = true } +try-runtime-cli = { workspace = true, optional = true } + +# Local +cere-client = { workspace = true, optional = true } +cere-service = { workspace = true, optional = true } + +[build-dependencies] +substrate-build-script-utils = { workspace = true } + +[features] +default = ["cli", "cere-dev-native"] +cli = [ + "clap", + "sc-cli", + "sc-service", + "frame-benchmarking-cli", + "try-runtime-cli", + "cere-client", +] +runtime-benchmarks = ["cere-service/runtime-benchmarks"] +try-runtime = ["cere-service/try-runtime"] + +cere-native = ["cere-service/cere-native"] +cere-dev-native = ["cere-service/cere-dev-native"] diff --git a/cli/build.rs b/node/cli/build.rs similarity index 100% rename from cli/build.rs rename to node/cli/build.rs diff --git a/cli/src/cli.rs b/node/cli/src/cli.rs similarity index 100% rename from cli/src/cli.rs rename to node/cli/src/cli.rs diff --git a/cli/src/command.rs b/node/cli/src/command.rs similarity index 99% rename from cli/src/command.rs rename to node/cli/src/command.rs index e327ff1df..6838dd6c8 100644 --- a/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -176,9 +176,9 @@ pub fn run() -> sc_cli::Result<()> { #[cfg(not(feature = "cere-native"))] #[allow(unreachable_code)] - Error::Service(ServiceError::Other( + Err(Error::Service(ServiceError::Other( "No runtime feature (cere-native, cere-dev-native) is enabled".to_string(), - )) + ))) }, BenchmarkCmd::Block(cmd) => runner.sync_run(|config| { let (client, _, _, _) = cere_service::new_chain_ops(&config)?; diff --git a/cli/src/lib.rs b/node/cli/src/lib.rs similarity index 100% rename from cli/src/lib.rs rename to node/cli/src/lib.rs diff --git a/src/main.rs b/node/cli/src/main.rs similarity index 100% rename from src/main.rs rename to node/cli/src/main.rs diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index 633de43bd..3961a54a5 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -1,38 +1,40 @@ [package] name = "cere-client" -version = "4.8.7" +version = "4.8.8" edition = "2021" [dependencies] -futures = "0.3.21" +# 3rd-party dependencies +futures = { workspace = true } -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -node-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-service = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } -sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# Substrate dependencies +frame-benchmarking = { workspace = true, default-features = true } +frame-system = { workspace = true, default-features = true } +frame-system-rpc-runtime-api = { workspace = true, default-features = true } +node-primitives = { workspace = true, default-features = true } +pallet-transaction-payment = { workspace = true, default-features = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true } +sc-client-api = { workspace = true, default-features = true } +sc-executor = { workspace = true, default-features = true } +sc-service = { workspace = true, default-features = true } +sp-api = { workspace = true, default-features = true } +sp-authority-discovery = { workspace = true, default-features = true } +sp-block-builder = { workspace = true, default-features = true } +sp-blockchain = { workspace = true, default-features = true } +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-offchain = { workspace = true, default-features = true } +sp-runtime = { workspace = true, default-features = true } +sp-session = { workspace = true, default-features = true } +sp-storage = { workspace = true, default-features = true } +sp-timestamp = { workspace = true, default-features = true } +sp-transaction-pool = { workspace = true, default-features = true } # Local -cere-dev-runtime = { path = "../../runtime/cere-dev", optional = true } -cere-runtime = { path = "../../runtime/cere", optional = true } +cere-dev-runtime = { workspace = true, optional = true } +cere-runtime = { workspace = true, optional = true } [features] default = ["cere"] diff --git a/node/client/src/lib.rs b/node/client/src/lib.rs index 25dd12951..6cdfd4131 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -1,7 +1,9 @@ use std::sync::Arc; pub use node_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Header, Index, Signature}; -use sc_client_api::{AuxStore, Backend as BackendT, BlockchainEvents, KeyIterator, UsageProvider}; +use sc_client_api::{ + AuxStore, Backend as BackendT, BlockchainEvents, KeysIter, PairsIter, UsageProvider, +}; pub use sc_executor::NativeElseWasmExecutor; use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; @@ -276,20 +278,6 @@ impl sc_client_api::StorageProvider for Client { } } - fn storage_keys( - &self, - hash: ::Hash, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { - with_client! { - self, - client, - { - client.storage_keys(hash, key_prefix) - } - } - } - fn storage_hash( &self, hash: ::Hash, @@ -307,30 +295,33 @@ impl sc_client_api::StorageProvider for Client { fn storage_pairs( &self, hash: ::Hash, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { + key_prefix: Option<&StorageKey>, + start_key: Option<&StorageKey>, + ) -> sp_blockchain::Result< + PairsIter<>::State, Block>, + > { with_client! { self, client, { - client.storage_pairs(hash, key_prefix) + client.storage_pairs(hash, key_prefix, start_key) } } } - fn storage_keys_iter( + fn storage_keys( &self, hash: ::Hash, prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, ) -> sp_blockchain::Result< - KeyIterator<>::State, Block>, + KeysIter<>::State, Block>, > { with_client! { self, client, { - client.storage_keys_iter(hash, prefix, start_key) + client.storage_keys(hash, prefix, start_key) } } } @@ -351,34 +342,19 @@ impl sc_client_api::StorageProvider for Client { } fn child_storage_keys( - &self, - hash: ::Hash, - child_info: &ChildInfo, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { - with_client! { - self, - client, - { - client.child_storage_keys(hash, child_info, key_prefix) - } - } - } - - fn child_storage_keys_iter( &self, hash: ::Hash, child_info: ChildInfo, prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, ) -> sp_blockchain::Result< - KeyIterator<>::State, Block>, + KeysIter<>::State, Block>, > { with_client! { self, client, { - client.child_storage_keys_iter(hash, child_info, prefix, start_key) + client.child_storage_keys(hash, child_info, prefix, start_key) } } } @@ -498,7 +474,7 @@ pub trait RuntimeApiCollection: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::ApiExt + sp_consensus_babe::BabeApi - + sp_finality_grandpa::GrandpaApi + + sp_consensus_grandpa::GrandpaApi + sp_block_builder::BlockBuilder + frame_system_rpc_runtime_api::AccountNonceApi + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi @@ -516,7 +492,7 @@ where Api: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::ApiExt + sp_consensus_babe::BabeApi - + sp_finality_grandpa::GrandpaApi + + sp_consensus_grandpa::GrandpaApi + sp_block_builder::BlockBuilder + frame_system_rpc_runtime_api::AccountNonceApi + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi diff --git a/node/rpc/Cargo.toml b/node/rpc/Cargo.toml new file mode 100644 index 000000000..0eee61e41 --- /dev/null +++ b/node/rpc/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "cere-rpc" +version = "4.8.8" +edition = "2021" + +[dependencies] +# 3rd-party dependencies +jsonrpsee = { workspace = true, default-features = true } + +# Substrate dependencies +node-primitives = { workspace = true, default-features = true } +pallet-transaction-payment-rpc = { workspace = true, default-features = true } +sc-chain-spec = { workspace = true, default-features = true } +sc-client-api = { workspace = true, default-features = true } +sc-consensus-babe = { workspace = true, default-features = true } +sc-consensus-babe-rpc = { workspace = true, default-features = true } +sc-consensus-epochs = { workspace = true, default-features = true } +sc-consensus-grandpa = { workspace = true, default-features = true } +sc-consensus-grandpa-rpc = { workspace = true, default-features = true } +sc-rpc = { workspace = true, default-features = true } +sc-rpc-api = { workspace = true, default-features = true } +sc-sync-state-rpc = { workspace = true, default-features = true } +sc-transaction-pool-api = { workspace = true, default-features = true } +sp-api = { workspace = true, default-features = true } +sp-block-builder = { workspace = true, default-features = true } +sp-blockchain = { workspace = true, default-features = true } +sp-consensus = { workspace = true, default-features = true } +sp-consensus-babe = { workspace = true, default-features = true } +sp-keystore = { workspace = true, default-features = true } +sp-runtime = { workspace = true, default-features = true } +substrate-frame-rpc-system = { workspace = true, default-features = true } +substrate-state-trie-migration-rpc = { workspace = true, default-features = true } diff --git a/rpc/src/lib.rs b/node/rpc/src/lib.rs similarity index 97% rename from rpc/src/lib.rs rename to node/rpc/src/lib.rs index 75daa9a88..2f0406fd3 100644 --- a/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -12,10 +12,10 @@ use node_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index}; use sc_client_api::AuxStore; use sc_consensus_babe::{BabeConfiguration, Epoch}; use sc_consensus_epochs::SharedEpochChanges; -use sc_finality_grandpa::{ +use sc_consensus_grandpa::{ FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, }; -use sc_finality_grandpa_rpc::Grandpa; +use sc_consensus_grandpa_rpc::Grandpa; use sc_rpc::SubscriptionTaskExecutor; pub use sc_rpc_api::DenyUnsafe; use sc_transaction_pool_api::TransactionPool; @@ -93,7 +93,7 @@ where { use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; - use sc_finality_grandpa_rpc::GrandpaApiServer; + use sc_consensus_grandpa_rpc::GrandpaApiServer; use sc_rpc::dev::{Dev, DevApiServer}; use sc_sync_state_rpc::{SyncState, SyncStateApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index e5a103f5a..9c6c21baa 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -1,56 +1,58 @@ [package] name = "cere-service" -version = "4.8.7" +version = "4.8.8" edition = "2021" [dependencies] -futures = "0.3.21" -jsonrpsee = { version = "0.16.2", features = ["server"] } -rand = "0.8" -serde = { version = "1.0.136", features = ["derive"] } +# 3rd-party dependencies +futures = { workspace = true } +jsonrpsee = { workspace = true } +rand = { workspace = true, default-features = true } +serde = { workspace = true, default-features = true } -node-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-consensus-slots = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-executor = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-telemetry = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } +# Substrate dependencies +node-primitives = { workspace = true } +pallet-im-online = { workspace = true } +sc-authority-discovery = { workspace = true } +sc-basic-authorship = { workspace = true } +sc-chain-spec = { workspace = true } +sc-client-api = { workspace = true } +sc-consensus = { workspace = true } +sc-consensus-babe = { workspace = true } +sc-consensus-grandpa = { workspace = true } +sc-consensus-slots = { workspace = true } +sc-executor = { workspace = true } +sc-network = { workspace = true } +sc-network-common = { workspace = true } +sc-rpc = { workspace = true } +sc-service = { workspace = true } +sc-sync-state-rpc = { workspace = true } +sc-sysinfo = { workspace = true } +sc-telemetry = { workspace = true } +sc-transaction-pool = { workspace = true } +sp-api = { workspace = true } +sp-authority-discovery = { workspace = true } +sp-blockchain = { workspace = true } +sp-consensus-babe = { workspace = true } +sp-consensus-grandpa = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-timestamp = { workspace = true } +sp-transaction-storage-proof = { workspace = true } +sp-trie = { workspace = true } -# Local -cere-client = { path = "../client", default-features = false, optional = true } -cere-dev-runtime-constants = { path = "../../runtime/cere-dev/constants", optional = true } -cere-rpc = { path = "../../rpc" } +# Cere dependencies +cere-client = { workspace = true, default-features = false, optional = true } +cere-rpc = { workspace = true } +cere-runtime-common = { workspace = true, optional = true } -cere-dev-runtime = { path = "../../runtime/cere-dev", optional = true } -cere-runtime = { path = "../../runtime/cere", optional = true } +cere-dev-runtime = { workspace = true, optional = true } +cere-runtime = { workspace = true, optional = true } [features] default = ["cere-native"] cere-native = ["cere-runtime", "cere-client/cere"] -cere-dev-native = ["cere-dev-runtime", "cere-dev-runtime-constants", "cere-client/cere-dev"] +cere-dev-native = ["cere-dev-runtime", "cere-runtime-common", "cere-client/cere-dev"] runtime-benchmarks = [ "cere-runtime/runtime-benchmarks", diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index f428baa4e..0c7aa1156 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -1,9 +1,9 @@ #[cfg(feature = "cere-dev-native")] use cere_dev_runtime as cere_dev; -#[cfg(feature = "cere-dev-native")] -use cere_dev_runtime_constants::currency::DOLLARS as TEST_UNITS; #[cfg(feature = "cere-native")] use cere_runtime as cere; +#[cfg(feature = "cere-dev-native")] +use cere_runtime_common::constants::currency::DOLLARS as TEST_UNITS; use jsonrpsee::core::__reexports::serde_json; pub use node_primitives::{AccountId, Balance, Block, Signature}; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; @@ -12,8 +12,8 @@ use sc_service::ChainType; use serde::{Deserialize, Serialize}; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; +use sp_consensus_grandpa::AuthorityId as GrandpaId; use sp_core::{sr25519, Pair, Public}; -use sp_finality_grandpa::AuthorityId as GrandpaId; use sp_runtime::{ traits::{IdentifyAccount, Verify}, Perbill, diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 80b9045c2..41653a1ec 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -2,6 +2,9 @@ use std::sync::Arc; +#[cfg(not(any(feature = "cere-native", feature = "cere-dev-native",)))] +compile_error!("at least one runtime feature must be enabled"); + #[cfg(feature = "cere-dev-native")] pub use cere_dev_runtime; #[cfg(feature = "cere-native")] @@ -10,7 +13,7 @@ use futures::prelude::*; use sc_client_api::BlockBackend; use sc_consensus_babe::{self, SlotProportion}; pub use sc_executor::NativeExecutionDispatch; -use sc_network::Event; +use sc_network::{Event, NetworkEventStream}; use sc_service::{ error::Error as ServiceError, Configuration, KeystoreContainer, RpcHandlers, TaskManager, }; @@ -18,24 +21,28 @@ use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; use sp_trie::PrefixedMemoryDB; 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, CereDevExecutorDispatch, CereExecutorDispatch, Client, ClientHandle, - ExecuteWithClient, FullBackend, FullClient, RuntimeApiCollection, + AbstractClient, Client, ClientHandle, ExecuteWithClient, FullBackend, FullClient, + RuntimeApiCollection, }; pub use chain_spec::{CereChainSpec, CereDevChainSpec}; pub use node_primitives::{Block, BlockNumber}; pub use sc_executor::NativeElseWasmExecutor; -use sc_network_common::service::NetworkEventStream; pub use sc_service::ChainSpec; pub use sp_api::ConstructRuntimeApi; type FullSelectChain = sc_consensus::LongestChain; -type FullGrandpaBlockImport = sc_finality_grandpa::GrandpaBlockImport< - FullBackend, - Block, - FullClient, - FullSelectChain, ->; +type FullGrandpaBlockImport = + sc_consensus_grandpa::GrandpaBlockImport< + FullBackend, + Block, + FullClient, + FullSelectChain, + >; struct Basics where @@ -126,14 +133,14 @@ fn new_partial( FullClient, FullGrandpaBlockImport, >, - sc_finality_grandpa::LinkHalf< + sc_consensus_grandpa::LinkHalf< Block, FullClient, FullSelectChain, >, sc_consensus_babe::BabeLink, ), - sc_finality_grandpa::SharedVoterState, + sc_consensus_grandpa::SharedVoterState, Option, ), >, @@ -162,7 +169,7 @@ where client.clone(), ); - let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( + let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), &client, select_chain.clone(), @@ -206,10 +213,10 @@ where let justification_stream = grandpa_link.justification_stream(); let shared_authority_set = grandpa_link.shared_authority_set().clone(); - let shared_voter_state = sc_finality_grandpa::SharedVoterState::empty(); + let shared_voter_state = sc_consensus_grandpa::SharedVoterState::empty(); let shared_voter_state2 = shared_voter_state.clone(); - let finality_proof_provider = sc_finality_grandpa::FinalityProofProvider::new_for_service( + let finality_proof_provider = sc_consensus_grandpa::FinalityProofProvider::new_for_service( backend.clone(), Some(shared_authority_set.clone()), ); @@ -333,6 +340,8 @@ where RuntimeApiCollection>, ExecutorDispatch: NativeExecutionDispatch + 'static, { + use sc_network_common::sync::warp::WarpSyncParams; + let hwbench = if !disable_hardware_benchmarks { config.database.path().map(|database_path| { let _ = std::fs::create_dir_all(database_path); @@ -357,7 +366,7 @@ where let shared_voter_state = rpc_setup; let auth_disc_publish_non_global_ips = config.network.allow_non_globals_in_dht; - let grandpa_protocol_name = sc_finality_grandpa::protocol_standard_name( + let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), &config.chain_spec, ); @@ -365,14 +374,15 @@ where config .network .extra_sets - .push(sc_finality_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); - let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( + .push(sc_consensus_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); + + let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( backend.clone(), import_setup.1.shared_authority_set().clone(), Vec::default(), )); - let (network, system_rpc_tx, tx_handler_controller, network_starter) = + let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, client: client.clone(), @@ -380,7 +390,7 @@ where spawn_handle: task_manager.spawn_handle(), import_queue, block_announce_validator_builder: None, - warp_sync: Some(warp_sync), + warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)), })?; let role = config.role.clone(); @@ -403,6 +413,7 @@ where system_rpc_tx, tx_handler_controller, telemetry: telemetry.as_mut(), + sync_service: sync_service.clone(), })?; if let Some(hwbench) = hwbench { @@ -439,8 +450,8 @@ where select_chain, env: proposer, block_import, - sync_oracle: network.clone(), - justification_sync_link: network.clone(), + sync_oracle: sync_service.clone(), + justification_sync_link: sync_service.clone(), create_inherent_data_providers: move |parent, ()| { let client_clone = client_clone.clone(); async move { @@ -513,7 +524,7 @@ where let keystore = if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None }; - let config = sc_finality_grandpa::Config { + let config = sc_consensus_grandpa::Config { // FIXME #1578 make this available through chainspec gossip_duration: std::time::Duration::from_millis(333), justification_period: 512, @@ -532,12 +543,13 @@ where // and vote data availability than the observer. The observer has not // been tested extensively yet and having most nodes in a network run it // could lead to finality stalls. - let grandpa_config = sc_finality_grandpa::GrandpaParams { + let grandpa_config = sc_consensus_grandpa::GrandpaParams { config, link: grandpa_link, + sync: Arc::new(sync_service), network: network.clone(), telemetry: telemetry.as_ref().map(|x| x.handle()), - voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), + voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(), prometheus_registry, shared_voter_state, }; @@ -547,7 +559,7 @@ where task_manager.spawn_essential_handle().spawn_blocking( "grandpa-voter", None, - sc_finality_grandpa::run_grandpa_voter(grandpa_config)?, + sc_consensus_grandpa::run_grandpa_voter(grandpa_config)?, ); } @@ -572,7 +584,7 @@ impl ExecuteWithClient for RevertConsensus { Client: AbstractClient + 'static, { sc_consensus_babe::revert(client.clone(), self.backend, self.blocks)?; - sc_finality_grandpa::revert(client, self.blocks)?; + sc_consensus_grandpa::revert(client, self.blocks)?; Ok(()) } } diff --git a/pallets/chainbridge/Cargo.toml b/pallets/chainbridge/Cargo.toml index 97e0cd647..78ae61038 100644 --- a/pallets/chainbridge/Cargo.toml +++ b/pallets/chainbridge/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-chainbridge" -version = "4.8.7" +version = "4.8.8" authors = ["Parity Technologies "] edition = "2021" homepage = "https://substrate.io" @@ -13,15 +13,18 @@ description = "" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# 3rd-party dependencies +codec = { workspace = true } +scale-info = { workspace = true } + +# Substrate dependencies +frame-support = { workspace = true } +frame-system = { workspace = true } +pallet-balances = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } [features] default = ["std"] diff --git a/pallets/chainbridge/src/lib.rs b/pallets/chainbridge/src/lib.rs index b5bf242ef..161d7cfd4 100644 --- a/pallets/chainbridge/src/lib.rs +++ b/pallets/chainbridge/src/lib.rs @@ -105,7 +105,6 @@ pub mod pallet { use super::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] pub struct Pallet(_); @@ -361,7 +360,7 @@ pub mod pallet { /// - weight of proposed call, regardless of whether execution is performed /// # #[pallet::call_index(6)] - #[pallet::weight(call.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64))] + #[pallet::weight(call.get_dispatch_info().weight + Weight::from_parts(195_000_000_u64, 0))] pub fn acknowledge_proposal( origin: OriginFor, nonce: DepositNonce, @@ -408,7 +407,7 @@ pub mod pallet { /// - weight of proposed call, regardless of whether execution is performed /// # #[pallet::call_index(8)] - #[pallet::weight(prop.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64))] + #[pallet::weight(prop.get_dispatch_info().weight + Weight::from_parts(195_000_000_u64, 0))] pub fn eval_vote_state( origin: OriginFor, nonce: DepositNonce, diff --git a/pallets/chainbridge/src/mock.rs b/pallets/chainbridge/src/mock.rs index 6dbdb2d64..0c0407dac 100644 --- a/pallets/chainbridge/src/mock.rs +++ b/pallets/chainbridge/src/mock.rs @@ -14,7 +14,7 @@ use crate::{self as bridge, *}; parameter_types! { pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); + pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const MaxLocks: u32 = 50; diff --git a/pallets/ddc-clusters/Cargo.toml b/pallets/ddc-clusters/Cargo.toml index 06e93e83c..6f5c2ccd8 100644 --- a/pallets/ddc-clusters/Cargo.toml +++ b/pallets/ddc-clusters/Cargo.toml @@ -1,33 +1,37 @@ [package] name = "pallet-ddc-clusters" -version = "4.8.7" +version = "4.8.8" edition = "2021" [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.7", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.7", default-features = false, path = "../../traits" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -hex-literal = "^0.3.1" -pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-ddc-nodes = { version = "4.7.0", default-features = false, path = "../ddc-nodes" } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.136", default-features = false, features = ["derive"], optional = true } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# 3rd-party depdencies +codec = { workspace = true } +hex-literal = { workspace = true } +serde = { workspace = true, optional = true } + +# Substrate dependencies +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +pallet-contracts = { workspace = true } +scale-info = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +# Cere dependencies +ddc-primitives = { workspace = true } +pallet-ddc-nodes = { workspace = true } [dev-dependencies] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -hex-literal = "^0.3.1" -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +frame-benchmarking = { workspace = true, default-features = true } +hex-literal = { workspace = true, default-features = true } +pallet-balances = { workspace = true, default-features = true } +pallet-insecure-randomness-collective-flip = { workspace = true, default-features = true } +pallet-timestamp = { workspace = true, default-features = true } +sp-io = { workspace = true, default-features = true } +sp-tracing = { workspace = true, default-features = true } +substrate-test-utils = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/ddc-clusters/src/lib.rs b/pallets/ddc-clusters/src/lib.rs index 7c0eefc72..99f546eaa 100644 --- a/pallets/ddc-clusters/src/lib.rs +++ b/pallets/ddc-clusters/src/lib.rs @@ -28,13 +28,13 @@ pub(crate) mod mock; mod tests; use ddc_primitives::{ + traits::{ + cluster::{ClusterCreator, ClusterVisitor, ClusterVisitorError}, + staking::{StakerCreator, StakingVisitor, StakingVisitorError}, + }, ClusterBondingParams, ClusterFeesParams, ClusterGovParams, ClusterId, ClusterParams, ClusterPricingParams, NodePubKey, NodeType, }; -use ddc_traits::{ - cluster::{ClusterCreator, ClusterVisitor, ClusterVisitorError}, - staking::{StakerCreator, StakingVisitor, StakingVisitorError}, -}; use frame_support::{ assert_ok, pallet_prelude::*, @@ -61,12 +61,16 @@ pub type BalanceOf = #[frame_support::pallet] pub mod pallet { - use ddc_traits::cluster::{ClusterManager, ClusterManagerError}; + use ddc_primitives::traits::cluster::{ClusterManager, ClusterManagerError}; use super::*; + /// The current storage version. + const STORAGE_VERSION: frame_support::traits::StorageVersion = + frame_support::traits::StorageVersion::new(0); + #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] + #[pallet::storage_version(STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/ddc-clusters/src/mock.rs b/pallets/ddc-clusters/src/mock.rs index e85ac170b..bf2f5f4b0 100644 --- a/pallets/ddc-clusters/src/mock.rs +++ b/pallets/ddc-clusters/src/mock.rs @@ -2,8 +2,10 @@ #![allow(dead_code)] -use ddc_primitives::{ClusterId, NodePubKey}; -use ddc_traits::staking::{StakerCreator, StakingVisitor, StakingVisitorError}; +use ddc_primitives::{ + traits::staking::{StakerCreator, StakingVisitor, StakingVisitorError}, + ClusterId, NodePubKey, +}; use frame_support::{ construct_runtime, parameter_types, traits::{ConstBool, ConstU32, ConstU64, Everything, Nothing}, @@ -45,7 +47,7 @@ construct_runtime!( Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, DdcNodes: pallet_ddc_nodes::{Pallet, Call, Storage, Event}, DdcClusters: pallet_ddc_clusters::{Pallet, Call, Storage, Event}, - Randomness: pallet_randomness_collective_flip::{Pallet, Storage}, + Randomness: pallet_insecure_randomness_collective_flip::{Pallet, Storage}, } ); @@ -115,7 +117,7 @@ where type OverarchingCall = RuntimeCall; type Extrinsic = Extrinsic; } -impl pallet_randomness_collective_flip::Config for Test {} +impl pallet_insecure_randomness_collective_flip::Config for Test {} impl CreateSignedTransaction for Test where diff --git a/pallets/ddc-clusters/src/node_provider_auth.rs b/pallets/ddc-clusters/src/node_provider_auth.rs index ae709d434..a8b6ff237 100644 --- a/pallets/ddc-clusters/src/node_provider_auth.rs +++ b/pallets/ddc-clusters/src/node_provider_auth.rs @@ -20,7 +20,7 @@ const INK_SELECTOR_IS_AUTHORIZED: [u8; 4] = [0x96, 0xb0, 0x45, 0x3e]; /// The maximum amount of weight that the cluster extension contract call is allowed to consume. /// See also https://github.com/paritytech/substrate/blob/a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d/frame/contracts/rpc/src/lib.rs#L63. const EXTENSION_CALL_GAS_LIMIT: Weight = - Weight::from_ref_time(5_000_000_000_000).set_proof_size(u64::MAX); + Weight::from_parts(5_000_000_000_000, 0).set_proof_size(u64::MAX); pub struct NodeProviderAuthContract { pub contract_id: T::AccountId, diff --git a/pallets/ddc-clusters/src/tests.rs b/pallets/ddc-clusters/src/tests.rs index 5f7a0c8d5..baca5e410 100644 --- a/pallets/ddc-clusters/src/tests.rs +++ b/pallets/ddc-clusters/src/tests.rs @@ -1,10 +1,10 @@ //! Tests for the module. use ddc_primitives::{ - ClusterBondingParams, ClusterFeesParams, ClusterId, ClusterParams, ClusterPricingParams, - NodeParams, NodePubKey, StorageNodeMode, StorageNodeParams, + traits::cluster::ClusterManager, ClusterBondingParams, ClusterFeesParams, ClusterId, + ClusterParams, ClusterPricingParams, NodeParams, NodePubKey, StorageNodeMode, + StorageNodeParams, }; -use ddc_traits::cluster::ClusterManager; use frame_support::{assert_noop, assert_ok, error::BadOrigin}; use frame_system::Config; use hex_literal::hex; @@ -303,7 +303,7 @@ fn add_and_delete_node_works() { // Deploy the contract. const GAS_LIMIT: frame_support::weights::Weight = - Weight::from_ref_time(100_000_000_000).set_proof_size(u64::MAX); + Weight::from_parts(100_000_000_000, 0).set_proof_size(u64::MAX); const ENDOWMENT: Balance = 0; Contracts::instantiate_with_code( RuntimeOrigin::signed(alice.clone()), diff --git a/pallets/ddc-clusters/src/weights.rs b/pallets/ddc-clusters/src/weights.rs index af2bb5559..a7f94f2e8 100644 --- a/pallets/ddc-clusters/src/weights.rs +++ b/pallets/ddc-clusters/src/weights.rs @@ -40,7 +40,7 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcClusters Clusters (r:1 w:1) // Storage: DdcClusters ClustersGovParams (r:0 w:1) fn create_cluster() -> Weight { - Weight::from_ref_time(15_000_000_u64) + Weight::from_parts(15_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -59,7 +59,7 @@ impl WeightInfo for SubstrateWeight { // Storage: unknown [0x89eb0d6a8a691dae2cd15ed0369931ce0a949ecafa5c3f93f8121833646e15c3] (r:1 w:0) // Storage: unknown [0xc3ad1d87683b6ac25f2e809346840d7a7ed0c05653ee606dba68aba3bdb5d957] (r:1 w:0) fn add_node() -> Weight { - Weight::from_ref_time(599_000_000_u64) + Weight::from_parts(599_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -67,20 +67,20 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcNodes StorageNodes (r:1 w:1) // Storage: DdcClusters ClustersNodes (r:0 w:1) fn remove_node() -> Weight { - Weight::from_ref_time(24_000_000_u64) + Weight::from_parts(24_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: DdcClusters Clusters (r:1 w:1) fn set_cluster_params() -> Weight { - Weight::from_ref_time(16_000_000_u64) + Weight::from_parts(16_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: DdcClusters Clusters (r:1 w:0) // Storage: DdcClusters ClustersGovParams (r:0 w:1) fn set_cluster_gov_params() -> Weight { - Weight::from_ref_time(17_000_000_u64) + Weight::from_parts(17_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -91,7 +91,7 @@ impl WeightInfo for () { // Storage: DdcClusters Clusters (r:1 w:1) // Storage: DdcClusters ClustersGovParams (r:0 w:1) fn create_cluster() -> Weight { - Weight::from_ref_time(15_000_000_u64) + Weight::from_parts(15_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -110,7 +110,7 @@ impl WeightInfo for () { // Storage: unknown [0x89eb0d6a8a691dae2cd15ed0369931ce0a949ecafa5c3f93f8121833646e15c3] (r:1 w:0) // Storage: unknown [0xc3ad1d87683b6ac25f2e809346840d7a7ed0c05653ee606dba68aba3bdb5d957] (r:1 w:0) fn add_node() -> Weight { - Weight::from_ref_time(599_000_000_u64) + Weight::from_parts(599_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -118,20 +118,20 @@ impl WeightInfo for () { // Storage: DdcNodes StorageNodes (r:1 w:1) // Storage: DdcClusters ClustersNodes (r:0 w:1) fn remove_node() -> Weight { - Weight::from_ref_time(24_000_000_u64) + Weight::from_parts(24_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: DdcClusters Clusters (r:1 w:1) fn set_cluster_params() -> Weight { - Weight::from_ref_time(16_000_000_u64) + Weight::from_parts(16_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: DdcClusters Clusters (r:1 w:0) // Storage: DdcClusters ClustersGovParams (r:0 w:1) fn set_cluster_gov_params() -> Weight { - Weight::from_ref_time(17_000_000_u64) + Weight::from_parts(17_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/ddc-customers/Cargo.toml b/pallets/ddc-customers/Cargo.toml index 73e066922..d143847d1 100644 --- a/pallets/ddc-customers/Cargo.toml +++ b/pallets/ddc-customers/Cargo.toml @@ -1,35 +1,34 @@ [package] name = "pallet-ddc-customers" -version = "4.8.7" +version = "4.8.8" edition = "2021" [dependencies] -# Substrate -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# 3rd-party dependencies +codec = { workspace = true } +log = { workspace = true } +rand_chacha = { workspace = true, optional = true } +scale-info = { workspace = true } -# 3rd Party -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -log = { version = "0.4.17", default-features = false } -rand_chacha = { version = "0.2", default-features = false, optional = true } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +# Substrate dependencies +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } -# Cere -ddc-primitives = { version = "4.8.7", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.7", default-features = false, path = "../../traits" } +# Cere dependencies +ddc-primitives = { workspace = true } [dev-dependencies] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +frame-benchmarking = { workspace = true, default-features = true } +pallet-balances = { workspace = true, default-features = true } +pallet-timestamp = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = true } +sp-io = { workspace = true, default-features = true } +sp-tracing = { workspace = true, default-features = true } +substrate-test-utils = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/ddc-customers/src/lib.rs b/pallets/ddc-customers/src/lib.rs index 3bc58fe7c..382b2ecf1 100644 --- a/pallets/ddc-customers/src/lib.rs +++ b/pallets/ddc-customers/src/lib.rs @@ -13,10 +13,12 @@ pub(crate) mod mock; mod tests; use codec::{Decode, Encode}; -use ddc_primitives::{BucketId, ClusterId}; -use ddc_traits::{ - cluster::{ClusterCreator, ClusterVisitor}, - customer::{CustomerCharger, CustomerDepositor}, +use ddc_primitives::{ + traits::{ + cluster::{ClusterCreator, ClusterVisitor}, + customer::{CustomerCharger, CustomerDepositor}, + }, + BucketId, ClusterId, }; use frame_support::{ parameter_types, @@ -126,8 +128,12 @@ pub mod pallet { use super::*; + /// The current storage version. + const STORAGE_VERSION: frame_support::traits::StorageVersion = + frame_support::traits::StorageVersion::new(0); + #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] + #[pallet::storage_version(STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/ddc-customers/src/mock.rs b/pallets/ddc-customers/src/mock.rs index 7b07b6b06..982a4cf8c 100644 --- a/pallets/ddc-customers/src/mock.rs +++ b/pallets/ddc-customers/src/mock.rs @@ -1,12 +1,12 @@ //! Test utilities use ddc_primitives::{ + traits::cluster::{ + ClusterCreator, ClusterManager, ClusterManagerError, ClusterVisitor, ClusterVisitorError, + }, ClusterBondingParams, ClusterFeesParams, ClusterGovParams, ClusterId, ClusterParams, ClusterPricingParams, NodePubKey, NodeType, }; -use ddc_traits::cluster::{ - ClusterCreator, ClusterManager, ClusterManagerError, ClusterVisitor, ClusterVisitorError, -}; use frame_support::{ construct_runtime, parameter_types, traits::{ConstU32, ConstU64, Everything, GenesisBuild}, diff --git a/pallets/ddc-customers/src/weights.rs b/pallets/ddc-customers/src/weights.rs index 0a3c999dc..29fec5272 100644 --- a/pallets/ddc-customers/src/weights.rs +++ b/pallets/ddc-customers/src/weights.rs @@ -43,47 +43,47 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcClusters Clusters (r:1 w:0) // Storage: DdcCustomers Buckets (r:0 w:1) fn create_bucket() -> Weight { - Weight::from_ref_time(156_518_000_u64) + Weight::from_parts(156_518_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) // Storage: System Account (r:1 w:1) fn deposit() -> Weight { - Weight::from_ref_time(439_562_000_u64) + Weight::from_parts(439_562_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) // Storage: System Account (r:1 w:1) fn deposit_extra() -> Weight { - Weight::from_ref_time(582_699_000_u64) + Weight::from_parts(582_699_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) fn unlock_deposit() -> Weight { - Weight::from_ref_time(208_316_000_u64) + Weight::from_parts(208_316_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) // Storage: System Account (r:1 w:1) fn withdraw_unlocked_deposit_update() -> Weight { - Weight::from_ref_time(451_983_000_u64) + Weight::from_parts(451_983_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) // Storage: System Account (r:1 w:1) fn withdraw_unlocked_deposit_kill() -> Weight { - Weight::from_ref_time(599_908_000_u64) + Weight::from_parts(599_908_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Buckets (r:1 w:1) fn set_bucket_params() -> Weight { - Weight::from_ref_time(155_437_000_u64) + Weight::from_parts(155_437_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -95,48 +95,48 @@ impl WeightInfo for () { // Storage: DdcClusters Clusters (r:1 w:0) // Storage: DdcCustomers Buckets (r:0 w:1) fn create_bucket() -> Weight { - Weight::from_ref_time(156_518_000_u64) + Weight::from_parts(156_518_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) // Storage: System Account (r:1 w:1) fn deposit() -> Weight { - Weight::from_ref_time(439_562_000_u64) + Weight::from_parts(439_562_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) // Storage: System Account (r:1 w:1) fn deposit_extra() -> Weight { - Weight::from_ref_time(582_699_000_u64) + Weight::from_parts(582_699_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) fn unlock_deposit() -> Weight { - Weight::from_ref_time(208_316_000_u64) + Weight::from_parts(208_316_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) // Storage: System Account (r:1 w:1) fn withdraw_unlocked_deposit_update() -> Weight { - Weight::from_ref_time(451_983_000_u64) + Weight::from_parts(451_983_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Ledger (r:1 w:1) // Storage: System Account (r:1 w:1) fn withdraw_unlocked_deposit_kill() -> Weight { - Weight::from_ref_time(599_908_000_u64) + Weight::from_parts(599_908_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: DdcCustomers Buckets (r:1 w:1) fn set_bucket_params() -> Weight { - Weight::from_ref_time(155_437_000_u64) + Weight::from_parts(155_437_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } -} \ No newline at end of file +} diff --git a/pallets/ddc-nodes/Cargo.toml b/pallets/ddc-nodes/Cargo.toml index aa58bd7fd..5a37aae59 100644 --- a/pallets/ddc-nodes/Cargo.toml +++ b/pallets/ddc-nodes/Cargo.toml @@ -1,27 +1,31 @@ [package] name = "pallet-ddc-nodes" -version = "4.8.7" +version = "4.8.8" edition = "2021" [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.7", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.7", default-features = false, path = "../../traits" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.136", default-features = false, features = ["derive"], optional = true } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# 3rd-party dependencies +codec = { workspace = true } +scale-info = { workspace = true } +serde = { workspace = true, optional = true } + +# Substrate dependencies +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +# Cere dependencies +ddc-primitives = { workspace = true } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +pallet-balances = { workspace = true, default-features = true } +pallet-timestamp = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = true } +sp-io = { workspace = true, default-features = true } +sp-tracing = { workspace = true, default-features = true } +substrate-test-utils = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/ddc-nodes/src/lib.rs b/pallets/ddc-nodes/src/lib.rs index 664917bd0..225e9cd04 100644 --- a/pallets/ddc-nodes/src/lib.rs +++ b/pallets/ddc-nodes/src/lib.rs @@ -27,10 +27,12 @@ pub mod benchmarking; #[cfg(any(feature = "runtime-benchmarks", test))] pub mod testing_utils; -use ddc_primitives::{ClusterId, NodeParams, NodePubKey, StorageNodePubKey}; -use ddc_traits::{ - node::{NodeCreator, NodeVisitor, NodeVisitorError}, - staking::StakingVisitor, +use ddc_primitives::{ + traits::{ + node::{NodeCreator, NodeVisitor, NodeVisitorError}, + staking::StakingVisitor, + }, + ClusterId, NodeParams, NodePubKey, StorageNodePubKey, }; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; @@ -48,8 +50,12 @@ pub use crate::{ pub mod pallet { use super::*; + /// The current storage version. + const STORAGE_VERSION: frame_support::traits::StorageVersion = + frame_support::traits::StorageVersion::new(0); + #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] + #[pallet::storage_version(STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/ddc-nodes/src/mock.rs b/pallets/ddc-nodes/src/mock.rs index 8a4be3286..e42ea6ad6 100644 --- a/pallets/ddc-nodes/src/mock.rs +++ b/pallets/ddc-nodes/src/mock.rs @@ -2,7 +2,7 @@ #![allow(dead_code)] -use ddc_traits::staking::{StakingVisitor, StakingVisitorError}; +use ddc_primitives::traits::staking::{StakingVisitor, StakingVisitorError}; use frame_support::{ construct_runtime, parameter_types, traits::{ConstU32, ConstU64, Everything}, diff --git a/pallets/ddc-nodes/src/weights.rs b/pallets/ddc-nodes/src/weights.rs index bc05729ba..b1c3a3228 100644 --- a/pallets/ddc-nodes/src/weights.rs +++ b/pallets/ddc-nodes/src/weights.rs @@ -37,20 +37,20 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: DdcNodes StorageNodes (r:1 w:1) fn create_node() -> Weight { - Weight::from_ref_time(12_000_000_u64) + Weight::from_parts(12_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: DdcNodes StorageNodes (r:1 w:1) // Storage: DdcStaking Nodes (r:1 w:0) fn delete_node() -> Weight { - Weight::from_ref_time(16_000_000_u64) + Weight::from_parts(16_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: DdcNodes StorageNodes (r:1 w:1) fn set_node_params() -> Weight { - Weight::from_ref_time(15_000_000_u64) + Weight::from_parts(15_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -60,20 +60,20 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: DdcNodes StorageNodes (r:1 w:1) fn create_node() -> Weight { - Weight::from_ref_time(12_000_000_u64) + Weight::from_parts(12_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: DdcNodes StorageNodes (r:1 w:1) // Storage: DdcStaking Nodes (r:1 w:0) fn delete_node() -> Weight { - Weight::from_ref_time(16_000_000_u64) + Weight::from_parts(16_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: DdcNodes StorageNodes (r:1 w:1) fn set_node_params() -> Weight { - Weight::from_ref_time(15_000_000_u64) + Weight::from_parts(15_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/ddc-payouts/Cargo.toml b/pallets/ddc-payouts/Cargo.toml index b651f3ef2..aba3d5b3a 100644 --- a/pallets/ddc-payouts/Cargo.toml +++ b/pallets/ddc-payouts/Cargo.toml @@ -1,31 +1,35 @@ [package] name = "pallet-ddc-payouts" -version = "4.8.7" +version = "4.8.8" edition = "2021" [dependencies] -byte-unit = { version = "4.0.19", default-features = false, features = ["u128"] } -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.7", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.7", default-features = false, path = "../../traits" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# 3rd-party dependencies +byte-unit = { workspace = true } +codec = { workspace = true } +log = { workspace = true } +scale-info = { workspace = true } + +# Substrate dependencies +frame-benchmarking = { workspace = true, optional = true } +frame-election-provider-support = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-staking = { workspace = true } +sp-std = { workspace = true } + +# Cere dependencies +ddc-primitives = { workspace = true } [dev-dependencies] -chrono = "0.4.31" -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +chrono = { workspace = true, default-features = true } +pallet-balances = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = true } +sp-tracing = { workspace = true, default-features = true } +substrate-test-utils = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/ddc-payouts/src/lib.rs b/pallets/ddc-payouts/src/lib.rs index cab9c0a98..89f0e0517 100644 --- a/pallets/ddc-payouts/src/lib.rs +++ b/pallets/ddc-payouts/src/lib.rs @@ -25,13 +25,15 @@ pub(crate) mod mock; #[cfg(test)] mod tests; -use ddc_primitives::{ClusterId, DdcEra, MILLICENTS}; -use ddc_traits::{ - cluster::{ClusterCreator as ClusterCreatorType, ClusterVisitor as ClusterVisitorType}, - customer::{ - CustomerCharger as CustomerChargerType, CustomerDepositor as CustomerDepositorType, +use ddc_primitives::{ + traits::{ + cluster::{ClusterCreator as ClusterCreatorType, ClusterVisitor as ClusterVisitorType}, + customer::{ + CustomerCharger as CustomerChargerType, CustomerDepositor as CustomerDepositorType, + }, + pallet::PalletVisitor as PalletVisitorType, }, - pallet::PalletVisitor as PalletVisitorType, + ClusterId, DdcEra, MILLICENTS, }; use frame_election_provider_support::SortedListProvider; use frame_support::{ @@ -115,8 +117,12 @@ pub mod pallet { use super::*; + /// The current storage version. + const STORAGE_VERSION: frame_support::traits::StorageVersion = + frame_support::traits::StorageVersion::new(0); + #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] + #[pallet::storage_version(STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); @@ -195,6 +201,7 @@ pub mod pallet { Rewarded { cluster_id: ClusterId, era: DdcEra, + batch_index: BatchIndex, node_provider_id: T::AccountId, rewarded: u128, expected_to_reward: u128, @@ -202,6 +209,7 @@ pub mod pallet { NotDistributedReward { cluster_id: ClusterId, era: DdcEra, + batch_index: BatchIndex, node_provider_id: T::AccountId, expected_reward: u128, distributed_reward: BalanceOf, @@ -728,11 +736,13 @@ pub mod pallet { &updated_billing_report.vault, ) - ::Currency::minimum_balance(); + // 10000000000001 > 10000000000000 but is still ok if reward > vault_balance { if reward - vault_balance > max_dust { Self::deposit_event(Event::::NotDistributedReward { cluster_id, era, + batch_index, node_provider_id: node_provider_id.clone(), expected_reward: amount_to_reward, distributed_reward: vault_balance, @@ -760,6 +770,7 @@ pub mod pallet { Self::deposit_event(Event::::Rewarded { cluster_id, era, + batch_index, node_provider_id, rewarded: reward_, expected_to_reward: amount_to_reward, diff --git a/pallets/ddc-payouts/src/mock.rs b/pallets/ddc-payouts/src/mock.rs index 8f2e3e4c4..c47ab5d58 100644 --- a/pallets/ddc-payouts/src/mock.rs +++ b/pallets/ddc-payouts/src/mock.rs @@ -3,14 +3,14 @@ #![allow(dead_code)] use ddc_primitives::{ + traits::{ + cluster::{ClusterCreator, ClusterVisitor, ClusterVisitorError}, + customer::{CustomerCharger, CustomerDepositor}, + pallet::PalletVisitor, + }, ClusterBondingParams, ClusterFeesParams, ClusterGovParams, ClusterParams, ClusterPricingParams, NodeType, DOLLARS, }; -use ddc_traits::{ - cluster::{ClusterCreator, ClusterVisitor, ClusterVisitorError}, - customer::{CustomerCharger, CustomerDepositor}, - pallet::PalletVisitor, -}; use frame_election_provider_support::SortedListProvider; use frame_support::{ construct_runtime, parameter_types, @@ -328,10 +328,6 @@ impl SortedListProvider for TestValidator 0 } - fn try_state() -> Result<(), &'static str> { - unimplemented!() - } - fn unsafe_clear() { unimplemented!() } diff --git a/pallets/ddc-payouts/src/tests.rs b/pallets/ddc-payouts/src/tests.rs index b334e33e9..a20ae8a08 100644 --- a/pallets/ddc-payouts/src/tests.rs +++ b/pallets/ddc-payouts/src/tests.rs @@ -1781,6 +1781,18 @@ fn send_rewarding_providers_batch_works() { assert_eq!(balance_node1, transfer_charge + storage_charge + puts_charge + gets_charge); let mut report_reward = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); + System::assert_has_event( + Event::Rewarded { + cluster_id, + era, + node_provider_id: node1, + batch_index: batch_node_index, + rewarded: balance_node1, + expected_to_reward: balance_node1, + } + .into(), + ); + let ratio2_transfer = Perquintill::from_rational( node_usage2.transferred_bytes, total_nodes_usage.transferred_bytes, @@ -1807,6 +1819,18 @@ fn send_rewarding_providers_batch_works() { assert_eq!(balance_node2, transfer_charge + storage_charge + puts_charge + gets_charge); assert_eq!(report_reward.total_distributed_reward, balance_node1 + balance_node2); + System::assert_has_event( + Event::Rewarded { + cluster_id, + era, + node_provider_id: node2, + batch_index: batch_node_index, + rewarded: balance_node2, + expected_to_reward: balance_node2, + } + .into(), + ); + // batch 2 assert_ok!(DdcPayouts::send_rewarding_providers_batch( RuntimeOrigin::signed(dac_account), @@ -1841,6 +1865,19 @@ fn send_rewarding_providers_batch_works() { report_reward = DdcPayouts::active_billing_reports(cluster_id, era).unwrap(); let balance_node3 = Balances::free_balance(node3); assert_eq!(balance_node3, transfer_charge + storage_charge + puts_charge + gets_charge); + + System::assert_has_event( + Event::Rewarded { + cluster_id, + era, + node_provider_id: node3, + batch_index: batch_node_index + 1, + rewarded: balance_node3, + expected_to_reward: balance_node3, + } + .into(), + ); + assert_eq!( report_reward.total_distributed_reward, balance_node1 + balance_node2 + balance_node3 diff --git a/pallets/ddc-payouts/src/weights.rs b/pallets/ddc-payouts/src/weights.rs index a8ba246c7..1b9fafa41 100644 --- a/pallets/ddc-payouts/src/weights.rs +++ b/pallets/ddc-payouts/src/weights.rs @@ -43,20 +43,20 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: DdcPayouts AuthorisedCaller (r:0 w:1) fn set_authorised_caller() -> Weight { - Weight::from_ref_time(90_258_000_u64) + Weight::from_parts(90_258_000_u64, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn begin_billing_report() -> Weight { - Weight::from_ref_time(214_646_000_u64) + Weight::from_parts(214_646_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn begin_charging_customers() -> Weight { - Weight::from_ref_time(228_676_000_u64) + Weight::from_parts(228_676_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -68,9 +68,9 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcPayouts DebtorCustomers (r:1 w:1) /// The range of component `b` is `[1, 1000]`. fn send_charging_customers_batch(b: u32, ) -> Weight { - Weight::from_ref_time(891_324_000_u64) + Weight::from_parts(891_324_000_u64, 0) // Standard Error: 3_864_375 - .saturating_add(Weight::from_ref_time(558_679_506_u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_parts(558_679_506_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -86,14 +86,14 @@ impl WeightInfo for SubstrateWeight { // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:0) fn end_charging_customers() -> Weight { - Weight::from_ref_time(1_691_550_000_u64) + Weight::from_parts(1_691_550_000_u64, 0) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn begin_rewarding_providers() -> Weight { - Weight::from_ref_time(234_686_000_u64) + Weight::from_parts(234_686_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -102,9 +102,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:2) /// The range of component `b` is `[1, 1000]`. fn send_rewarding_providers_batch(b: u32, ) -> Weight { - Weight::from_ref_time(565_710_000_u64) + Weight::from_parts(565_710_000_u64, 0) // Standard Error: 854_032 - .saturating_add(Weight::from_ref_time(408_429_599_u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_parts(408_429_599_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -113,14 +113,14 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn end_rewarding_providers() -> Weight { - Weight::from_ref_time(274_535_000_u64) + Weight::from_parts(274_535_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn end_billing_report() -> Weight { - Weight::from_ref_time(232_626_000_u64) + Weight::from_parts(232_626_000_u64, 0) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -130,20 +130,20 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: DdcPayouts AuthorisedCaller (r:0 w:1) fn set_authorised_caller() -> Weight { - Weight::from_ref_time(90_258_000_u64) + Weight::from_parts(90_258_000_u64, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn begin_billing_report() -> Weight { - Weight::from_ref_time(214_646_000_u64) + Weight::from_parts(214_646_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn begin_charging_customers() -> Weight { - Weight::from_ref_time(228_676_000_u64) + Weight::from_parts(228_676_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -155,9 +155,9 @@ impl WeightInfo for () { // Storage: DdcPayouts DebtorCustomers (r:1 w:1) /// The range of component `b` is `[1, 1000]`. fn send_charging_customers_batch(b: u32, ) -> Weight { - Weight::from_ref_time(891_324_000_u64) + Weight::from_parts(891_324_000_u64, 0) // Standard Error: 3_864_375 - .saturating_add(Weight::from_ref_time(558_679_506_u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_parts(558_679_506_u64, 0).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(b as u64))) .saturating_add(RocksDbWeight::get().writes(5_u64)) @@ -173,14 +173,14 @@ impl WeightInfo for () { // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:0) fn end_charging_customers() -> Weight { - Weight::from_ref_time(1_691_550_000_u64) + Weight::from_parts(1_691_550_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn begin_rewarding_providers() -> Weight { - Weight::from_ref_time(234_686_000_u64) + Weight::from_parts(234_686_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -189,9 +189,9 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:2) /// The range of component `b` is `[1, 1000]`. fn send_rewarding_providers_batch(b: u32, ) -> Weight { - Weight::from_ref_time(565_710_000_u64) + Weight::from_parts(565_710_000_u64, 0) // Standard Error: 854_032 - .saturating_add(Weight::from_ref_time(408_429_599_u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_parts(408_429_599_u64, 0).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -200,15 +200,15 @@ impl WeightInfo for () { // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn end_rewarding_providers() -> Weight { - Weight::from_ref_time(274_535_000_u64) + Weight::from_parts(274_535_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } // Storage: DdcPayouts AuthorisedCaller (r:1 w:0) // Storage: DdcPayouts ActiveBillingReports (r:1 w:1) fn end_billing_report() -> Weight { - Weight::from_ref_time(232_626_000_u64) + Weight::from_parts(232_626_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } -} \ No newline at end of file +} diff --git a/pallets/ddc-staking/Cargo.toml b/pallets/ddc-staking/Cargo.toml index e41c47b94..bfc32eafc 100644 --- a/pallets/ddc-staking/Cargo.toml +++ b/pallets/ddc-staking/Cargo.toml @@ -1,28 +1,32 @@ [package] name = "pallet-ddc-staking" -version = "4.8.7" +version = "4.8.8" edition = "2021" [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.7", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.7", default-features = false, path = "../../traits" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# 3rd-party dependencies +codec = { workspace = true } +scale-info = { workspace = true } + +# Substrate dependencies +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +# Cere dependencies +ddc-primitives = { workspace = true } [dev-dependencies] -lazy_static = "1.4.0" -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -parking_lot = "0.12.1" -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +lazy_static = { workspace = true, default-features = true } +pallet-balances = { workspace = true, default-features = true } +pallet-timestamp = { workspace = true, default-features = true } +parking_lot = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = true } +sp-tracing = { workspace = true, default-features = true } +substrate-test-utils = { workspace = true, default-features = true } [features] default = ["std"] diff --git a/pallets/ddc-staking/src/lib.rs b/pallets/ddc-staking/src/lib.rs index 713168793..444ce8f88 100644 --- a/pallets/ddc-staking/src/lib.rs +++ b/pallets/ddc-staking/src/lib.rs @@ -28,12 +28,12 @@ pub mod weights; use core::fmt::Debug; use codec::{Decode, Encode, HasCompact}; -pub use ddc_primitives::{ClusterId, NodePubKey, NodeType}; -use ddc_traits::{ +use ddc_primitives::traits::{ cluster::{ClusterCreator, ClusterVisitor, ClusterVisitorError}, node::{NodeCreator, NodeVisitor}, staking::{StakerCreator, StakingVisitor, StakingVisitorError}, }; +pub use ddc_primitives::{ClusterId, NodePubKey, NodeType}; #[cfg(feature = "std")] use frame_support::assert_ok; use frame_support::{ @@ -149,12 +149,16 @@ impl< #[frame_support::pallet] pub mod pallet { - use ddc_traits::{cluster::ClusterManager, node::NodeVisitorError}; + use ddc_primitives::traits::{cluster::ClusterManager, node::NodeVisitorError}; use super::*; + /// The current storage version. + const STORAGE_VERSION: frame_support::traits::StorageVersion = + frame_support::traits::StorageVersion::new(0); + #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] + #[pallet::storage_version(STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/ddc-staking/src/mock.rs b/pallets/ddc-staking/src/mock.rs index 9017e9ef5..17b8c20e2 100644 --- a/pallets/ddc-staking/src/mock.rs +++ b/pallets/ddc-staking/src/mock.rs @@ -5,13 +5,13 @@ use std::cell::RefCell; use ddc_primitives::{ + traits::{ + cluster::{ClusterManager, ClusterManagerError, ClusterVisitor, ClusterVisitorError}, + node::{NodeVisitor, NodeVisitorError}, + }, ClusterBondingParams, ClusterFeesParams, ClusterGovParams, ClusterParams, ClusterPricingParams, NodeParams, NodePubKey, StorageNodePubKey, }; -use ddc_traits::{ - cluster::{ClusterManager, ClusterManagerError, ClusterVisitor, ClusterVisitorError}, - node::{NodeVisitor, NodeVisitorError}, -}; use frame_support::{ construct_runtime, dispatch::DispatchResult, diff --git a/pallets/ddc-staking/src/weights.rs b/pallets/ddc-staking/src/weights.rs index e7157a60d..523478f3b 100644 --- a/pallets/ddc-staking/src/weights.rs +++ b/pallets/ddc-staking/src/weights.rs @@ -46,7 +46,7 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcNodes StorageNodes (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn bond() -> Weight { - Weight::from_ref_time(39_000_000_u64) + Weight::from_parts(39_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -57,7 +57,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unbond() -> Weight { - Weight::from_ref_time(37_000_000_u64) + Weight::from_parts(37_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -67,7 +67,7 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: DdcStaking LeavingStorages (r:1 w:0) fn withdraw_unbonded() -> Weight { - Weight::from_ref_time(33_000_000_u64) + Weight::from_parts(33_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -78,7 +78,7 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcStaking Storages (r:1 w:1) // Storage: DdcStaking LeavingStorages (r:1 w:0) fn store() -> Weight { - Weight::from_ref_time(28_000_000_u64) + Weight::from_parts(28_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -86,14 +86,14 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcStaking Storages (r:1 w:1) // Storage: DdcClusters ClustersGovParams (r:1 w:0) fn chill() -> Weight { - Weight::from_ref_time(28_000_000_u64) + Weight::from_parts(28_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: DdcStaking Bonded (r:1 w:1) // Storage: DdcStaking Ledger (r:2 w:2) fn set_controller() -> Weight { - Weight::from_ref_time(14_000_000_u64) + Weight::from_parts(14_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -102,7 +102,7 @@ impl WeightInfo for SubstrateWeight { // Storage: DdcStaking Storages (r:1 w:0) // Storage: DdcStaking LeavingStorages (r:1 w:0) fn set_node() -> Weight { - Weight::from_ref_time(14_000_000_u64) + Weight::from_parts(14_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -117,7 +117,7 @@ impl WeightInfo for () { // Storage: DdcNodes StorageNodes (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn bond() -> Weight { - Weight::from_ref_time(39_000_000_u64) + Weight::from_parts(39_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -128,7 +128,7 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unbond() -> Weight { - Weight::from_ref_time(37_000_000_u64) + Weight::from_parts(37_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -138,7 +138,7 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: DdcStaking LeavingStorages (r:1 w:0) fn withdraw_unbonded() -> Weight { - Weight::from_ref_time(33_000_000_u64) + Weight::from_parts(33_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -149,7 +149,7 @@ impl WeightInfo for () { // Storage: DdcStaking Storages (r:1 w:1) // Storage: DdcStaking LeavingStorages (r:1 w:0) fn store() -> Weight { - Weight::from_ref_time(28_000_000_u64) + Weight::from_parts(28_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -157,14 +157,14 @@ impl WeightInfo for () { // Storage: DdcStaking Storages (r:1 w:1) // Storage: DdcClusters ClustersGovParams (r:1 w:0) fn chill() -> Weight { - Weight::from_ref_time(28_000_000_u64) + Weight::from_parts(28_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } // Storage: DdcStaking Bonded (r:1 w:1) // Storage: DdcStaking Ledger (r:2 w:2) fn set_controller() -> Weight { - Weight::from_ref_time(14_000_000_u64) + Weight::from_parts(14_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -173,7 +173,7 @@ impl WeightInfo for () { // Storage: DdcStaking Storages (r:1 w:0) // Storage: DdcStaking LeavingStorages (r:1 w:0) fn set_node() -> Weight { - Weight::from_ref_time(14_000_000_u64) + Weight::from_parts(14_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/pallets/erc20/Cargo.toml b/pallets/erc20/Cargo.toml index 9f6ea6b2d..5b6fdde72 100644 --- a/pallets/erc20/Cargo.toml +++ b/pallets/erc20/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-erc20" -version = "4.8.7" +version = "4.8.8" authors = ["Parity Technologies "] edition = "2021" homepage = "https://substrate.dev" @@ -13,18 +13,23 @@ description = "FRAME example pallet" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-chainbridge = { version = "4.2.0", default-features = false, path = "../chainbridge" } -pallet-erc721 = { version = "4.2.0", default-features = false, path = "../erc721" } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# 3rd-party dependencies +codec = { workspace = true } +scale-info = { workspace = true } + +# Substrate dependencies +frame-support = { workspace = true } +frame-system = { workspace = true } +pallet-balances = { workspace = true } +sp-arithmetic = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +# Cere dependencies +pallet-chainbridge = { workspace = true } +pallet-erc721 = { workspace = true } [features] default = ["std"] diff --git a/pallets/erc20/src/lib.rs b/pallets/erc20/src/lib.rs index 5c2fee14a..5a107ea72 100644 --- a/pallets/erc20/src/lib.rs +++ b/pallets/erc20/src/lib.rs @@ -26,7 +26,6 @@ pub mod pallet { use super::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/erc721/Cargo.toml b/pallets/erc721/Cargo.toml index 5641ab157..ac187d475 100644 --- a/pallets/erc721/Cargo.toml +++ b/pallets/erc721/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-erc721" -version = "4.8.7" +version = "4.8.8" authors = ["Parity Technologies "] edition = "2021" homepage = "https://substrate.dev" @@ -13,16 +13,21 @@ description = "FRAME example pallet" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-chainbridge = { version = "4.2.0", default-features = false, path = "../chainbridge" } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# 3rd-party dependencies +codec = { workspace = true } +scale-info = { workspace = true } + +# Substrate dependencies +frame-support = { workspace = true } +frame-system = { workspace = true } +pallet-balances = { workspace = true } +sp-core = { workspace = true } +sp-io = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } + +# Cere dependencies +pallet-chainbridge = { workspace = true } [features] default = ["std"] diff --git a/pallets/erc721/src/lib.rs b/pallets/erc721/src/lib.rs index 090ce27e0..1dd59953c 100644 --- a/pallets/erc721/src/lib.rs +++ b/pallets/erc721/src/lib.rs @@ -31,7 +31,6 @@ pub mod pallet { use super::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/erc721/src/mock.rs b/pallets/erc721/src/mock.rs index dc8865d84..57289ac42 100644 --- a/pallets/erc721/src/mock.rs +++ b/pallets/erc721/src/mock.rs @@ -15,7 +15,7 @@ use crate::{self as erc721, Config}; parameter_types! { pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); + pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 6d2552628..4f930a580 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,15 +1,18 @@ [package] name = "ddc-primitives" -version = "4.8.7" +version = "4.8.8" edition = "2021" [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.136", default-features = false, features = ["derive"], optional = true } +codec = { workspace = true } +scale-info = { workspace = true } +serde = { workspace = true, optional = true } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } +sp-std = { workspace = true } [features] default = ["std"] @@ -18,6 +21,11 @@ std = [ "scale-info/std", "serde", "sp-core/std", + "sp-std/std", "sp-runtime/std", ] -runtime-benchmarks = [] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 06a5dcfde..2c49950e5 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -7,6 +7,8 @@ use serde::{Deserialize, Serialize}; use sp_core::hash::H160; use sp_runtime::{AccountId32, Perquintill, RuntimeDebug}; +pub mod traits; + pub const MILLICENTS: u128 = 100_000; pub const CENTS: u128 = 1_000 * MILLICENTS; // assume this is worth about a cent. pub const DOLLARS: u128 = 100 * CENTS; diff --git a/traits/src/cluster.rs b/primitives/src/traits/cluster.rs similarity index 98% rename from traits/src/cluster.rs rename to primitives/src/traits/cluster.rs index d980c1ae4..5f4cf2829 100644 --- a/traits/src/cluster.rs +++ b/primitives/src/traits/cluster.rs @@ -1,13 +1,14 @@ use codec::{Decode, Encode}; -use ddc_primitives::{ - ClusterBondingParams, ClusterFeesParams, ClusterGovParams, ClusterId, ClusterParams, - ClusterPricingParams, NodePubKey, NodeType, -}; use frame_support::dispatch::DispatchResult; use frame_system::Config; use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; +use crate::{ + ClusterBondingParams, ClusterFeesParams, ClusterGovParams, ClusterId, ClusterParams, + ClusterPricingParams, NodePubKey, NodeType, +}; + pub trait ClusterVisitor { fn ensure_cluster(cluster_id: &ClusterId) -> Result<(), ClusterVisitorError>; diff --git a/traits/src/customer.rs b/primitives/src/traits/customer.rs similarity index 100% rename from traits/src/customer.rs rename to primitives/src/traits/customer.rs diff --git a/traits/src/lib.rs b/primitives/src/traits/mod.rs similarity index 54% rename from traits/src/lib.rs rename to primitives/src/traits/mod.rs index 24ea7a7a1..d7372abac 100644 --- a/traits/src/lib.rs +++ b/primitives/src/traits/mod.rs @@ -5,3 +5,10 @@ pub mod node; pub mod pallet; pub mod staking; pub mod validator; + +pub use cluster::*; +pub use customer::*; +pub use node::*; +pub use pallet::*; +pub use staking::*; +pub use validator::*; diff --git a/traits/src/node.rs b/primitives/src/traits/node.rs similarity index 88% rename from traits/src/node.rs rename to primitives/src/traits/node.rs index ed60e0f1a..c6de69e02 100644 --- a/traits/src/node.rs +++ b/primitives/src/traits/node.rs @@ -1,7 +1,8 @@ -use ddc_primitives::{ClusterId, NodeParams, NodePubKey}; use frame_support::dispatch::DispatchResult; use frame_system::Config; +use crate::{ClusterId, NodeParams, NodePubKey}; + pub trait NodeVisitor { fn get_cluster_id(node_pub_key: &NodePubKey) -> Result, NodeVisitorError>; fn exists(node_pub_key: &NodePubKey) -> bool; diff --git a/traits/src/pallet.rs b/primitives/src/traits/pallet.rs similarity index 100% rename from traits/src/pallet.rs rename to primitives/src/traits/pallet.rs diff --git a/traits/src/staking.rs b/primitives/src/traits/staking.rs similarity index 93% rename from traits/src/staking.rs rename to primitives/src/traits/staking.rs index 06697856f..2ce6e4fb3 100644 --- a/traits/src/staking.rs +++ b/primitives/src/traits/staking.rs @@ -1,6 +1,7 @@ -use ddc_primitives::{ClusterId, NodePubKey}; use frame_system::Config; +use crate::{ClusterId, NodePubKey}; + pub trait StakingVisitor { fn has_activated_stake( node_pub_key: &NodePubKey, diff --git a/traits/src/treasury.rs b/primitives/src/traits/treasury.rs similarity index 100% rename from traits/src/treasury.rs rename to primitives/src/traits/treasury.rs diff --git a/traits/src/validator.rs b/primitives/src/traits/validator.rs similarity index 100% rename from traits/src/validator.rs rename to primitives/src/traits/validator.rs diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml deleted file mode 100644 index 9733f1715..000000000 --- a/rpc/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "cere-rpc" -version = "4.8.7" -edition = "2021" - -[dependencies] -jsonrpsee = { version = "0.16.2", features = ["server"] } -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } diff --git a/runtime/cere-dev/Cargo.toml b/runtime/cere-dev/Cargo.toml index 90e112576..4866ef07b 100644 --- a/runtime/cere-dev/Cargo.toml +++ b/runtime/cere-dev/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cere-dev-runtime" -version = "4.8.7" +version = "4.8.8" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" @@ -12,99 +12,96 @@ repository = "https://github.com/paritytech/substrate/" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# third-party dependencies -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } -hex-literal = { version = "0.3.4", optional = true } -log = { version = "0.4.16", default-features = false } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -static_assertions = "1.1.0" +# 3rd-party dependencies +codec = { workspace = true, features = ["derive", "max-encoded-len"] } +hex-literal = { workspace = true, default-features = true, optional = true } +log = { workspace = true } +scale-info = { workspace = true } +static_assertions = { workspace = true } -# primitives -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false, version = "4.0.0-dev" } -sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } - -# frame dependencies -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -pallet-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-bags-list = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-chainbridge = { version = "4.8.1", default-features = false, path = "../../pallets/chainbridge" } -pallet-child-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-contracts-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-election-provider-support-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -pallet-elections-phragmen = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } -pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-identity = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-indices = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-multisig = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.38" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } -pallet-offences = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false, optional = true } -pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-recovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-session = { features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false, optional = true } -pallet-society = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-tips = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# Substrate dependencies +frame-benchmarking = { workspace = true, optional = true } +frame-election-provider-support = { workspace = true } +frame-executive = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-benchmarking = { workspace = true, optional = true } +frame-system-rpc-runtime-api = { workspace = true } +frame-try-runtime = { workspace = true, optional = true } +node-primitives = { workspace = true } +pallet-authority-discovery = { workspace = true } +pallet-authorship = { workspace = true } +pallet-babe = { workspace = true } +pallet-bags-list = { workspace = true } +pallet-balances = { workspace = true } +pallet-bounties = { workspace = true } +pallet-child-bounties = { workspace = true } +pallet-collective = { workspace = true } +pallet-contracts = { workspace = true } +pallet-contracts-primitives = { workspace = true } +pallet-democracy = { workspace = true } +pallet-election-provider-multi-phase = { workspace = true } +pallet-election-provider-support-benchmarking = { workspace = true, optional = true } +pallet-elections-phragmen = { workspace = true } +pallet-fast-unstake = { workspace = true } +pallet-grandpa = { workspace = true } +pallet-identity = { workspace = true } +pallet-im-online = { workspace = true } +pallet-indices = { workspace = true } +pallet-insecure-randomness-collective-flip = { workspace = true } +pallet-membership = { workspace = true } +pallet-multisig = { workspace = true } +pallet-nomination-pools = { workspace = true } +pallet-nomination-pools-benchmarking = { workspace = true } +pallet-nomination-pools-runtime-api = { workspace = true } +pallet-offences = { workspace = true } +pallet-offences-benchmarking = { workspace = true, optional = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-recovery = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-session = { workspace = true, features = ["historical"] } +pallet-session-benchmarking = { workspace = true, optional = true } +pallet-society = { workspace = true } +pallet-staking = { workspace = true } +pallet-staking-reward-curve = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-tips = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-treasury = { workspace = true } +pallet-utility = { workspace = true } +pallet-vesting = { workspace = true } +sp-api = { workspace = true } +sp-authority-discovery = { workspace = true } +sp-block-builder = { workspace = true } +sp-consensus-babe = { workspace = true } +sp-core = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true } +sp-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-staking = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } # cere dependencies -cere-dev-runtime-constants = { path = "./constants", default-features = false } -cere-runtime-common = { path = "../common", default-features = false } -ddc-traits = { version = "4.8.7", default-features = false, path = "../../traits" } -pallet-ddc-clusters = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-clusters" } -pallet-ddc-customers = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-customers" } -pallet-ddc-nodes = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-nodes" } -pallet-ddc-payouts = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-payouts" } -pallet-ddc-staking = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-staking" } -pallet-erc20 = { version = "4.8.7", default-features = false, path = "../../pallets/erc20" } -pallet-erc721 = { version = "4.8.7", default-features = false, path = "../../pallets/erc721" } +cere-runtime-common = { workspace = true } +ddc-primitives = { workspace = true } +pallet-chainbridge = { workspace = true } +pallet-ddc-clusters = { workspace = true } +pallet-ddc-customers = { workspace = true } +pallet-ddc-nodes = { workspace = true } +pallet-ddc-payouts = { workspace = true } +pallet-ddc-staking = { workspace = true } +pallet-erc20 = { workspace = true } +pallet-erc721 = { workspace = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +substrate-wasm-builder = { workspace = true, default-features = true } [features] default = ["std"] @@ -146,7 +143,7 @@ std = [ "pallet-proxy/std", "pallet-preimage/std", "sp-core/std", - "pallet-randomness-collective-flip/std", + "pallet-insecure-randomness-collective-flip/std", "sp-std/std", "pallet-session/std", "sp-api/std", @@ -175,12 +172,12 @@ std = [ "log/std", "frame-try-runtime/std", "sp-io/std", + "ddc-primitives/std", "pallet-child-bounties/std", "pallet-ddc-payouts/std", "pallet-ddc-nodes/std", "pallet-ddc-staking/std", "cere-runtime-common/std", - "cere-dev-runtime-constants/std", "pallet-ddc-customers/std", "pallet-ddc-clusters/std", "pallet-ddc-payouts/std", @@ -229,6 +226,7 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "pallet-chainbridge/runtime-benchmarks", + "ddc-primitives/runtime-benchmarks", "hex-literal", ] try-runtime = [ @@ -258,7 +256,7 @@ try-runtime = [ "pallet-offences/try-runtime", "pallet-proxy/try-runtime", "pallet-preimage/try-runtime", - "pallet-randomness-collective-flip/try-runtime", + "pallet-insecure-randomness-collective-flip/try-runtime", "pallet-recovery/try-runtime", "pallet-scheduler/try-runtime", "pallet-session/try-runtime", diff --git a/runtime/cere-dev/constants/Cargo.toml b/runtime/cere-dev/constants/Cargo.toml deleted file mode 100644 index ba37e0c61..000000000 --- a/runtime/cere-dev/constants/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "cere-dev-runtime-constants" -version = "4.8.7" -authors = ["Parity Technologies "] -edition = "2021" - -[dependencies] -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } - -[features] -default = ["std"] -std = [ - "node-primitives/std", -] diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 019d24fe4..b067f9e34 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -23,7 +23,7 @@ #![recursion_limit = "256"] use codec::{Decode, Encode, MaxEncodedLen}; -use ddc_traits::pallet::PalletVisitor; +use ddc_primitives::traits::pallet::PalletVisitor; use frame_election_provider_support::{onchain, BalancingConfig, SequentialPhragmen, VoteWeight}; use frame_support::{ construct_runtime, @@ -99,7 +99,7 @@ use static_assertions::const_assert; /// Implementations of some helper traits passed into runtime modules as associated types. pub mod impls; /// Constant values used within the runtime. -use cere_dev_runtime_constants::{currency::*, time::*}; +use cere_runtime_common::constants::{currency::*, time::*}; use impls::Author; use sp_runtime::generic::Era; @@ -130,7 +130,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: 48701, + spec_version: 48800, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 13, @@ -232,7 +232,7 @@ impl frame_system::Config for Runtime { type MaxConsumers = ConstU32<16>; } -impl pallet_randomness_collective_flip::Config for Runtime {} +impl pallet_insecure_randomness_collective_flip::Config for Runtime {} impl pallet_utility::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -390,20 +390,11 @@ impl pallet_babe::Config for Runtime { type EpochChangeTrigger = pallet_babe::ExternalTrigger; type DisabledValidators = Session; - type KeyOwnerProofSystem = Historical; - - type KeyOwnerProof = >::Proof; - - type KeyOwnerIdentification = >::IdentificationTuple; + type KeyOwnerProof = + >::Proof; - type HandleEquivocation = - pallet_babe::EquivocationHandler; + type EquivocationReportSystem = + pallet_babe::EquivocationReportSystem; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; @@ -689,6 +680,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { as frame_election_provider_support::ElectionDataProvider >::MaxVotesPerVoter; + type MaxWinners = MaxActiveValidators; // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their // weight estimate function is wired to this call's weight. @@ -799,6 +791,7 @@ impl pallet_democracy::Config for Runtime { type CooloffPeriod = CooloffPeriod; type Slash = Treasury; type Scheduler = Scheduler; + type SubmitOrigin = frame_system::EnsureSigned; type PalletsOrigin = OriginCaller; type MaxVotes = ConstU32<100>; type WeightInfo = pallet_democracy::weights::SubstrateWeight; @@ -822,6 +815,7 @@ impl pallet_collective::Config for Runtime { type MotionDuration = CouncilMotionDuration; type MaxProposals = CouncilMaxProposals; type MaxMembers = CouncilMaxMembers; + type SetMembersOrigin = EnsureRoot; type DefaultVote = pallet_collective::PrimeDefaultVote; type WeightInfo = pallet_collective::weights::SubstrateWeight; } @@ -836,6 +830,7 @@ parameter_types! { pub const DesiredRunnersUp: u32 = 20; pub const ElectionsPhragmenPalletId: LockIdentifier = *b"phrelect"; pub const MaxVoters: u32 = 10 * 1000; + pub const MaxVotesPerVoter: u32 = 16; pub const MaxCandidates: u32 = 1000; } @@ -861,6 +856,7 @@ impl pallet_elections_phragmen::Config for Runtime { type TermDuration = TermDuration; type WeightInfo = pallet_elections_phragmen::weights::SubstrateWeight; type MaxVoters = MaxVoters; + type MaxVotesPerVoter = MaxVotesPerVoter; type MaxCandidates = MaxCandidates; } @@ -878,6 +874,7 @@ impl pallet_collective::Config for Runtime { type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; + type SetMembersOrigin = EnsureRoot; type DefaultVote = pallet_collective::PrimeDefaultVote; type WeightInfo = pallet_collective::weights::SubstrateWeight; } @@ -903,7 +900,7 @@ parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 50_000 * DOLLARS; pub const SpendPeriod: BlockNumber = DAYS; - pub const Burn: Permill = Permill::from_percent(0); + pub const Burn: Permill = Permill::from_parts(580); pub const TipCountdown: BlockNumber = DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); pub const TipReportDepositBase: Balance = 50_000 * DOLLARS; @@ -1129,21 +1126,10 @@ parameter_types! { impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type KeyOwnerProofSystem = Historical; + type KeyOwnerProof = >::Proof; - type KeyOwnerProof = - >::Proof; - - type KeyOwnerIdentification = >::IdentificationTuple; - - type HandleEquivocation = pallet_grandpa::EquivocationHandler< - Self::KeyOwnerIdentification, - Offences, - ReportLongevity, - >; + type EquivocationReportSystem = + pallet_grandpa::EquivocationReportSystem; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; @@ -1421,7 +1407,7 @@ construct_runtime!( AuthorityDiscovery: pallet_authority_discovery, Offences: pallet_offences, Historical: pallet_session_historical::{Pallet}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip, Identity: pallet_identity, Society: pallet_society, Recovery: pallet_recovery, @@ -1487,9 +1473,21 @@ pub type UncheckedExtrinsic = pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; + +pub struct NominationPoolsMigrationV4OldPallet; +impl Get for NominationPoolsMigrationV4OldPallet { + fn get() -> Perbill { + Perbill::zero() + } +} + /// Runtime migrations type Migrations = ( - // Remove stale entries in the set id -> session index storage map (after + // 0.9.40 + pallet_nomination_pools::migration::v4::MigrateV3ToV5< + Runtime, + NominationPoolsMigrationV4OldPallet, + >, // this release they will be properly pruned after the bonding duration has // elapsed) pallet_grandpa::migrations::CleanupSetIdSessionMap, @@ -1513,7 +1511,7 @@ mod custom_migration { impl OnRuntimeUpgrade for Upgrade { fn on_runtime_upgrade() -> Weight { clear_prefix(&twox_128(b"DdcValidator"), None); - Weight::from_ref_time(0) + Weight::from_parts(0, 0) } } } @@ -1826,7 +1824,15 @@ impl_runtime_apis! { Balance, > for Runtime { fn pending_rewards(member: AccountId) -> Balance { - NominationPools::pending_rewards(member).unwrap_or_default() + NominationPools::api_pending_rewards(member).unwrap_or_default() + } + + fn points_to_balance(pool_id: pallet_nomination_pools::PoolId, points: Balance) -> Balance { + NominationPools::api_points_to_balance(pool_id, points) + } + + fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { + NominationPools::api_balance_to_points(pool_id, new_funds) } } diff --git a/runtime/cere/Cargo.toml b/runtime/cere/Cargo.toml index 221235e34..20a20a396 100644 --- a/runtime/cere/Cargo.toml +++ b/runtime/cere/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cere-runtime" -version = "4.8.7" +version = "4.8.8" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" @@ -12,99 +12,96 @@ repository = "https://github.com/paritytech/substrate/" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# third-party dependencies +# 3rd-party dependencies codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.3.4", optional = true } log = { version = "0.4.16", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } static_assertions = "1.1.0" -# primitives -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false, version = "4.0.0-dev" } -sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +# Substrate dependencies +frame-benchmarking = { workspace = true, optional = true } +frame-election-provider-support = { workspace = true } +frame-executive = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +frame-system-benchmarking = { workspace = true, optional = true } +frame-system-rpc-runtime-api = { workspace = true } +frame-try-runtime = { workspace = true, optional = true } +node-primitives = { workspace = true } +pallet-authority-discovery = { workspace = true } +pallet-authorship = { workspace = true } +pallet-babe = { workspace = true } +pallet-bags-list = { workspace = true } +pallet-balances = { workspace = true } +pallet-bounties = { workspace = true } +pallet-child-bounties = { workspace = true } +pallet-collective = { workspace = true } +pallet-contracts = { workspace = true } +pallet-contracts-primitives = { workspace = true } +pallet-democracy = { workspace = true } +pallet-election-provider-multi-phase = { workspace = true } +pallet-election-provider-support-benchmarking = { workspace = true, optional = true } +pallet-elections-phragmen = { workspace = true } +pallet-fast-unstake = { workspace = true } +pallet-grandpa = { workspace = true } +pallet-identity = { workspace = true } +pallet-im-online = { workspace = true } +pallet-indices = { workspace = true } +pallet-insecure-randomness-collective-flip = { workspace = true } +pallet-membership = { workspace = true } +pallet-multisig = { workspace = true } +pallet-nomination-pools = { workspace = true } +pallet-nomination-pools-benchmarking = { workspace = true } +pallet-nomination-pools-runtime-api = { workspace = true } +pallet-offences = { workspace = true } +pallet-offences-benchmarking = { workspace = true, optional = true } +pallet-preimage = { workspace = true } +pallet-proxy = { workspace = true } +pallet-recovery = { workspace = true } +pallet-scheduler = { workspace = true } +pallet-session = { workspace = true, features = ["historical"] } +pallet-session-benchmarking = { workspace = true, optional = true } +pallet-society = { workspace = true } +pallet-staking = { workspace = true } +pallet-staking-reward-curve = { workspace = true } +pallet-sudo = { workspace = true } +pallet-timestamp = { workspace = true } +pallet-tips = { workspace = true } +pallet-transaction-payment = { workspace = true } +pallet-transaction-payment-rpc-runtime-api = { workspace = true } +pallet-treasury = { workspace = true } +pallet-utility = { workspace = true } +pallet-vesting = { workspace = true } +sp-api = { workspace = true } +sp-authority-discovery = { workspace = true } +sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", default-features = false, version = "4.0.0-dev" } +sp-consensus-babe = { workspace = true } +sp-core = { workspace = true } +sp-inherents = { workspace = true } +sp-io = { workspace = true } +sp-offchain = { workspace = true } +sp-runtime = { workspace = true } +sp-session = { workspace = true } +sp-staking = { workspace = true } +sp-std = { workspace = true } +sp-transaction-pool = { workspace = true } +sp-version = { workspace = true } -# frame dependencies -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -pallet-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-bags-list = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-chainbridge = { version = "4.8.7", default-features = false, path = "../../pallets/chainbridge" } -pallet-child-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-contracts-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-election-provider-support-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -pallet-elections-phragmen = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } -pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-identity = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-indices = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-multisig = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.38" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } -pallet-offences = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false, optional = true } -pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-recovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-session = { features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", default-features = false, optional = true } -pallet-society = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-tips = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } - -# cere dependencies -cere-runtime-common = { path = "../common", default-features = false } -cere-runtime-constants = { path = "./constants", default-features = false } -ddc-traits = { version = "4.8.7", default-features = false, path = "../../traits" } -pallet-ddc-clusters = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-clusters" } -pallet-ddc-customers = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-customers" } -pallet-ddc-nodes = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-nodes" } -pallet-ddc-payouts = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-payouts" } -pallet-ddc-staking = { version = "4.8.7", default-features = false, path = "../../pallets/ddc-staking" } -pallet-erc20 = { version = "4.8.7", default-features = false, path = "../../pallets/erc20" } -pallet-erc721 = { version = "4.8.7", default-features = false, path = "../../pallets/erc721" } +# Cere dependencies +cere-runtime-common = { workspace = true } +ddc-primitives = { workspace = true } +pallet-chainbridge = { workspace = true } +pallet-ddc-clusters = { workspace = true } +pallet-ddc-customers = { workspace = true } +pallet-ddc-nodes = { workspace = true } +pallet-ddc-payouts = { workspace = true } +pallet-ddc-staking = { workspace = true } +pallet-erc20 = { workspace = true } +pallet-erc721 = { workspace = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +substrate-wasm-builder = { workspace = true, default-features = true } [features] default = ["std"] @@ -146,7 +143,7 @@ std = [ "pallet-proxy/std", "pallet-preimage/std", "sp-core/std", - "pallet-randomness-collective-flip/std", + "pallet-insecure-randomness-collective-flip/std", "sp-std/std", "pallet-session/std", "sp-api/std", @@ -174,6 +171,7 @@ std = [ "log/std", "frame-try-runtime/std", "sp-io/std", + "ddc-primitives/std", "pallet-child-bounties/std", "pallet-ddc-clusters/std", "pallet-ddc-customers/std", @@ -181,7 +179,6 @@ std = [ "pallet-ddc-payouts/std", "pallet-ddc-staking/std", "cere-runtime-common/std", - "cere-runtime-constants/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", @@ -228,6 +225,7 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "pallet-chainbridge/runtime-benchmarks", + "ddc-primitives/runtime-benchmarks", "hex-literal", ] try-runtime = [ @@ -256,7 +254,7 @@ try-runtime = [ "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", "pallet-proxy/try-runtime", - "pallet-randomness-collective-flip/try-runtime", + "pallet-insecure-randomness-collective-flip/try-runtime", "pallet-recovery/try-runtime", "pallet-scheduler/try-runtime", "pallet-session/try-runtime", diff --git a/runtime/cere/constants/Cargo.toml b/runtime/cere/constants/Cargo.toml deleted file mode 100644 index b44b0301e..000000000 --- a/runtime/cere/constants/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "cere-runtime-constants" -version = "4.8.7" -authors = ["Parity Technologies "] -edition = "2021" - -[dependencies] -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } - -[features] -default = ["std"] -std = [ - "node-primitives/std", -] diff --git a/runtime/cere/constants/src/lib.rs b/runtime/cere/constants/src/lib.rs deleted file mode 100644 index 6da8a04ea..000000000 --- a/runtime/cere/constants/src/lib.rs +++ /dev/null @@ -1,77 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2019-2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! A set of constant values used in substrate runtime. - -#![cfg_attr(not(feature = "std"), no_std)] - -/// Money matters. -pub mod currency { - use node_primitives::Balance; - - pub const MILLICENTS: Balance = 100_000; - pub const CENTS: Balance = 1_000 * MILLICENTS; // assume this is worth about a cent. - pub const DOLLARS: Balance = 100 * CENTS; - - pub const fn deposit(items: u32, bytes: u32) -> Balance { - items as Balance * 15 * CENTS + (bytes as Balance) * 6 * CENTS - } -} - -/// Time. -pub mod time { - use node_primitives::{BlockNumber, Moment}; - - /// Since BABE is probabilistic this is the average expected block time that - /// we are targeting. Blocks will be produced at a minimum duration defined - /// by `SLOT_DURATION`, but some slots will not be allocated to any - /// authority and hence no block will be produced. We expect to have this - /// block time on average following the defined slot duration and the value - /// of `c` configured for BABE (where `1 - c` represents the probability of - /// a slot being empty). - /// This value is only used indirectly to define the unit constants below - /// that are expressed in blocks. The rest of the code should use - /// `SLOT_DURATION` instead (like the Timestamp pallet for calculating the - /// minimum period). - /// - /// If using BABE with secondary slots (default) then all of the slots will - /// always be assigned, in which case `MILLISECS_PER_BLOCK` and - /// `SLOT_DURATION` should have the same value. - /// - /// - pub const MILLISECS_PER_BLOCK: Moment = 6000; - pub const SECS_PER_BLOCK: Moment = MILLISECS_PER_BLOCK / 1000; - - // NOTE: Currently it is not possible to change the slot duration after the chain has started. - // Attempting to do so will brick block production. - pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; - - // 1 in 4 blocks (on average, not counting collisions) will be primary BABE blocks. - pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4); - - pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 4 * HOURS; - pub const EPOCH_DURATION_IN_SLOTS: u64 = { - const SLOT_FILL_RATE: f64 = MILLISECS_PER_BLOCK as f64 / SLOT_DURATION as f64; - - (EPOCH_DURATION_IN_BLOCKS as f64 * SLOT_FILL_RATE) as u64 - }; - - // These time units are defined in number of blocks. - pub const MINUTES: BlockNumber = 60 / (SECS_PER_BLOCK as BlockNumber); - pub const HOURS: BlockNumber = MINUTES * 60; - pub const DAYS: BlockNumber = HOURS * 24; -} diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index 2f99c2581..9b4c829aa 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -23,7 +23,7 @@ #![recursion_limit = "256"] use codec::{Decode, Encode, MaxEncodedLen}; -use ddc_traits::pallet::PalletVisitor; +use ddc_primitives::traits::pallet::PalletVisitor; use frame_election_provider_support::{onchain, BalancingConfig, SequentialPhragmen, VoteWeight}; use frame_support::{ construct_runtime, @@ -94,7 +94,7 @@ use static_assertions::const_assert; /// Implementations of some helper traits passed into runtime modules as associated types. pub mod impls; /// Constant values used within the runtime. -use cere_runtime_constants::{currency::*, time::*}; +use cere_runtime_common::constants::{currency::*, time::*}; use impls::Author; use sp_runtime::generic::Era; @@ -125,7 +125,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: 48701, + spec_version: 48800, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 13, @@ -227,7 +227,7 @@ impl frame_system::Config for Runtime { type MaxConsumers = ConstU32<16>; } -impl pallet_randomness_collective_flip::Config for Runtime {} +impl pallet_insecure_randomness_collective_flip::Config for Runtime {} impl pallet_utility::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -339,8 +339,8 @@ impl pallet_proxy::Config for Runtime { parameter_types! { pub const PreimageMaxSize: u32 = 4096 * 1024; - pub const PreimageBaseDeposit: Balance = deposit(4, 128); - pub const PreimageByteDeposit: Balance = deposit(0, 2); + pub const PreimageBaseDeposit: Balance = deposit(2, 64); + pub const PreimageByteDeposit: Balance = deposit(0, 1); } impl pallet_preimage::Config for Runtime { @@ -385,20 +385,11 @@ impl pallet_babe::Config for Runtime { type EpochChangeTrigger = pallet_babe::ExternalTrigger; type DisabledValidators = Session; - type KeyOwnerProofSystem = Historical; - - type KeyOwnerProof = >::Proof; - - type KeyOwnerIdentification = >::IdentificationTuple; + type KeyOwnerProof = + >::Proof; - type HandleEquivocation = - pallet_babe::EquivocationHandler; + type EquivocationReportSystem = + pallet_babe::EquivocationReportSystem; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; @@ -688,6 +679,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { as frame_election_provider_support::ElectionDataProvider >::MaxVotesPerVoter; + type MaxWinners = MaxActiveValidators; // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their // weight estimate function is wired to this call's weight. @@ -803,6 +795,7 @@ impl pallet_democracy::Config for Runtime { type CooloffPeriod = CooloffPeriod; type Slash = Treasury; type Scheduler = Scheduler; + type SubmitOrigin = frame_system::EnsureSigned; type PalletsOrigin = OriginCaller; type MaxVotes = ConstU32<100>; type WeightInfo = pallet_democracy::weights::SubstrateWeight; @@ -826,6 +819,7 @@ impl pallet_collective::Config for Runtime { type MotionDuration = CouncilMotionDuration; type MaxProposals = CouncilMaxProposals; type MaxMembers = CouncilMaxMembers; + type SetMembersOrigin = EnsureRoot; type DefaultVote = pallet_collective::PrimeDefaultVote; type WeightInfo = pallet_collective::weights::SubstrateWeight; } @@ -840,6 +834,7 @@ parameter_types! { pub const DesiredRunnersUp: u32 = 20; pub const ElectionsPhragmenPalletId: LockIdentifier = *b"phrelect"; pub const MaxVoters: u32 = 10 * 1000; + pub const MaxVotesPerVoter: u32 = 16; pub const MaxCandidates: u32 = 1000; } @@ -865,6 +860,7 @@ impl pallet_elections_phragmen::Config for Runtime { type TermDuration = TermDuration; type WeightInfo = pallet_elections_phragmen::weights::SubstrateWeight; type MaxVoters = MaxVoters; + type MaxVotesPerVoter = MaxVotesPerVoter; type MaxCandidates = MaxCandidates; } @@ -882,6 +878,7 @@ impl pallet_collective::Config for Runtime { type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; + type SetMembersOrigin = EnsureRoot; type DefaultVote = pallet_collective::PrimeDefaultVote; type WeightInfo = pallet_collective::weights::SubstrateWeight; } @@ -907,7 +904,7 @@ parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 50_000 * DOLLARS; pub const SpendPeriod: BlockNumber = DAYS; - pub const Burn: Permill = Permill::from_percent(0); + pub const Burn: Permill = Permill::from_percent(580); pub const TipCountdown: BlockNumber = DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); pub const TipReportDepositBase: Balance = 50_000 * DOLLARS; @@ -1134,21 +1131,10 @@ parameter_types! { impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type KeyOwnerProofSystem = Historical; + type KeyOwnerProof = >::Proof; - type KeyOwnerProof = - >::Proof; - - type KeyOwnerIdentification = >::IdentificationTuple; - - type HandleEquivocation = pallet_grandpa::EquivocationHandler< - Self::KeyOwnerIdentification, - Offences, - ReportLongevity, - >; + type EquivocationReportSystem = + pallet_grandpa::EquivocationReportSystem; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; @@ -1426,7 +1412,7 @@ construct_runtime!( AuthorityDiscovery: pallet_authority_discovery, Offences: pallet_offences, Historical: pallet_session_historical::{Pallet}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip, Identity: pallet_identity, Society: pallet_society, Recovery: pallet_recovery, @@ -1492,9 +1478,21 @@ pub type UncheckedExtrinsic = pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; + +pub struct NominationPoolsMigrationV4OldPallet; +impl Get for NominationPoolsMigrationV4OldPallet { + fn get() -> Perbill { + Perbill::zero() + } +} + /// Runtime migrations type Migrations = ( - // Remove stale entries in the set id -> session index storage map (after + // 0.9.40 + pallet_nomination_pools::migration::v4::MigrateV3ToV5< + Runtime, + NominationPoolsMigrationV4OldPallet, + >, // this release they will be properly pruned after the bonding duration has // elapsed) pallet_grandpa::migrations::CleanupSetIdSessionMap, @@ -1816,7 +1814,15 @@ impl_runtime_apis! { Balance, > for Runtime { fn pending_rewards(member: AccountId) -> Balance { - NominationPools::pending_rewards(member).unwrap_or_default() + NominationPools::api_pending_rewards(member).unwrap_or_default() + } + + fn points_to_balance(pool_id: pallet_nomination_pools::PoolId, points: Balance) -> Balance { + NominationPools::api_points_to_balance(pool_id, points) + } + + fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { + NominationPools::api_balance_to_points(pool_id, new_funds) } } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index caf302717..bbd81254e 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,16 +1,21 @@ [package] name = "cere-runtime-common" -version = "4.8.7" +version = "4.8.8" authors = ["Parity Technologies "] edition = "2021" +[dependencies] +frame-support = { workspace = true } +node-primitives = { workspace = true } +sp-core = { workspace = true } +sp-runtime = { workspace = true } + [features] default = ["std"] no_std = [] -std = [] - -[dependencies] -frame-support = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.38" } -node-primitives = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.38" } -sp-core = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.38" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.38" } +std = [ + "frame-support/std", + "node-primitives/std", + "sp-core/std", + "sp-runtime/std", +] diff --git a/runtime/cere-dev/constants/src/lib.rs b/runtime/common/src/constants.rs similarity index 100% rename from runtime/cere-dev/constants/src/lib.rs rename to runtime/common/src/constants.rs diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 03d133233..fd38fa810 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1,5 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std)] +pub mod constants; + use node_primitives::Balance; /// Convert a balance to an unsigned 256-bit number, use in nomination pools. diff --git a/traits/Cargo.toml b/traits/Cargo.toml deleted file mode 100644 index f75bf5e9c..000000000 --- a/traits/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "ddc-traits" -version = "4.8.7" -edition = "2021" - -[dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.7", default-features = false, path = "../primitives" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" }