From c47fbe4bf5bcaf6f259926aa6607e94f8b378db1 Mon Sep 17 00:00:00 2001 From: Ayush Mishra Date: Fri, 17 May 2024 14:55:28 +0530 Subject: [PATCH] Release/5.3.0 to master (#338) ## Description ## Types of Changes Please select the branch type you are merging and fill in the relevant template. - [ ] Hotfix - [X] Release - [ ] Fix or Feature ## Fix or Feature ### 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) - [ ] Dependency upgrade (A change in substrate or any 3rd party crate version) ### Migrations and Hooks - [X] This change requires a runtime migration. - [ ] Modifies `on_initialize` - [ ] Modifies `on_finalize` ### Checklist for Fix or Feature - [X] Change has been tested locally. - [ ] Change adds / updates tests if applicable. - [X] Changelog doc updated. ## Checklist for Hotfix - [ ] Change has been deployed to Testnet. - [ ] Change has been tested in Testnet. - [ ] Changelog has been updated. - [ ] Crate version has been updated. - [ ] Spec version has been updated. - [ ] Transaction version has been updated if required. - [ ] Pull Request to `dev` has been created. - [ ] Pull Request to `staging` has been created. ## Checklist for Release - [ ] Change has been deployed to Devnet. - [ ] Change has been tested in Devnet. - [ ] Change has been deployed to Qanet. - [ ] Change has been tested in Qanet. - [ ] Change has been deployed to Testnet. - [ ] Change has been tested in Testnet. - [ ] Changelog has been updated. - [ ] Crate version has been updated. - [ ] Spec version has been updated. - [ ] Transaction version has been updated if required. --------- Co-authored-by: rakanalh Co-authored-by: Yahor Tsaryk Co-authored-by: Maksim Ramanenkau Co-authored-by: Pavel --- .github/auto_assign.yml | 3 +- .github/pull_request_template.md | 40 +- .github/workflows/ci.yaml | 62 +- CHANGELOG.md | 18 + Cargo.lock | 1350 +++++++++++++------- Cargo.toml | 236 ++-- README.md | 2 +- node/cli/src/command.rs | 6 +- node/client/src/lib.rs | 17 +- node/rpc/src/lib.rs | 2 +- node/service/src/chain_spec.rs | 21 - node/service/src/lib.rs | 44 +- pallets/ddc-clusters/Cargo.toml | 1 + pallets/ddc-clusters/src/benchmarking.rs | 24 +- pallets/ddc-clusters/src/cluster.rs | 9 + pallets/ddc-clusters/src/lib.rs | 45 +- pallets/ddc-clusters/src/migration.rs | 198 +++ pallets/ddc-clusters/src/mock.rs | 32 +- pallets/ddc-clusters/src/testing_utils.rs | 23 +- pallets/ddc-clusters/src/tests.rs | 132 +- pallets/ddc-customers/src/benchmarking.rs | 7 +- pallets/ddc-customers/src/lib.rs | 3 +- pallets/ddc-customers/src/migration.rs | 1 + pallets/ddc-customers/src/mock.rs | 8 +- pallets/ddc-customers/src/tests.rs | 82 +- pallets/ddc-nodes/src/lib.rs | 4 +- pallets/ddc-payouts/src/benchmarking.rs | 7 +- pallets/ddc-staking/src/lib.rs | 11 +- pallets/ddc-staking/src/testing_utils.rs | 7 +- primitives/src/lib.rs | 3 + runtime/cere-dev/Cargo.toml | 79 +- runtime/cere-dev/src/governance/mod.rs | 70 + runtime/cere-dev/src/governance/origins.rs | 130 ++ runtime/cere-dev/src/governance/tracks.rs | 267 ++++ runtime/cere-dev/src/lib.rs | 443 +++---- runtime/cere/Cargo.toml | 63 +- runtime/cere/src/governance/mod.rs | 70 + runtime/cere/src/governance/origins.rs | 129 ++ runtime/cere/src/governance/tracks.rs | 283 ++++ runtime/cere/src/lib.rs | 442 +++---- runtime/common/src/constants.rs | 1 + runtime/common/src/migrations.rs | 4 +- rust-toolchain.toml | 2 +- scripts/init.sh | 4 +- scripts/pre-commit.sh | 2 +- shell.nix | 2 +- 46 files changed, 3005 insertions(+), 1384 deletions(-) create mode 100644 pallets/ddc-clusters/src/migration.rs create mode 100644 runtime/cere-dev/src/governance/mod.rs create mode 100644 runtime/cere-dev/src/governance/origins.rs create mode 100644 runtime/cere-dev/src/governance/tracks.rs create mode 100644 runtime/cere/src/governance/mod.rs create mode 100644 runtime/cere/src/governance/origins.rs create mode 100644 runtime/cere/src/governance/tracks.rs diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml index d04ca19a2..a39f5703c 100644 --- a/.github/auto_assign.yml +++ b/.github/auto_assign.yml @@ -1,11 +1,10 @@ addReviewers: true addAssignees: author reviewers: - - rakanalh - MRamanenkau - - Raid5594 - aie0 - yahortsaryk + - ayushmishra2005 skipKeywords: - wip numberOfReviewers: 1 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0c19d98be..08191dd51 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,16 @@ -### Description +## Description +## Types of Changes +Please select the branch type you are merging and fill in the relevant template. + +- [ ] Hotfix +- [ ] Release +- [ ] Fix or Feature + +## Fix or Feature + + ### Types of Changes - [ ] Tech Debt (Code improvements) @@ -15,8 +25,32 @@ - [ ] Modifies `on_initialize` - [ ] Modifies `on_finalize` -### Checklist +### Checklist for Fix or Feature - [ ] Change has been tested locally. -- [ ] Change adds / updates tests. +- [ ] Change adds / updates tests if applicable. - [ ] Changelog doc updated. + +## Checklist for Hotfix + +- [ ] Change has been deployed to Testnet. +- [ ] Change has been tested in Testnet. +- [ ] Changelog has been updated. +- [ ] Crate version has been updated. +- [ ] Spec version has been updated. +- [ ] Transaction version has been updated if required. +- [ ] Pull Request to `dev` has been created. +- [ ] Pull Request to `staging` has been created. + +## Checklist for Release + +- [ ] Change has been deployed to Devnet. +- [ ] Change has been tested in Devnet. +- [ ] Change has been deployed to Qanet. +- [ ] Change has been tested in Qanet. +- [ ] Change has been deployed to Testnet. +- [ ] Change has been tested in Testnet. +- [ ] Changelog has been updated. +- [ ] Crate version has been updated. +- [ ] Spec version has been updated. +- [ ] Transaction version has been updated if required. diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index acca7e811..776ae796f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - - name: Install nightly toolchain + - name: Install toolchain uses: actions-rs/toolchain@v1 with: toolchain: nightly-2024-03-12 @@ -41,10 +41,10 @@ jobs: - uses: actions/checkout@v3 - name: Install linux dependencies run: sudo apt update && sudo apt install -y cargo clang libssl-dev llvm libudev-dev protobuf-compiler - - name: Install nightly toolchain + - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2024-03-12 + toolchain: 1.77.0 override: true target: wasm32-unknown-unknown - name: Rust Cache @@ -55,38 +55,34 @@ jobs: - name: Run dev chain run: | timeout --preserve-status 30s ./target/release/cere --dev -# Disabled for one release to apply missing migrations -# https://github.com/Cerebellum-Network/blockchain-node/pull/300 -# - name: Check Build for Benchmarking -# run: > -# pushd node && -# cargo check --features=runtime-benchmarks --release + - name: Check Build for Benchmarking + run: > + pushd node && + cargo check --features=runtime-benchmarks --release - name: Check Build for Try-Runtime run: | cargo check --features=try-runtime --release -# Disabled for one release to apply missing migrations -# https://github.com/Cerebellum-Network/blockchain-node/pull/300 -# clippy: -# name: Run Clippy -# needs: format -# runs-on: ubuntu-22.04 -# steps: -# - uses: actions/checkout@v3 -# - name: Install linux dependencies -# run: sudo apt update && sudo apt install -y cargo clang libssl-dev llvm libudev-dev protobuf-compiler -# - name: Install nightly toolchain -# uses: actions-rs/toolchain@v1 -# with: -# toolchain: nightly-2023-05-23 -# override: true -# target: wasm32-unknown-unknown -# components: clippy -# - name: Rust Cache -# uses: Swatinem/rust-cache@v2 -# - name: Check with Clippy -# run: | -# cargo clippy --no-deps --all-targets --features runtime-benchmarks,try-runtime --workspace -- --deny warnings + clippy: + name: Run Clippy + needs: format + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Install linux dependencies + run: sudo apt update && sudo apt install -y cargo clang libssl-dev llvm libudev-dev protobuf-compiler + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.77.0 + override: true + target: wasm32-unknown-unknown + components: clippy + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + - name: Check with Clippy + run: | + cargo clippy --no-deps --all-targets --features runtime-benchmarks,try-runtime --workspace -- --deny warnings tests: name: Run tests @@ -98,10 +94,10 @@ jobs: - uses: actions/checkout@v3 - name: Install linux dependencies run: sudo apt update && sudo apt install -y cargo clang libssl-dev llvm libudev-dev protobuf-compiler - - name: Install nightly toolchain + - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2024-03-12 + toolchain: 1.77.0 override: true target: wasm32-unknown-unknown - name: Rust Cache diff --git a/CHANGELOG.md b/CHANGELOG.md index 56dfdc12b..e6235cd26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [C] Changes is `Cere` Runtime - [D] Changes is `Cere Dev` Runtime + +## [5.3.0] + +### Changed + +- [C,D] Updated Substrate to polkadot-v1.1.0 +- [C,D] Introduction of the OpenGov +- [C,D] `pallet-ddc-clusters`: Added Erasure coding and Replication in cluster params + ## [5.2.2] - [C,D] Depositing extra amount in ddc-customers pallet is fixed @@ -65,6 +74,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [C] `5.0.1` release changes are reverted - [C,D] Off-chain workers are enabled +## [5.0.1] + +### Changed + +- [C,D] Set burn rate at 0.058% CERE tokens at the end of every era. + ## [5.0.0] ### Changed @@ -72,6 +87,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [C,D] Updated Substrate to polkadot-v1.0.0 - [C,D] `pallet-ddc-customers`: implemented bucket removal +### Added +- Added ChargeError event to payout pallet + ## [4.8.9] ### Changed diff --git a/Cargo.lock b/Cargo.lock index 74e7b2129..746efb529 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -178,9 +178,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "approx" @@ -191,6 +191,205 @@ dependencies = [ "num-traits", ] +[[package]] +name = "aquamarine" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" +dependencies = [ + "include_dir", + "itertools", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-scale" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", +] + +[[package]] +name = "ark-scale" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ark-secret-scalar" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + [[package]] name = "array-bytes" version = "6.2.2" @@ -254,6 +453,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-channel" version = "1.9.0" @@ -278,7 +483,7 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 0.38.34", + "rustix 0.38.32", "slab", "tracing", "windows-sys 0.52.0", @@ -306,24 +511,24 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -371,6 +576,28 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.1" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-scale 0.0.12", + "ark-serialize", + "ark-std", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring 0.1.0", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "base-x" version = "0.2.11" @@ -431,13 +658,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.19", + "prettyplease 0.2.17", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -565,6 +792,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" version = "1.9.1" @@ -674,18 +910,17 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.95" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] name = "cere-cli" -version = "5.2.2" +version = "5.3.0" dependencies = [ "cere-client", "cere-service", @@ -702,7 +937,7 @@ dependencies = [ [[package]] name = "cere-client" -version = "5.2.2" +version = "5.3.0" dependencies = [ "cere-dev-runtime", "cere-runtime", @@ -734,7 +969,7 @@ dependencies = [ [[package]] name = "cere-dev-runtime" -version = "5.2.2" +version = "5.3.0" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -760,6 +995,7 @@ dependencies = [ "pallet-collective", "pallet-contracts", "pallet-contracts-primitives", + "pallet-conviction-voting", "pallet-ddc-clusters", "pallet-ddc-customers", "pallet-ddc-nodes", @@ -785,8 +1021,10 @@ dependencies = [ "pallet-preimage", "pallet-proxy", "pallet-recovery", + "pallet-referenda", "pallet-scheduler", "pallet-session", + "pallet-session-benchmarking", "pallet-staking", "pallet-staking-reward-curve", "pallet-sudo", @@ -797,9 +1035,11 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "parity-scale-codec", "scale-info", "sp-api", + "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", @@ -811,6 +1051,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "static_assertions", @@ -819,7 +1060,7 @@ dependencies = [ [[package]] name = "cere-rpc" -version = "5.2.2" +version = "5.3.0" dependencies = [ "jsonrpsee", "node-primitives", @@ -848,7 +1089,7 @@ dependencies = [ [[package]] name = "cere-runtime" -version = "5.2.2" +version = "5.3.0" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -874,6 +1115,7 @@ dependencies = [ "pallet-collective", "pallet-contracts", "pallet-contracts-primitives", + "pallet-conviction-voting", "pallet-ddc-clusters", "pallet-ddc-customers", "pallet-ddc-nodes", @@ -899,8 +1141,10 @@ dependencies = [ "pallet-preimage", "pallet-proxy", "pallet-recovery", + "pallet-referenda", "pallet-scheduler", "pallet-session", + "pallet-session-benchmarking", "pallet-staking", "pallet-staking-reward-curve", "pallet-sudo", @@ -911,9 +1155,11 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "parity-scale-codec", "scale-info", "sp-api", + "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", @@ -925,6 +1171,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "static_assertions", @@ -933,7 +1180,7 @@ dependencies = [ [[package]] name = "cere-runtime-common" -version = "5.2.2" +version = "5.3.0" dependencies = [ "frame-support", "frame-system", @@ -952,7 +1199,7 @@ dependencies = [ [[package]] name = "cere-service" -version = "5.2.2" +version = "5.3.0" dependencies = [ "cere-client", "cere-dev-runtime", @@ -1007,9 +1254,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.8" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" dependencies = [ "smallvec", ] @@ -1052,16 +1299,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] @@ -1130,7 +1377,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -1157,15 +1404,29 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "7.1.1" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum 0.26.2", - "strum_macros 0.26.2", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "merlin 3.0.0", +] + [[package]] name = "common-path" version = "1.0.0" @@ -1174,9 +1435,9 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.5.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -1510,7 +1771,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -1537,7 +1798,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -1554,7 +1815,7 @@ checksum = "ad08a837629ad949b73d032c637653d069e909cffe4ee7870b02301939ce39cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -1585,7 +1846,7 @@ dependencies = [ [[package]] name = "ddc-primitives" -version = "5.2.2" +version = "5.3.0" dependencies = [ "frame-support", "frame-system", @@ -1630,6 +1891,17 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive-syn-parse" version = "0.1.5" @@ -1737,32 +2009,50 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", +] + +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale 0.0.10", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "rand_core 0.6.4", + "zeroize", ] [[package]] name = "docify" -version = "0.1.16" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1b04e6ef3d21119d3eb7b032bca17f99fe041e9c072f30f32cc0e1a2b1f3c4" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.1.16" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5610df7f2acf89a1bb5d1a66ae56b1c7fcdcfe3948856fb3ace3f644d70eb7" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" dependencies = [ "common-path", "derive-syn-parse", - "lazy_static", + "once_cell", "proc-macro2", "quote", "regex", - "syn 2.0.60", + "syn 2.0.58", "termcolor", + "toml 0.8.2", "walkdir", ] @@ -1821,19 +2111,10 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature 2.2.0", + "signature", "spki", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.3" @@ -1841,19 +2122,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -1863,7 +2132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek 4.1.2", - "ed25519 2.2.3", + "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.8", @@ -1887,9 +2156,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" @@ -1945,7 +2214,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -2030,7 +2299,7 @@ dependencies = [ "prettier-please", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -2070,11 +2339,24 @@ dependencies = [ "subtle", ] +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", +] + [[package]] name = "fiat-crypto" -version = "0.2.8" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "file-per-thread-logger" @@ -2110,7 +2392,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "scale-info", ] @@ -2134,9 +2416,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.29" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4556222738635b7a3417ae6130d8f52201e45a0c4d1a907f0826383adb5f85e7" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-sys", @@ -2161,7 +2443,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", ] @@ -2184,7 +2466,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-support-procedural", @@ -2209,7 +2491,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "array-bytes", @@ -2257,18 +2539,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2285,11 +2567,12 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -2314,7 +2597,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-recursion", "futures", @@ -2326,6 +2609,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", "spinners", "substrate-rpc-client", "tokio", @@ -2335,9 +2619,11 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "aquamarine", "bitflags 1.3.2", + "docify", "environmental", "frame-metadata", "frame-support-procedural", @@ -2349,27 +2635,31 @@ dependencies = [ "paste", "scale-info", "serde", + "serde_json", "smallvec", "sp-api", "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", "sp-debug-derive", + "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-metadata-ir", "sp-runtime", "sp-staking", "sp-state-machine", "sp-std", "sp-tracing", "sp-weights", + "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "cfg-expr", @@ -2381,35 +2671,35 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cfg-if", "frame-support", @@ -2428,7 +2718,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -2443,7 +2733,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "sp-api", @@ -2452,7 +2742,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "parity-scale-codec", @@ -2553,7 +2843,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -2841,6 +3131,15 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.8.1" @@ -2981,7 +3280,7 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.12", + "rustls 0.21.10", "rustls-native-certs", "tokio", "tokio-rustls", @@ -3090,6 +3389,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -3157,12 +3475,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "intx" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3226,9 +3538,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] @@ -3295,7 +3607,7 @@ dependencies = [ "globset", "hyper", "jsonrpsee-types", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", "serde", @@ -3424,7 +3736,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parking_lot 0.12.2", + "parking_lot 0.12.1", ] [[package]] @@ -3435,7 +3747,7 @@ checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "regex", "rocksdb", "smallvec", @@ -3466,7 +3778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] @@ -3549,7 +3861,7 @@ dependencies = [ "multihash", "multistream-select", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "pin-project", "quick-protobuf", "rand 0.8.5", @@ -3569,7 +3881,7 @@ dependencies = [ "futures", "libp2p-core", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "smallvec", "trust-dns-resolver", ] @@ -3602,8 +3914,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "bs58", - "ed25519-dalek 2.1.1", + "bs58 0.4.0", + "ed25519-dalek", "log", "multiaddr", "multihash", @@ -3696,7 +4008,7 @@ dependencies = [ "snow", "static_assertions", "thiserror", - "x25519-dalek", + "x25519-dalek 1.1.1", "zeroize", ] @@ -3731,7 +4043,7 @@ dependencies = [ "libp2p-identity", "libp2p-tls", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "quinn-proto", "rand 0.8.5", "rustls 0.20.9", @@ -3847,7 +4159,7 @@ dependencies = [ "futures-rustls", "libp2p-core", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "quicksink", "rw-stream-sink", "soketto", @@ -3999,9 +4311,9 @@ checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -4069,7 +4381,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -4083,7 +4395,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -4094,7 +4406,7 @@ checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -4105,7 +4417,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -4157,7 +4469,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.34", + "rustix 0.38.32", ] [[package]] @@ -4461,7 +4773,7 @@ dependencies = [ [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-core", "sp-runtime", @@ -4628,7 +4940,7 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -4644,7 +4956,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -4658,7 +4970,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4682,8 +4994,10 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "aquamarine", + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -4702,7 +5016,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4717,7 +5031,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4734,7 +5048,7 @@ dependencies = [ [[package]] name = "pallet-chainbridge" -version = "5.2.2" +version = "5.3.0" dependencies = [ "frame-support", "frame-system", @@ -4750,7 +5064,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4769,7 +5083,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4786,7 +5100,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitflags 1.3.2", "environmental", @@ -4795,6 +5109,7 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "log", + "pallet-balances", "pallet-contracts-primitives", "pallet-contracts-proc-macro", "parity-scale-codec", @@ -4815,7 +5130,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -4828,22 +5143,40 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", +] + +[[package]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-ddc-clusters" -version = "5.2.2" +version = "5.3.0" dependencies = [ "ddc-primitives", "frame-benchmarking", "frame-support", "frame-system", "hex-literal", + "log", "pallet-balances", "pallet-contracts", "pallet-contracts-primitives", @@ -4863,7 +5196,7 @@ dependencies = [ [[package]] name = "pallet-ddc-customers" -version = "5.2.2" +version = "5.3.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -4886,7 +5219,7 @@ dependencies = [ [[package]] name = "pallet-ddc-nodes" -version = "5.2.2" +version = "5.3.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -4907,7 +5240,7 @@ dependencies = [ [[package]] name = "pallet-ddc-payouts" -version = "5.2.2" +version = "5.3.0" dependencies = [ "byte-unit", "chrono", @@ -4931,7 +5264,7 @@ dependencies = [ [[package]] name = "pallet-ddc-staking" -version = "5.2.2" +version = "5.3.0" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -4941,7 +5274,7 @@ dependencies = [ "pallet-balances", "pallet-timestamp", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "scale-info", "sp-core", "sp-io", @@ -4954,7 +5287,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -4972,7 +5305,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4995,7 +5328,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5003,12 +5336,13 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", + "sp-std", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5026,7 +5360,7 @@ dependencies = [ [[package]] name = "pallet-erc20" -version = "5.2.2" +version = "5.3.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5045,7 +5379,7 @@ dependencies = [ [[package]] name = "pallet-erc721" -version = "5.2.2" +version = "5.3.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5063,7 +5397,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "docify", "frame-benchmarking", @@ -5082,7 +5416,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5105,7 +5439,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5121,7 +5455,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5141,7 +5475,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5158,7 +5492,7 @@ dependencies = [ [[package]] name = "pallet-insecure-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -5172,7 +5506,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5189,7 +5523,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5205,11 +5539,12 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", @@ -5217,12 +5552,13 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-std", + "sp-tracing", ] [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5233,7 +5569,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -5250,7 +5586,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5267,7 +5603,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5282,7 +5618,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5294,11 +5630,31 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-referenda" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -5314,7 +5670,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -5328,13 +5684,32 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", + "sp-state-machine", "sp-std", "sp-trie", ] +[[package]] +name = "pallet-session-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", + "pallet-staking", + "parity-scale-codec", + "rand 0.8.5", + "sp-runtime", + "sp-session", + "sp-std", +] + [[package]] name = "pallet-staking" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5342,41 +5717,33 @@ dependencies = [ "frame-system", "log", "pallet-authorship", - "pallet-bags-list", - "pallet-balances", "pallet-session", - "pallet-staking-reward-curve", - "pallet-timestamp", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", "sp-application-crypto", - "sp-core", "sp-io", - "sp-npos-elections", "sp-runtime", "sp-staking", "sp-std", - "sp-tracing", - "substrate-test-utils", ] [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5391,7 +5758,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5403,13 +5770,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-storage", "sp-timestamp", ] [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5428,7 +5796,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -5444,7 +5812,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5460,7 +5828,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5472,7 +5840,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5489,7 +5857,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5505,7 +5873,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -5517,6 +5885,21 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-whitelist" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "parity-db" version = "0.4.13" @@ -5531,7 +5914,7 @@ dependencies = [ "log", "lz4", "memmap2", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "rand 0.8.5", "siphasher", "snap", @@ -5596,12 +5979,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", + "parking_lot_core 0.9.9", ] [[package]] @@ -5620,15 +6003,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.4.1", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.48.5", ] [[package]] @@ -5684,9 +6067,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.9" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" dependencies = [ "memchr", "thiserror", @@ -5695,9 +6078,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.9" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" +checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" dependencies = [ "pest", "pest_generator", @@ -5705,22 +6088,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.9" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" +checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "pest_meta" -version = "2.7.9" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" +checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" dependencies = [ "once_cell", "pest", @@ -5754,7 +6137,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -5799,15 +6182,15 @@ checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" [[package]] name = "polling" -version = "3.7.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" +checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi 0.3.9", "pin-project-lite 0.2.14", - "rustix 0.38.34", + "rustix 0.38.32", "tracing", "windows-sys 0.52.0", ] @@ -5890,7 +6273,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22020dfcf177fcc7bf5deaf7440af371400c67c0de14c399938d8ed4fb4645d3" dependencies = [ "proc-macro2", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -5905,12 +6288,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.19" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -5978,14 +6361,14 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -6000,7 +6383,7 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "thiserror", ] @@ -6012,7 +6395,7 @@ checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "prometheus-client-derive-encode", ] @@ -6024,7 +6407,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -6149,9 +6532,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -6298,15 +6681,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", -] - [[package]] name = "redox_users" version = "0.4.5" @@ -6335,7 +6709,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -6414,6 +6788,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "common", + "fflonk", + "merlin 3.0.0", +] + [[package]] name = "ring" version = "0.16.20" @@ -6551,9 +6940,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ "bitflags 2.5.0", "errno", @@ -6576,9 +6965,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.8", @@ -6670,7 +7059,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "sp-core", @@ -6681,7 +7070,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -6709,7 +7098,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "futures-timer", @@ -6732,7 +7121,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6747,7 +7136,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -6766,18 +7155,18 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "chrono", @@ -6816,13 +7205,13 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fnv", "futures", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -6842,7 +7231,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "kvdb", @@ -6852,7 +7241,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sc-client-api", "sc-state-db", "schnellru", @@ -6868,7 +7257,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -6876,7 +7265,7 @@ dependencies = [ "libp2p-identity", "log", "mockall", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sc-client-api", "sc-utils", "serde", @@ -6893,7 +7282,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "fork-tree", @@ -6903,7 +7292,7 @@ dependencies = [ "num-rational", "num-traits", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sc-client-api", "sc-consensus", "sc-consensus-epochs", @@ -6929,7 +7318,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "jsonrpsee", @@ -6951,7 +7340,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6964,7 +7353,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.11", "array-bytes", @@ -6976,7 +7365,7 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", "sc-chain-spec", @@ -7005,7 +7394,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "finality-grandpa", "futures", @@ -7025,7 +7414,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -7048,10 +7437,10 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmtime", "schnellru", @@ -7070,7 +7459,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -7082,7 +7471,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "anyhow", "cfg-if", @@ -7099,7 +7488,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "futures", @@ -7115,10 +7504,10 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "serde_json", "sp-application-crypto", "sp-core", @@ -7129,7 +7518,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "async-channel", @@ -7146,7 +7535,7 @@ dependencies = [ "log", "mockall", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "partial_sort", "pin-project", "rand 0.8.5", @@ -7170,7 +7559,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-channel", "cid", @@ -7190,7 +7579,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -7207,7 +7596,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.11", "futures", @@ -7225,7 +7614,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "async-channel", @@ -7246,7 +7635,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "async-channel", @@ -7280,7 +7669,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "futures", @@ -7298,7 +7687,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "bytes", @@ -7312,7 +7701,7 @@ dependencies = [ "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "rand 0.8.5", "sc-client-api", "sc-network", @@ -7332,7 +7721,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7341,13 +7730,13 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -7372,7 +7761,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7391,7 +7780,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "http", "jsonrpsee", @@ -7406,7 +7795,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", "futures", @@ -7415,10 +7804,11 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -7426,13 +7816,14 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", + "tokio", "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "directories", @@ -7442,7 +7833,7 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "pin-project", "rand 0.8.5", "sc-block-builder", @@ -7496,18 +7887,18 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sp-core", ] [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7526,7 +7917,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "libc", @@ -7545,13 +7936,13 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "chrono", "futures", "libp2p", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "pin-project", "rand 0.8.5", "sc-utils", @@ -7564,7 +7955,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "atty", @@ -7572,7 +7963,7 @@ dependencies = [ "lazy_static", "libc", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", @@ -7593,18 +7984,18 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -7612,7 +8003,7 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", "sc-utils", @@ -7630,7 +8021,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -7646,14 +8037,14 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-channel", "futures", "futures-timer", "lazy_static", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "prometheus", "sp-arithmetic", ] @@ -7860,29 +8251,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.199" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -7974,19 +8365,13 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.2.0" @@ -8100,7 +8485,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "log", @@ -8121,7 +8506,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "blake2", @@ -8129,13 +8514,13 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -8148,7 +8533,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "integer-sqrt", "num-traits", @@ -8162,7 +8547,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -8175,7 +8560,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-api", "sp-inherents", @@ -8186,12 +8571,12 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "schnellru", "sp-api", "sp-consensus", @@ -8204,7 +8589,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures", @@ -8219,7 +8604,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec", @@ -8236,7 +8621,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec", @@ -8255,7 +8640,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "finality-grandpa", "log", @@ -8273,7 +8658,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -8285,13 +8670,15 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", + "arrayvec 0.7.4", + "bandersnatch_vrfs", "bitflags 1.3.2", "blake2", "bounded-collections", - "bs58", + "bs58 0.5.0", "dyn-clonable", "ed25519-zebra", "futures", @@ -8303,7 +8690,7 @@ dependencies = [ "log", "merlin 2.0.1", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "paste", "primitive-types", "rand 0.8.5", @@ -8330,7 +8717,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "blake2b_simd", "byteorder", @@ -8343,36 +8730,36 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "kvdb", - "parking_lot 0.12.2", + "parking_lot 0.12.1", ] [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "environmental", "parity-scale-codec", @@ -8380,10 +8767,21 @@ dependencies = [ "sp-storage", ] +[[package]] +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "serde_json", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -8397,11 +8795,10 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bytes", - "ed25519 1.5.3", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "libsecp256k1", "log", "parity-scale-codec", @@ -8422,7 +8819,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "lazy_static", "sp-core", @@ -8433,10 +8830,10 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "sp-core", "sp-externalities", "thiserror", @@ -8445,7 +8842,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "thiserror", "zstd 0.12.4", @@ -8454,7 +8851,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -8465,7 +8862,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -8479,7 +8876,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-api", "sp-core", @@ -8489,7 +8886,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "backtrace", "lazy_static", @@ -8499,7 +8896,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "rustc-hash", "serde", @@ -8509,7 +8906,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "either", "hash256-std-hasher", @@ -8531,7 +8928,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -8549,19 +8946,19 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -8576,7 +8973,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8590,12 +8987,12 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "rand 0.8.5", "smallvec", "sp-core", @@ -8611,10 +9008,16 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "aes-gcm", + "curve25519-dalek 4.1.2", + "ed25519-dalek", + "hkdf", "parity-scale-codec", + "rand 0.8.5", "scale-info", + "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", @@ -8623,17 +9026,18 @@ dependencies = [ "sp-runtime-interface", "sp-std", "thiserror", + "x25519-dalek 2.0.1", ] [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8646,7 +9050,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec", @@ -8659,7 +9063,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "sp-std", @@ -8671,7 +9075,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-api", "sp-runtime", @@ -8680,7 +9084,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec", @@ -8695,7 +9099,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.11", "hash-db", @@ -8704,7 +9108,7 @@ dependencies = [ "memory-db", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "scale-info", "schnellru", "sp-core", @@ -8718,7 +9122,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8735,18 +9139,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -8759,7 +9163,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -8876,9 +9280,9 @@ dependencies = [ [[package]] name = "strum" -version = "0.26.2" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum_macros" @@ -8895,15 +9299,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -8922,12 +9326,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -8946,7 +9350,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hyper", "log", @@ -8958,7 +9362,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "jsonrpsee", @@ -8971,7 +9375,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -8988,28 +9392,16 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures", - "substrate-test-utils-derive", "tokio", ] -[[package]] -name = "substrate-test-utils-derive" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 2.0.60", -] - [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "build-helper", @@ -9043,9 +9435,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2", "quote", @@ -9105,7 +9497,7 @@ checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "rustix 0.38.34", + "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -9126,22 +9518,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -9181,9 +9573,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", @@ -9202,9 +9594,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ "num-conv", "time-core", @@ -9264,7 +9656,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "pin-project-lite 0.2.14", "signal-hook-registry", "socket2 0.5.6", @@ -9280,7 +9672,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -9300,7 +9692,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.12", + "rustls 0.21.10", "tokio", ] @@ -9352,6 +9744,18 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "toml_datetime" version = "0.6.3" @@ -9381,6 +9785,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.2.6", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -9446,7 +9852,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -9572,7 +9978,7 @@ dependencies = [ "ipconfig", "lazy_static", "lru-cache", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "resolv-conf", "smallvec", "thiserror", @@ -9590,7 +9996,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +source = "git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "clap", @@ -9688,9 +10094,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -9831,7 +10237,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", "wasm-bindgen-shared", ] @@ -9865,7 +10271,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9896,9 +10302,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" +checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" dependencies = [ "anyhow", "libc", @@ -9912,9 +10318,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" +checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" dependencies = [ "anyhow", "cxx", @@ -9924,9 +10330,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" +checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" dependencies = [ "anyhow", "cc", @@ -9951,11 +10357,10 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.30.0" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" dependencies = [ - "intx", "smallvec", "spin 0.9.8", "wasmi_arena", @@ -9971,9 +10376,9 @@ checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" [[package]] name = "wasmi_core" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624e6333e861ef49095d2d678b76ebf30b06bf37effca845be7e5b87c90071b7" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" dependencies = [ "downcast-rs", "libm", @@ -9993,9 +10398,9 @@ dependencies = [ [[package]] name = "wasmparser-nostd" -version = "0.100.2" +version = "0.100.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa" +checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" dependencies = [ "indexmap-nostd", ] @@ -10239,14 +10644,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.34", + "rustix 0.38.32", ] [[package]] name = "wide" -version = "0.7.16" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a1851a719f11d1d2fea40e15c72f6c00de8c142d7ac47c1441cc7e4d0d5bc6" +checksum = "89beec544f246e679fc25490e3f8e08003bc4bf612068f325120dad4cea02c1c" dependencies = [ "bytemuck", "safe_arch", @@ -10276,11 +10681,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "windows-sys 0.52.0", + "winapi", ] [[package]] @@ -10314,7 +10719,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] @@ -10341,7 +10746,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.4", ] [[package]] @@ -10376,18 +10781,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -10404,9 +10808,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -10422,9 +10826,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -10440,15 +10844,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -10464,9 +10862,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -10482,9 +10880,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -10500,9 +10898,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -10518,9 +10916,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" @@ -10561,6 +10959,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x25519-dalek" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +dependencies = [ + "curve25519-dalek 4.1.2", + "rand_core 0.6.4", + "serde", + "zeroize", +] + [[package]] name = "x509-parser" version = "0.14.0" @@ -10588,7 +10998,7 @@ dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.2", + "parking_lot 0.12.1", "rand 0.8.5", "static_assertions", ] @@ -10619,7 +11029,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] @@ -10639,7 +11049,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.58", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 1186edff8..4bfe6aa5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "5.2.2" +version = "5.3.0" authors = ["Cerebellum-Network"] edition = "2021" homepage = "https://cere.network/" @@ -19,7 +19,6 @@ members = [ "pallets/ddc-staking", "pallets/erc20", "pallets/erc721", - "pallets/staking", "primitives", "runtime/cere", "runtime/cere-dev", @@ -47,121 +46,124 @@ 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-v1.0.0", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -node-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-contracts = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-im-online = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-indices = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false, features = ["historical"] } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -# pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-staking = { path = "pallets/staking", default-features = false } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-consensus-slots = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-network-common = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-rpc-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sc-sync-state = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sc-sysinfo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-telemetry = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-consensus-epochs = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-rpc-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0", default-features = false } -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +# dependency-name = { git = "X", tag = "Y", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +node-primitives = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-contracts-primitives = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-fast-unstake = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-indices = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-nomination-pools = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false, features = ["historical"] } +pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-consensus-epochs = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sc-sync-state = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sc-sync-state-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-consensus-epochs = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.1.0", default-features = false } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +substrate-test-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.1.0", default-features = false } # Cere Dependenies cere-client = { path = "node/client" } diff --git a/README.md b/README.md index 1072beaba..596133ec7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ First, complete the [basic Rust setup instructions](./docs/rust-setup.md). Use the following command to build the node without launching it: ```sh -cargo +nightly-2023-05-23 build --release +cargo +1.77.0 build --release ``` ## Run diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index f5d564c3d..3abf560a7 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -1,4 +1,4 @@ -use cere_service::{self, IdentifyVariant}; +use cere_service::IdentifyVariant; use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; use sc_cli::{Error, SubstrateCli}; use sc_service::error::Error as ServiceError; @@ -138,14 +138,14 @@ pub fn run() -> sc_cli::Result<()> { if !cfg!(feature = "runtime-benchmarks") { return Err("Runtime benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." - .into()) + .into()); } #[cfg(feature = "cere-dev-native")] if chain_spec.is_cere_dev() { return runner.sync_run(|config| { cmd.run::(config) - }) + }); } #[cfg(not(feature = "cere-native"))] diff --git a/node/client/src/lib.rs b/node/client/src/lib.rs index 863a3b09f..ef9e2c372 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -72,7 +72,7 @@ where Block: BlockT, Backend: BackendT, Backend::State: sp_api::StateBackend, - Self::Api: RuntimeApiCollection, + Self::Api: RuntimeApiCollection, { } @@ -91,7 +91,7 @@ where + Sync + CallApiAt + HeaderMetadata, - Client::Api: RuntimeApiCollection, + Client::Api: RuntimeApiCollection, { } @@ -128,10 +128,9 @@ pub trait ExecuteWithClient { /// Execute whatever should be executed with the given client instance. fn execute_with_client(self, client: Arc) -> Self::Output where - >::StateBackend: sp_api::StateBackend, - Backend: sc_client_api::Backend + 'static, + Backend: sc_client_api::Backend, Backend::State: sp_api::StateBackend, - Api: crate::RuntimeApiCollection, + Api: crate::RuntimeApiCollection, Client: AbstractClient + 'static; } @@ -483,13 +482,10 @@ pub trait RuntimeApiCollection: + sp_offchain::OffchainWorkerApi + sp_session::SessionKeys + sp_authority_discovery::AuthorityDiscoveryApi -where - >::StateBackend: sp_api::StateBackend, { } -impl RuntimeApiCollection for Api -where +impl RuntimeApiCollection for Api where Api: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::ApiExt + sp_consensus_babe::BabeApi @@ -500,8 +496,7 @@ where + sp_api::Metadata + sp_offchain::OffchainWorkerApi + sp_session::SessionKeys - + sp_authority_discovery::AuthorityDiscoveryApi, - >::StateBackend: sp_api::StateBackend, + + sp_authority_discovery::AuthorityDiscoveryApi { } diff --git a/node/rpc/src/lib.rs b/node/rpc/src/lib.rs index adb59447f..c9eb5ac6a 100644 --- a/node/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -84,7 +84,7 @@ where P: TransactionPool + 'static, SC: SelectChain + 'static, B: sc_client_api::Backend + Send + Sync + 'static, - B::State: sc_client_api::backend::StateBackend>, + B::State: sc_client_api::backend::StateBackend>, { use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 454d43cc8..05f71ff88 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -157,8 +157,6 @@ pub fn cere_dev_genesis( })) .collect::>(); - let num_endowed_accounts = endowed_accounts.len(); - const ENDOWMENT: Balance = 10_000_000_000 * TEST_UNITS; const STASH: Balance = ENDOWMENT / 1000; @@ -194,24 +192,6 @@ pub fn cere_dev_genesis( ..Default::default() }, ddc_staking: cere_dev::DdcStakingConfig::default(), - democracy: cere_dev::DemocracyConfig::default(), - elections: cere_dev::ElectionsConfig { - members: endowed_accounts - .iter() - .take((num_endowed_accounts + 1) / 2) - .cloned() - .map(|member| (member, STASH)) - .collect(), - }, - council: cere_dev::CouncilConfig::default(), - technical_committee: cere_dev::TechnicalCommitteeConfig { - members: endowed_accounts - .iter() - .take((num_endowed_accounts + 1) / 2) - .cloned() - .collect(), - phantom: Default::default(), - }, sudo: cere_dev::SudoConfig { key: Some(root_key) }, babe: cere_dev::BabeConfig { authorities: Default::default(), @@ -224,7 +204,6 @@ pub fn cere_dev_genesis( ..Default::default() }, grandpa: Default::default(), - technical_membership: Default::default(), treasury: Default::default(), vesting: Default::default(), transaction_payment: Default::default(), diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 723eb7a45..27e9d89f4 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -11,7 +11,7 @@ pub use cere_dev_runtime; pub use cere_runtime; use futures::prelude::*; use sc_client_api::{Backend, BlockBackend}; -use sc_consensus_babe::{self, SlotProportion}; +use sc_consensus_babe::SlotProportion; pub use sc_executor::NativeExecutionDispatch; use sc_network::{Event, NetworkEventStream}; use sc_service::{ @@ -19,7 +19,6 @@ use sc_service::{ }; 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; @@ -38,6 +37,10 @@ pub use sc_service::ChainSpec; use sc_transaction_pool_api::OffchainTransactionPoolFactory; pub use sp_api::ConstructRuntimeApi; +/// The minimum period of blocks on which justifications will be +/// imported and generated. +const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; + type FullSelectChain = sc_consensus::LongestChain; type FullGrandpaBlockImport = sc_consensus_grandpa::GrandpaBlockImport< @@ -53,8 +56,7 @@ where + Send + Sync + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection>, + RuntimeApi::RuntimeApi: RuntimeApiCollection, ExecutorDispatch: NativeExecutionDispatch + 'static, { task_manager: TaskManager, @@ -72,8 +74,7 @@ where + Send + Sync + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection>, + RuntimeApi::RuntimeApi: RuntimeApiCollection, ExecutorDispatch: NativeExecutionDispatch + 'static, { let telemetry = config @@ -130,7 +131,7 @@ fn new_partial( FullClient, FullBackend, FullSelectChain, - sc_consensus::DefaultImportQueue>, + sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool>, ( impl Fn( @@ -161,8 +162,7 @@ where + Send + Sync + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection>, + RuntimeApi::RuntimeApi: RuntimeApiCollection, ExecutorDispatch: NativeExecutionDispatch + 'static, { let select_chain = sc_consensus::LongestChain::new(backend.clone()); @@ -174,13 +174,14 @@ where task_manager.spawn_essential_handle(), client.clone(), ); - let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), + GRANDPA_JUSTIFICATION_PERIOD, &client, select_chain.clone(), telemetry.as_ref().map(|x| x.handle()), )?; + let justification_import = grandpa_block_import.clone(); let (block_import, babe_link) = sc_consensus_babe::block_import( @@ -285,7 +286,7 @@ pub fn build_full( disable_hardware_benchmarks, |_, _| (), ) - .map(|full| full.with_client(Client::CereDev)) + .map(|full| full.with_client(Client::CereDev)); } #[cfg(feature = "cere-native")] @@ -340,11 +341,10 @@ where + Send + Sync + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection>, + RuntimeApi::RuntimeApi: RuntimeApiCollection, ExecutorDispatch: NativeExecutionDispatch + 'static, { - use sc_network_common::sync::warp::WarpSyncParams; + use sc_service::WarpSyncParams; let hwbench = if !disable_hardware_benchmarks { config.database.path().map(|database_path| { @@ -553,7 +553,7 @@ where let config = sc_consensus_grandpa::Config { // FIXME #1578 make this available through chainspec gossip_duration: std::time::Duration::from_millis(333), - justification_period: 512, + justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD, name: Some(name), observer_enabled: false, keystore, @@ -604,10 +604,9 @@ impl ExecuteWithClient for RevertConsensus { fn execute_with_client(self, client: Arc) -> Self::Output where - >::StateBackend: sp_api::StateBackend, - Backend: sc_client_api::Backend + 'static, + Backend: sc_client_api::Backend, Backend::State: sp_api::StateBackend, - Api: RuntimeApiCollection, + Api: RuntimeApiCollection, Client: AbstractClient + 'static, { sc_consensus_babe::revert(client.clone(), self.backend, self.blocks)?; @@ -631,17 +630,12 @@ macro_rules! chain_ops { pub fn new_chain_ops( config: &Configuration, ) -> Result< - ( - Arc, - Arc, - sc_consensus::BasicQueue>, - TaskManager, - ), + (Arc, Arc, sc_consensus::BasicQueue, TaskManager), ServiceError, > { #[cfg(feature = "cere-dev-native")] if config.chain_spec.is_cere_dev() { - return chain_ops!(config; cere_dev_runtime, CereDevExecutorDispatch, CereDev) + return chain_ops!(config; cere_dev_runtime, CereDevExecutorDispatch, CereDev); } #[cfg(feature = "cere-native")] diff --git a/pallets/ddc-clusters/Cargo.toml b/pallets/ddc-clusters/Cargo.toml index c209fb9f8..7dda7df3f 100644 --- a/pallets/ddc-clusters/Cargo.toml +++ b/pallets/ddc-clusters/Cargo.toml @@ -12,6 +12,7 @@ repository.workspace = true # 3rd-party depdencies codec = { workspace = true } hex-literal = { workspace = true } +log = { workspace = true } scale-info = { workspace = true } serde = { workspace = true } diff --git a/pallets/ddc-clusters/src/benchmarking.rs b/pallets/ddc-clusters/src/benchmarking.rs index 5aa62f4c9..bcf46b49c 100644 --- a/pallets/ddc-clusters/src/benchmarking.rs +++ b/pallets/ddc-clusters/src/benchmarking.rs @@ -24,7 +24,12 @@ benchmarks! { create_cluster { let cluster_id = ClusterId::from([1; 20]); let user = account::("user", USER_SEED, 0u32); - let cluster_params = ClusterParams { node_provider_auth_contract: Some(user.clone()) }; + let cluster_params = ClusterParams { + node_provider_auth_contract: Some(user.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }; let cluster_gov_params: ClusterGovParams, BlockNumberFor> = ClusterGovParams { treasury_share: Perquintill::default(), validators_share: Perquintill::default(), @@ -78,10 +83,23 @@ benchmarks! { let user = account::("user", USER_SEED, 0u32); let user_2 = account::("user", USER_SEED_2, 0u32); let _ = config_cluster::(user.clone(), cluster_id); - let new_cluster_params = ClusterParams { node_provider_auth_contract: Some(user_2.clone()) }; + let new_cluster_params = ClusterParams { + node_provider_auth_contract: Some(user_2.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }; }: _(RawOrigin::Signed(user.clone()), cluster_id, new_cluster_params) verify { - assert_eq!(Clusters::::try_get(cluster_id).unwrap().props, ClusterProps { node_provider_auth_contract: Some(user_2) }); + assert_eq!( + Clusters::::try_get(cluster_id).unwrap().props, + ClusterProps { + node_provider_auth_contract: Some(user_2), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + } + ); } set_cluster_gov_params { diff --git a/pallets/ddc-clusters/src/cluster.rs b/pallets/ddc-clusters/src/cluster.rs index 93e19603e..0d9abae99 100644 --- a/pallets/ddc-clusters/src/cluster.rs +++ b/pallets/ddc-clusters/src/cluster.rs @@ -21,6 +21,9 @@ pub struct Cluster { #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq, Serialize, Deserialize)] pub struct ClusterProps { pub node_provider_auth_contract: Option, + pub erasure_coding_required: u32, + pub erasure_coding_total: u32, + pub replication_total: u32, } impl Cluster { @@ -36,6 +39,9 @@ impl Cluster { reserve_id, props: ClusterProps { node_provider_auth_contract: cluster_params.node_provider_auth_contract, + erasure_coding_required: cluster_params.erasure_coding_required, + erasure_coding_total: cluster_params.erasure_coding_total, + replication_total: cluster_params.replication_total, }, }) } @@ -46,6 +52,9 @@ impl Cluster { ) -> Result<(), ClusterError> { self.props = ClusterProps { node_provider_auth_contract: cluster_params.node_provider_auth_contract, + erasure_coding_required: cluster_params.erasure_coding_required, + erasure_coding_total: cluster_params.erasure_coding_total, + replication_total: cluster_params.replication_total, }; Ok(()) } diff --git a/pallets/ddc-clusters/src/lib.rs b/pallets/ddc-clusters/src/lib.rs index 937e5b7c6..337b04ed4 100644 --- a/pallets/ddc-clusters/src/lib.rs +++ b/pallets/ddc-clusters/src/lib.rs @@ -26,6 +26,8 @@ pub(crate) mod mock; #[cfg(test)] mod tests; +pub mod migration; + use ddc_primitives::{ traits::{ cluster::{ClusterCreator, ClusterVisitor, ClusterVisitorError}, @@ -66,7 +68,7 @@ pub mod pallet { /// The current storage version. const STORAGE_VERSION: frame_support::traits::StorageVersion = - frame_support::traits::StorageVersion::new(0); + frame_support::traits::StorageVersion::new(1); #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] @@ -81,6 +83,12 @@ pub mod pallet { type StakerCreator: StakerCreator>; type Currency: LockableCurrency>; type WeightInfo: WeightInfo; + #[pallet::constant] + type MinErasureCodingRequiredLimit: Get; + #[pallet::constant] + type MinErasureCodingTotalLimit: Get; + #[pallet::constant] + type MinReplicationTotalLimit: Get; } #[pallet::event] @@ -111,6 +119,9 @@ pub mod pallet { NodeAuthContractCallFailed, NodeAuthContractDeployFailed, NodeAuthNodeAuthorizationNotSuccessful, + ErasureCodingRequiredDidNotMeetMinimum, + ErasureCodingTotalNotMeetMinimum, + ReplicationTotalDidNotMeetMinimum, } #[pallet::storage] @@ -171,6 +182,9 @@ pub mod pallet { .props .node_provider_auth_contract .clone(), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 }, self.clusters_gov_params .iter() @@ -297,6 +311,18 @@ pub mod pallet { let mut cluster = Clusters::::try_get(cluster_id).map_err(|_| Error::::ClusterDoesNotExist)?; ensure!(cluster.manager_id == caller_id, Error::::OnlyClusterManager); + ensure!( + cluster_params.erasure_coding_required >= T::MinErasureCodingRequiredLimit::get(), + Error::::ErasureCodingRequiredDidNotMeetMinimum + ); + ensure!( + cluster_params.erasure_coding_total >= T::MinErasureCodingTotalLimit::get(), + Error::::ErasureCodingTotalNotMeetMinimum + ); + ensure!( + cluster_params.replication_total >= T::MinReplicationTotalLimit::get(), + Error::::ReplicationTotalDidNotMeetMinimum + ); cluster.set_params(cluster_params).map_err(Into::>::into)?; Clusters::::insert(cluster_id, cluster); Self::deposit_event(Event::::ClusterParamsSet { cluster_id }); @@ -330,11 +356,24 @@ pub mod pallet { cluster_params: ClusterParams, cluster_gov_params: ClusterGovParams, BlockNumberFor>, ) -> DispatchResult { + ensure!(!Clusters::::contains_key(cluster_id), Error::::ClusterAlreadyExists); + + ensure!( + cluster_params.erasure_coding_required >= T::MinErasureCodingRequiredLimit::get(), + Error::::ErasureCodingRequiredDidNotMeetMinimum + ); + ensure!( + cluster_params.erasure_coding_total >= T::MinErasureCodingTotalLimit::get(), + Error::::ErasureCodingTotalNotMeetMinimum + ); + ensure!( + cluster_params.replication_total >= T::MinReplicationTotalLimit::get(), + Error::::ReplicationTotalDidNotMeetMinimum + ); + let cluster = Cluster::new(cluster_id, cluster_manager_id, cluster_reserve_id, cluster_params) .map_err(Into::>::into)?; - ensure!(!Clusters::::contains_key(cluster_id), Error::::ClusterAlreadyExists); - Clusters::::insert(cluster_id, cluster); ClustersGovParams::::insert(cluster_id, cluster_gov_params); Self::deposit_event(Event::::ClusterCreated { cluster_id }); diff --git a/pallets/ddc-clusters/src/migration.rs b/pallets/ddc-clusters/src/migration.rs new file mode 100644 index 000000000..cdb17d46e --- /dev/null +++ b/pallets/ddc-clusters/src/migration.rs @@ -0,0 +1,198 @@ +#[cfg(feature = "try-runtime")] +use frame_support::ensure; +use frame_support::{ + storage_alias, + traits::{Get, GetStorageVersion, OnRuntimeUpgrade, StorageVersion}, + weights::Weight, +}; +use log::info; +#[cfg(feature = "try-runtime")] +use sp_runtime::DispatchError; +use sp_runtime::Saturating; + +use super::*; +use crate::cluster::ClusterProps; + +const LOG_TARGET: &str = "ddc-clusters"; + +pub mod v0 { + use frame_support::pallet_prelude::*; + + use super::*; + + #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] + pub struct Cluster { + pub cluster_id: ClusterId, + pub manager_id: AccountId, + pub reserve_id: AccountId, + pub props: ClusterProps, + } + + #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] + pub struct ClusterProps { + pub node_provider_auth_contract: Option, + } + + #[storage_alias] + pub(super) type Clusters = StorageMap< + crate::Pallet, + Blake2_128Concat, + ClusterId, + Cluster<::AccountId>, + >; +} + +pub fn migrate_to_v1() -> Weight { + let on_chain_version = Pallet::::on_chain_storage_version(); + let current_version = Pallet::::current_storage_version(); + + info!( + target: LOG_TARGET, + "Running migration with current storage version {:?} / onchain {:?}", + current_version, + on_chain_version + ); + + if on_chain_version == 0 && current_version == 1 { + let mut translated = 0u64; + let count = v0::Clusters::::iter().count(); + info!( + target: LOG_TARGET, + " >>> Updating DDC Cluster storage. Migrating {} clusters...", count + ); + + Clusters::::translate::, _>( + |cluster_id: ClusterId, cluster: v0::Cluster| { + info!(target: LOG_TARGET, " Migrating cluster for cluster ID {:?}...", cluster_id); + translated.saturating_inc(); + let props = ClusterProps { + node_provider_auth_contract: cluster.props.node_provider_auth_contract, + erasure_coding_required: 16, + erasure_coding_total: 48, + replication_total: 20, + }; + + Some(Cluster { + cluster_id: cluster.cluster_id, + manager_id: cluster.manager_id, + reserve_id: cluster.reserve_id, + props, + }) + }, + ); + + // Update storage version. + StorageVersion::new(1).put::>(); + info!( + target: LOG_TARGET, + "Upgraded {} records, storage to version {:?}", + translated, + current_version + ); + + T::DbWeight::get().reads_writes(translated + 1, translated + 1) + } else { + info!(target: LOG_TARGET, " >>> Unused migration!"); + T::DbWeight::get().reads(1) + } +} +pub struct MigrateToV1(sp_std::marker::PhantomData); +impl OnRuntimeUpgrade for MigrateToV1 { + fn on_runtime_upgrade() -> Weight { + migrate_to_v1::() + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, DispatchError> { + let prev_count = v0::Clusters::::iter().count(); + + Ok((prev_count as u64).encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(prev_state: Vec) -> Result<(), DispatchError> { + let prev_count: u64 = + Decode::decode(&mut &prev_state[..]).expect("pre_upgrade provides a valid state; qed"); + + let post_count = Clusters::::iter().count() as u64; + ensure!( + prev_count == post_count, + "the cluster count before and after the migration should be the same" + ); + + let current_version = Pallet::::current_storage_version(); + let on_chain_version = Pallet::::on_chain_storage_version(); + + frame_support::ensure!(current_version == 1, "must_upgrade"); + ensure!( + current_version == on_chain_version, + "after migration, the current_version and on_chain_version should be the same" + ); + Ok(()) + } +} + +#[cfg(test)] +#[cfg(feature = "try-runtime")] +mod test { + + use frame_support::pallet_prelude::StorageVersion; + + use super::*; + use crate::mock::{Test as T, *}; + + #[test] + fn cluster_migration_works() { + ExtBuilder.build_and_execute(|| { + let cluster_id0 = ClusterId::from([0; 20]); + let cluster_id1 = ClusterId::from([1; 20]); + let cluster_id2 = ClusterId::from([2; 20]); + let cluster_manager_id = AccountId::from([1; 32]); + let cluster_reserve_id = AccountId::from([2; 32]); + let auth_contract = AccountId::from([3; 32]); + + assert_eq!(StorageVersion::get::>(), 0); + + let cluster1 = v0::Cluster { + cluster_id: cluster_id1, + manager_id: cluster_manager_id.clone(), + reserve_id: cluster_reserve_id.clone(), + props: v0::ClusterProps { + node_provider_auth_contract: Some(auth_contract.clone()), + }, + }; + + v0::Clusters::::insert(cluster_id1, cluster1); + let cluster2 = v0::Cluster { + cluster_id: cluster_id2, + manager_id: cluster_manager_id, + reserve_id: cluster_reserve_id, + props: v0::ClusterProps { + node_provider_auth_contract: Some(auth_contract.clone()), + }, + }; + + v0::Clusters::::insert(cluster_id2, cluster2); + let cluster_count = v0::Clusters::::iter_values().count() as u32; + + assert_eq!(cluster_count, 3); + let state = MigrateToV1::::pre_upgrade().unwrap(); + let _weight = MigrateToV1::::on_runtime_upgrade(); + MigrateToV1::::post_upgrade(state).unwrap(); + + let cluster_count_after_upgrade = Clusters::::iter_values().count() as u32; + + assert_eq!(StorageVersion::get::>(), 1); + assert_eq!(cluster_count_after_upgrade, 3); + assert_eq!(Clusters::::get(cluster_id0).unwrap().props.erasure_coding_required, 16); + assert_eq!(Clusters::::get(cluster_id0).unwrap().props.erasure_coding_total, 48); + assert_eq!(Clusters::::get(cluster_id0).unwrap().props.replication_total, 20); + assert_eq!(Clusters::::get(cluster_id1).unwrap().props.erasure_coding_required, 16); + assert_eq!(Clusters::::get(cluster_id1).unwrap().props.erasure_coding_total, 48); + assert_eq!(Clusters::::get(cluster_id1).unwrap().props.replication_total, 20); + assert_eq!(Clusters::::get(cluster_id2).unwrap().props.erasure_coding_required, 16); + assert_eq!(Clusters::::get(cluster_id2).unwrap().props.erasure_coding_total, 48); + assert_eq!(Clusters::::get(cluster_id2).unwrap().props.replication_total, 20); + }); + } +} diff --git a/pallets/ddc-clusters/src/mock.rs b/pallets/ddc-clusters/src/mock.rs index 74f05e998..b333afb9a 100644 --- a/pallets/ddc-clusters/src/mock.rs +++ b/pallets/ddc-clusters/src/mock.rs @@ -20,7 +20,7 @@ use sp_runtime::{ traits::{ BlakeTwo256, Convert, Extrinsic as ExtrinsicT, IdentifyAccount, IdentityLookup, Verify, }, - BuildStorage, MultiSignature, Perquintill, + BuildStorage, MultiSignature, Perbill, Perquintill, }; use crate::{self as pallet_ddc_clusters, *}; @@ -38,7 +38,7 @@ type Block = MockBlock; construct_runtime!( pub struct Test { - Contracts: contracts::{Pallet, Call, Storage, Event}, + Contracts: contracts::{Pallet, Call, Storage, Event, HoldReason}, System: frame_system::{Pallet, Call, Config, Storage, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, @@ -61,6 +61,8 @@ parameter_types! { pub const MaxValueSize: u32 = 16_384; pub Schedule: pallet_contracts::Schedule = Default::default(); pub static DefaultDepositLimit: Balance = 10_000_000; + pub const CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(0); + pub const MaxDelegateDependencies: u32 = 32; } impl Convert> for Test { @@ -69,10 +71,9 @@ impl Convert> for Test { } } -use contracts::Config as contractsConfig; - -type BalanceOf = - <::Currency as Currency<::AccountId>>::Balance; +type BalanceOf = <::Currency as Currency< + ::AccountId, +>>::Balance; impl contracts::Config for Test { type Time = Timestamp; @@ -94,6 +95,11 @@ impl contracts::Config for Test { type MaxStorageKeyLen = ConstU32<128>; type UnsafeUnstableInterface = ConstBool; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; + type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; + type MaxDelegateDependencies = MaxDelegateDependencies; + type RuntimeHoldReason = RuntimeHoldReason; + type Debug = (); + type Environment = (); type Migrations = (); } @@ -173,8 +179,8 @@ impl pallet_balances::Config for Test { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type MaxHolds = (); - type RuntimeHoldReason = (); + type MaxHolds = ConstU32<1>; + type RuntimeHoldReason = RuntimeHoldReason; } impl pallet_timestamp::Config for Test { @@ -197,6 +203,9 @@ impl crate::pallet::Config for Test { type StakingVisitor = TestStakingVisitor; type StakerCreator = TestStaker; type WeightInfo = (); + type MinErasureCodingRequiredLimit = ConstU32<4>; + type MinErasureCodingTotalLimit = ConstU32<6>; + type MinReplicationTotalLimit = ConstU32<3>; } pub(crate) type DdcStakingCall = crate::Call; @@ -271,7 +280,12 @@ impl ExtBuilder { ClusterId::from([0; 20]), AccountId::from([0; 32]), AccountId::from([0; 32]), - ClusterParams { node_provider_auth_contract: Some(AccountId::from([0; 32])) }, + ClusterParams { + node_provider_auth_contract: Some(AccountId::from([0; 32])), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3, + }, ) { let _ = pallet_ddc_clusters::GenesisConfig:: { clusters: vec![cluster], diff --git a/pallets/ddc-clusters/src/testing_utils.rs b/pallets/ddc-clusters/src/testing_utils.rs index 9a8b74002..a09688a1f 100644 --- a/pallets/ddc-clusters/src/testing_utils.rs +++ b/pallets/ddc-clusters/src/testing_utils.rs @@ -20,7 +20,12 @@ pub fn config_cluster(user: T::AccountId, cluster_id: ClusterId) where T::AccountId: UncheckedFrom + AsRef<[u8]>, { - let cluster_params = ClusterParams { node_provider_auth_contract: Some(user.clone()) }; + let cluster_params = ClusterParams { + node_provider_auth_contract: Some(user.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3, + }; let cluster_gov_params: ClusterGovParams, BlockNumberFor> = ClusterGovParams { treasury_share: Perquintill::default(), validators_share: Perquintill::default(), @@ -52,7 +57,12 @@ pub fn config_cluster_and_node( where T::AccountId: UncheckedFrom + AsRef<[u8]>, { - let cluster_params = ClusterParams { node_provider_auth_contract: Some(user.clone()) }; + let cluster_params = ClusterParams { + node_provider_auth_contract: Some(user.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3, + }; let storage_node_params = StorageNodeParams { mode: StorageNodeMode::Storage, host: vec![1u8; 255], @@ -106,9 +116,12 @@ where auth_contract = auth_contract.deploy_contract(user.clone())?; auth_contract.authorize_node(node_pub_key)?; - let updated_cluster_params = - ClusterParams { node_provider_auth_contract: Some(auth_contract.contract_id) }; - + let updated_cluster_params = ClusterParams { + node_provider_auth_contract: Some(auth_contract.contract_id), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3, + }; // Register auth contract let _ = DdcClusters::::set_cluster_params( RawOrigin::Signed(user).into(), diff --git a/pallets/ddc-clusters/src/tests.rs b/pallets/ddc-clusters/src/tests.rs index a78306e3d..1f8b50956 100644 --- a/pallets/ddc-clusters/src/tests.rs +++ b/pallets/ddc-clusters/src/tests.rs @@ -1,5 +1,6 @@ //! Tests for the module. +use codec::Compact; use ddc_primitives::{ traits::cluster::ClusterManager, ClusterBondingParams, ClusterFeesParams, ClusterId, ClusterParams, ClusterPricingParams, NodeParams, NodePubKey, StorageNodeMode, @@ -42,7 +43,12 @@ fn create_cluster_works() { cluster_id, cluster_manager_id.clone(), cluster_reserve_id.clone(), - ClusterParams { node_provider_auth_contract: Some(auth_contract.clone()) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, cluster_gov_params.clone() ), BadOrigin @@ -54,7 +60,12 @@ fn create_cluster_works() { cluster_id, cluster_manager_id.clone(), cluster_reserve_id.clone(), - ClusterParams { node_provider_auth_contract: Some(auth_contract.clone()) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, cluster_gov_params.clone() )); @@ -110,7 +121,12 @@ fn create_cluster_works() { cluster_id, cluster_manager_id, cluster_reserve_id, - ClusterParams { node_provider_auth_contract: Some(auth_contract) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, cluster_gov_params ), Error::::ClusterAlreadyExists @@ -152,7 +168,12 @@ fn add_and_delete_node_works() { cluster_id, cluster_manager_id.clone(), cluster_reserve_id.clone(), - ClusterParams { node_provider_auth_contract: Some(cluster_manager_id.clone()) }, + ClusterParams { + node_provider_auth_contract: Some(cluster_manager_id.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, ClusterGovParams { treasury_share: Perquintill::from_float(0.05), validators_share: Perquintill::from_float(0.01), @@ -218,7 +239,12 @@ fn add_and_delete_node_works() { assert_ok!(DdcClusters::set_cluster_params( RuntimeOrigin::signed(cluster_manager_id.clone()), cluster_id, - ClusterParams { node_provider_auth_contract: Some(contract_id) }, + ClusterParams { + node_provider_auth_contract: Some(contract_id), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, )); // Node added succesfully @@ -309,7 +335,7 @@ fn add_and_delete_node_works() { RuntimeOrigin::signed(alice.clone()), ENDOWMENT, GAS_LIMIT, - None, + Some(Compact(100)), wasm.to_vec(), contract_args.clone(), vec![], @@ -361,7 +387,12 @@ fn set_cluster_params_works() { DdcClusters::set_cluster_params( RuntimeOrigin::signed(cluster_manager_id.clone()), cluster_id, - ClusterParams { node_provider_auth_contract: Some(auth_contract_1.clone()) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract_1.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, ), Error::::ClusterDoesNotExist ); @@ -372,7 +403,12 @@ fn set_cluster_params_works() { cluster_id, cluster_manager_id.clone(), cluster_reserve_id.clone(), - ClusterParams { node_provider_auth_contract: Some(auth_contract_1) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract_1), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, ClusterGovParams { treasury_share: Perquintill::from_float(0.05), validators_share: Perquintill::from_float(0.01), @@ -391,19 +427,74 @@ fn set_cluster_params_works() { DdcClusters::set_cluster_params( RuntimeOrigin::signed(cluster_reserve_id), cluster_id, - ClusterParams { node_provider_auth_contract: Some(auth_contract_2.clone()) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract_2.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, ), Error::::OnlyClusterManager ); + assert_noop!( + DdcClusters::set_cluster_params( + RuntimeOrigin::signed(cluster_manager_id.clone()), + cluster_id, + ClusterParams { + node_provider_auth_contract: Some(auth_contract_2.clone()), + erasure_coding_required: 1, + erasure_coding_total: 6, + replication_total: 3 + }, + ), + Error::::ErasureCodingRequiredDidNotMeetMinimum + ); + + assert_noop!( + DdcClusters::set_cluster_params( + RuntimeOrigin::signed(cluster_manager_id.clone()), + cluster_id, + ClusterParams { + node_provider_auth_contract: Some(auth_contract_2.clone()), + erasure_coding_required: 4, + erasure_coding_total: 1, + replication_total: 3 + }, + ), + Error::::ErasureCodingTotalNotMeetMinimum + ); + + assert_noop!( + DdcClusters::set_cluster_params( + RuntimeOrigin::signed(cluster_manager_id.clone()), + cluster_id, + ClusterParams { + node_provider_auth_contract: Some(auth_contract_2.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 1 + }, + ), + Error::::ReplicationTotalDidNotMeetMinimum + ); + assert_ok!(DdcClusters::set_cluster_params( RuntimeOrigin::signed(cluster_manager_id), cluster_id, - ClusterParams { node_provider_auth_contract: Some(auth_contract_2.clone()) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract_2.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, )); let updated_cluster = DdcClusters::clusters(cluster_id).unwrap(); assert_eq!(updated_cluster.props.node_provider_auth_contract, Some(auth_contract_2)); + assert_eq!(updated_cluster.props.erasure_coding_required, 4); + assert_eq!(updated_cluster.props.erasure_coding_total, 6); + assert_eq!(updated_cluster.props.replication_total, 3); // Checking that event was emitted assert_eq!(System::events().len(), 2); @@ -449,7 +540,12 @@ fn set_cluster_gov_params_works() { cluster_id, cluster_manager_id.clone(), cluster_reserve_id, - ClusterParams { node_provider_auth_contract: Some(auth_contract) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, cluster_gov_params.clone() )); @@ -555,7 +651,12 @@ fn cluster_visitor_works() { cluster_id, cluster_manager_id, cluster_reserve_id.clone(), - ClusterParams { node_provider_auth_contract: Some(auth_contract) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, cluster_gov_params )); @@ -662,7 +763,12 @@ fn cluster_creator_works() { cluster_id, cluster_manager_id, cluster_reserve_id, - ClusterParams { node_provider_auth_contract: Some(auth_contract) }, + ClusterParams { + node_provider_auth_contract: Some(auth_contract), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, cluster_gov_params )); diff --git a/pallets/ddc-customers/src/benchmarking.rs b/pallets/ddc-customers/src/benchmarking.rs index 263239b6d..60ec90c82 100644 --- a/pallets/ddc-customers/src/benchmarking.rs +++ b/pallets/ddc-customers/src/benchmarking.rs @@ -38,7 +38,12 @@ benchmarks! { ClusterId::from([1; 20]), user.clone(), user.clone(), - ClusterParams { node_provider_auth_contract: Some(user.clone()) }, + ClusterParams { + node_provider_auth_contract: Some(user.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3 + }, cluster_gov_params ); diff --git a/pallets/ddc-customers/src/lib.rs b/pallets/ddc-customers/src/lib.rs index 0d6aa30fc..41b15a364 100644 --- a/pallets/ddc-customers/src/lib.rs +++ b/pallets/ddc-customers/src/lib.rs @@ -245,6 +245,7 @@ pub mod pallet { } } + #[allow(unused_must_use)] #[pallet::genesis_build] impl BuildGenesisConfig for GenesisConfig { fn build(&self) { @@ -613,7 +614,7 @@ pub mod pallet { } if unlocking_balance >= value { - break + break; } } diff --git a/pallets/ddc-customers/src/migration.rs b/pallets/ddc-customers/src/migration.rs index 3b1d22153..b95225a3e 100644 --- a/pallets/ddc-customers/src/migration.rs +++ b/pallets/ddc-customers/src/migration.rs @@ -6,6 +6,7 @@ use frame_support::{ weights::Weight, }; use log::info; +#[cfg(feature = "try-runtime")] use sp_runtime::DispatchError; use super::*; diff --git a/pallets/ddc-customers/src/mock.rs b/pallets/ddc-customers/src/mock.rs index 7ce43a6e3..451519b81 100644 --- a/pallets/ddc-customers/src/mock.rs +++ b/pallets/ddc-customers/src/mock.rs @@ -1,11 +1,9 @@ //! Test utilities use ddc_primitives::{ - traits::cluster::{ - ClusterCreator, ClusterManager, ClusterManagerError, ClusterVisitor, ClusterVisitorError, - }, - ClusterBondingParams, ClusterFeesParams, ClusterGovParams, ClusterId, ClusterParams, - ClusterPricingParams, NodePubKey, NodeType, + traits::cluster::{ClusterManager, ClusterManagerError, ClusterVisitorError}, + ClusterBondingParams, ClusterFeesParams, ClusterGovParams, ClusterParams, ClusterPricingParams, + NodePubKey, NodeType, }; use frame_support::{ construct_runtime, parameter_types, diff --git a/pallets/ddc-customers/src/tests.rs b/pallets/ddc-customers/src/tests.rs index 7c8921200..86d1e0bf9 100644 --- a/pallets/ddc-customers/src/tests.rs +++ b/pallets/ddc-customers/src/tests.rs @@ -1,6 +1,5 @@ //! Tests for the module. -use ddc_primitives::ClusterId; use frame_support::{assert_noop, assert_ok}; use super::{mock::*, *}; @@ -506,3 +505,84 @@ fn remove_bucket_works() { ); }) } + +#[test] +fn remove_bucket_checks_with_multiple_buckets_works() { + ExtBuilder.build_and_execute(|| { + let cluster_id = ClusterId::from([1; 20]); + let account_1 = 1; + let account_2 = 2; + let bucket_id_1 = 1; + let bucket_id_2 = 2; + let private_bucket_params = BucketParams { is_public: false }; + let public_bucket_params = BucketParams { is_public: true }; + + // Fail to remove non-existing buckets + assert_noop!( + DdcCustomers::remove_bucket(RuntimeOrigin::signed(account_1), bucket_id_1), + Error::::NoBucketWithId + ); + + assert_noop!( + DdcCustomers::remove_bucket(RuntimeOrigin::signed(account_1), bucket_id_2), + Error::::NoBucketWithId + ); + + // Bucket created + assert_ok!(DdcCustomers::create_bucket( + RuntimeOrigin::signed(account_1), + cluster_id, + private_bucket_params.clone() + )); + + // Bucket created + assert_ok!(DdcCustomers::create_bucket( + RuntimeOrigin::signed(account_2), + cluster_id, + public_bucket_params.clone() + )); + + // Fail to remove bucket with different owner + assert_noop!( + DdcCustomers::remove_bucket(RuntimeOrigin::signed(account_1), bucket_id_2), + Error::::NotBucketOwner + ); + + assert_noop!( + DdcCustomers::remove_bucket(RuntimeOrigin::signed(account_2), bucket_id_1), + Error::::NotBucketOwner + ); + + // Remove bucket with correct owner + assert_ok!(DdcCustomers::remove_bucket(RuntimeOrigin::signed(account_1), bucket_id_1)); + + // Verify whether bucket has been removed + assert_eq!( + DdcCustomers::buckets(bucket_id_1), + Some(Bucket { + bucket_id: bucket_id_1, + owner_id: account_1, + cluster_id, + is_public: private_bucket_params.is_public, + is_removed: true, + }) + ); + + assert_eq!( + DdcCustomers::buckets(bucket_id_2), + Some(Bucket { + bucket_id: bucket_id_2, + owner_id: account_2, + cluster_id, + is_public: public_bucket_params.is_public, + is_removed: false, + }) + ); + + // Fail to remove already removed bucket + assert_noop!( + DdcCustomers::remove_bucket(RuntimeOrigin::signed(account_1), bucket_id_1), + Error::::AlreadyRemoved + ); + }) +} diff --git a/pallets/ddc-nodes/src/lib.rs b/pallets/ddc-nodes/src/lib.rs index a8220b2bd..4f0e8aba0 100644 --- a/pallets/ddc-nodes/src/lib.rs +++ b/pallets/ddc-nodes/src/lib.rs @@ -185,7 +185,7 @@ pub mod pallet { match node { Node::Storage(storage_node) => { if StorageNodes::::contains_key(&storage_node.pub_key) { - return Err(NodeRepositoryError::StorageNodeAlreadyExists) + return Err(NodeRepositoryError::StorageNodeAlreadyExists); } StorageNodes::::insert(storage_node.pub_key.clone(), storage_node); Ok(()) @@ -206,7 +206,7 @@ pub mod pallet { match node { Node::Storage(storage_node) => { if !StorageNodes::::contains_key(&storage_node.pub_key) { - return Err(NodeRepositoryError::StorageNodeDoesNotExist) + return Err(NodeRepositoryError::StorageNodeDoesNotExist); } StorageNodes::::insert(storage_node.pub_key.clone(), storage_node); }, diff --git a/pallets/ddc-payouts/src/benchmarking.rs b/pallets/ddc-payouts/src/benchmarking.rs index dde17e11d..d92f86693 100644 --- a/pallets/ddc-payouts/src/benchmarking.rs +++ b/pallets/ddc-payouts/src/benchmarking.rs @@ -60,7 +60,12 @@ fn create_cluster( fn create_default_cluster(cluster_id: ClusterId) { let cluster_manager = create_account::("cm", 0, 0); let cluster_reserve = create_account::("cr", 0, 0); - let cluster_params = ClusterParams { node_provider_auth_contract: Default::default() }; + let cluster_params = ClusterParams { + node_provider_auth_contract: Default::default(), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3, + }; let cluster_gov_params: ClusterGovParams, BlockNumberFor> = ClusterGovParams { treasury_share: Perquintill::from_percent(5), validators_share: Perquintill::from_percent(10), diff --git a/pallets/ddc-staking/src/lib.rs b/pallets/ddc-staking/src/lib.rs index 311fdc74d..65f8639e7 100644 --- a/pallets/ddc-staking/src/lib.rs +++ b/pallets/ddc-staking/src/lib.rs @@ -38,7 +38,6 @@ use frame_support::{ pallet_prelude::*, parameter_types, traits::{Currency, DefensiveSaturating, LockIdentifier, LockableCurrency, WithdrawReasons}, - BoundedVec, }; use frame_system::pallet_prelude::*; pub use pallet::*; @@ -604,7 +603,7 @@ pub mod pallet { ensure!(current_cluster == cluster_id, Error::::AlreadyInRole); // Cancel previous "chill" attempts Self::reset_chilling(&controller); - return Ok(()) + return Ok(()); } else { // Can't participate in new Storage network if provider hasn't left the previous // cluster yet @@ -646,13 +645,13 @@ pub mod pallet { .map_err(Into::>::into)?; (cluster, chill_delay) } else { - return Ok(()) // node is already chilling or leaving the cluster + return Ok(()); // node is already chilling or leaving the cluster }; if delay == BlockNumberFor::::from(0u32) { // No delay is set, so we can chill right away. Self::chill_stash(&ledger.stash); - return Ok(()) + return Ok(()); } let can_chill_from = current_block.defensive_saturating_add(delay); @@ -660,13 +659,13 @@ pub mod pallet { None => { // No previous declarations of desire to chill. Note it to allow chilling soon. Self::chill_stash_soon(&ledger.stash, &controller, cluster, can_chill_from); - return Ok(()) + return Ok(()); }, Some(chilling) if can_chill_from < chilling => { // Time to chill is not reached yet, but it is allowed to chill earlier. Update // to allow chilling sooner. Self::chill_stash_soon(&ledger.stash, &controller, cluster, can_chill_from); - return Ok(()) + return Ok(()); }, Some(chilling) if chilling > current_block => Err(Error::::TooEarly)?, Some(_) => (), diff --git a/pallets/ddc-staking/src/testing_utils.rs b/pallets/ddc-staking/src/testing_utils.rs index 16788cb27..c302b2350 100644 --- a/pallets/ddc-staking/src/testing_utils.rs +++ b/pallets/ddc-staking/src/testing_utils.rs @@ -111,7 +111,12 @@ pub fn create_stash_controller_node_with_balance( } let cluster_id = ClusterId::from([1; 20]); - let cluster_params = ClusterParams { node_provider_auth_contract: Some(stash.clone()) }; + let cluster_params = ClusterParams { + node_provider_auth_contract: Some(stash.clone()), + erasure_coding_required: 4, + erasure_coding_total: 6, + replication_total: 3, + }; let cluster_gov_params: ClusterGovParams, BlockNumberFor> = ClusterGovParams { treasury_share: Perquintill::default(), validators_share: Perquintill::default(), diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 45e77e553..509db89d7 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -20,6 +20,9 @@ pub type StorageNodePubKey = AccountId32; #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq)] pub struct ClusterParams { pub node_provider_auth_contract: Option, + pub erasure_coding_required: u32, + pub erasure_coding_total: u32, + pub replication_total: u32, } // ClusterGovParams includes Governance sensitive parameters diff --git a/runtime/cere-dev/Cargo.toml b/runtime/cere-dev/Cargo.toml index 3786d42f6..7b0b75c2e 100644 --- a/runtime/cere-dev/Cargo.toml +++ b/runtime/cere-dev/Cargo.toml @@ -39,6 +39,7 @@ pallet-child-bounties = { workspace = true } pallet-collective = { workspace = true } pallet-contracts = { workspace = true } pallet-contracts-primitives = { workspace = true } +pallet-conviction-voting = { workspace = true } pallet-democracy = { workspace = true } pallet-election-provider-multi-phase = { workspace = true } pallet-election-provider-support-benchmarking = { workspace = true, optional = true } @@ -57,8 +58,10 @@ pallet-offences = { workspace = true } pallet-preimage = { workspace = true } pallet-proxy = { workspace = true } pallet-recovery = { workspace = true } +pallet-referenda = { workspace = true } pallet-scheduler = { workspace = true } pallet-session = { workspace = true, features = ["historical"] } +pallet-session-benchmarking = { workspace = true, optional = true } pallet-staking = { workspace = true } pallet-staking-reward-curve = { workspace = true } pallet-sudo = { workspace = true } @@ -69,7 +72,9 @@ pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-treasury = { workspace = true } pallet-utility = { workspace = true } pallet-vesting = { workspace = true } +pallet-whitelist = { workspace = true } sp-api = { workspace = true } +sp-arithmetic = { workspace = true } sp-authority-discovery = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-babe = { workspace = true } @@ -81,6 +86,7 @@ sp-runtime = { workspace = true } sp-session = { workspace = true } sp-staking = { workspace = true } sp-std = { workspace = true } +sp-storage = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } @@ -103,79 +109,85 @@ substrate-wasm-builder = { workspace = true, default-features = true } default = ["std"] with-tracing = ["frame-executive/with-tracing"] std = [ - "sp-authority-discovery/std", - "pallet-authority-discovery/std", - "pallet-authorship/std", - "sp-consensus-babe/std", - "pallet-babe/std", - "pallet-bags-list/std", - "pallet-balances/std", - "pallet-bounties/std", - "sp-block-builder/std", "codec/std", "scale-info/std", + "log/std", + "frame-executive/std", + "frame-support/std", + "frame-benchmarking/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime/std", + "node-primitives/std", "pallet-collective/std", "pallet-contracts/std", "pallet-contracts-primitives/std", "pallet-democracy/std", "pallet-fast-unstake/std", "pallet-elections-phragmen/std", - "frame-executive/std", "pallet-chainbridge/std", "pallet-erc721/std", "pallet-erc20/std", "pallet-grandpa/std", "pallet-im-online/std", "pallet-indices/std", + "pallet-babe/std", + "pallet-bags-list/std", + "pallet-balances/std", + "pallet-bounties/std", + "pallet-authority-discovery/std", + "pallet-authorship/std", "sp-inherents/std", "pallet-membership/std", + "pallet-insecure-randomness-collective-flip/std", "pallet-multisig/std", "pallet-nomination-pools/std", "pallet-nomination-pools-runtime-api/std", "pallet-identity/std", "pallet-scheduler/std", - "node-primitives/std", "pallet-offences/std", "pallet-proxy/std", "pallet-preimage/std", - "sp-core/std", - "pallet-insecure-randomness-collective-flip/std", - "sp-std/std", - "pallet-session/std", - "sp-api/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-staking/std", - "pallet-staking/std", - "sp-session/std", - "pallet-sudo/std", - "frame-support/std", - "frame-benchmarking/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", "pallet-election-provider-multi-phase/std", "pallet-timestamp/std", "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-treasury/std", - "sp-transaction-pool/std", + "pallet-session/std", + "pallet-staking/std", + "pallet-sudo/std", "pallet-utility/std", "sp-version/std", "pallet-recovery/std", "pallet-vesting/std", - "log/std", - "frame-try-runtime/std", + "sp-core/std", + "sp-authority-discovery/std", + "sp-consensus-babe/std", + "sp-block-builder/std", + "sp-std/std", + "sp-api/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-staking/std", + "sp-storage/std", + "sp-session/std", + "sp-transaction-pool/std", + "sp-version/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", "pallet-ddc-customers/std", "pallet-ddc-clusters/std", "pallet-ddc-payouts/std", + "cere-runtime-common/std", + "sp-arithmetic/std", + "pallet-conviction-voting/std", + "pallet-referenda/std", + "pallet-whitelist/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", @@ -204,6 +216,7 @@ runtime-benchmarks = [ "pallet-proxy/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", + "pallet-session-benchmarking/runtime-benchmarks", "pallet-staking/runtime-benchmarks", "pallet-ddc-customers/runtime-benchmarks", "pallet-ddc-clusters/runtime-benchmarks", @@ -219,6 +232,9 @@ runtime-benchmarks = [ "pallet-chainbridge/runtime-benchmarks", "ddc-primitives/runtime-benchmarks", "hex-literal", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", ] try-runtime = [ "frame-executive/try-runtime", @@ -267,4 +283,7 @@ try-runtime = [ "pallet-ddc-staking/try-runtime", "pallet-erc20/try-runtime", "pallet-erc721/try-runtime", + "pallet-conviction-voting/try-runtime", + "pallet-referenda/try-runtime", + "pallet-whitelist/try-runtime", ] diff --git a/runtime/cere-dev/src/governance/mod.rs b/runtime/cere-dev/src/governance/mod.rs new file mode 100644 index 000000000..75b25fcc8 --- /dev/null +++ b/runtime/cere-dev/src/governance/mod.rs @@ -0,0 +1,70 @@ +use frame_support::parameter_types; +use frame_system::EnsureRootWithSuccess; + +use super::*; + +mod origins; +pub use origins::{ + pallet_custom_origins, GeneralAdmin, ReferendumCanceller, ReferendumKiller, Spender, + StakingAdmin, Treasurer, WhitelistedCaller, +}; +mod tracks; +pub use tracks::TracksInfo; + +parameter_types! { + pub const VoteLockingPeriod: BlockNumber = 7 * DAYS; +} + +impl pallet_conviction_voting::Config for Runtime { + type WeightInfo = pallet_conviction_voting::weights::SubstrateWeight; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type VoteLockingPeriod = VoteLockingPeriod; + type MaxVotes = ConstU32<512>; + type MaxTurnout = + frame_support::traits::tokens::currency::ActiveIssuanceOf; + type Polls = Referenda; +} + +parameter_types! { + pub const AlarmInterval: BlockNumber = 1; + pub const SubmissionDeposit: Balance = DOLLARS; + pub const UndecidingTimeout: BlockNumber = 14 * DAYS; +} + +parameter_types! { + pub const MaxBalance: Balance = Balance::max_value(); +} + +pub type TreasurySpender = EitherOf, Spender>; + +impl origins::pallet_custom_origins::Config for Runtime {} + +impl pallet_whitelist::Config for Runtime { + type WeightInfo = pallet_whitelist::weights::SubstrateWeight; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type WhitelistOrigin = EnsureRoot; + type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; + type Preimages = Preimage; +} + +impl pallet_referenda::Config for Runtime { + type WeightInfo = pallet_referenda::weights::SubstrateWeight; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type Scheduler = Scheduler; + type Currency = Balances; + type SubmitOrigin = frame_system::EnsureSigned; + type CancelOrigin = EitherOf, ReferendumCanceller>; + type KillOrigin = EitherOf, ReferendumKiller>; + type Slash = Treasury; + type Votes = pallet_conviction_voting::VotesOf; + type Tally = pallet_conviction_voting::TallyOf; + type SubmissionDeposit = SubmissionDeposit; + type MaxQueued = ConstU32<100>; + type UndecidingTimeout = UndecidingTimeout; + type AlarmInterval = AlarmInterval; + type Tracks = TracksInfo; + type Preimages = Preimage; +} diff --git a/runtime/cere-dev/src/governance/origins.rs b/runtime/cere-dev/src/governance/origins.rs new file mode 100644 index 000000000..57e2c98cc --- /dev/null +++ b/runtime/cere-dev/src/governance/origins.rs @@ -0,0 +1,130 @@ +//! Custom origins for governance interventions. + +pub use pallet_custom_origins::*; + +#[frame_support::pallet] +pub mod pallet_custom_origins { + use frame_support::pallet_prelude::*; + + use crate::{Balance, DOLLARS, GRAND}; + + #[pallet::config] + pub trait Config: frame_system::Config {} + + #[pallet::pallet] + pub struct Pallet(_); + + #[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)] + #[pallet::origin] + pub enum Origin { + /// Origin able to cancel slashes and manage minimum commission. + StakingAdmin, + /// Origin for spending up to $10,000,000 DOT from the treasury as well as generally + /// administering it. + Treasurer, + /// Origin for managing the composition of the fellowship. + FellowshipAdmin, + /// Origin for managing the registrar. + GeneralAdmin, + /// Origin able to cancel referenda. + ReferendumCanceller, + /// Origin able to kill referenda. + ReferendumKiller, + /// Origin able to spend around $250 from the treasury at once. + SmallTipper, + /// Origin able to spend around $1,000 from the treasury at once. + BigTipper, + /// Origin able to spend around $10,000 from the treasury at once. + SmallSpender, + /// Origin able to spend around $100,000 from the treasury at once. + MediumSpender, + /// Origin able to spend up to $1,000,000 DOT from the treasury at once. + BigSpender, + /// Origin able to dispatch a whitelisted call. + WhitelistedCaller, + } + + macro_rules! decl_unit_ensures { + ( $name:ident: $success_type:ty = $success:expr ) => { + pub struct $name; + impl> + From> + EnsureOrigin for $name + { + type Success = $success_type; + fn try_origin(o: O) -> Result { + o.into().and_then(|o| match o { + Origin::$name => Ok($success), + r => Err(O::from(r)), + }) + } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + Ok(O::from(Origin::$name)) + } + } + }; + ( $name:ident ) => { decl_unit_ensures! { $name : () = () } }; + ( $name:ident: $success_type:ty = $success:expr, $( $rest:tt )* ) => { + decl_unit_ensures! { $name: $success_type = $success } + decl_unit_ensures! { $( $rest )* } + }; + ( $name:ident, $( $rest:tt )* ) => { + decl_unit_ensures! { $name } + decl_unit_ensures! { $( $rest )* } + }; + () => {} + } + decl_unit_ensures!( + StakingAdmin, + Treasurer, + FellowshipAdmin, + GeneralAdmin, + ReferendumCanceller, + ReferendumKiller, + WhitelistedCaller, + ); + + macro_rules! decl_ensure { + ( + $vis:vis type $name:ident: EnsureOrigin { + $( $item:ident = $success:expr, )* + } + ) => { + $vis struct $name; + impl> + From> + EnsureOrigin for $name + { + type Success = $success_type; + fn try_origin(o: O) -> Result { + o.into().and_then(|o| match o { + $( + Origin::$item => Ok($success), + )* + r => Err(O::from(r)), + }) + } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + // By convention the more privileged origins go later, so for greatest chance + // of success, we want the last one. + let _result: Result = Err(()); + $( + let _result: Result = Ok(O::from(Origin::$item)); + )* + _result + } + } + } + } + + decl_ensure! { + pub type Spender: EnsureOrigin { + SmallTipper = 250 * DOLLARS, + BigTipper = GRAND, + SmallSpender = 10 * GRAND, + MediumSpender = 100 * GRAND, + BigSpender = 1_000 * GRAND, + Treasurer = 10_000 * GRAND, + } + } +} diff --git a/runtime/cere-dev/src/governance/tracks.rs b/runtime/cere-dev/src/governance/tracks.rs new file mode 100644 index 000000000..d4c813a46 --- /dev/null +++ b/runtime/cere-dev/src/governance/tracks.rs @@ -0,0 +1,267 @@ +//! Track configurations for governance. + +use super::*; + +const fn percent(x: i32) -> sp_arithmetic::FixedI64 { + sp_arithmetic::FixedI64::from_rational(x as u128, 100) +} +use pallet_referenda::Curve; +const APP_ROOT: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); +const SUP_ROOT: Curve = Curve::make_linear(28, 28, percent(0), percent(50)); +const APP_STAKING_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_STAKING_ADMIN: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_TREASURER: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); +const SUP_TREASURER: Curve = Curve::make_linear(28, 28, percent(0), percent(50)); +const APP_FELLOWSHIP_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_FELLOWSHIP_ADMIN: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_GENERAL_ADMIN: Curve = + Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); +const SUP_GENERAL_ADMIN: Curve = + Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); +const APP_REFERENDUM_CANCELLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_REFERENDUM_CANCELLER: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_REFERENDUM_KILLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_REFERENDUM_KILLER: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_SMALL_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100)); +const SUP_SMALL_TIPPER: Curve = Curve::make_reciprocal(1, 28, percent(4), percent(0), percent(50)); +const APP_BIG_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100)); +const SUP_BIG_TIPPER: Curve = Curve::make_reciprocal(8, 28, percent(1), percent(0), percent(50)); +const APP_SMALL_SPENDER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_SMALL_SPENDER: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_MEDIUM_SPENDER: Curve = Curve::make_linear(23, 28, percent(50), percent(100)); +const SUP_MEDIUM_SPENDER: Curve = + Curve::make_reciprocal(16, 28, percent(1), percent(0), percent(50)); +const APP_BIG_SPENDER: Curve = Curve::make_linear(28, 28, percent(50), percent(100)); +const SUP_BIG_SPENDER: Curve = Curve::make_reciprocal(20, 28, percent(1), percent(0), percent(50)); +const APP_WHITELISTED_CALLER: Curve = + Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); +const SUP_WHITELISTED_CALLER: Curve = + Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50)); + +const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 13] = [ + ( + 0, + pallet_referenda::TrackInfo { + name: "root", + max_deciding: 1, + decision_deposit: 100 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 24 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_ROOT, + min_support: SUP_ROOT, + }, + ), + ( + 1, + pallet_referenda::TrackInfo { + name: "whitelisted_caller", + max_deciding: 100, + decision_deposit: 10 * GRAND, + prepare_period: 30 * MINUTES, + decision_period: 28 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: 10 * MINUTES, + min_approval: APP_WHITELISTED_CALLER, + min_support: SUP_WHITELISTED_CALLER, + }, + ), + ( + 10, + pallet_referenda::TrackInfo { + name: "staking_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_STAKING_ADMIN, + min_support: SUP_STAKING_ADMIN, + }, + ), + ( + 11, + pallet_referenda::TrackInfo { + name: "treasurer", + max_deciding: 10, + decision_deposit: GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_TREASURER, + min_support: SUP_TREASURER, + }, + ), + ( + 13, + pallet_referenda::TrackInfo { + name: "fellowship_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_FELLOWSHIP_ADMIN, + min_support: SUP_FELLOWSHIP_ADMIN, + }, + ), + ( + 14, + pallet_referenda::TrackInfo { + name: "general_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_GENERAL_ADMIN, + min_support: SUP_GENERAL_ADMIN, + }, + ), + ( + 20, + pallet_referenda::TrackInfo { + name: "referendum_canceller", + max_deciding: 1_000, + decision_deposit: 10 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 7 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REFERENDUM_CANCELLER, + min_support: SUP_REFERENDUM_CANCELLER, + }, + ), + ( + 21, + pallet_referenda::TrackInfo { + name: "referendum_killer", + max_deciding: 1_000, + decision_deposit: 50 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REFERENDUM_KILLER, + min_support: SUP_REFERENDUM_KILLER, + }, + ), + ( + 30, + pallet_referenda::TrackInfo { + name: "small_tipper", + max_deciding: 200, + decision_deposit: DOLLARS, + prepare_period: MINUTES, + decision_period: 7 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: MINUTES, + min_approval: APP_SMALL_TIPPER, + min_support: SUP_SMALL_TIPPER, + }, + ), + ( + 31, + pallet_referenda::TrackInfo { + name: "big_tipper", + max_deciding: 100, + decision_deposit: 10 * DOLLARS, + prepare_period: 10 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_BIG_TIPPER, + min_support: SUP_BIG_TIPPER, + }, + ), + ( + 32, + pallet_referenda::TrackInfo { + name: "small_spender", + max_deciding: 50, + decision_deposit: 100 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 12 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_SMALL_SPENDER, + min_support: SUP_SMALL_SPENDER, + }, + ), + ( + 33, + pallet_referenda::TrackInfo { + name: "medium_spender", + max_deciding: 50, + decision_deposit: 200 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 24 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_MEDIUM_SPENDER, + min_support: SUP_MEDIUM_SPENDER, + }, + ), + ( + 34, + pallet_referenda::TrackInfo { + name: "big_spender", + max_deciding: 50, + decision_deposit: 400 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 48 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_BIG_SPENDER, + min_support: SUP_BIG_SPENDER, + }, + ), +]; + +pub struct TracksInfo; +impl pallet_referenda::TracksInfo for TracksInfo { + type Id = u16; + type RuntimeOrigin = ::PalletsOrigin; + fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo)] { + &TRACKS_DATA[..] + } + fn track_for(id: &Self::RuntimeOrigin) -> Result { + if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) { + match system_origin { + frame_system::RawOrigin::Root => Ok(0), + _ => Err(()), + } + } else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) { + match custom_origin { + origins::Origin::WhitelistedCaller => Ok(1), + // General admin + origins::Origin::StakingAdmin => Ok(10), + origins::Origin::Treasurer => Ok(11), + origins::Origin::FellowshipAdmin => Ok(13), + origins::Origin::GeneralAdmin => Ok(14), + // Referendum admins + origins::Origin::ReferendumCanceller => Ok(20), + origins::Origin::ReferendumKiller => Ok(21), + // Limited treasury spenders + origins::Origin::SmallTipper => Ok(30), + origins::Origin::BigTipper => Ok(31), + origins::Origin::SmallSpender => Ok(32), + origins::Origin::MediumSpender => Ok(33), + origins::Origin::BigSpender => Ok(34), + } + } else { + Err(()) + } + } +} +pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber); diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 3f0e11cbd..37843e8d1 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -24,16 +24,18 @@ use codec::{Decode, Encode, MaxEncodedLen}; use ddc_primitives::traits::pallet::PalletVisitor; -use frame_election_provider_support::{onchain, BalancingConfig, SequentialPhragmen, VoteWeight}; +use frame_election_provider_support::{ + bounds::ElectionBoundsBuilder, onchain, BalancingConfig, SequentialPhragmen, VoteWeight, +}; use frame_support::{ construct_runtime, dispatch::DispatchClass, - pallet_prelude::{Get, StorageVersion}, + pallet_prelude::Get, parameter_types, traits::{ - ConstBool, ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse, EqualPrivilegeOnly, - Everything, GetStorageVersion, Imbalance, InstanceFilter, KeyOwnerProofSystem, - LockIdentifier, Nothing, OnRuntimeUpgrade, OnUnbalanced, WithdrawReasons, + ConstBool, ConstU128, ConstU16, ConstU32, Currency, EitherOf, EitherOfDiverse, + EqualPrivilegeOnly, Everything, Imbalance, InstanceFilter, KeyOwnerProofSystem, Nothing, + OnUnbalanced, WithdrawReasons, }, weights::{ constants::{ @@ -41,7 +43,7 @@ use frame_support::{ }, ConstantMultiplier, IdentityFee, Weight, }, - PalletId, RuntimeDebug, + PalletId, }; #[cfg(any(feature = "std", test))] pub use frame_system::Call as SystemCall; @@ -89,6 +91,7 @@ use sp_runtime::{ }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, FixedPointNumber, FixedU128, Perbill, Percent, Permill, Perquintill, + RuntimeDebug, }; use sp_std::prelude::*; #[cfg(any(feature = "std", test))] @@ -106,6 +109,10 @@ use cere_runtime_common::{ use impls::Author; use sp_runtime::generic::Era; +// Governance configurations. +pub mod governance; +use governance::{pallet_custom_origins, GeneralAdmin, StakingAdmin, Treasurer, TreasurySpender}; + /// Generated voter bag information. mod voter_bags; @@ -133,10 +140,10 @@ 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: 52200, + spec_version: 53003, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 15, + transaction_version: 17, state_version: 0, }; @@ -305,15 +312,17 @@ impl InstanceFilter for ProxyType { RuntimeCall::Balances(..) | RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. }) | RuntimeCall::Indices(pallet_indices::Call::transfer { .. }) | - RuntimeCall::NominationPools(..) + RuntimeCall::NominationPools(..) | + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda(..) | + RuntimeCall::Whitelist(..) ), ProxyType::Governance => matches!( c, - RuntimeCall::Democracy(..) | - RuntimeCall::Council(..) | - RuntimeCall::TechnicalCommittee(..) | - RuntimeCall::Elections(..) | - RuntimeCall::Treasury(..) + RuntimeCall::Treasury(..) | + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda(..) | + RuntimeCall::Whitelist(..) ), ProxyType::Staking => matches!(c, RuntimeCall::Staking(..)), } @@ -400,6 +409,7 @@ impl pallet_babe::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; } parameter_types! { @@ -420,6 +430,7 @@ parameter_types! { // This number may need to be adjusted in the future if this assumption no longer holds true. pub const MaxLocks: u32 = 50; pub const MaxReserves: u32 = 50; + pub const MaxHolds: u32 = 50; } impl pallet_balances::Config for Runtime { @@ -435,7 +446,7 @@ impl pallet_balances::Config for Runtime { type FreezeIdentifier = (); type MaxFreezes = (); type RuntimeHoldReason = RuntimeHoldReason; - type MaxHolds = ConstU32<0>; + type MaxHolds = MaxHolds; } parameter_types! { @@ -523,6 +534,7 @@ parameter_types! { pub const MaxNominatorRewardedPerValidator: u32 = 256; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); pub OffchainRepeat: BlockNumber = 5; + pub const MaxNominations: u32 = ::LIMIT as u32; } pub struct StakingBenchmarkingConfig; @@ -531,13 +543,7 @@ impl pallet_staking::BenchmarkingConfig for StakingBenchmarkingConfig { type MaxValidators = ConstU32<1000>; } -type StakingAdminOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, ->; - impl pallet_staking::Config for Runtime { - type MaxNominations = MaxNominations; type Currency = Balances; type CurrencyBalance = Balance; type UnixTime = Timestamp; @@ -549,7 +555,7 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = StakingAdminOrigin; + type AdminOrigin = EitherOf, StakingAdmin>; type SessionInterface = Self; type EraPayout = pallet_staking::ConvertCurve; type NextNewSession = Session; @@ -564,11 +570,12 @@ impl pallet_staking::Config for Runtime { type EventListeners = NominationPools; type WeightInfo = pallet_staking::weights::SubstrateWeight; type BenchmarkingConfig = StakingBenchmarkingConfig; + type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; } impl pallet_fast_unstake::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type ControlOrigin = frame_system::EnsureRoot; + type ControlOrigin = EnsureRoot; type Deposit = ConstU128<{ DOLLARS }>; type Currency = Balances; type BatchSize = frame_support::traits::ConstU32<64>; @@ -610,7 +617,11 @@ parameter_types! { /// Setup election pallet to support maximum winners upto 1200. This will mean Staking Pallet /// cannot have active validators higher than this count. pub const MaxActiveValidators: u32 = 1200; - pub MaxNominations: u32 = ::LIMIT as u32; + /// We take the top 22500 nominators as electing voters and all of the validators as electable + /// targets. Whilst this is the case, we cannot and shall not increase the size of the + /// validator intentions. + pub ElectionBounds: frame_election_provider_support::bounds::ElectionBounds = + ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); } frame_election_provider_support::generate_solution_type!( @@ -671,8 +682,7 @@ impl onchain::Config for OnChainSeqPhragmen { >; type DataProvider = ::DataProvider; type MaxWinners = MaxActiveValidators; - type VotersBound = MaxElectingVoters; - type TargetsBound = MaxElectableTargets; + type Bounds = ElectionBounds; type WeightInfo = frame_election_provider_support::weights::SubstrateWeight; } @@ -724,11 +734,10 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type Fallback = onchain::OnChainExecution; type GovernanceFallback = onchain::OnChainExecution; type Solver = SequentialPhragmen, OffchainRandomBalancing>; - type ForceOrigin = EnsureRootOrHalfCouncil; - type MaxElectableTargets = ConstU16<{ u16::MAX }>; - type MaxElectingVoters = MaxElectingVoters; + type ForceOrigin = EitherOf, StakingAdmin>; type BenchmarkingConfig = ElectionProviderBenchmarkConfig; type MaxWinners = MaxActiveValidators; + type ElectionBounds = ElectionBounds; type WeightInfo = pallet_election_provider_multi_phase::weights::SubstrateWeight; } @@ -745,165 +754,6 @@ impl pallet_bags_list::Config for Runtime { type Score = VoteWeight; } -parameter_types! { - pub const LaunchPeriod: BlockNumber = 24 * 60 * MINUTES; - pub const VotingPeriod: BlockNumber = 24 * 60 * MINUTES; - pub const FastTrackVotingPeriod: BlockNumber = 3 * 60 * MINUTES; - pub const MinimumDeposit: Balance = 50_000 * DOLLARS; - pub const EnactmentPeriod: BlockNumber = 24 * 60 * MINUTES; - pub const CooloffPeriod: BlockNumber = 7 * 24 * 60 * MINUTES; - pub const MaxProposals: u32 = 100; -} - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type VoteLockingPeriod = EnactmentPeriod; // Same as EnactmentPeriod - type MinimumDeposit = MinimumDeposit; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionAtLeast; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantAllowed = frame_support::traits::ConstBool; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cool-off period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type SubmitOrigin = frame_system::EnsureSigned; - type PalletsOrigin = OriginCaller; - type MaxVotes = ConstU32<100>; - type WeightInfo = pallet_democracy::weights::SubstrateWeight; - type MaxProposals = MaxProposals; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; -} - -parameter_types! { - pub const CouncilMotionDuration: BlockNumber = 7 * DAYS; - pub const CouncilMaxProposals: u32 = 100; - pub const CouncilMaxMembers: u32 = 100; -} - -type CouncilCollective = pallet_collective::Instance1; -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = CouncilMaxProposals; - type MaxMembers = CouncilMaxMembers; - type SetMembersOrigin = EnsureRoot; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = pallet_collective::weights::SubstrateWeight; - type MaxProposalWeight = MaxCollectivesProposalWeight; -} - -parameter_types! { - pub const CandidacyBond: Balance = 5_000_000 * DOLLARS; - // 1 storage item created, key size is 32 bytes, value size is 16+16. - pub const VotingBondBase: Balance = deposit(1, 64); - pub const VotingBondFactor: Balance = DOLLARS; - pub const TermDuration: BlockNumber = 182 * DAYS; - pub const DesiredMembers: u32 = 13; - 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; -} - -// Make sure that there are no more than `MaxMembers` members elected via elections-phragmen. -const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); - -impl pallet_elections_phragmen::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = ElectionsPhragmenPalletId; - type Currency = Balances; - type ChangeMembers = Council; - // NOTE: this implies that council's genesis members cannot be set directly and must come from - // this module. - type InitializeMembers = Council; - type CurrencyToVote = CurrencyToVote; - type CandidacyBond = CandidacyBond; - type VotingBondBase = VotingBondBase; - type VotingBondFactor = VotingBondFactor; - type LoserCandidate = (); - type KickedMember = (); - type DesiredMembers = DesiredMembers; - type DesiredRunnersUp = DesiredRunnersUp; - type TermDuration = TermDuration; - type WeightInfo = pallet_elections_phragmen::weights::SubstrateWeight; - type MaxVoters = MaxVoters; - type MaxVotesPerVoter = MaxVotesPerVoter; - type MaxCandidates = MaxCandidates; -} - -parameter_types! { - pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; - pub const TechnicalMaxProposals: u32 = 100; - pub const TechnicalMaxMembers: u32 = 100; -} - -type TechnicalCollective = pallet_collective::Instance2; -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = TechnicalMotionDuration; - type MaxProposals = TechnicalMaxProposals; - type MaxMembers = TechnicalMaxMembers; - type SetMembersOrigin = EnsureRoot; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = pallet_collective::weights::SubstrateWeight; - type MaxProposalWeight = MaxCollectivesProposalWeight; -} - -type EnsureRootOrHalfCouncil = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionMoreThan, ->; -impl pallet_membership::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRootOrHalfCouncil; - type RemoveOrigin = EnsureRootOrHalfCouncil; - type SwapOrigin = EnsureRootOrHalfCouncil; - type ResetOrigin = EnsureRootOrHalfCouncil; - type PrimeOrigin = EnsureRootOrHalfCouncil; - type MembershipInitialized = TechnicalCommittee; - type MembershipChanged = TechnicalCommittee; - type MaxMembers = TechnicalMaxMembers; - type WeightInfo = pallet_membership::weights::SubstrateWeight; -} - parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 50_000 * DOLLARS; @@ -921,14 +771,8 @@ parameter_types! { impl pallet_treasury::Config for Runtime { type PalletId = TreasuryPalletId; type Currency = Balances; - type ApproveOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - type RejectOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionMoreThan, - >; + type ApproveOrigin = EitherOfDiverse, Treasurer>; + type RejectOrigin = EitherOfDiverse, Treasurer>; type RuntimeEvent = RuntimeEvent; type OnSlash = (); type ProposalBond = ProposalBond; @@ -940,7 +784,7 @@ impl pallet_treasury::Config for Runtime { type SpendFunds = Bounties; type WeightInfo = pallet_treasury::weights::SubstrateWeight; type MaxApprovals = MaxApprovals; - type SpendOrigin = frame_support::traits::NeverEnsureOrigin; + type SpendOrigin = TreasurySpender; } parameter_types! { @@ -980,17 +824,6 @@ impl pallet_child_bounties::Config for Runtime { type WeightInfo = pallet_child_bounties::weights::SubstrateWeight; } -impl pallet_tips::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DataDepositPerByte = DataDepositPerByte; - type MaximumReasonLength = MaximumReasonLength; - type Tippers = Elections; - type TipCountdown = TipCountdown; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = TipReportDepositBase; - type WeightInfo = pallet_tips::weights::SubstrateWeight; -} - parameter_types! { pub const DepositPerItem: Balance = deposit(1, 0); pub const DepositPerByte: Balance = deposit(0, 1); @@ -1003,6 +836,8 @@ parameter_types! { .max_total .unwrap_or(RuntimeBlockWeights::get().max_block); pub Schedule: pallet_contracts::Schedule = Default::default(); + pub const CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(0); + pub const MaxDelegateDependencies: u32 = 32; } impl pallet_contracts::Config for Runtime { @@ -1031,7 +866,16 @@ impl pallet_contracts::Config for Runtime { type MaxStorageKeyLen = ConstU32<128>; type UnsafeUnstableInterface = ConstBool; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; - type Migrations = (); + type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; + type MaxDelegateDependencies = MaxDelegateDependencies; + type RuntimeHoldReason = RuntimeHoldReason; + type Debug = (); + type Environment = (); + type Migrations = ( + pallet_contracts::migration::v13::Migration, + pallet_contracts::migration::v14::Migration, + pallet_contracts::migration::v15::Migration, + ); } impl pallet_sudo::Config for Runtime { @@ -1141,6 +985,7 @@ impl pallet_grandpa::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; + type MaxNominators = MaxNominatorRewardedPerValidator; } parameter_types! { @@ -1162,8 +1007,8 @@ impl pallet_identity::Config for Runtime { type MaxAdditionalFields = MaxAdditionalFields; type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; - type ForceOrigin = EnsureRootOrHalfCouncil; - type RegistrarOrigin = EnsureRootOrHalfCouncil; + type ForceOrigin = EitherOf, GeneralAdmin>; + type RegistrarOrigin = EitherOf, GeneralAdmin>; type WeightInfo = pallet_identity::weights::SubstrateWeight; } @@ -1266,28 +1111,6 @@ impl pallet_nomination_pools::Config for Runtime { type WeightInfo = (); } -pub struct InitiateNominationPools; -impl frame_support::traits::OnRuntimeUpgrade for InitiateNominationPools { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - // we use one as an indicator if this has already been set. - if pallet_nomination_pools::MaxPools::::get().is_none() { - pallet_nomination_pools::MinJoinBond::::put(250 * DOLLARS); - pallet_nomination_pools::MinCreateBond::::put(5000 * DOLLARS); - - // Initialize with limits for now. - pallet_nomination_pools::MaxPools::::put(0); - pallet_nomination_pools::MaxPoolMembersPerPool::::put(0); - pallet_nomination_pools::MaxPoolMembers::::put(0); - - log::info!(target: "runtime::cere", "pools config initiated 🎉"); - ::DbWeight::get().reads_writes(1, 5) - } else { - log::info!(target: "runtime::cere", "pools config already initiated 😏"); - ::DbWeight::get().reads(1) - } - } -} - impl pallet_ddc_staking::Config for Runtime { type Currency = Balances; type RuntimeEvent = RuntimeEvent; @@ -1327,6 +1150,9 @@ impl pallet_ddc_clusters::Config for Runtime { type StakerCreator = pallet_ddc_staking::Pallet; type Currency = Balances; type WeightInfo = pallet_ddc_clusters::weights::SubstrateWeight; + type MinErasureCodingRequiredLimit = ConstU32<4>; + type MinErasureCodingTotalLimit = ConstU32<6>; + type MinReplicationTotalLimit = ConstU32<3>; } parameter_types! { @@ -1370,11 +1196,6 @@ construct_runtime!( ElectionProviderMultiPhase: pallet_election_provider_multi_phase, Staking: pallet_staking, Session: pallet_session, - Democracy: pallet_democracy, - Council: pallet_collective::, - TechnicalCommittee: pallet_collective::, - Elections: pallet_elections_phragmen, - TechnicalMembership: pallet_membership::, Grandpa: pallet_grandpa, Treasury: pallet_treasury, Contracts: pallet_contracts, @@ -1392,7 +1213,6 @@ construct_runtime!( Proxy: pallet_proxy, Multisig: pallet_multisig, Bounties: pallet_bounties, - Tips: pallet_tips, VoterList: pallet_bags_list::, ChildBounties: pallet_child_bounties, NominationPools: pallet_nomination_pools, @@ -1404,7 +1224,13 @@ construct_runtime!( DdcCustomers: pallet_ddc_customers, DdcNodes: pallet_ddc_nodes, DdcClusters: pallet_ddc_clusters, - DdcPayouts: pallet_ddc_payouts + DdcPayouts: pallet_ddc_payouts, + // Start OpenGov. + ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event}, + Referenda: pallet_referenda::{Pallet, Call, Storage, Event}, + Origins: pallet_custom_origins::{Origin}, + Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event}, + // End OpenGov. } ); @@ -1434,13 +1260,6 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); -pub struct StakingMigrationV11OldPallet; -impl Get<&'static str> for StakingMigrationV11OldPallet { - fn get() -> &'static str { - "BagsList" - } -} - /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1449,38 +1268,86 @@ pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; -// We don't need to run pallet_balances::pallets::MigrateToTrackInactive or -// pallet_balances::pallets::MigrateManyToTrackInactive since XCM related only. -// MigrateToTrackInactive and MigrateManyToTrackInactive simply add CheckingAccount value to -// InactiveIssuance so it's safe to skip it. -pub struct SetBalancesStorageVersions; -impl OnRuntimeUpgrade for SetBalancesStorageVersions { - fn on_runtime_upgrade() -> Weight { - let storage_version = ::on_chain_storage_version(); - if storage_version < 1 { - StorageVersion::new(1).put::(); - } +/// Runtime migrations +type Migrations = migrations::Unreleased; + +/// The runtime migrations per release. +#[allow(deprecated, missing_docs)] +pub mod migrations { + use frame_support::traits::LockIdentifier; + use frame_system::pallet_prelude::BlockNumberFor; - RocksDbWeight::get().reads_writes(1, 1) + use super::*; + + parameter_types! { + pub const DemocracyPalletName: &'static str = "Democracy"; + pub const CouncilPalletName: &'static str = "Council"; + pub const TechnicalCommitteePalletName: &'static str = "TechnicalCommittee"; + pub const ElectionPalletName: &'static str = "Elections"; + pub const TechnicalMembershipPalletName: &'static str = "TechnicalMembership"; + pub const TipsPalletName: &'static str = "Tips"; + pub const ElectionPalletId: LockIdentifier = *b"phrelect"; } -} -parameter_types! { - pub const SocietyPalletName: &'static str = "Society"; -} -/// Runtime migrations -type Migrations = ( - pallet_staking::migrations::v9::InjectValidatorsIntoVoterList, - pallet_staking::migrations::v10::MigrateToV10, - pallet_staking::migrations::v11::MigrateToV11, - pallet_staking::migrations::v12::MigrateToV12, - pallet_staking::migrations::v13::MigrateToV13, - frame_support::migrations::RemovePallet< - SocietyPalletName, - ::DbWeight, - >, - SetBalancesStorageVersions, -); + // Special Config for Gov V1 pallets, allowing us to run migrations for them without + // implementing their configs on [`Runtime`]. + pub struct UnlockConfig; + impl pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockConfig for UnlockConfig { + type Currency = Balances; + type MaxVotes = ConstU32<100>; + type MaxDeposits = ConstU32<100>; + type AccountId = AccountId; + type BlockNumber = BlockNumberFor; + type DbWeight = ::DbWeight; + type PalletName = DemocracyPalletName; + } + impl pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockConfig + for UnlockConfig + { + type Currency = Balances; + type MaxVotesPerVoter = ConstU32<16>; + type PalletId = ElectionPalletId; + type AccountId = AccountId; + type DbWeight = ::DbWeight; + type PalletName = ElectionPalletName; + } + impl pallet_tips::migrations::unreserve_deposits::UnlockConfig<()> for UnlockConfig { + type Currency = Balances; + type Hash = Hash; + type DataDepositPerByte = DataDepositPerByte; + type TipReportDepositBase = TipReportDepositBase; + type AccountId = AccountId; + type BlockNumber = BlockNumberFor; + type DbWeight = ::DbWeight; + type PalletName = TipsPalletName; + } + + /// Unreleased migrations. Add new ones here: + pub type Unreleased = ( + pallet_ddc_clusters::migration::MigrateToV1, + pallet_contracts::migration::Migration, + pallet_referenda::migration::v1::MigrateV0ToV1, + // Gov v1 storage migrations + // https://github.com/paritytech/polkadot/issues/6749 + pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, + pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, + pallet_tips::migrations::unreserve_deposits::UnreserveDeposits, + + // Delete all Gov v1 pallet storage key/values. + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + ); +} /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -1497,19 +1364,6 @@ type EventRecord = frame_system::EventRecord< ::Hash, >; -mod custom_migration { - use frame_support::{traits::OnRuntimeUpgrade, weights::Weight}; - use sp_io::{hashing::twox_128, storage::clear_prefix}; - - pub struct Upgrade; - impl OnRuntimeUpgrade for Upgrade { - fn on_runtime_upgrade() -> Weight { - clear_prefix(&twox_128(b"DdcValidator"), None); - Weight::from_parts(0, 0) - } - } -} - #[cfg(feature = "runtime-benchmarks")] #[macro_use] extern crate frame_benchmarking; @@ -1523,18 +1377,14 @@ mod benches { [pallet_balances, Balances] [pallet_bounties, Bounties] [pallet_child_bounties, ChildBounties] - [pallet_collective, Council] [pallet_contracts, Contracts] - [pallet_democracy, Democracy] [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] [pallet_election_provider_support_benchmarking, EPSBench::] - [pallet_elections_phragmen, Elections] [pallet_fast_unstake, FastUnstake] [pallet_grandpa, Grandpa] [pallet_identity, Identity] [pallet_im_online, ImOnline] [pallet_indices, Indices] - [pallet_membership, TechnicalMembership] [pallet_multisig, Multisig] [pallet_proxy, Proxy] [pallet_preimage, Preimage] @@ -1547,10 +1397,12 @@ mod benches { [pallet_ddc_payouts, DdcPayouts] [frame_system, SystemBench::] [pallet_timestamp, Timestamp] - [pallet_tips, Tips] [pallet_treasury, Treasury] [pallet_utility, Utility] [pallet_vesting, Vesting] + [pallet_conviction_voting, ConvictionVoting] + [pallet_referenda, Referenda] + [pallet_whitelist, Whitelist] ); } @@ -1893,7 +1745,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch, TrackedStorageKey}; + use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch}; + use sp_storage::TrackedStorageKey; // Trying to add benchmarks directly to the Session Pallet caused cyclic dependency // issues. To get around that, we separated the Session benchmarks into its own crate, diff --git a/runtime/cere/Cargo.toml b/runtime/cere/Cargo.toml index a2208853c..e04dfbb5c 100644 --- a/runtime/cere/Cargo.toml +++ b/runtime/cere/Cargo.toml @@ -59,6 +59,7 @@ 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-staking = { workspace = true } pallet-staking-reward-curve = { workspace = true } pallet-sudo = { workspace = true } @@ -70,6 +71,7 @@ pallet-treasury = { workspace = true } pallet-utility = { workspace = true } pallet-vesting = { workspace = true } sp-api = { workspace = true } +sp-arithmetic = { workspace = true } sp-authority-discovery = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-babe = { workspace = true } @@ -81,6 +83,7 @@ sp-runtime = { workspace = true } sp-session = { workspace = true } sp-staking = { workspace = true } sp-std = { workspace = true } +sp-storage = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } @@ -88,6 +91,7 @@ sp-version = { workspace = true } cere-runtime-common = { workspace = true } ddc-primitives = { workspace = true } pallet-chainbridge = { workspace = true } +pallet-conviction-voting = { workspace = true } pallet-ddc-clusters = { workspace = true } pallet-ddc-customers = { workspace = true } pallet-ddc-nodes = { workspace = true } @@ -95,6 +99,8 @@ pallet-ddc-payouts = { workspace = true } pallet-ddc-staking = { workspace = true } pallet-erc20 = { workspace = true } pallet-erc721 = { workspace = true } +pallet-referenda = { workspace = true } +pallet-whitelist = { workspace = true } [build-dependencies] substrate-wasm-builder = { workspace = true, default-features = true } @@ -103,68 +109,69 @@ substrate-wasm-builder = { workspace = true, default-features = true } default = ["std"] with-tracing = ["frame-executive/with-tracing"] std = [ - "sp-authority-discovery/std", + "codec/std", + "scale-info/std", + "log/std", + "frame-support/std", + "frame-benchmarking/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-executive/std", + "frame-try-runtime/std", + "node-primitives/std", "pallet-authority-discovery/std", "pallet-authorship/std", - "sp-consensus-babe/std", "pallet-babe/std", "pallet-bags-list/std", "pallet-balances/std", "pallet-bounties/std", - "sp-block-builder/std", - "codec/std", - "scale-info/std", "pallet-collective/std", "pallet-contracts/std", "pallet-contracts-primitives/std", "pallet-democracy/std", "pallet-fast-unstake/std", "pallet-elections-phragmen/std", - "frame-executive/std", "pallet-chainbridge/std", "pallet-erc721/std", "pallet-erc20/std", "pallet-grandpa/std", "pallet-im-online/std", "pallet-indices/std", - "sp-inherents/std", "pallet-membership/std", "pallet-multisig/std", "pallet-nomination-pools/std", "pallet-nomination-pools-runtime-api/std", "pallet-identity/std", "pallet-scheduler/std", - "node-primitives/std", "pallet-offences/std", "pallet-proxy/std", - "pallet-preimage/std", - "sp-core/std", "pallet-insecure-randomness-collective-flip/std", - "sp-std/std", "pallet-session/std", - "sp-api/std", - "sp-runtime/std", - "sp-staking/std", "pallet-staking/std", - "sp-session/std", "pallet-sudo/std", - "frame-support/std", - "frame-benchmarking/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", "pallet-election-provider-multi-phase/std", "pallet-timestamp/std", "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", "pallet-treasury/std", - "sp-transaction-pool/std", "pallet-utility/std", "sp-version/std", "pallet-recovery/std", "pallet-vesting/std", - "log/std", - "frame-try-runtime/std", + "sp-std/std", + "sp-core/std", + "sp-inherents/std", + "sp-block-builder/std", + "sp-consensus-babe/std", + "sp-authority-discovery/std", + "sp-storage/std", + "sp-api/std", + "sp-runtime/std", + "sp-staking/std", + "sp-session/std", + "sp-transaction-pool/std", + "sp-version/std", "sp-io/std", "ddc-primitives/std", "pallet-child-bounties/std", @@ -174,6 +181,10 @@ std = [ "pallet-ddc-payouts/std", "pallet-ddc-staking/std", "cere-runtime-common/std", + "sp-arithmetic/std", + "pallet-conviction-voting/std", + "pallet-referenda/std", + "pallet-whitelist/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", @@ -204,10 +215,10 @@ runtime-benchmarks = [ "pallet-membership/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nomination-pools/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", + "pallet-session-benchmarking/runtime-benchmarks", "pallet-staking/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-tips/runtime-benchmarks", @@ -218,6 +229,9 @@ runtime-benchmarks = [ "pallet-chainbridge/runtime-benchmarks", "ddc-primitives/runtime-benchmarks", "hex-literal", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", ] try-runtime = [ "frame-executive/try-runtime", @@ -266,4 +280,7 @@ try-runtime = [ "pallet-ddc-staking/try-runtime", "pallet-erc20/try-runtime", "pallet-erc721/try-runtime", + "pallet-conviction-voting/try-runtime", + "pallet-referenda/try-runtime", + "pallet-whitelist/try-runtime", ] diff --git a/runtime/cere/src/governance/mod.rs b/runtime/cere/src/governance/mod.rs new file mode 100644 index 000000000..1e2c835e6 --- /dev/null +++ b/runtime/cere/src/governance/mod.rs @@ -0,0 +1,70 @@ +use frame_support::parameter_types; +use frame_system::EnsureRootWithSuccess; + +use super::*; + +mod origins; +pub use origins::{ + pallet_custom_origins, GeneralAdmin, ReferendumCanceller, ReferendumKiller, Spender, + StakingAdmin, Treasurer, WhitelistedCaller, +}; + +mod tracks; +pub use tracks::TracksInfo; + +parameter_types! { + pub const VoteLockingPeriod: BlockNumber = 7 * DAYS; +} + +impl pallet_conviction_voting::Config for Runtime { + type WeightInfo = pallet_conviction_voting::weights::SubstrateWeight; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type VoteLockingPeriod = VoteLockingPeriod; + type MaxVotes = ConstU32<512>; + type MaxTurnout = + frame_support::traits::tokens::currency::ActiveIssuanceOf; + type Polls = Referenda; +} + +parameter_types! { + pub const AlarmInterval: BlockNumber = 1; + pub const SubmissionDeposit: Balance = DOLLARS; + pub const UndecidingTimeout: BlockNumber = 14 * DAYS; +} + +parameter_types! { + pub const MaxBalance: Balance = Balance::max_value(); +} +pub type TreasurySpender = EitherOf, Spender>; + +impl origins::pallet_custom_origins::Config for Runtime {} + +impl pallet_whitelist::Config for Runtime { + type WeightInfo = pallet_whitelist::weights::SubstrateWeight; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type WhitelistOrigin = EnsureRoot; + type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; + type Preimages = Preimage; +} + +impl pallet_referenda::Config for Runtime { + type WeightInfo = pallet_referenda::weights::SubstrateWeight; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type Scheduler = Scheduler; + type Currency = Balances; + type SubmitOrigin = frame_system::EnsureSigned; + type CancelOrigin = EitherOf, ReferendumCanceller>; + type KillOrigin = EitherOf, ReferendumKiller>; + type Slash = Treasury; + type Votes = pallet_conviction_voting::VotesOf; + type Tally = pallet_conviction_voting::TallyOf; + type SubmissionDeposit = SubmissionDeposit; + type MaxQueued = ConstU32<100>; + type UndecidingTimeout = UndecidingTimeout; + type AlarmInterval = AlarmInterval; + type Tracks = TracksInfo; + type Preimages = Preimage; +} diff --git a/runtime/cere/src/governance/origins.rs b/runtime/cere/src/governance/origins.rs new file mode 100644 index 000000000..dbbfebe20 --- /dev/null +++ b/runtime/cere/src/governance/origins.rs @@ -0,0 +1,129 @@ +//! Custom origins for governance interventions. +pub use pallet_custom_origins::*; + +#[frame_support::pallet] +pub mod pallet_custom_origins { + use frame_support::pallet_prelude::*; + + use crate::{Balance, DOLLARS, GRAND}; + + #[pallet::config] + pub trait Config: frame_system::Config {} + + #[pallet::pallet] + pub struct Pallet(_); + + #[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)] + #[pallet::origin] + pub enum Origin { + /// Origin able to cancel slashes and manage minimum commission. + StakingAdmin, + /// Origin for spending up to $10,000,000 DOT from the treasury as well as generally + /// administering it. + Treasurer, + /// Origin for managing the composition of the fellowship. + FellowshipAdmin, + /// Origin for managing the registrar. + GeneralAdmin, + /// Origin able to cancel referenda. + ReferendumCanceller, + /// Origin able to kill referenda. + ReferendumKiller, + /// Origin able to spend around $250 from the treasury at once. + SmallTipper, + /// Origin able to spend around $1,000 from the treasury at once. + BigTipper, + /// Origin able to spend around $10,000 from the treasury at once. + SmallSpender, + /// Origin able to spend around $100,000 from the treasury at once. + MediumSpender, + /// Origin able to spend up to $1,000,000 DOT from the treasury at once. + BigSpender, + /// Origin able to dispatch a whitelisted call. + WhitelistedCaller, + } + + macro_rules! decl_unit_ensures { + ( $name:ident: $success_type:ty = $success:expr ) => { + pub struct $name; + impl> + From> + EnsureOrigin for $name + { + type Success = $success_type; + fn try_origin(o: O) -> Result { + o.into().and_then(|o| match o { + Origin::$name => Ok($success), + r => Err(O::from(r)), + }) + } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + Ok(O::from(Origin::$name)) + } + } + }; + ( $name:ident ) => { decl_unit_ensures! { $name : () = () } }; + ( $name:ident: $success_type:ty = $success:expr, $( $rest:tt )* ) => { + decl_unit_ensures! { $name: $success_type = $success } + decl_unit_ensures! { $( $rest )* } + }; + ( $name:ident, $( $rest:tt )* ) => { + decl_unit_ensures! { $name } + decl_unit_ensures! { $( $rest )* } + }; + () => {} + } + decl_unit_ensures!( + StakingAdmin, + Treasurer, + FellowshipAdmin, + GeneralAdmin, + ReferendumCanceller, + ReferendumKiller, + WhitelistedCaller, + ); + + macro_rules! decl_ensure { + ( + $vis:vis type $name:ident: EnsureOrigin { + $( $item:ident = $success:expr, )* + } + ) => { + $vis struct $name; + impl> + From> + EnsureOrigin for $name + { + type Success = $success_type; + fn try_origin(o: O) -> Result { + o.into().and_then(|o| match o { + $( + Origin::$item => Ok($success), + )* + r => Err(O::from(r)), + }) + } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + // By convention the more privileged origins go later, so for greatest chance + // of success, we want the last one. + let _result: Result = Err(()); + $( + let _result: Result = Ok(O::from(Origin::$item)); + )* + _result + } + } + } + } + + decl_ensure! { + pub type Spender: EnsureOrigin { + SmallTipper = 250 * DOLLARS, + BigTipper = GRAND, + SmallSpender = 10 * GRAND, + MediumSpender = 100 * GRAND, + BigSpender = 1_000 * GRAND, + Treasurer = 10_000 * GRAND, + } + } +} diff --git a/runtime/cere/src/governance/tracks.rs b/runtime/cere/src/governance/tracks.rs new file mode 100644 index 000000000..da3b0dce1 --- /dev/null +++ b/runtime/cere/src/governance/tracks.rs @@ -0,0 +1,283 @@ +// Copyright 2023 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Track configurations for governance. + +use super::*; + +const fn percent(x: i32) -> sp_arithmetic::FixedI64 { + sp_arithmetic::FixedI64::from_rational(x as u128, 100) +} +use pallet_referenda::Curve; +const APP_ROOT: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); +const SUP_ROOT: Curve = Curve::make_linear(28, 28, percent(0), percent(50)); +const APP_STAKING_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_STAKING_ADMIN: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_TREASURER: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); +const SUP_TREASURER: Curve = Curve::make_linear(28, 28, percent(0), percent(50)); +const APP_FELLOWSHIP_ADMIN: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_FELLOWSHIP_ADMIN: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_GENERAL_ADMIN: Curve = + Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100)); +const SUP_GENERAL_ADMIN: Curve = + Curve::make_reciprocal(7, 28, percent(10), percent(0), percent(50)); +const APP_REFERENDUM_CANCELLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_REFERENDUM_CANCELLER: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_REFERENDUM_KILLER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_REFERENDUM_KILLER: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_SMALL_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100)); +const SUP_SMALL_TIPPER: Curve = Curve::make_reciprocal(1, 28, percent(4), percent(0), percent(50)); +const APP_BIG_TIPPER: Curve = Curve::make_linear(10, 28, percent(50), percent(100)); +const SUP_BIG_TIPPER: Curve = Curve::make_reciprocal(8, 28, percent(1), percent(0), percent(50)); +const APP_SMALL_SPENDER: Curve = Curve::make_linear(17, 28, percent(50), percent(100)); +const SUP_SMALL_SPENDER: Curve = + Curve::make_reciprocal(12, 28, percent(1), percent(0), percent(50)); +const APP_MEDIUM_SPENDER: Curve = Curve::make_linear(23, 28, percent(50), percent(100)); +const SUP_MEDIUM_SPENDER: Curve = + Curve::make_reciprocal(16, 28, percent(1), percent(0), percent(50)); +const APP_BIG_SPENDER: Curve = Curve::make_linear(28, 28, percent(50), percent(100)); +const SUP_BIG_SPENDER: Curve = Curve::make_reciprocal(20, 28, percent(1), percent(0), percent(50)); +const APP_WHITELISTED_CALLER: Curve = + Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); +const SUP_WHITELISTED_CALLER: Curve = + Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50)); + +const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 13] = [ + ( + 0, + pallet_referenda::TrackInfo { + name: "root", + max_deciding: 1, + decision_deposit: 100 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 24 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_ROOT, + min_support: SUP_ROOT, + }, + ), + ( + 1, + pallet_referenda::TrackInfo { + name: "whitelisted_caller", + max_deciding: 100, + decision_deposit: 10 * GRAND, + prepare_period: 30 * MINUTES, + decision_period: 28 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: 10 * MINUTES, + min_approval: APP_WHITELISTED_CALLER, + min_support: SUP_WHITELISTED_CALLER, + }, + ), + ( + 10, + pallet_referenda::TrackInfo { + name: "staking_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_STAKING_ADMIN, + min_support: SUP_STAKING_ADMIN, + }, + ), + ( + 11, + pallet_referenda::TrackInfo { + name: "treasurer", + max_deciding: 10, + decision_deposit: GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_TREASURER, + min_support: SUP_TREASURER, + }, + ), + ( + 13, + pallet_referenda::TrackInfo { + name: "fellowship_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_FELLOWSHIP_ADMIN, + min_support: SUP_FELLOWSHIP_ADMIN, + }, + ), + ( + 14, + pallet_referenda::TrackInfo { + name: "general_admin", + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_GENERAL_ADMIN, + min_support: SUP_GENERAL_ADMIN, + }, + ), + ( + 20, + pallet_referenda::TrackInfo { + name: "referendum_canceller", + max_deciding: 1_000, + decision_deposit: 10 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 7 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REFERENDUM_CANCELLER, + min_support: SUP_REFERENDUM_CANCELLER, + }, + ), + ( + 21, + pallet_referenda::TrackInfo { + name: "referendum_killer", + max_deciding: 1_000, + decision_deposit: 50 * GRAND, + prepare_period: 2 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REFERENDUM_KILLER, + min_support: SUP_REFERENDUM_KILLER, + }, + ), + ( + 30, + pallet_referenda::TrackInfo { + name: "small_tipper", + max_deciding: 200, + decision_deposit: DOLLARS, + prepare_period: MINUTES, + decision_period: 7 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: MINUTES, + min_approval: APP_SMALL_TIPPER, + min_support: SUP_SMALL_TIPPER, + }, + ), + ( + 31, + pallet_referenda::TrackInfo { + name: "big_tipper", + max_deciding: 100, + decision_deposit: 10 * DOLLARS, + prepare_period: 10 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_BIG_TIPPER, + min_support: SUP_BIG_TIPPER, + }, + ), + ( + 32, + pallet_referenda::TrackInfo { + name: "small_spender", + max_deciding: 50, + decision_deposit: 100 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 12 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_SMALL_SPENDER, + min_support: SUP_SMALL_SPENDER, + }, + ), + ( + 33, + pallet_referenda::TrackInfo { + name: "medium_spender", + max_deciding: 50, + decision_deposit: 200 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 24 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_MEDIUM_SPENDER, + min_support: SUP_MEDIUM_SPENDER, + }, + ), + ( + 34, + pallet_referenda::TrackInfo { + name: "big_spender", + max_deciding: 50, + decision_deposit: 400 * DOLLARS, + prepare_period: 4 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 48 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_BIG_SPENDER, + min_support: SUP_BIG_SPENDER, + }, + ), +]; + +pub struct TracksInfo; +impl pallet_referenda::TracksInfo for TracksInfo { + type Id = u16; + type RuntimeOrigin = ::PalletsOrigin; + fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo)] { + &TRACKS_DATA[..] + } + fn track_for(id: &Self::RuntimeOrigin) -> Result { + if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) { + match system_origin { + frame_system::RawOrigin::Root => Ok(0), + _ => Err(()), + } + } else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) { + match custom_origin { + origins::Origin::WhitelistedCaller => Ok(1), + // General admin + origins::Origin::StakingAdmin => Ok(10), + origins::Origin::Treasurer => Ok(11), + origins::Origin::FellowshipAdmin => Ok(13), + origins::Origin::GeneralAdmin => Ok(14), + // Referendum admins + origins::Origin::ReferendumCanceller => Ok(20), + origins::Origin::ReferendumKiller => Ok(21), + // Limited treasury spenders + origins::Origin::SmallTipper => Ok(30), + origins::Origin::BigTipper => Ok(31), + origins::Origin::SmallSpender => Ok(32), + origins::Origin::MediumSpender => Ok(33), + origins::Origin::BigSpender => Ok(34), + } + } else { + Err(()) + } + } +} +pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber); diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index 10c40a4ff..d4e6450d6 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -21,19 +21,20 @@ #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] - use codec::{Decode, Encode, MaxEncodedLen}; use ddc_primitives::traits::pallet::PalletVisitor; -use frame_election_provider_support::{onchain, BalancingConfig, SequentialPhragmen, VoteWeight}; +use frame_election_provider_support::{ + bounds::ElectionBoundsBuilder, onchain, BalancingConfig, SequentialPhragmen, VoteWeight, +}; use frame_support::{ construct_runtime, dispatch::DispatchClass, - pallet_prelude::{Get, StorageVersion}, + pallet_prelude::Get, parameter_types, traits::{ - ConstBool, ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse, EqualPrivilegeOnly, - Everything, GetStorageVersion, Imbalance, InstanceFilter, KeyOwnerProofSystem, - LockIdentifier, Nothing, OnRuntimeUpgrade, OnUnbalanced, WithdrawReasons, + ConstBool, ConstU128, ConstU16, ConstU32, Currency, EitherOf, EitherOfDiverse, + EqualPrivilegeOnly, Everything, Imbalance, InstanceFilter, KeyOwnerProofSystem, Nothing, + OnUnbalanced, WithdrawReasons, }, weights::{ constants::{ @@ -41,7 +42,7 @@ use frame_support::{ }, ConstantMultiplier, IdentityFee, Weight, }, - PalletId, RuntimeDebug, + PalletId, }; #[cfg(any(feature = "std", test))] pub use frame_system::Call as SystemCall; @@ -84,6 +85,7 @@ use sp_runtime::{ }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, ApplyExtrinsicResult, FixedPointNumber, FixedU128, Perbill, Percent, Permill, Perquintill, + RuntimeDebug, }; use sp_std::prelude::*; #[cfg(any(feature = "std", test))] @@ -101,6 +103,10 @@ use cere_runtime_common::{ use impls::Author; use sp_runtime::generic::Era; +// Governance configurations. +pub mod governance; +use governance::{pallet_custom_origins, GeneralAdmin, StakingAdmin, Treasurer, TreasurySpender}; + /// Generated voter bag information. mod voter_bags; @@ -128,10 +134,10 @@ 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: 52200, + spec_version: 53003, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 15, + transaction_version: 17, state_version: 0, }; @@ -300,15 +306,17 @@ impl InstanceFilter for ProxyType { RuntimeCall::Balances(..) | RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. }) | RuntimeCall::Indices(pallet_indices::Call::transfer { .. }) | - RuntimeCall::NominationPools(..) + RuntimeCall::NominationPools(..) | + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda(..) | + RuntimeCall::Whitelist(..) ), ProxyType::Governance => matches!( c, - RuntimeCall::Democracy(..) | - RuntimeCall::Council(..) | - RuntimeCall::TechnicalCommittee(..) | - RuntimeCall::Elections(..) | - RuntimeCall::Treasury(..) + RuntimeCall::Treasury(..) | + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda(..) | + RuntimeCall::Whitelist(..) ), ProxyType::Staking => matches!(c, RuntimeCall::Staking(..)), } @@ -386,6 +394,7 @@ impl pallet_babe::Config for Runtime { type ExpectedBlockTime = ExpectedBlockTime; type EpochChangeTrigger = pallet_babe::ExternalTrigger; type DisabledValidators = Session; + type MaxNominators = MaxNominatorRewardedPerValidator; type KeyOwnerProof = >::Proof; @@ -415,6 +424,7 @@ parameter_types! { // This number may need to be adjusted in the future if this assumption no longer holds true. pub const MaxLocks: u32 = 50; pub const MaxReserves: u32 = 50; + pub const MaxHolds: u32 = 50; } impl pallet_balances::Config for Runtime { @@ -430,7 +440,7 @@ impl pallet_balances::Config for Runtime { type FreezeIdentifier = (); type MaxFreezes = (); type RuntimeHoldReason = RuntimeHoldReason; - type MaxHolds = ConstU32<0>; + type MaxHolds = MaxHolds; } parameter_types! { @@ -515,10 +525,12 @@ parameter_types! { pub const BondingDuration: sp_staking::EraIndex = 3; pub const SlashDeferDuration: sp_staking::EraIndex = 2; pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - pub const MaxNominatorRewardedPerValidator: u32 = 256; + pub const MaxNominatorRewardedPerValidator: u32 = 512; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); pub OffchainRepeat: BlockNumber = 5; pub HistoryDepth: u32 = 84; + // 16 + pub const MaxNominations: u32 = ::LIMIT as u32; } pub struct StakingBenchmarkingConfig; @@ -527,13 +539,7 @@ impl pallet_staking::BenchmarkingConfig for StakingBenchmarkingConfig { type MaxValidators = ConstU32<1000>; } -type StakingAdminOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, ->; - impl pallet_staking::Config for Runtime { - type MaxNominations = MaxNominations; type Currency = Balances; type CurrencyBalance = Balance; type UnixTime = Timestamp; @@ -545,7 +551,7 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = StakingAdminOrigin; + type AdminOrigin = EitherOf, StakingAdmin>; type SessionInterface = Self; type EraPayout = pallet_staking::ConvertCurve; type NextNewSession = Session; @@ -560,11 +566,12 @@ impl pallet_staking::Config for Runtime { type EventListeners = NominationPools; type WeightInfo = pallet_staking::weights::SubstrateWeight; type BenchmarkingConfig = StakingBenchmarkingConfig; + type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; } impl pallet_fast_unstake::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type ControlOrigin = frame_system::EnsureRoot; + type ControlOrigin = EnsureRoot; type Deposit = ConstU128<{ DOLLARS }>; type Currency = Balances; type BatchSize = frame_support::traits::ConstU32<64>; @@ -607,6 +614,11 @@ parameter_types! { /// Setup election pallet to support maximum winners upto 1200. This will mean Staking Pallet /// cannot have active validators higher than this count. pub const MaxActiveValidators: u32 = 1200; + /// We take the top 22500 nominators as electing voters and all of the validators as electable + /// targets. Whilst this is the case, we cannot and shall not increase the size of the + /// validator intentions. + pub ElectionBounds: frame_election_provider_support::bounds::ElectionBounds = + ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); } frame_election_provider_support::generate_solution_type!( @@ -619,10 +631,6 @@ frame_election_provider_support::generate_solution_type!( >(16) ); -parameter_types! { - pub MaxNominations: u32 = ::LIMIT as u32; -} - /// The numbers configured here could always be more than the the maximum limits of staking pallet /// to ensure election snapshot will not run out of memory. For now, we set them to smaller values /// since the staking is bounded and the weight pipeline takes hours for this single pallet. @@ -670,8 +678,7 @@ impl onchain::Config for OnChainSeqPhragmen { >; type DataProvider = ::DataProvider; type MaxWinners = MaxActiveValidators; - type VotersBound = MaxElectingVoters; - type TargetsBound = MaxElectableTargets; + type Bounds = ElectionBounds; type WeightInfo = frame_election_provider_support::weights::SubstrateWeight; } @@ -728,12 +735,11 @@ impl pallet_election_provider_multi_phase::Config for Runtime { )>; type GovernanceFallback = onchain::OnChainExecution; type Solver = SequentialPhragmen, OffchainRandomBalancing>; - type ForceOrigin = EnsureRootOrHalfCouncil; - type MaxElectableTargets = ConstU16<{ u16::MAX }>; - type MaxElectingVoters = MaxElectingVoters; + type ForceOrigin = EitherOf, StakingAdmin>; type BenchmarkingConfig = ElectionProviderBenchmarkConfig; type WeightInfo = pallet_election_provider_multi_phase::weights::SubstrateWeight; type MaxWinners = MaxActiveValidators; + type ElectionBounds = ElectionBounds; } parameter_types! { @@ -749,165 +755,6 @@ impl pallet_bags_list::Config for Runtime { type Score = VoteWeight; } -parameter_types! { - pub const LaunchPeriod: BlockNumber = 24 * 60 * MINUTES; - pub const VotingPeriod: BlockNumber = 24 * 60 * MINUTES; - pub const FastTrackVotingPeriod: BlockNumber = 3 * 60 * MINUTES; - pub const MinimumDeposit: Balance = 50_000 * DOLLARS; - pub const EnactmentPeriod: BlockNumber = 24 * 60 * MINUTES; - pub const CooloffPeriod: BlockNumber = 7 * 24 * 60 * MINUTES; - pub const MaxProposals: u32 = 100; -} - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type VoteLockingPeriod = EnactmentPeriod; // Same as EnactmentPeriod - type MinimumDeposit = MinimumDeposit; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionAtLeast; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantAllowed = frame_support::traits::ConstBool; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cool-off period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type SubmitOrigin = frame_system::EnsureSigned; - type PalletsOrigin = OriginCaller; - type MaxVotes = ConstU32<100>; - type WeightInfo = pallet_democracy::weights::SubstrateWeight; - type MaxProposals = MaxProposals; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; -} - -parameter_types! { - pub const CouncilMotionDuration: BlockNumber = 7 * DAYS; - pub const CouncilMaxProposals: u32 = 100; - pub const CouncilMaxMembers: u32 = 100; -} - -type CouncilCollective = pallet_collective::Instance1; -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = CouncilMaxProposals; - type MaxMembers = CouncilMaxMembers; - type SetMembersOrigin = EnsureRoot; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = pallet_collective::weights::SubstrateWeight; - type MaxProposalWeight = MaxCollectivesProposalWeight; -} - -parameter_types! { - pub const CandidacyBond: Balance = 5_000_000 * DOLLARS; - // 1 storage item created, key size is 32 bytes, value size is 16+16. - pub const VotingBondBase: Balance = deposit(1, 64); - pub const VotingBondFactor: Balance = DOLLARS; - pub const TermDuration: BlockNumber = 182 * DAYS; - pub const DesiredMembers: u32 = 13; - 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; -} - -// Make sure that there are no more than `MaxMembers` members elected via elections-phragmen. -const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); - -impl pallet_elections_phragmen::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = ElectionsPhragmenPalletId; - type Currency = Balances; - type ChangeMembers = Council; - // NOTE: this implies that council's genesis members cannot be set directly and must come from - // this module. - type InitializeMembers = Council; - type CurrencyToVote = CurrencyToVote; - type CandidacyBond = CandidacyBond; - type VotingBondBase = VotingBondBase; - type VotingBondFactor = VotingBondFactor; - type LoserCandidate = (); - type KickedMember = (); - type DesiredMembers = DesiredMembers; - type DesiredRunnersUp = DesiredRunnersUp; - type TermDuration = TermDuration; - type WeightInfo = pallet_elections_phragmen::weights::SubstrateWeight; - type MaxVoters = MaxVoters; - type MaxVotesPerVoter = MaxVotesPerVoter; - type MaxCandidates = MaxCandidates; -} - -parameter_types! { - pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; - pub const TechnicalMaxProposals: u32 = 100; - pub const TechnicalMaxMembers: u32 = 100; -} - -type TechnicalCollective = pallet_collective::Instance2; -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = TechnicalMotionDuration; - type MaxProposals = TechnicalMaxProposals; - type MaxMembers = TechnicalMaxMembers; - type SetMembersOrigin = EnsureRoot; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = pallet_collective::weights::SubstrateWeight; - type MaxProposalWeight = MaxCollectivesProposalWeight; -} - -type EnsureRootOrHalfCouncil = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionMoreThan, ->; -impl pallet_membership::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRootOrHalfCouncil; - type RemoveOrigin = EnsureRootOrHalfCouncil; - type SwapOrigin = EnsureRootOrHalfCouncil; - type ResetOrigin = EnsureRootOrHalfCouncil; - type PrimeOrigin = EnsureRootOrHalfCouncil; - type MembershipInitialized = TechnicalCommittee; - type MembershipChanged = TechnicalCommittee; - type MaxMembers = TechnicalMaxMembers; - type WeightInfo = pallet_membership::weights::SubstrateWeight; -} - parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 50_000 * DOLLARS; @@ -925,14 +772,8 @@ parameter_types! { impl pallet_treasury::Config for Runtime { type PalletId = TreasuryPalletId; type Currency = Balances; - type ApproveOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - type RejectOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionMoreThan, - >; + type ApproveOrigin = EitherOfDiverse, Treasurer>; + type RejectOrigin = EitherOfDiverse, Treasurer>; type RuntimeEvent = RuntimeEvent; type OnSlash = (); type ProposalBond = ProposalBond; @@ -944,7 +785,7 @@ impl pallet_treasury::Config for Runtime { type SpendFunds = Bounties; type WeightInfo = pallet_treasury::weights::SubstrateWeight; type MaxApprovals = MaxApprovals; - type SpendOrigin = frame_support::traits::NeverEnsureOrigin; + type SpendOrigin = TreasurySpender; } parameter_types! { @@ -984,17 +825,6 @@ impl pallet_child_bounties::Config for Runtime { type WeightInfo = pallet_child_bounties::weights::SubstrateWeight; } -impl pallet_tips::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DataDepositPerByte = DataDepositPerByte; - type MaximumReasonLength = MaximumReasonLength; - type Tippers = Elections; - type TipCountdown = TipCountdown; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = TipReportDepositBase; - type WeightInfo = pallet_tips::weights::SubstrateWeight; -} - parameter_types! { pub const DepositPerItem: Balance = deposit(1, 0); pub const DepositPerByte: Balance = deposit(0, 1); @@ -1008,6 +838,8 @@ parameter_types! { .unwrap_or(RuntimeBlockWeights::get().max_block); pub Schedule: pallet_contracts::Schedule = Default::default(); pub UnsafeUnstableInterface: bool = false; + pub const CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(0); + pub const MaxDelegateDependencies: u32 = 32; } impl pallet_contracts::Config for Runtime { @@ -1036,7 +868,16 @@ impl pallet_contracts::Config for Runtime { type MaxStorageKeyLen = ConstU32<128>; type UnsafeUnstableInterface = ConstBool; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; - type Migrations = (); + type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; + type MaxDelegateDependencies = MaxDelegateDependencies; + type RuntimeHoldReason = RuntimeHoldReason; + type Debug = (); + type Environment = (); + type Migrations = ( + pallet_contracts::migration::v13::Migration, + pallet_contracts::migration::v14::Migration, + pallet_contracts::migration::v15::Migration, + ); } impl pallet_sudo::Config for Runtime { @@ -1146,6 +987,7 @@ impl pallet_grandpa::Config for Runtime { type WeightInfo = (); type MaxAuthorities = MaxAuthorities; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; + type MaxNominators = MaxNominatorRewardedPerValidator; } parameter_types! { @@ -1167,8 +1009,8 @@ impl pallet_identity::Config for Runtime { type MaxAdditionalFields = MaxAdditionalFields; type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; - type ForceOrigin = EnsureRootOrHalfCouncil; - type RegistrarOrigin = EnsureRootOrHalfCouncil; + type ForceOrigin = EitherOf, GeneralAdmin>; + type RegistrarOrigin = EitherOf, GeneralAdmin>; type WeightInfo = pallet_identity::weights::SubstrateWeight; } @@ -1271,28 +1113,6 @@ impl pallet_nomination_pools::Config for Runtime { type WeightInfo = (); } -pub struct InitiateNominationPools; -impl frame_support::traits::OnRuntimeUpgrade for InitiateNominationPools { - fn on_runtime_upgrade() -> frame_support::weights::Weight { - // we use one as an indicator if this has already been set. - if pallet_nomination_pools::MaxPools::::get().is_none() { - pallet_nomination_pools::MinJoinBond::::put(250 * DOLLARS); - pallet_nomination_pools::MinCreateBond::::put(5000 * DOLLARS); - - // Initialize with limits for now. - pallet_nomination_pools::MaxPools::::put(0); - pallet_nomination_pools::MaxPoolMembersPerPool::::put(0); - pallet_nomination_pools::MaxPoolMembers::::put(0); - - log::info!(target: "runtime::cere", "pools config initiated 🎉"); - ::DbWeight::get().reads_writes(1, 5) - } else { - log::info!(target: "runtime::cere", "pools config already initiated 😏"); - ::DbWeight::get().reads(1) - } - } -} - parameter_types! { pub const DdcCustomersPalletId: PalletId = PalletId(*b"accounts"); // DDC maintainer's stake pub const UnlockingDelay: BlockNumber = 100800_u32; // 1 hour * 24 * 7 = 7 days; (1 hour is 600 blocks) @@ -1315,6 +1135,9 @@ impl pallet_ddc_clusters::Config for Runtime { type StakerCreator = pallet_ddc_staking::Pallet; type Currency = Balances; type WeightInfo = pallet_ddc_clusters::weights::SubstrateWeight; + type MinErasureCodingRequiredLimit = ConstU32<4>; + type MinErasureCodingTotalLimit = ConstU32<6>; + type MinReplicationTotalLimit = ConstU32<3>; } impl pallet_ddc_nodes::Config for Runtime { @@ -1375,11 +1198,6 @@ construct_runtime!( ElectionProviderMultiPhase: pallet_election_provider_multi_phase, Staking: pallet_staking, Session: pallet_session, - Democracy: pallet_democracy, - Council: pallet_collective::, - TechnicalCommittee: pallet_collective::, - Elections: pallet_elections_phragmen, - TechnicalMembership: pallet_membership::, Grandpa: pallet_grandpa, Treasury: pallet_treasury, Contracts: pallet_contracts, @@ -1397,7 +1215,6 @@ construct_runtime!( Proxy: pallet_proxy, Multisig: pallet_multisig, Bounties: pallet_bounties, - Tips: pallet_tips, VoterList: pallet_bags_list::, ChildBounties: pallet_child_bounties, NominationPools: pallet_nomination_pools, @@ -1409,7 +1226,13 @@ construct_runtime!( DdcCustomers: pallet_ddc_customers, DdcNodes: pallet_ddc_nodes, DdcClusters: pallet_ddc_clusters, - DdcPayouts: pallet_ddc_payouts + DdcPayouts: pallet_ddc_payouts, + // Start OpenGov. + ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event}, + Referenda: pallet_referenda::{Pallet, Call, Storage, Event}, + Origins: pallet_custom_origins::{Origin}, + Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event}, + // End OpenGov. } ); @@ -1439,29 +1262,6 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); -pub struct StakingMigrationV11OldPallet; -impl Get<&'static str> for StakingMigrationV11OldPallet { - fn get() -> &'static str { - "BagsList" - } -} - -// We don't need to run pallet_balances::pallets::MigrateToTrackInactive or -// pallet_balances::pallets::MigrateManyToTrackInactive since XCM related only. -// MigrateToTrackInactive and MigrateManyToTrackInactive simply add CheckingAccount value to -// InactiveIssuance so it's safe to skip it. -pub struct SetBalancesStorageVersions; -impl OnRuntimeUpgrade for SetBalancesStorageVersions { - fn on_runtime_upgrade() -> Weight { - let storage_version = ::on_chain_storage_version(); - if storage_version < 1 { - StorageVersion::new(1).put::(); - } - - RocksDbWeight::get().reads_writes(1, 1) - } -} - /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1470,23 +1270,86 @@ pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; -parameter_types! { - pub const SocietyPalletName: &'static str = "Society"; -} - /// Runtime migrations -type Migrations = ( - pallet_staking::migrations::v9::InjectValidatorsIntoVoterList, - pallet_staking::migrations::v10::MigrateToV10, - pallet_staking::migrations::v11::MigrateToV11, - pallet_staking::migrations::v12::MigrateToV12, - pallet_staking::migrations::v13::MigrateToV13, - frame_support::migrations::RemovePallet< - SocietyPalletName, - ::DbWeight, - >, - SetBalancesStorageVersions, -); +type Migrations = migrations::Unreleased; + +/// The runtime migrations per release. +#[allow(deprecated, missing_docs)] +pub mod migrations { + use frame_support::traits::LockIdentifier; + use frame_system::pallet_prelude::BlockNumberFor; + + use super::*; + + parameter_types! { + pub const DemocracyPalletName: &'static str = "Democracy"; + pub const CouncilPalletName: &'static str = "Council"; + pub const TechnicalCommitteePalletName: &'static str = "TechnicalCommittee"; + pub const ElectionPalletName: &'static str = "Elections"; + pub const TechnicalMembershipPalletName: &'static str = "TechnicalMembership"; + pub const TipsPalletName: &'static str = "Tips"; + pub const ElectionPalletId: LockIdentifier = *b"phrelect"; + } + + // Special Config for Gov V1 pallets, allowing us to run migrations for them without + // implementing their configs on [`Runtime`]. + pub struct UnlockConfig; + impl pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockConfig for UnlockConfig { + type Currency = Balances; + type MaxVotes = ConstU32<100>; + type MaxDeposits = ConstU32<100>; + type AccountId = AccountId; + type BlockNumber = BlockNumberFor; + type DbWeight = ::DbWeight; + type PalletName = DemocracyPalletName; + } + impl pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockConfig + for UnlockConfig + { + type Currency = Balances; + type MaxVotesPerVoter = ConstU32<16>; + type PalletId = ElectionPalletId; + type AccountId = AccountId; + type DbWeight = ::DbWeight; + type PalletName = ElectionPalletName; + } + impl pallet_tips::migrations::unreserve_deposits::UnlockConfig<()> for UnlockConfig { + type Currency = Balances; + type Hash = Hash; + type DataDepositPerByte = DataDepositPerByte; + type TipReportDepositBase = TipReportDepositBase; + type AccountId = AccountId; + type BlockNumber = BlockNumberFor; + type DbWeight = ::DbWeight; + type PalletName = TipsPalletName; + } + + /// Unreleased migrations. Add new ones here: + pub type Unreleased = ( + pallet_ddc_clusters::migration::MigrateToV1, + pallet_contracts::migration::Migration, + pallet_referenda::migration::v1::MigrateV0ToV1, + // Gov v1 storage migrations + // https://github.com/paritytech/polkadot/issues/6749 + pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, + pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, + pallet_tips::migrations::unreserve_deposits::UnreserveDeposits, + + // Delete all Gov v1 pallet storage key/values. + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, + ); +} /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -1516,23 +1379,19 @@ mod benches { [pallet_balances, Balances] [pallet_bounties, Bounties] [pallet_child_bounties, ChildBounties] - [pallet_collective, Council] [pallet_contracts, Contracts] [pallet_ddc_customers, DdcCustomers] [pallet_ddc_clusters, DdcClusters] [pallet_ddc_staking, DdcStaking] [pallet_ddc_nodes, DdcNodes] [pallet_ddc_payouts, DdcPayouts] - [pallet_democracy, Democracy] [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] [pallet_election_provider_support_benchmarking, EPSBench::] - [pallet_elections_phragmen, Elections] [pallet_fast_unstake, FastUnstake] [pallet_grandpa, Grandpa] [pallet_identity, Identity] [pallet_im_online, ImOnline] [pallet_indices, Indices] - [pallet_membership, TechnicalMembership] [pallet_multisig, Multisig] [pallet_proxy, Proxy] [pallet_preimage, Preimage] @@ -1540,10 +1399,12 @@ mod benches { [pallet_staking, Staking] [frame_system, SystemBench::] [pallet_timestamp, Timestamp] - [pallet_tips, Tips] [pallet_treasury, Treasury] [pallet_utility, Utility] [pallet_vesting, Vesting] + [pallet_conviction_voting, ConvictionVoting] + [pallet_referenda, Referenda] + [pallet_whitelist, Whitelist] ); } @@ -1885,7 +1746,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch, TrackedStorageKey}; + use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch}; + use sp_storage::TrackedStorageKey; // Trying to add benchmarks directly to the Session Pallet caused cyclic dependency // issues. To get around that, we separated the Session benchmarks into its own crate, diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs index aa4dcd79b..78831f532 100644 --- a/runtime/common/src/constants.rs +++ b/runtime/common/src/constants.rs @@ -24,6 +24,7 @@ pub mod currency { 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 GRAND: Balance = DOLLARS * 1_000; pub const fn deposit(items: u32, bytes: u32) -> Balance { items as Balance * 15 * CENTS + (bytes as Balance) * 6 * CENTS diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index d76bda074..94a7a9904 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -1,8 +1,6 @@ //! storage migrations for pallet #![allow(clippy::type_complexity)] -use frame_support::{ - log, pallet_prelude::*, traits::OnRuntimeUpgrade, weights::Weight, DefaultNoBound, -}; +use frame_support::{pallet_prelude::*, traits::OnRuntimeUpgrade, weights::Weight, DefaultNoBound}; use pallet_contracts::migration::{IsFinished, MigrationStep}; use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b358f6e8e..5d6438a01 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2024-03-12" +channel = "1.77.0" components = ["clippy", "rustfmt"] targets = ["wasm32-unknown-unknown"] diff --git a/scripts/init.sh b/scripts/init.sh index d7eaa58b2..105339203 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -4,9 +4,9 @@ set -e echo "*** Initializing WASM build environment" -rustup install nightly-2024-03-12 +rustup install 1.77.0 -rustup target add wasm32-unknown-unknown --toolchain nightly-2024-03-12 +rustup target add wasm32-unknown-unknown --toolchain 1.77.0 ln -sf $PWD/scripts/pre-commit.sh $PWD/.git/hooks/pre-commit || true ln -sf $PWD/scripts/pre-push.sh $PWD/.git/hooks/pre-push || true diff --git a/scripts/pre-commit.sh b/scripts/pre-commit.sh index a01d1ba34..ee7aec9f9 100755 --- a/scripts/pre-commit.sh +++ b/scripts/pre-commit.sh @@ -2,7 +2,7 @@ # Prevent committing badly formatted code -cargo fmt -- --check +cargo +nightly-2024-03-12 fmt -- --check if [ $? -ne 0 ]; then echo "Run \`cargo fmt\` to fix formatting issues before committing." exit 1 diff --git a/shell.nix b/shell.nix index 98ec71450..11b077422 100644 --- a/shell.nix +++ b/shell.nix @@ -13,7 +13,7 @@ let rev = "1fe6ed37fd9beb92afe90671c0c2a662a03463dd"; }; nixpkgs = import pinned { overlays = [ mozillaOverlay ]; }; - toolchain = with nixpkgs; (rustChannelOf { date = "2023-05-23"; channel = "nightly"; }); + toolchain = with nixpkgs; (rustChannelOf { date = "2023-10-05"; channel = "nightly"; }); rust-wasm = toolchain.rust.override { targets = [ "wasm32-unknown-unknown" ]; extensions = ["rust-src"];