From af018293ff2e9188e5258f2209be0dc0b4820d44 Mon Sep 17 00:00:00 2001 From: Rakan Al-Huneiti Date: Wed, 10 Jan 2024 16:00:30 +0300 Subject: [PATCH 1/7] Update Substrate deps to 0.9.36 (#180) Notable changes: - `#[pallet::call_index(X)]` has to be added to extrinsic calls in pallets, where `X` is 0...N TODO - [x] Fix RPC - [x] Add pallet index to all extrinsic calls - [x] Add `call_index` to DDC/OCW & Chain-Bridge pallets (WIP) - [x] Update cere & cere-dev spec & transaction versions --------- Co-authored-by: Raid5594 <52794079+Raid5594@users.noreply.github.com> --- .github/workflows/ci.yaml | 8 +- CHANGELOG.md | 6 + Cargo.lock | 934 ++++++++++++-------------- Cargo.toml | 6 +- README.md | 2 +- cli/Cargo.toml | 12 +- node/client/Cargo.toml | 50 +- node/client/src/lib.rs | 2 +- node/service/Cargo.toml | 66 +- pallets/chainbridge/Cargo.toml | 17 +- pallets/chainbridge/src/lib.rs | 721 +++++++++++--------- pallets/chainbridge/src/mock.rs | 9 +- pallets/chainbridge/src/tests.rs | 68 +- pallets/ddc-clusters/Cargo.toml | 34 +- pallets/ddc-clusters/src/lib.rs | 5 + pallets/ddc-clusters/src/mock.rs | 4 +- pallets/ddc-customers/Cargo.toml | 32 +- pallets/ddc-customers/src/lib.rs | 6 + pallets/ddc-nodes/Cargo.toml | 28 +- pallets/ddc-nodes/src/lib.rs | 3 + pallets/ddc-payouts/Cargo.toml | 32 +- pallets/ddc-payouts/src/lib.rs | 9 + pallets/ddc-staking/Cargo.toml | 28 +- pallets/ddc-staking/src/lib.rs | 8 + pallets/erc20/Cargo.toml | 18 +- pallets/erc20/src/lib.rs | 168 +++-- pallets/erc20/src/mock.rs | 12 +- pallets/erc721/Cargo.toml | 16 +- pallets/erc721/src/lib.rs | 173 ++--- pallets/erc721/src/tests.rs | 4 +- primitives/Cargo.toml | 6 +- rpc/Cargo.toml | 48 +- runtime/cere-dev/Cargo.toml | 154 ++--- runtime/cere-dev/constants/Cargo.toml | 6 +- runtime/cere-dev/src/lib.rs | 29 +- runtime/cere/Cargo.toml | 154 ++--- runtime/cere/constants/Cargo.toml | 4 +- runtime/cere/src/lib.rs | 30 +- runtime/common/Cargo.toml | 10 +- rust-toolchain.toml | 2 +- scripts/init.sh | 4 +- shell.nix | 3 +- traits/Cargo.toml | 12 +- 43 files changed, 1526 insertions(+), 1417 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d7e5c74ca..63026436c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,7 +24,7 @@ jobs: - name: Install nightly toolchain uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2022-10-09 + toolchain: nightly-2022-11-15 override: true components: rustfmt - name: Check TOML @@ -44,7 +44,7 @@ jobs: - name: Install nightly toolchain uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2022-10-09 + toolchain: nightly-2022-11-15 override: true target: wasm32-unknown-unknown - name: Rust Cache @@ -72,7 +72,7 @@ jobs: - name: Install nightly toolchain uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2022-10-09 + toolchain: nightly-2022-11-15 override: true target: wasm32-unknown-unknown components: clippy @@ -95,7 +95,7 @@ jobs: - name: Install nightly toolchain uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2022-10-09 + toolchain: nightly-2022-11-15 override: true target: wasm32-unknown-unknown - name: Rust Cache diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cea79319..972fc270c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ... +## [4.8.5] + +### Changed + +- [C,D] Updated Substrate to polkadot-v0.9.36 + ## [4.8.4] ### Changed diff --git a/Cargo.lock b/Cargo.lock index 1096e2858..2f8bfea70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -160,17 +160,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - [[package]] name = "async-channel" version = "2.1.1" @@ -204,7 +193,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.1.1", + "async-channel", "async-executor", "async-io 2.2.2", "async-lock 3.2.0", @@ -272,83 +261,6 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "async-process" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" -dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", - "async-signal", - "blocking", - "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.28", - "windows-sys 0.48.0", -] - -[[package]] -name = "async-signal" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" -dependencies = [ - "async-io 2.2.2", - "async-lock 2.8.0", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix 0.38.28", - "signal-hook-registry", - "slab", - "windows-sys 0.48.0", -] - -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-channel 1.9.0", - "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite 1.13.0", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite 0.2.13", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-std-resolver" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba50e24d9ee0a8950d3d03fc6d0dd10aa14b5de3b101949b4e160f7fee7c723" -dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "socket2 0.4.10", - "trust-dns-resolver", -] - [[package]] name = "async-task" version = "4.7.0" @@ -604,7 +516,7 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel 2.1.1", + "async-channel", "async-lock 3.2.0", "async-task", "fastrand 2.0.1", @@ -732,7 +644,7 @@ dependencies = [ [[package]] name = "cere" -version = "4.8.4" +version = "4.8.5" dependencies = [ "cere-cli", "sc-cli", @@ -741,7 +653,7 @@ dependencies = [ [[package]] name = "cere-cli" -version = "4.8.4" +version = "4.8.5" dependencies = [ "cere-client", "cere-service", @@ -756,13 +668,14 @@ dependencies = [ [[package]] name = "cere-client" -version = "4.8.4" +version = "4.8.5" dependencies = [ "cere-dev-runtime", "cere-runtime", "frame-benchmarking", "frame-system", "frame-system-rpc-runtime-api", + "futures", "node-primitives", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -787,7 +700,7 @@ dependencies = [ [[package]] name = "cere-dev-runtime" -version = "4.8.4" +version = "4.8.5" dependencies = [ "cere-dev-runtime-constants", "cere-runtime-common", @@ -876,7 +789,7 @@ dependencies = [ [[package]] name = "cere-dev-runtime-constants" -version = "4.8.4" +version = "4.8.5" dependencies = [ "node-primitives", "sp-runtime", @@ -884,7 +797,7 @@ dependencies = [ [[package]] name = "cere-rpc" -version = "4.8.4" +version = "4.8.5" dependencies = [ "jsonrpsee", "node-primitives", @@ -913,7 +826,7 @@ dependencies = [ [[package]] name = "cere-runtime" -version = "4.8.4" +version = "4.8.5" dependencies = [ "cere-runtime-common", "cere-runtime-constants", @@ -1002,7 +915,7 @@ dependencies = [ [[package]] name = "cere-runtime-common" -version = "4.8.4" +version = "4.8.5" dependencies = [ "frame-support", "node-primitives", @@ -1012,14 +925,14 @@ dependencies = [ [[package]] name = "cere-runtime-constants" -version = "4.8.4" +version = "4.8.5" dependencies = [ "node-primitives", ] [[package]] name = "cere-service" -version = "4.8.4" +version = "4.8.5" dependencies = [ "cere-client", "cere-dev-runtime", @@ -1603,7 +1516,7 @@ dependencies = [ [[package]] name = "ddc-primitives" -version = "4.8.4" +version = "4.8.5" dependencies = [ "parity-scale-codec", "scale-info", @@ -1614,7 +1527,7 @@ dependencies = [ [[package]] name = "ddc-traits" -version = "4.8.4" +version = "4.8.5" dependencies = [ "ddc-primitives", "frame-support", @@ -1958,17 +1871,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite 0.2.13", -] - [[package]] name = "event-listener" version = "4.0.3" @@ -2136,7 +2038,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", ] @@ -2159,7 +2061,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -2182,7 +2084,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", "array-bytes", @@ -2234,7 +2136,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -2245,7 +2147,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2253,6 +2155,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", + "sp-core", "sp-npos-elections", "sp-runtime", "sp-std", @@ -2261,7 +2164,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -2287,10 +2190,29 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-remote-externalities" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +dependencies = [ + "env_logger 0.9.3", + "futures", + "log", + "parity-scale-codec", + "serde", + "serde_json", + "sp-core", + "sp-io", + "sp-runtime", + "sp-version", + "substrate-rpc-client", + "tokio", +] + [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bitflags 1.3.2", "frame-metadata", @@ -2322,7 +2244,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", "cfg-expr", @@ -2336,7 +2258,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -2348,7 +2270,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -2358,7 +2280,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "log", @@ -2376,7 +2298,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -2391,7 +2313,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sp-api", @@ -2400,7 +2322,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "parity-scale-codec", @@ -2520,7 +2442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls", + "rustls 0.20.9", "webpki", ] @@ -2668,18 +2590,6 @@ dependencies = [ "regex-syntax 0.8.2", ] -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "group" version = "0.12.1" @@ -2869,6 +2779,12 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" version = "1.8.0" @@ -2920,10 +2836,10 @@ dependencies = [ "http", "hyper", "log", - "rustls", + "rustls 0.20.9", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", ] [[package]] @@ -3048,6 +2964,12 @@ dependencies = [ "hashbrown 0.14.3", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "inout" version = "0.1.3" @@ -3162,24 +3084,23 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ "jsonrpsee-core", - "jsonrpsee-http-server", "jsonrpsee-proc-macros", + "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", - "jsonrpsee-ws-server", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", @@ -3190,17 +3111,17 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.25.3", ] [[package]] name = "jsonrpsee-core" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", "arrayvec 0.7.4", @@ -3211,10 +3132,8 @@ dependencies = [ "futures-timer", "futures-util", "globset", - "http", "hyper", "jsonrpsee-types", - "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -3224,45 +3143,48 @@ dependencies = [ "thiserror", "tokio", "tracing", - "tracing-futures", - "unicase", ] [[package]] -name = "jsonrpsee-http-server" -version = "0.15.1" +name = "jsonrpsee-proc-macros" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +dependencies = [ + "heck", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" dependencies = [ "futures-channel", "futures-util", + "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", "serde", "serde_json", + "soketto", "tokio", + "tokio-stream", + "tokio-util", + "tower", "tracing", - "tracing-futures", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", ] [[package]] name = "jsonrpsee-types" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ "anyhow", "beef", @@ -3274,9 +3196,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", "jsonrpsee-client-transport", @@ -3284,26 +3206,6 @@ dependencies = [ "jsonrpsee-types", ] -[[package]] -name = "jsonrpsee-ws-server" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" -dependencies = [ - "futures-channel", - "futures-util", - "http", - "jsonrpsee-core", - "jsonrpsee-types", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-futures", -] - [[package]] name = "k256" version = "0.11.6" @@ -3325,46 +3227,33 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - [[package]] name = "kvdb" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" dependencies = [ - "parity-util-mem", "smallvec", ] [[package]] name = "kvdb-memorydb" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" +checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parity-util-mem", "parking_lot 0.12.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c076cc2cdbac89b9910c853a36c957d3862a779f31c2661174222cefb49ee597" +checksum = "2182b8219fee6bd83aacaab7344e840179ae079d5216aa4e249b4d704646a844" dependencies = [ "kvdb", - "log", "num_cpus", - "parity-util-mem", "parking_lot 0.12.1", "regex", "rocksdb", @@ -3478,7 +3367,6 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" dependencies = [ - "async-std-resolver", "futures", "libp2p-core", "log", @@ -3542,7 +3430,6 @@ version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" dependencies = [ - "async-io 1.13.0", "data-encoding", "dns-parser", "futures", @@ -3553,6 +3440,7 @@ dependencies = [ "rand 0.8.5", "smallvec", "socket2 0.4.10", + "tokio", "void", ] @@ -3681,7 +3569,6 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" dependencies = [ - "async-io 1.13.0", "futures", "futures-timer", "if-watch", @@ -3689,6 +3576,7 @@ dependencies = [ "libp2p-core", "log", "socket2 0.4.10", + "tokio", ] [[package]] @@ -3721,7 +3609,7 @@ dependencies = [ "rw-stream-sink", "soketto", "url", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -3890,9 +3778,6 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -dependencies = [ - "value-bag", -] [[package]] name = "lru" @@ -4007,13 +3892,12 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" +checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" dependencies = [ "hash-db", "hashbrown 0.12.3", - "parity-util-mem", ] [[package]] @@ -4285,7 +4169,7 @@ dependencies = [ [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-system", "parity-scale-codec", @@ -4443,7 +4327,7 @@ checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -4459,7 +4343,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -4474,7 +4358,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4498,7 +4382,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4518,7 +4402,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4533,7 +4417,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4550,7 +4434,7 @@ dependencies = [ [[package]] name = "pallet-chainbridge" -version = "4.8.4" +version = "4.8.5" dependencies = [ "frame-support", "frame-system", @@ -4566,7 +4450,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4585,7 +4469,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4602,7 +4486,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bitflags 1.3.2", "frame-benchmarking", @@ -4622,16 +4506,16 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-sandbox", "sp-std", - "wasm-instrument", - "wasmi-validation", + "wasm-instrument 0.4.0", + "wasmi 0.20.0", + "wasmparser-nostd", ] [[package]] name = "pallet-contracts-primitives" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -4643,7 +4527,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -4652,7 +4536,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters" -version = "4.8.4" +version = "4.8.5" dependencies = [ "ddc-primitives", "ddc-traits", @@ -4678,7 +4562,7 @@ dependencies = [ [[package]] name = "pallet-ddc-customers" -version = "4.8.4" +version = "4.8.5" dependencies = [ "ddc-primitives", "ddc-traits", @@ -4701,7 +4585,7 @@ dependencies = [ [[package]] name = "pallet-ddc-nodes" -version = "4.8.4" +version = "4.8.5" dependencies = [ "ddc-primitives", "ddc-traits", @@ -4723,7 +4607,7 @@ dependencies = [ [[package]] name = "pallet-ddc-payouts" -version = "4.8.4" +version = "4.8.5" dependencies = [ "byte-unit", "ddc-primitives", @@ -4747,7 +4631,7 @@ dependencies = [ [[package]] name = "pallet-ddc-staking" -version = "4.8.4" +version = "4.8.5" dependencies = [ "ddc-primitives", "ddc-traits", @@ -4771,7 +4655,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4789,7 +4673,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4813,7 +4697,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4826,7 +4710,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4843,7 +4727,7 @@ dependencies = [ [[package]] name = "pallet-erc20" -version = "4.8.4" +version = "4.8.5" dependencies = [ "frame-support", "frame-system", @@ -4861,7 +4745,7 @@ dependencies = [ [[package]] name = "pallet-erc721" -version = "4.8.4" +version = "4.8.5" dependencies = [ "frame-support", "frame-system", @@ -4878,7 +4762,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4896,7 +4780,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4919,7 +4803,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4935,7 +4819,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4955,7 +4839,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4972,7 +4856,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4989,7 +4873,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5005,7 +4889,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5022,7 +4906,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5042,7 +4926,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sp-api", @@ -5052,7 +4936,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5069,7 +4953,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5092,7 +4976,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5107,7 +4991,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5121,7 +5005,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5136,7 +5020,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5147,12 +5031,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5173,7 +5058,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5189,7 +5074,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5203,7 +5088,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5226,7 +5111,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -5237,7 +5122,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5251,7 +5136,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5269,7 +5154,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5288,7 +5173,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5304,7 +5189,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5320,7 +5205,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5332,7 +5217,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5349,7 +5234,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5365,7 +5250,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5431,33 +5316,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" -[[package]] -name = "parity-util-mem" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" -dependencies = [ - "cfg-if", - "hashbrown 0.12.3", - "impl-trait-for-tuples", - "parity-util-mem-derive", - "parking_lot 0.12.1", - "primitive-types", - "smallvec", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "parity-wasm" version = "0.45.0" @@ -6227,23 +6085,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" -dependencies = [ - "env_logger 0.9.3", - "log", - "parity-scale-codec", - "serde", - "serde_json", - "sp-core", - "sp-io", - "sp-runtime", - "sp-version", - "substrate-rpc-client", -] - [[package]] name = "resolv-conf" version = "0.7.0" @@ -6429,6 +6270,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -6450,6 +6303,16 @@ dependencies = [ "base64 0.21.6", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -6494,7 +6357,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "sp-core", @@ -6505,7 +6368,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -6532,7 +6395,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "futures-timer", @@ -6555,7 +6418,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6571,7 +6434,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "memmap2", @@ -6588,7 +6451,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -6599,7 +6462,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "chrono", @@ -6639,7 +6502,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "fnv", "futures", @@ -6667,7 +6530,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "kvdb", @@ -6692,13 +6555,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", "futures-timer", "libp2p", "log", + "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -6716,7 +6580,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "fork-tree", @@ -6757,7 +6621,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "jsonrpsee", @@ -6779,7 +6643,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6792,7 +6656,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -6816,7 +6680,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sc-client-api", "sp-authorship", @@ -6827,9 +6691,8 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "lazy_static", "lru", "parity-scale-codec", "parking_lot 0.12.1", @@ -6838,7 +6701,6 @@ dependencies = [ "sc-executor-wasmtime", "sp-api", "sp-core", - "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", "sp-panic-handler", @@ -6847,56 +6709,48 @@ dependencies = [ "sp-version", "sp-wasm-interface", "tracing", - "wasmi", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "environmental", - "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", - "sp-sandbox", "sp-wasm-interface", "thiserror", - "wasm-instrument", - "wasmi", + "wasm-instrument 0.3.0", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", - "parity-scale-codec", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", - "wasmi", + "wasmi 0.13.2", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "cfg-if", "libc", "log", "once_cell", - "parity-scale-codec", - "parity-wasm", "rustix 0.35.16", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmtime", ] @@ -6904,7 +6758,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", "array-bytes", @@ -6945,7 +6799,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "finality-grandpa", "futures", @@ -6966,13 +6820,12 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term", "futures", "futures-timer", "log", - "parity-util-mem", "sc-client-api", "sc-network-common", "sc-transaction-pool-api", @@ -6983,7 +6836,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "async-trait", @@ -6998,7 +6851,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "async-trait", @@ -7045,7 +6898,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "cid", "futures", @@ -7065,7 +6918,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -7091,7 +6944,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", "futures", @@ -7109,7 +6962,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "futures", @@ -7130,9 +6983,10 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", + "async-trait", "fork-tree", "futures", "libp2p", @@ -7154,13 +7008,14 @@ dependencies = [ "sp-core", "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "futures", @@ -7179,7 +7034,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "bytes", @@ -7209,7 +7064,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "libp2p", @@ -7222,7 +7077,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7231,7 +7086,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "hash-db", @@ -7261,7 +7116,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "jsonrpsee", @@ -7284,20 +7139,23 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", + "http", "jsonrpsee", "log", "serde_json", "substrate-prometheus-endpoint", "tokio", + "tower", + "tower-http", ] [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "hex", @@ -7316,7 +7174,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "directories", @@ -7327,7 +7185,6 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "pin-project", "rand 0.7.3", @@ -7387,12 +7244,10 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "parity-scale-codec", - "parity-util-mem", - "parity-util-mem-derive", "parking_lot 0.12.1", "sc-client-api", "sp-core", @@ -7401,7 +7256,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7420,7 +7275,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "libc", @@ -7439,7 +7294,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "chrono", "futures", @@ -7457,7 +7312,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term", "atty", @@ -7488,7 +7343,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -7499,7 +7354,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -7507,7 +7362,6 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -7526,7 +7380,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -7540,7 +7394,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "futures-timer", @@ -7947,6 +7801,7 @@ dependencies = [ "bytes", "flate2", "futures", + "http", "httparse", "log", "rand 0.8.5", @@ -7956,7 +7811,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "log", @@ -7974,7 +7829,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "blake2", "proc-macro-crate 1.1.3", @@ -7985,8 +7840,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -7998,8 +7853,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "integer-sqrt", "num-traits", @@ -8014,7 +7869,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8027,7 +7882,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "parity-scale-codec", @@ -8039,7 +7894,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sp-api", @@ -8051,7 +7906,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "log", @@ -8069,7 +7924,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -8088,7 +7943,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "merlin", @@ -8111,7 +7966,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8125,7 +7980,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8137,8 +7992,8 @@ dependencies = [ [[package]] name = "sp-core" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "base58", @@ -8176,14 +8031,14 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "wasmi", + "wasmi 0.13.2", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "blake2", "byteorder", @@ -8197,7 +8052,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -8208,7 +8063,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -8216,8 +8071,8 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -8226,8 +8081,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "environmental", "parity-scale-codec", @@ -8238,7 +8093,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "finality-grandpa", "log", @@ -8256,7 +8111,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -8269,10 +8124,11 @@ dependencies = [ [[package]] name = "sp-io" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bytes", + "ed25519-dalek", "futures", "hash-db", "libsecp256k1", @@ -8295,8 +8151,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "lazy_static", "sp-core", @@ -8306,8 +8162,8 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -8324,7 +8180,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "thiserror", "zstd", @@ -8333,7 +8189,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8347,7 +8203,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sp-api", "sp-core", @@ -8356,8 +8212,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "backtrace", "lazy_static", @@ -8367,7 +8223,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "rustc-hash", "serde", @@ -8376,15 +8232,14 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", - "parity-util-mem", "paste", "rand 0.7.3", "scale-info", @@ -8399,8 +8254,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -8417,8 +8272,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -8427,24 +8282,10 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "sp-sandbox" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" -dependencies = [ - "log", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi", -] - [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8458,18 +8299,19 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "log", @@ -8490,13 +8332,13 @@ dependencies = [ [[package]] name = "sp-std" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" [[package]] name = "sp-storage" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8509,7 +8351,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures-timer", @@ -8524,8 +8366,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sp-std", @@ -8537,7 +8379,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sp-api", "sp-runtime", @@ -8546,7 +8388,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "log", @@ -8561,8 +8403,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", "hash-db", @@ -8585,7 +8427,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8602,7 +8444,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -8612,21 +8454,21 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", "sp-std", - "wasmi", + "wasmi 0.13.2", "wasmtime", ] [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8773,7 +8615,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "platforms 2.0.0", ] @@ -8781,7 +8623,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -8802,7 +8644,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures-util", "hyper", @@ -8815,7 +8657,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "jsonrpsee", @@ -8828,7 +8670,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "log", @@ -8849,7 +8691,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "substrate-test-utils-derive", @@ -8859,7 +8701,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -8870,7 +8712,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term", "build-helper", @@ -9110,11 +8952,21 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.9", "tokio", "webpki", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -9167,6 +9019,41 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags 1.3.2", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite 0.2.13", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -9179,6 +9066,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", @@ -9301,6 +9189,7 @@ dependencies = [ "smallvec", "thiserror", "tinyvec", + "tokio", "tracing", "url", ] @@ -9320,6 +9209,7 @@ dependencies = [ "resolv-conf", "smallvec", "thiserror", + "tokio", "tracing", "trust-dns-proto", ] @@ -9333,21 +9223,25 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "clap", + "frame-remote-externalities", + "hex", "log", "parity-scale-codec", - "remote-externalities", "sc-chain-spec", "sc-cli", "sc-executor", "sc-service", "serde", + "sp-api", "sp-core", + "sp-debug-derive", "sp-externalities", "sp-io", "sp-keystore", + "sp-rpc", "sp-runtime", "sp-state-machine", "sp-version", @@ -9398,15 +9292,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.14" @@ -9497,12 +9382,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cdbaf5e132e593e9fc1de6a15bbec912395b11fb9719e061cf64f804524c503" - [[package]] name = "vcpkg" version = "0.2.15" @@ -9633,6 +9512,15 @@ dependencies = [ "parity-wasm", ] +[[package]] +name = "wasm-instrument" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a47ecb37b9734d1085eaa5ae1a81e60801fd8c28d4cabdd8aedb982021918bc" +dependencies = [ + "parity-wasm", +] + [[package]] name = "wasm-opt" version = "0.110.2" @@ -9697,7 +9585,19 @@ checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ "parity-wasm", "wasmi-validation", - "wasmi_core", + "wasmi_core 0.2.1", +] + +[[package]] +name = "wasmi" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01bf50edb2ea9d922aa75a7bf3c15e26a6c9e2d18c56e862b49737a582901729" +dependencies = [ + "spin 0.9.8", + "wasmi_arena", + "wasmi_core 0.5.0", + "wasmparser-nostd", ] [[package]] @@ -9709,6 +9609,12 @@ dependencies = [ "parity-wasm", ] +[[package]] +name = "wasmi_arena" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ea379cbb0b41f3a9f0bf7b47036d036aae7f43383d8cc487d4deccf40dee0a" + [[package]] name = "wasmi_core" version = "0.2.1" @@ -9722,6 +9628,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "wasmi_core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5bf998ab792be85e20e771fe14182b4295571ad1d4f89d3da521c1bef5f597a" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", +] + [[package]] name = "wasmparser" version = "0.89.1" @@ -9731,6 +9648,15 @@ dependencies = [ "indexmap 1.9.3", ] +[[package]] +name = "wasmparser-nostd" +version = "0.91.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c37f310b5a62bfd5ae7c0f1d8e6f98af16a5d6d84ba764e9c36439ec14e318b" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "1.0.2" @@ -9930,6 +9856,12 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + [[package]] name = "which" version = "4.4.2" diff --git a/Cargo.toml b/Cargo.toml index 4726737f0..8b123c794 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,17 +4,17 @@ path = "src/main.rs" [package] name = "cere" -version = "4.8.4" +version = "4.8.5" build = "build.rs" edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] cere-cli = { path = "cli", features = ["cere-dev-native"] } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [workspace] members = [ diff --git a/README.md b/README.md index 07d0962c9..4f8ae5818 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-2022-10-09 build --release +cargo +nightly-2022-11-15 build --release ``` ## Run diff --git a/cli/Cargo.toml b/cli/Cargo.toml index d66489723..25350b886 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cere-cli" -version = "4.8.4" +version = "4.8.5" edition = "2021" [package.metadata.wasm-pack.profile.release] @@ -13,10 +13,10 @@ crate-type = ["cdylib", "rlib"] [dependencies] clap = { version = "4.0.15", features = ["derive"], optional = true } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.33" } -sc-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.33" } -sc-service = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.33" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.33" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.36" } +sc-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.36" } +sc-service = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.36" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.36" } url = "2.4.1" # Local @@ -24,7 +24,7 @@ cere-client = { path = "../node/client", optional = true } cere-service = { path = "../node/service", default-features = false, optional = true } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["cli", "cere-native"] diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index 99c3ca651..ce6928aa9 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -1,32 +1,34 @@ [package] name = "cere-client" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -node-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-service = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } -sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +futures = "0.3.21" + +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +node-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-service = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } # Local cere-dev-runtime = { path = "../../runtime/cere-dev", optional = true } diff --git a/node/client/src/lib.rs b/node/client/src/lib.rs index 0bb9ab21a..9a85d36fb 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -532,7 +532,7 @@ pub fn benchmark_inherent_data() -> Result"] edition = "2021" homepage = "https://substrate.io" @@ -14,14 +14,14 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] @@ -34,4 +34,5 @@ std = [ "sp-io/std", "sp-std/std", "sp-core/std", + "sp-runtime/std", ] diff --git a/pallets/chainbridge/src/lib.rs b/pallets/chainbridge/src/lib.rs index 9972be688..a03bf2ee7 100644 --- a/pallets/chainbridge/src/lib.rs +++ b/pallets/chainbridge/src/lib.rs @@ -2,15 +2,21 @@ // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] +#[cfg(test)] +pub(crate) mod mock; +#[cfg(test)] +mod tests; + use codec::{Decode, Encode, EncodeLike}; use frame_support::{ - decl_error, decl_event, decl_module, decl_storage, - dispatch::{DispatchResult, GetDispatchInfo, Pays, Weight}, + dispatch::{DispatchResult, GetDispatchInfo, Weight}, ensure, + pallet_prelude::*, traits::{EnsureOrigin, Get}, PalletId, Parameter, }; -use frame_system::{self as system, ensure_root, ensure_signed}; +use frame_system::{self as system, ensure_root, ensure_signed, pallet_prelude::*}; +pub use pallet::*; use sp_core::U256; use sp_runtime::{ traits::{AccountIdConversion, Dispatchable}, @@ -18,9 +24,6 @@ use sp_runtime::{ }; use sp_std::prelude::*; -mod mock; -mod tests; - const DEFAULT_RELAYER_THRESHOLD: u32 = 1; pub const MODULE_ID: PalletId = PalletId(*b"cb/bridg"); @@ -28,18 +31,6 @@ pub type ChainId = u8; pub type DepositNonce = u64; pub type ResourceId = [u8; 32]; -/// Helper function to concatenate a chain ID and some bytes to produce a resource ID. -/// The common format is (31 bytes unique ID + 1 byte chain ID). -pub fn derive_resource_id(chain: u8, id: &[u8]) -> ResourceId { - let mut r_id: ResourceId = [0; 32]; - r_id[31] = chain; // last byte is chain id - let range = if id.len() > 31 { 31 } else { id.len() }; // Use at most 31 bytes - for i in 0..range { - r_id[30 - i] = id[range - 1 - i]; // Ensure left padding for eth compatibility - } - r_id -} - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub enum ProposalStatus { Initiated, @@ -97,24 +88,116 @@ impl Default for ProposalVotes> + Into<::RuntimeEvent>; - /// Origin used to administer the pallet - type AdminOrigin: EnsureOrigin; - /// Proposed dispatchable call - type Proposal: Parameter - + Dispatchable - + EncodeLike - + GetDispatchInfo; - /// The identifier for this chain. - /// This must be unique and must not collide with existing IDs within a set of bridged chains. - type ChainId: Get; - - type ProposalLifetime: Get; +/// Helper function to concatenate a chain ID and some bytes to produce a resource ID. +/// The common format is (31 bytes unique ID + 1 byte chain ID). +pub fn derive_resource_id(chain: u8, id: &[u8]) -> ResourceId { + let mut r_id: ResourceId = [0; 32]; + r_id[31] = chain; // last byte is chain id + let range = if id.len() > 31 { 31 } else { id.len() }; // Use at most 31 bytes + for i in 0..range { + r_id[30 - i] = id[range - 1 - i]; // Ensure left padding for eth compatibility + } + r_id } -decl_error! { - pub enum Error for Module { +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] + pub struct Pallet(_); + + /// Simple ensure origin for the bridge account + pub struct EnsureBridge(sp_std::marker::PhantomData); + impl EnsureOrigin for EnsureBridge { + type Success = T::AccountId; + fn try_origin(o: T::RuntimeOrigin) -> Result { + let bridge_id = + AccountIdConversion::::into_account_truncating(&MODULE_ID); + o.into().and_then(|o| match o { + system::RawOrigin::Signed(who) if who == bridge_id => Ok(bridge_id), + r => Err(T::RuntimeOrigin::from(r)), + }) + } + + #[cfg(feature = "runtime-benchmarks")] + fn successful_origin() -> T::RuntimeOrigin { + T::RuntimeOrigin::from(system::RawOrigin::Signed(>::account_id())) + } + } + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Origin used to administer the pallet + type AdminOrigin: EnsureOrigin; + /// Proposed dispatchable call + type Proposal: Parameter + + Dispatchable + + EncodeLike + + GetDispatchInfo; + /// The identifier for this chain. + /// This must be unique and must not collide with existing IDs within a set of bridged + /// chains. + type ChainId: Get; + + type ProposalLifetime: Get; + } + + /// All whitelisted chains and their respective transaction counts + #[pallet::storage] + #[pallet::getter(fn chains)] + pub type ChainNonces = StorageMap<_, Blake2_128Concat, ChainId, DepositNonce>; + + /// Tracks current relayer set + #[pallet::storage] + #[pallet::getter(fn relayers)] + pub type Relayers = StorageMap<_, Blake2_128Concat, T::AccountId, bool>; + + /// Utilized by the bridge software to map resource IDs to actual methods + #[pallet::storage] + #[pallet::getter(fn resources)] + pub type Resources = StorageMap<_, Blake2_128Concat, ResourceId, Vec>; + + /// All known proposals. + /// The key is the hash of the call and the deposit ID, to ensure it's unique + #[pallet::storage] + #[pallet::getter(fn votes)] + pub type Votes = StorageDoubleMap< + _, + Blake2_128Concat, + ChainId, + Blake2_128Concat, + (DepositNonce, T::Proposal), + ProposalVotes, + >; + + #[pallet::type_value] + pub fn DefaultRelayerThreshold() -> u32 { + DEFAULT_RELAYER_THRESHOLD + } + + /// Number of votes required for a proposal to execute + #[pallet::storage] + #[pallet::getter(fn relayer_threshold)] + pub type RelayerThreshold = + StorageValue>; + + #[pallet::type_value] + pub fn DefaultRelayerCount() -> u32 { + 0u32 + } + + /// Number of relayers in set + #[pallet::storage] + #[pallet::getter(fn relayer_count)] + pub type RelayerCount = + StorageValue>; + + #[pallet::error] + pub enum Error { /// Relayer threshold not set ThresholdNotSet, /// Provided chain Id is not valid @@ -146,54 +229,30 @@ decl_error! { /// Lifetime of proposal has been exceeded ProposalExpired, } -} - -decl_storage! { - trait Store for Module as ChainBridge { - /// All whitelisted chains and their respective transaction counts - ChainNonces get(fn chains): map hasher(opaque_blake2_256) ChainId => Option; - - /// Number of votes required for a proposal to execute - RelayerThreshold get(fn relayer_threshold): u32 = DEFAULT_RELAYER_THRESHOLD; - - /// Tracks current relayer set - pub Relayers get(fn relayers): map hasher(opaque_blake2_256) T::AccountId => bool; - - /// Number of relayers in set - pub RelayerCount get(fn relayer_count): u32; - - /// All known proposals. - /// The key is the hash of the call and the deposit ID, to ensure it's unique. - pub Votes get(fn votes): - double_map hasher(opaque_blake2_256) ChainId, hasher(opaque_blake2_256) (DepositNonce, T::Proposal) - => Option>; - - /// Utilized by the bridge software to map resource IDs to actual methods - pub Resources get(fn resources): - map hasher(opaque_blake2_256) ResourceId => Option> - } -} -decl_event!( - pub enum Event where ::AccountId { + #[pallet::event] + #[pallet::generate_deposit(pub(crate) fn deposit_event)] + pub enum Event { /// Vote threshold has changed (new_threshold) RelayerThresholdChanged(u32), /// Chain now available for transfers (chain_id) ChainWhitelisted(ChainId), /// Relayer added to set - RelayerAdded(AccountId), + RelayerAdded(T::AccountId), /// Relayer removed from set - RelayerRemoved(AccountId), - /// FunglibleTransfer is for relaying fungibles (dest_id, nonce, resource_id, amount, recipient, metadata) + RelayerRemoved(T::AccountId), + /// FunglibleTransfer is for relaying fungibles (dest_id, nonce, resource_id, amount, + /// recipient, metadata) FungibleTransfer(ChainId, DepositNonce, ResourceId, U256, Vec), - /// NonFungibleTransfer is for relaying NFTS (dest_id, nonce, resource_id, token_id, recipient, metadata) + /// NonFungibleTransfer is for relaying NFTS (dest_id, nonce, resource_id, token_id, + /// recipient, metadata) NonFungibleTransfer(ChainId, DepositNonce, ResourceId, Vec, Vec, Vec), /// GenericTransfer is for a generic data payload (dest_id, nonce, resource_id, metadata) GenericTransfer(ChainId, DepositNonce, ResourceId, Vec), /// Vote submitted in favour of proposal - VoteFor(ChainId, DepositNonce, AccountId), + VoteFor(ChainId, DepositNonce, T::AccountId), /// Vot submitted against proposal - VoteAgainst(ChainId, DepositNonce, AccountId), + VoteAgainst(ChainId, DepositNonce, T::AccountId), /// Voting successful for a proposal ProposalApproved(ChainId, DepositNonce), /// Voting rejected a proposal @@ -203,18 +262,9 @@ decl_event!( /// Execution of call failed ProposalFailed(ChainId, DepositNonce), } -); - -decl_module! { - pub struct Module for enum Call where origin: T::RuntimeOrigin { - type Error = Error; - - const ChainIdentity: ChainId = T::ChainId::get(); - const ProposalLifetime: T::BlockNumber = T::ProposalLifetime::get(); - const BridgeAccountId: T::AccountId = AccountIdConversion::::into_account_truncating(&MODULE_ID); - - fn deposit_event() = default; + #[pallet::call] + impl Pallet { /// Sets the vote threshold for proposals. /// /// This threshold is used to determine how many votes are required @@ -223,8 +273,9 @@ decl_module! { /// # /// - O(1) lookup and insert /// # - #[weight = 195_000_000] - pub fn set_threshold(origin, threshold: u32) -> DispatchResult { + #[pallet::call_index(0)] + #[pallet::weight(195_000_000)] + pub fn set_threshold(origin: OriginFor, threshold: u32) -> DispatchResult { Self::ensure_admin(origin)?; Self::set_relayer_threshold(threshold) } @@ -234,8 +285,13 @@ decl_module! { /// # /// - O(1) write /// # - #[weight = 195_000_000] - pub fn set_resource(origin, id: ResourceId, method: Vec) -> DispatchResult { + #[pallet::call_index(1)] + #[pallet::weight(195_000_000)] + pub fn set_resource( + origin: OriginFor, + id: ResourceId, + method: Vec, + ) -> DispatchResult { Self::ensure_admin(origin)?; Self::register_resource(id, method) } @@ -248,8 +304,9 @@ decl_module! { /// # /// - O(1) removal /// # - #[weight = 195_000_000] - pub fn remove_resource(origin, id: ResourceId) -> DispatchResult { + #[pallet::call_index(2)] + #[pallet::weight(195_000_000)] + pub fn remove_resource(origin: OriginFor, id: ResourceId) -> DispatchResult { Self::ensure_admin(origin)?; Self::unregister_resource(id) } @@ -259,8 +316,9 @@ decl_module! { /// # /// - O(1) lookup and insert /// # - #[weight = 195_000_000] - pub fn whitelist_chain(origin, id: ChainId) -> DispatchResult { + #[pallet::call_index(3)] + #[pallet::weight(195_000_000)] + pub fn whitelist_chain(origin: OriginFor, id: ChainId) -> DispatchResult { Self::ensure_admin(origin)?; Self::whitelist(id) } @@ -270,8 +328,9 @@ decl_module! { /// # /// - O(1) lookup and insert /// # - #[weight = 195_000_000] - pub fn add_relayer(origin, v: T::AccountId) -> DispatchResult { + #[pallet::call_index(4)] + #[pallet::weight(195_000_000)] + pub fn add_relayer(origin: OriginFor, v: T::AccountId) -> DispatchResult { Self::ensure_admin(origin)?; Self::register_relayer(v) } @@ -281,8 +340,9 @@ decl_module! { /// # /// - O(1) lookup and removal /// # - #[weight = 195_000_000] - pub fn remove_relayer(origin, v: T::AccountId) -> DispatchResult { + #[pallet::call_index(5)] + #[pallet::weight(195_000_000)] + pub fn remove_relayer(origin: OriginFor, v: T::AccountId) -> DispatchResult { Self::ensure_admin(origin)?; Self::unregister_relayer(v) } @@ -295,8 +355,15 @@ decl_module! { /// # /// - weight of proposed call, regardless of whether execution is performed /// # - #[weight = (call.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64), call.get_dispatch_info().class, Pays::Yes)] - pub fn acknowledge_proposal(origin, nonce: DepositNonce, src_id: ChainId, r_id: ResourceId, call: Box<::Proposal>) -> DispatchResult { + #[pallet::call_index(6)] + #[pallet::weight(call.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64))] + pub fn acknowledge_proposal( + origin: OriginFor, + nonce: DepositNonce, + src_id: ChainId, + r_id: ResourceId, + call: Box<::Proposal>, + ) -> DispatchResult { let who = ensure_signed(origin)?; ensure!(Self::is_relayer(&who), Error::::MustBeRelayer); ensure!(Self::chain_whitelisted(src_id), Error::::ChainNotWhitelisted); @@ -310,8 +377,15 @@ decl_module! { /// # /// - Fixed, since execution of proposal should not be included /// # - #[weight = 195_000_000] - pub fn reject_proposal(origin, nonce: DepositNonce, src_id: ChainId, r_id: ResourceId, call: Box<::Proposal>) -> DispatchResult { + #[pallet::call_index(7)] + #[pallet::weight(195_000_000)] + pub fn reject_proposal( + origin: OriginFor, + nonce: DepositNonce, + src_id: ChainId, + r_id: ResourceId, + call: Box<::Proposal>, + ) -> DispatchResult { let who = ensure_signed(origin)?; ensure!(Self::is_relayer(&who), Error::::MustBeRelayer); ensure!(Self::chain_whitelisted(src_id), Error::::ChainNotWhitelisted); @@ -328,275 +402,264 @@ decl_module! { /// # /// - weight of proposed call, regardless of whether execution is performed /// # - #[weight = (prop.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64), prop.get_dispatch_info().class, Pays::Yes)] - pub fn eval_vote_state(origin, nonce: DepositNonce, src_id: ChainId, prop: Box<::Proposal>) -> DispatchResult { + #[pallet::call_index(8)] + #[pallet::weight(prop.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64))] + pub fn eval_vote_state( + origin: OriginFor, + nonce: DepositNonce, + src_id: ChainId, + prop: Box<::Proposal>, + ) -> DispatchResult { ensure_signed(origin)?; Self::try_resolve_proposal(nonce, src_id, prop) } } -} - -impl Module { - // *** Utility methods *** - - pub fn ensure_admin(o: T::RuntimeOrigin) -> DispatchResult { - T::AdminOrigin::try_origin(o).map(|_| ()).or_else(ensure_root)?; - Ok(()) - } - /// Checks if who is a relayer - pub fn is_relayer(who: &T::AccountId) -> bool { - Self::relayers(who) - } + impl Pallet { + // *** Utility methods *** - /// Provides an AccountId for the pallet. - /// This is used both as an origin check and deposit/withdrawal account. - pub fn account_id() -> T::AccountId { - AccountIdConversion::::into_account_truncating(&MODULE_ID) - } + pub fn ensure_admin(o: T::RuntimeOrigin) -> DispatchResult { + T::AdminOrigin::try_origin(o).map(|_| ()).or_else(ensure_root)?; + Ok(()) + } - /// Asserts if a resource is registered - pub fn resource_exists(id: ResourceId) -> bool { - Self::resources(id).is_some() - } + /// Checks if who is a relayer + pub fn is_relayer(who: &T::AccountId) -> bool { + Self::relayers(who).unwrap_or(false) + } - /// Checks if a chain exists as a whitelisted destination - pub fn chain_whitelisted(id: ChainId) -> bool { - Self::chains(id).is_some() - } + /// Provides an AccountId for the pallet. + /// This is used both as an origin check and deposit/withdrawal account. + pub fn account_id() -> T::AccountId { + AccountIdConversion::::into_account_truncating(&MODULE_ID) + } - /// Increments the deposit nonce for the specified chain ID - fn bump_nonce(id: ChainId) -> DepositNonce { - let nonce = Self::chains(id).unwrap_or_default() + 1; - ::insert(id, nonce); - nonce - } + /// Asserts if a resource is registered + pub fn resource_exists(id: ResourceId) -> bool { + Self::resources(id).is_some() + } - // *** Admin methods *** + /// Checks if a chain exists as a whitelisted destination + pub fn chain_whitelisted(id: ChainId) -> bool { + Self::chains(id).is_some() + } - /// Set a new voting threshold - pub fn set_relayer_threshold(threshold: u32) -> DispatchResult { - ensure!(threshold > 0, Error::::InvalidThreshold); - ::put(threshold); - Self::deposit_event(RawEvent::RelayerThresholdChanged(threshold)); - Ok(()) - } + /// Increments the deposit nonce for the specified chain ID + fn bump_nonce(id: ChainId) -> DepositNonce { + let nonce = Self::chains(id).unwrap_or_default() + 1; + >::insert(id, nonce); + nonce + } - /// Register a method for a resource Id, enabling associated transfers - pub fn register_resource(id: ResourceId, method: Vec) -> DispatchResult { - ::insert(id, method); - Ok(()) - } + // *** Admin methods *** - /// Removes a resource ID, disabling associated transfer - pub fn unregister_resource(id: ResourceId) -> DispatchResult { - ::remove(id); - Ok(()) - } + /// Set a new voting threshold + pub fn set_relayer_threshold(threshold: u32) -> DispatchResult { + ensure!(threshold > 0, Error::::InvalidThreshold); + >::put(threshold); + Self::deposit_event(Event::RelayerThresholdChanged(threshold)); + Ok(()) + } - /// Whitelist a chain ID for transfer - pub fn whitelist(id: ChainId) -> DispatchResult { - // Cannot whitelist this chain - ensure!(id != T::ChainId::get(), Error::::InvalidChainId); - // Cannot whitelist with an existing entry - ensure!(!Self::chain_whitelisted(id), Error::::ChainAlreadyWhitelisted); - ::insert(id, 0); - Self::deposit_event(RawEvent::ChainWhitelisted(id)); - Ok(()) - } + /// Register a method for a resource Id, enabling associated transfers + pub fn register_resource(id: ResourceId, method: Vec) -> DispatchResult { + >::insert(id, method); + Ok(()) + } - /// Adds a new relayer to the set - pub fn register_relayer(relayer: T::AccountId) -> DispatchResult { - ensure!(!Self::is_relayer(&relayer), Error::::RelayerAlreadyExists); - >::insert(&relayer, true); - ::mutate(|i| *i += 1); + /// Removes a resource ID, disabling associated transfer + pub fn unregister_resource(id: ResourceId) -> DispatchResult { + >::remove(id); + Ok(()) + } - Self::deposit_event(RawEvent::RelayerAdded(relayer)); - Ok(()) - } + /// Whitelist a chain ID for transfer + pub fn whitelist(id: ChainId) -> DispatchResult { + // Cannot whitelist this chain + ensure!(id != T::ChainId::get(), Error::::InvalidChainId); + // Cannot whitelist with an existing entry + ensure!(!Self::chain_whitelisted(id), Error::::ChainAlreadyWhitelisted); + >::insert(id, 0); + Self::deposit_event(Event::ChainWhitelisted(id)); + Ok(()) + } - /// Removes a relayer from the set - pub fn unregister_relayer(relayer: T::AccountId) -> DispatchResult { - ensure!(Self::is_relayer(&relayer), Error::::RelayerInvalid); - >::remove(&relayer); - ::mutate(|i| *i -= 1); - Self::deposit_event(RawEvent::RelayerRemoved(relayer)); - Ok(()) - } + /// Adds a new relayer to the set + pub fn register_relayer(relayer: T::AccountId) -> DispatchResult { + ensure!(!Self::is_relayer(&relayer), Error::::RelayerAlreadyExists); + >::insert(&relayer, true); + >::mutate(|i| *i += 1); - // *** Proposal voting and execution methods *** - - /// Commits a vote for a proposal. If the proposal doesn't exist it will be created. - fn commit_vote( - who: T::AccountId, - nonce: DepositNonce, - src_id: ChainId, - prop: Box, - in_favour: bool, - ) -> DispatchResult { - let now = >::block_number(); - let mut votes = match >::get(src_id, (nonce, prop.clone())) { - Some(v) => v, - None => { - let mut v = ProposalVotes::default(); - v.expiry = now + T::ProposalLifetime::get(); - v - }, - }; - - // Ensure the proposal isn't complete and relayer hasn't already voted - ensure!(!votes.is_complete(), Error::::ProposalAlreadyComplete); - ensure!(!votes.is_expired(now), Error::::ProposalExpired); - ensure!(!votes.has_voted(&who), Error::::RelayerAlreadyVoted); - - if in_favour { - votes.votes_for.push(who.clone()); - Self::deposit_event(RawEvent::VoteFor(src_id, nonce, who)); - } else { - votes.votes_against.push(who.clone()); - Self::deposit_event(RawEvent::VoteAgainst(src_id, nonce, who)); + Self::deposit_event(Event::RelayerAdded(relayer)); + Ok(()) } - >::insert(src_id, (nonce, prop), votes.clone()); + /// Removes a relayer from the set + pub fn unregister_relayer(relayer: T::AccountId) -> DispatchResult { + ensure!(Self::is_relayer(&relayer), Error::::RelayerInvalid); + >::remove(&relayer); + >::mutate(|i| *i -= 1); + Self::deposit_event(Event::RelayerRemoved(relayer)); + Ok(()) + } - Ok(()) - } + // *** Proposal voting and execution methods *** - /// Attempts to finalize or cancel the proposal if the vote count allows. - fn try_resolve_proposal( - nonce: DepositNonce, - src_id: ChainId, - prop: Box, - ) -> DispatchResult { - if let Some(mut votes) = >::get(src_id, (nonce, prop.clone())) { + /// Commits a vote for a proposal. If the proposal doesn't exist it will be created. + fn commit_vote( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + in_favour: bool, + ) -> DispatchResult { let now = >::block_number(); + let mut votes = match >::get(src_id, (nonce, prop.clone())) { + Some(v) => v, + None => { + let mut v = ProposalVotes::default(); + v.expiry = now + T::ProposalLifetime::get(); + v + }, + }; + + // Ensure the proposal isn't complete and relayer hasn't already voted ensure!(!votes.is_complete(), Error::::ProposalAlreadyComplete); ensure!(!votes.is_expired(now), Error::::ProposalExpired); + ensure!(!votes.has_voted(&who), Error::::RelayerAlreadyVoted); + + if in_favour { + votes.votes_for.push(who.clone()); + Self::deposit_event(Event::VoteFor(src_id, nonce, who)); + } else { + votes.votes_against.push(who.clone()); + Self::deposit_event(Event::VoteAgainst(src_id, nonce, who)); + } - let status = votes.try_to_complete(::get(), ::get()); - >::insert(src_id, (nonce, prop.clone()), votes.clone()); + >::insert(src_id, (nonce, prop), votes.clone()); - match status { - ProposalStatus::Approved => Self::finalize_execution(src_id, nonce, prop), - ProposalStatus::Rejected => Self::cancel_execution(src_id, nonce), - _ => Ok(()), - } - } else { - Err(Error::::ProposalDoesNotExist)? + Ok(()) } - } - /// Commits a vote in favour of the proposal and executes it if the vote threshold is met. - fn vote_for( - who: T::AccountId, - nonce: DepositNonce, - src_id: ChainId, - prop: Box, - ) -> DispatchResult { - Self::commit_vote(who, nonce, src_id, prop.clone(), true)?; - Self::try_resolve_proposal(nonce, src_id, prop) - } - - /// Commits a vote against the proposal and cancels it if more than (relayers.len() - threshold) - /// votes against exist. - fn vote_against( - who: T::AccountId, - nonce: DepositNonce, - src_id: ChainId, - prop: Box, - ) -> DispatchResult { - Self::commit_vote(who, nonce, src_id, prop.clone(), false)?; - Self::try_resolve_proposal(nonce, src_id, prop) - } + /// Attempts to finalize or cancel the proposal if the vote count allows. + fn try_resolve_proposal( + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + if let Some(mut votes) = >::get(src_id, (nonce, prop.clone())) { + let now = >::block_number(); + ensure!(!votes.is_complete(), Error::::ProposalAlreadyComplete); + ensure!(!votes.is_expired(now), Error::::ProposalExpired); + + let status = + votes.try_to_complete(>::get(), >::get()); + >::insert(src_id, (nonce, prop.clone()), votes.clone()); + + match status { + ProposalStatus::Approved => Self::finalize_execution(src_id, nonce, prop), + ProposalStatus::Rejected => Self::cancel_execution(src_id, nonce), + _ => Ok(()), + } + } else { + Err(Error::::ProposalDoesNotExist)? + } + } - /// Execute the proposal and signals the result as an event - fn finalize_execution( - src_id: ChainId, - nonce: DepositNonce, - call: Box, - ) -> DispatchResult { - Self::deposit_event(RawEvent::ProposalApproved(src_id, nonce)); - call.dispatch(frame_system::RawOrigin::Signed(Self::account_id()).into()) - .map(|_| ()) - .map_err(|e| e.error)?; - Self::deposit_event(RawEvent::ProposalSucceeded(src_id, nonce)); - Ok(()) - } + /// Commits a vote in favour of the proposal and executes it if the vote threshold is met. + fn vote_for( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + Self::commit_vote(who, nonce, src_id, prop.clone(), true)?; + Self::try_resolve_proposal(nonce, src_id, prop) + } - /// Cancels a proposal. - fn cancel_execution(src_id: ChainId, nonce: DepositNonce) -> DispatchResult { - Self::deposit_event(RawEvent::ProposalRejected(src_id, nonce)); - Ok(()) - } + /// Commits a vote against the proposal and cancels it if more than (relayers.len() - + /// threshold) votes against exist. + fn vote_against( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + Self::commit_vote(who, nonce, src_id, prop.clone(), false)?; + Self::try_resolve_proposal(nonce, src_id, prop) + } - /// Initiates a transfer of a fungible asset out of the chain. This should be called by another - /// pallet. - pub fn transfer_fungible( - dest_id: ChainId, - resource_id: ResourceId, - to: Vec, - amount: U256, - ) -> DispatchResult { - ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); - ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); - let nonce = Self::bump_nonce(dest_id); - Self::deposit_event(RawEvent::FungibleTransfer(dest_id, nonce, resource_id, amount, to)); - Ok(()) - } + /// Execute the proposal and signals the result as an event + fn finalize_execution( + src_id: ChainId, + nonce: DepositNonce, + call: Box, + ) -> DispatchResult { + Self::deposit_event(Event::ProposalApproved(src_id, nonce)); + call.dispatch(frame_system::RawOrigin::Signed(Self::account_id()).into()) + .map(|_| ()) + .map_err(|e| e.error)?; + Self::deposit_event(Event::ProposalSucceeded(src_id, nonce)); + Ok(()) + } - /// Initiates a transfer of a nonfungible asset out of the chain. This should be called by - /// another pallet. - pub fn transfer_nonfungible( - dest_id: ChainId, - resource_id: ResourceId, - token_id: Vec, - to: Vec, - metadata: Vec, - ) -> DispatchResult { - ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); - ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); - let nonce = Self::bump_nonce(dest_id); - Self::deposit_event(RawEvent::NonFungibleTransfer( - dest_id, - nonce, - resource_id, - token_id, - to, - metadata, - )); - Ok(()) - } + /// Cancels a proposal. + fn cancel_execution(src_id: ChainId, nonce: DepositNonce) -> DispatchResult { + Self::deposit_event(Event::ProposalRejected(src_id, nonce)); + Ok(()) + } - /// Initiates a transfer of generic data out of the chain. This should be called by another - /// pallet. - pub fn transfer_generic( - dest_id: ChainId, - resource_id: ResourceId, - metadata: Vec, - ) -> DispatchResult { - ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); - ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); - let nonce = Self::bump_nonce(dest_id); - Self::deposit_event(RawEvent::GenericTransfer(dest_id, nonce, resource_id, metadata)); - Ok(()) - } -} + /// Initiates a transfer of a fungible asset out of the chain. This should be called by + /// another pallet. + pub fn transfer_fungible( + dest_id: ChainId, + resource_id: ResourceId, + to: Vec, + amount: U256, + ) -> DispatchResult { + ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); + ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(Event::FungibleTransfer(dest_id, nonce, resource_id, amount, to)); + Ok(()) + } -/// Simple ensure origin for the bridge account -pub struct EnsureBridge(sp_std::marker::PhantomData); -impl EnsureOrigin for EnsureBridge { - type Success = T::AccountId; - fn try_origin(o: T::RuntimeOrigin) -> Result { - let bridge_id = AccountIdConversion::::into_account_truncating(&MODULE_ID); - o.into().and_then(|o| match o { - system::RawOrigin::Signed(who) if who == bridge_id => Ok(bridge_id), - r => Err(T::RuntimeOrigin::from(r)), - }) - } + /// Initiates a transfer of a nonfungible asset out of the chain. This should be called by + /// another pallet. + pub fn transfer_nonfungible( + dest_id: ChainId, + resource_id: ResourceId, + token_id: Vec, + to: Vec, + metadata: Vec, + ) -> DispatchResult { + ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); + ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(Event::NonFungibleTransfer( + dest_id, + nonce, + resource_id, + token_id, + to, + metadata, + )); + Ok(()) + } - #[cfg(feature = "runtime-benchmarks")] - fn successful_origin() -> T::RuntimeOrigin { - T::RuntimeOrigin::from(system::RawOrigin::Signed(>::account_id())) + /// Initiates a transfer of generic data out of the chain. This should be called by another + /// pallet. + pub fn transfer_generic( + dest_id: ChainId, + resource_id: ResourceId, + metadata: Vec, + ) -> DispatchResult { + ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); + ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(Event::GenericTransfer(dest_id, nonce, resource_id, metadata)); + Ok(()) + } } } diff --git a/pallets/chainbridge/src/mock.rs b/pallets/chainbridge/src/mock.rs index 33fd9c5c0..c980befec 100644 --- a/pallets/chainbridge/src/mock.rs +++ b/pallets/chainbridge/src/mock.rs @@ -1,5 +1,3 @@ -#![cfg(test)] - use frame_support::{ assert_ok, ord_parameter_types, parameter_types, traits::Everything, weights::Weight, }; @@ -12,8 +10,7 @@ use sp_runtime::{ Perbill, }; -use super::*; -use crate::{self as bridge, Config}; +use crate::{self as bridge, *}; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -77,7 +74,7 @@ parameter_types! { pub const ProposalLifetime: u64 = 50; } -impl Config for Test { +impl crate::pallet::Config for Test { type RuntimeEvent = RuntimeEvent; type AdminOrigin = frame_system::EnsureRoot; type Proposal = RuntimeCall; @@ -94,7 +91,7 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: system::{Pallet, Call, Event}, + System: system::{Pallet, Call, Config, Storage, Event}, Balances: balances::{Pallet, Call, Storage, Config, Event}, Bridge: bridge::{Pallet, Call, Storage, Event}, } diff --git a/pallets/chainbridge/src/tests.rs b/pallets/chainbridge/src/tests.rs index 673b33cb9..3263718b3 100644 --- a/pallets/chainbridge/src/tests.rs +++ b/pallets/chainbridge/src/tests.rs @@ -1,5 +1,3 @@ -#![cfg(test)] - use frame_support::{assert_noop, assert_ok}; use super::{ @@ -105,24 +103,24 @@ fn whitelist_chain() { Error::::InvalidChainId ); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::ChainWhitelisted(0))]); + assert_events(vec![(Event::ChainWhitelisted(0)).into()]); }) } #[test] fn set_get_threshold() { new_test_ext().execute_with(|| { - assert_eq!(::get(), 1); + assert_eq!(>::get(), 1); assert_ok!(Bridge::set_threshold(RuntimeOrigin::root(), TEST_THRESHOLD)); - assert_eq!(::get(), TEST_THRESHOLD); + assert_eq!(>::get(), TEST_THRESHOLD); assert_ok!(Bridge::set_threshold(RuntimeOrigin::root(), 5)); - assert_eq!(::get(), 5); + assert_eq!(>::get(), 5); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::RelayerThresholdChanged(TEST_THRESHOLD)), - RuntimeEvent::Bridge(RawEvent::RelayerThresholdChanged(5)), + RuntimeEvent::Bridge(Event::RelayerThresholdChanged(TEST_THRESHOLD)), + RuntimeEvent::Bridge(Event::RelayerThresholdChanged(5)), ]); }) } @@ -144,8 +142,8 @@ fn asset_transfer_success() { assert_ok!(Bridge::whitelist_chain(RuntimeOrigin::root(), dest_id)); assert_ok!(Bridge::transfer_fungible(dest_id, resource_id, to.clone(), amount.into())); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::ChainWhitelisted(dest_id)), - RuntimeEvent::Bridge(RawEvent::FungibleTransfer( + RuntimeEvent::Bridge(Event::ChainWhitelisted(dest_id)), + RuntimeEvent::Bridge(Event::FungibleTransfer( dest_id, 1, resource_id, @@ -161,22 +159,18 @@ fn asset_transfer_success() { to.clone(), metadata.clone() )); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::NonFungibleTransfer( + assert_events(vec![Event::NonFungibleTransfer( dest_id, 2, resource_id, token_id, to, metadata.clone(), - ))]); + ) + .into()]); assert_ok!(Bridge::transfer_generic(dest_id, resource_id, metadata.clone())); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::GenericTransfer( - dest_id, - 3, - resource_id, - metadata, - ))]); + assert_events(vec![Event::GenericTransfer(dest_id, 3, resource_id, metadata).into()]); }) } @@ -216,7 +210,7 @@ fn asset_transfer_invalid_chain() { let resource_id = [4; 32]; assert_ok!(Bridge::whitelist_chain(RuntimeOrigin::root(), chain_id)); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::ChainWhitelisted(chain_id))]); + assert_events(vec![Event::ChainWhitelisted(chain_id).into()]); assert_noop!( Bridge::transfer_fungible(bad_dest_id, resource_id, vec![], U256::zero()), @@ -262,10 +256,10 @@ fn add_remove_relayer() { assert_eq!(Bridge::relayer_count(), 2); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::RelayerAdded(RELAYER_A)), - RuntimeEvent::Bridge(RawEvent::RelayerAdded(RELAYER_B)), - RuntimeEvent::Bridge(RawEvent::RelayerAdded(RELAYER_C)), - RuntimeEvent::Bridge(RawEvent::RelayerRemoved(RELAYER_B)), + RuntimeEvent::Bridge(Event::RelayerAdded(RELAYER_A)), + RuntimeEvent::Bridge(Event::RelayerAdded(RELAYER_B)), + RuntimeEvent::Bridge(Event::RelayerAdded(RELAYER_C)), + RuntimeEvent::Bridge(Event::RelayerRemoved(RELAYER_B)), ]); }) } @@ -335,11 +329,11 @@ fn create_sucessful_proposal() { assert_eq!(prop, expected); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), - RuntimeEvent::Bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_B)), - RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_C)), - RuntimeEvent::Bridge(RawEvent::ProposalApproved(src_id, prop_id)), - RuntimeEvent::Bridge(RawEvent::ProposalSucceeded(src_id, prop_id)), + RuntimeEvent::Bridge(Event::VoteFor(src_id, prop_id, RELAYER_A)), + RuntimeEvent::Bridge(Event::VoteAgainst(src_id, prop_id, RELAYER_B)), + RuntimeEvent::Bridge(Event::VoteFor(src_id, prop_id, RELAYER_C)), + RuntimeEvent::Bridge(Event::ProposalApproved(src_id, prop_id)), + RuntimeEvent::Bridge(Event::ProposalSucceeded(src_id, prop_id)), ]); }) } @@ -408,10 +402,10 @@ fn create_unsucessful_proposal() { assert_eq!(Balances::free_balance(Bridge::account_id()), ENDOWED_BALANCE); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), - RuntimeEvent::Bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_B)), - RuntimeEvent::Bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_C)), - RuntimeEvent::Bridge(RawEvent::ProposalRejected(src_id, prop_id)), + RuntimeEvent::Bridge(Event::VoteFor(src_id, prop_id, RELAYER_A)), + RuntimeEvent::Bridge(Event::VoteAgainst(src_id, prop_id, RELAYER_B)), + RuntimeEvent::Bridge(Event::VoteAgainst(src_id, prop_id, RELAYER_C)), + RuntimeEvent::Bridge(Event::ProposalRejected(src_id, prop_id)), ]); }) } @@ -466,10 +460,10 @@ fn execute_after_threshold_change() { assert_eq!(Balances::free_balance(Bridge::account_id()), ENDOWED_BALANCE); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), - RuntimeEvent::Bridge(RawEvent::RelayerThresholdChanged(1)), - RuntimeEvent::Bridge(RawEvent::ProposalApproved(src_id, prop_id)), - RuntimeEvent::Bridge(RawEvent::ProposalSucceeded(src_id, prop_id)), + RuntimeEvent::Bridge(Event::VoteFor(src_id, prop_id, RELAYER_A)), + RuntimeEvent::Bridge(Event::RelayerThresholdChanged(1)), + RuntimeEvent::Bridge(Event::ProposalApproved(src_id, prop_id)), + RuntimeEvent::Bridge(Event::ProposalSucceeded(src_id, prop_id)), ]); }) } @@ -544,6 +538,6 @@ fn proposal_expires() { }; assert_eq!(prop, expected); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A))]); + assert_events(vec![Event::VoteFor(src_id, prop_id, RELAYER_A).into()]); }) } diff --git a/pallets/ddc-clusters/Cargo.toml b/pallets/ddc-clusters/Cargo.toml index fa9afccdf..afd255ef4 100644 --- a/pallets/ddc-clusters/Cargo.toml +++ b/pallets/ddc-clusters/Cargo.toml @@ -1,33 +1,33 @@ [package] name = "pallet-ddc-clusters" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.4", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.4", default-features = false, path = "../../traits" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +ddc-primitives = { version = "4.8.5", default-features = false, path = "../../primitives" } +ddc-traits = { version = "4.8.5", default-features = false, path = "../../traits" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } hex-literal = "^0.3.1" -pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } pallet-ddc-nodes = { version = "4.7.0", default-features = false, path = "../ddc-nodes" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", default-features = false, features = ["derive"], optional = true } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [dev-dependencies] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } hex-literal = "^0.3.1" -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/pallets/ddc-clusters/src/lib.rs b/pallets/ddc-clusters/src/lib.rs index 3292f34fd..12c9b2c5f 100644 --- a/pallets/ddc-clusters/src/lib.rs +++ b/pallets/ddc-clusters/src/lib.rs @@ -191,6 +191,7 @@ pub mod pallet { where T::AccountId: UncheckedFrom + AsRef<[u8]>, { + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::create_cluster())] pub fn create_cluster( origin: OriginFor, @@ -210,6 +211,7 @@ pub mod pallet { ) } + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::add_node())] pub fn add_node( origin: OriginFor, @@ -259,6 +261,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::remove_node())] pub fn remove_node( origin: OriginFor, @@ -280,6 +283,7 @@ pub mod pallet { } // Sets Governance non-sensetive parameters only + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::set_cluster_params())] pub fn set_cluster_params( origin: OriginFor, @@ -298,6 +302,7 @@ pub mod pallet { } // Requires Governance approval + #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::set_cluster_gov_params())] pub fn set_cluster_gov_params( origin: OriginFor, diff --git a/pallets/ddc-clusters/src/mock.rs b/pallets/ddc-clusters/src/mock.rs index 911d4ce84..00478bc90 100644 --- a/pallets/ddc-clusters/src/mock.rs +++ b/pallets/ddc-clusters/src/mock.rs @@ -11,7 +11,7 @@ use frame_support::{ }; use frame_system::mocking::{MockBlock, MockUncheckedExtrinsic}; use pallet_contracts as contracts; -use sp_core::H256; +use sp_core::{ConstBool, H256}; use sp_io::TestExternalities; use sp_runtime::{ testing::{Header, TestXt}, @@ -93,6 +93,8 @@ impl contracts::Config for Test { type AddressGenerator = pallet_contracts::DefaultAddressGenerator; type MaxCodeLen = ConstU32<{ 128 * 1024 }>; type MaxStorageKeyLen = ConstU32<128>; + type UnsafeUnstableInterface = ConstBool; + type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; } use frame_system::offchain::{ diff --git a/pallets/ddc-customers/Cargo.toml b/pallets/ddc-customers/Cargo.toml index 7c4408029..13110749e 100644 --- a/pallets/ddc-customers/Cargo.toml +++ b/pallets/ddc-customers/Cargo.toml @@ -1,16 +1,16 @@ [package] name = "pallet-ddc-customers" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] # Substrate -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } # 3rd Party codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } @@ -19,17 +19,17 @@ rand_chacha = { version = "0.2", default-features = false, optional = true } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } # Cere -ddc-primitives = { version = "4.8.4", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.4", default-features = false, path = "../../traits" } +ddc-primitives = { version = "4.8.5", default-features = false, path = "../../primitives" } +ddc-traits = { version = "4.8.5", default-features = false, path = "../../traits" } [dev-dependencies] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/pallets/ddc-customers/src/lib.rs b/pallets/ddc-customers/src/lib.rs index a1bff9acd..43edc2b73 100644 --- a/pallets/ddc-customers/src/lib.rs +++ b/pallets/ddc-customers/src/lib.rs @@ -285,6 +285,7 @@ pub mod pallet { /// Create new bucket with specified cluster id /// /// Anyone can create a bucket + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::create_bucket())] pub fn create_bucket( origin: OriginFor, @@ -321,6 +322,7 @@ pub mod pallet { /// The dispatch origin for this call must be _Signed_ by the owner account. /// /// Emits `Deposited`. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::deposit())] pub fn deposit( origin: OriginFor, @@ -337,6 +339,7 @@ pub mod pallet { /// The dispatch origin for this call must be _Signed_ by the owner. /// /// Emits `Deposited`. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::deposit_extra())] pub fn deposit_extra( origin: OriginFor, @@ -363,6 +366,7 @@ pub mod pallet { /// Emits `InitialDepositUnlock`. /// /// See also [`Call::withdraw_unlocked_deposit`]. + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::unlock_deposit())] pub fn unlock_deposit( origin: OriginFor, @@ -424,6 +428,7 @@ pub mod pallet { /// Emits `Withdrawn`. /// /// See also [`Call::unlock_deposit`]. + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::withdraw_unlocked_deposit_kill())] pub fn withdraw_unlocked_deposit(origin: OriginFor) -> DispatchResultWithPostInfo { let owner = ensure_signed(origin)?; @@ -479,6 +484,7 @@ pub mod pallet { /// The dispatch origin for this call must be _Signed_ by the bucket owner. /// /// Emits `BucketUpdated`. + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::set_bucket_params())] pub fn set_bucket_params( origin: OriginFor, diff --git a/pallets/ddc-nodes/Cargo.toml b/pallets/ddc-nodes/Cargo.toml index c8836da53..59f83b4f5 100644 --- a/pallets/ddc-nodes/Cargo.toml +++ b/pallets/ddc-nodes/Cargo.toml @@ -1,27 +1,27 @@ [package] name = "pallet-ddc-nodes" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.4", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.4", default-features = false, path = "../../traits" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +ddc-primitives = { version = "4.8.5", default-features = false, path = "../../primitives" } +ddc-traits = { version = "4.8.5", default-features = false, path = "../../traits" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", default-features = false, features = ["derive"], optional = true } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/pallets/ddc-nodes/src/lib.rs b/pallets/ddc-nodes/src/lib.rs index b5cc37a1f..664917bd0 100644 --- a/pallets/ddc-nodes/src/lib.rs +++ b/pallets/ddc-nodes/src/lib.rs @@ -107,6 +107,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::create_node())] pub fn create_node( origin: OriginFor, @@ -121,6 +122,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::delete_node())] pub fn delete_node(origin: OriginFor, node_pub_key: NodePubKey) -> DispatchResult { let caller_id = ensure_signed(origin)?; @@ -134,6 +136,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::set_node_params())] pub fn set_node_params( origin: OriginFor, diff --git a/pallets/ddc-payouts/Cargo.toml b/pallets/ddc-payouts/Cargo.toml index c7a8c0ff1..565cddfcd 100644 --- a/pallets/ddc-payouts/Cargo.toml +++ b/pallets/ddc-payouts/Cargo.toml @@ -1,30 +1,30 @@ [package] name = "pallet-ddc-payouts" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] byte-unit = { version = "4.0.19", default-features = false, features = ["u128"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.4", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.4", default-features = false, path = "../../traits" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +ddc-primitives = { version = "4.8.5", default-features = false, path = "../../primitives" } +ddc-traits = { version = "4.8.5", default-features = false, path = "../../traits" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/pallets/ddc-payouts/src/lib.rs b/pallets/ddc-payouts/src/lib.rs index 8feb9e2fe..5f6ee60d7 100644 --- a/pallets/ddc-payouts/src/lib.rs +++ b/pallets/ddc-payouts/src/lib.rs @@ -313,6 +313,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::set_authorised_caller())] pub fn set_authorised_caller( origin: OriginFor, @@ -327,6 +328,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::begin_billing_report())] pub fn begin_billing_report( origin: OriginFor, @@ -353,6 +355,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::begin_charging_customers())] pub fn begin_charging_customers( origin: OriginFor, @@ -379,6 +382,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::send_charging_customers_batch(payers.len().saturated_into()))] pub fn send_charging_customers_batch( origin: OriginFor, @@ -519,6 +523,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::end_charging_customers())] pub fn end_charging_customers( origin: OriginFor, @@ -617,6 +622,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::begin_rewarding_providers())] pub fn begin_rewarding_providers( origin: OriginFor, @@ -648,6 +654,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::send_rewarding_providers_batch(payees.len().saturated_into()))] pub fn send_rewarding_providers_batch( origin: OriginFor, @@ -752,6 +759,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(7)] #[pallet::weight(T::WeightInfo::end_rewarding_providers())] pub fn end_rewarding_providers( origin: OriginFor, @@ -802,6 +810,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(8)] #[pallet::weight(T::WeightInfo::end_billing_report())] pub fn end_billing_report( origin: OriginFor, diff --git a/pallets/ddc-staking/Cargo.toml b/pallets/ddc-staking/Cargo.toml index 913259c31..52cc7ef77 100644 --- a/pallets/ddc-staking/Cargo.toml +++ b/pallets/ddc-staking/Cargo.toml @@ -1,28 +1,28 @@ [package] name = "pallet-ddc-staking" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.4", default-features = false, path = "../../primitives" } -ddc-traits = { version = "4.8.4", default-features = false, path = "../../traits" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +ddc-primitives = { version = "4.8.5", default-features = false, path = "../../primitives" } +ddc-traits = { version = "4.8.5", default-features = false, path = "../../traits" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [dev-dependencies] lazy_static = "1.4.0" -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } parking_lot = "0.12.1" -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/pallets/ddc-staking/src/lib.rs b/pallets/ddc-staking/src/lib.rs index aa32fdae5..713168793 100644 --- a/pallets/ddc-staking/src/lib.rs +++ b/pallets/ddc-staking/src/lib.rs @@ -332,6 +332,7 @@ pub mod pallet { /// The dispatch origin for this call must be _Signed_ by the stash account. /// /// Emits `Bonded`. + #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::bond())] pub fn bond( origin: OriginFor, @@ -406,6 +407,7 @@ pub mod pallet { /// Emits `Unbonded`. /// /// See also [`Call::withdraw_unbonded`]. + #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::unbond())] pub fn unbond( origin: OriginFor, @@ -518,6 +520,7 @@ pub mod pallet { /// Emits `Withdrawn`. /// /// See also [`Call::unbond`]. + #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::withdraw_unbonded())] pub fn withdraw_unbonded(origin: OriginFor) -> DispatchResult { let controller = ensure_signed(origin)?; @@ -570,6 +573,7 @@ pub mod pallet { /// /// The dispatch origin for this call must be _Signed_ by the controller, not the stash. The /// bond size must be greater than or equal to the `StorageBondSize`. + #[pallet::call_index(3)] #[pallet::weight(T::WeightInfo::store())] pub fn store(origin: OriginFor, cluster_id: ClusterId) -> DispatchResult { let controller = ensure_signed(origin)?; @@ -628,6 +632,7 @@ pub mod pallet { /// The dispatch origin for this call must be _Signed_ by the controller, not the stash. /// /// Emits `ChillSoon`, `Chill`. + #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::chill())] pub fn chill(origin: OriginFor) -> DispatchResult { let controller = ensure_signed(origin)?; @@ -678,6 +683,7 @@ pub mod pallet { /// Effects will be felt at the beginning of the next block. /// /// The dispatch origin for this call must be _Signed_ by the stash, not the controller. + #[pallet::call_index(5)] #[pallet::weight(T::WeightInfo::set_controller())] pub fn set_controller( origin: OriginFor, @@ -701,6 +707,7 @@ pub mod pallet { /// (Re-)set the DDC node of a node operator stash account. Requires to chill first. /// /// The dispatch origin for this call must be _Signed_ by the stash, not the controller. + #[pallet::call_index(6)] #[pallet::weight(T::WeightInfo::set_node())] pub fn set_node(origin: OriginFor, new_node: NodePubKey) -> DispatchResult { let stash = ensure_signed(origin)?; @@ -732,6 +739,7 @@ pub mod pallet { /// Allow cluster node candidate to chill in the next block. /// /// The dispatch origin for this call must be _Signed_ by the controller. + #[pallet::call_index(7)] #[pallet::weight(10_000)] pub fn fast_chill(origin: OriginFor) -> DispatchResult { let controller = ensure_signed(origin)?; diff --git a/pallets/erc20/Cargo.toml b/pallets/erc20/Cargo.toml index fe671cb87..b05dd35e8 100644 --- a/pallets/erc20/Cargo.toml +++ b/pallets/erc20/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-erc20" -version = "4.8.4" +version = "4.8.5" authors = ["Parity Technologies "] edition = "2021" homepage = "https://substrate.dev" @@ -14,17 +14,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } pallet-chainbridge = { version = "4.2.0", default-features = false, path = "../chainbridge" } pallet-erc721 = { version = "4.2.0", default-features = false, path = "../erc721" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/pallets/erc20/src/lib.rs b/pallets/erc20/src/lib.rs index cdc37a064..6d3b9f07f 100644 --- a/pallets/erc20/src/lib.rs +++ b/pallets/erc20/src/lib.rs @@ -3,12 +3,13 @@ #![cfg_attr(not(feature = "std"), no_std)] use frame_support::{ - decl_error, decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, + pallet_prelude::*, traits::{Currency, EnsureOrigin, ExistenceRequirement::AllowDeath, Get}, }; -use frame_system::{self as system, ensure_signed}; +use frame_system::{ensure_signed, pallet_prelude::*}; +pub use pallet::*; use pallet_chainbridge as bridge; use pallet_erc721 as erc721; use sp_arithmetic::traits::SaturatedConversion; @@ -17,93 +18,118 @@ use sp_std::prelude::*; type ResourceId = bridge::ResourceId; -type BalanceOf = +pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; -pub trait Config: system::Config + bridge::Config + erc721::Config { - type RuntimeEvent: From> + Into<::RuntimeEvent>; - /// Specifies the origin check provided by the bridge for calls that can only be called by the - /// bridge pallet - type BridgeOrigin: EnsureOrigin; - - /// The currency mechanism. - type Currency: Currency; - - /// Ids can be defined by the runtime and passed in, perhaps from blake2b_128 hashes. - type HashId: Get; - type NativeTokenId: Get; - type Erc721Id: Get; -} +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config + bridge::Config + erc721::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Specifies the origin check provided by the bridge for calls that can only be called by + /// the bridge pallet + type BridgeOrigin: EnsureOrigin; + + /// The currency mechanism. + type Currency: Currency; + + /// Ids can be defined by the runtime and passed in, perhaps from blake2b_128 hashes. + type HashId: Get; + type NativeTokenId: Get; + type Erc721Id: Get; + } -decl_error! { - pub enum Error for Module{ + #[pallet::error] + pub enum Error { InvalidTransfer, } -} -decl_storage! { - trait Store for Module as Test {} -} - -decl_event!( - pub enum Event where - ::Hash, - { - Remark(Hash), + #[pallet::event] + #[pallet::generate_deposit(pub(crate) fn deposit_event)] + pub enum Event { + Remark(::Hash), } -); - -decl_module! { - pub struct Module for enum Call where origin: T::RuntimeOrigin { - const HashId: ResourceId = T::HashId::get(); - const NativeTokenId: ResourceId = T::NativeTokenId::get(); - const Erc721Id: ResourceId = T::Erc721Id::get(); - - fn deposit_event() = default; + #[pallet::call] + impl Pallet { // // Initiation calls. These start a bridge transfer. // /// Transfers an arbitrary hash to a (whitelisted) destination chain. - #[weight = 195_000_000] - pub fn transfer_hash(origin, hash: T::Hash, dest_id: bridge::ChainId) -> DispatchResult { + #[pallet::call_index(0)] + #[pallet::weight(195_000_000)] + pub fn transfer_hash( + origin: OriginFor, + hash: T::Hash, + dest_id: bridge::ChainId, + ) -> DispatchResult { ensure_signed(origin)?; let resource_id = T::HashId::get(); let metadata: Vec = hash.as_ref().to_vec(); - >::transfer_generic(dest_id, resource_id, metadata) + >::transfer_generic(dest_id, resource_id, metadata) } - /// Transfers some amount of the native token to some recipient on a (whitelisted) destination chain. - #[weight = 195_000_000] - pub fn transfer_native(origin, amount: BalanceOf, recipient: Vec, dest_id: bridge::ChainId) -> DispatchResult { + /// Transfers some amount of the native token to some recipient on a (whitelisted) + /// destination chain. + #[pallet::call_index(1)] + #[pallet::weight(195_000_000)] + pub fn transfer_native( + origin: OriginFor, + amount: BalanceOf, + recipient: Vec, + dest_id: bridge::ChainId, + ) -> DispatchResult { let source = ensure_signed(origin)?; - ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); - let bridge_id = >::account_id(); + ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); + let bridge_id = >::account_id(); T::Currency::transfer(&source, &bridge_id, amount, AllowDeath)?; let resource_id = T::NativeTokenId::get(); let number_amount: u128 = amount.saturated_into(); - >::transfer_fungible(dest_id, resource_id, recipient, U256::from(number_amount)) + >::transfer_fungible( + dest_id, + resource_id, + recipient, + U256::from(number_amount), + ) } - /// Transfer a non-fungible token (erc721) to a (whitelisted) destination chain. - #[weight = 195_000_000] - pub fn transfer_erc721(origin, recipient: Vec, token_id: U256, dest_id: bridge::ChainId) -> DispatchResult { + #[pallet::call_index(2)] + #[pallet::weight(195_000_000)] + pub fn transfer_erc721( + origin: OriginFor, + recipient: Vec, + token_id: U256, + dest_id: bridge::ChainId, + ) -> DispatchResult { let source = ensure_signed(origin)?; - ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); - match >::tokens(token_id) { + ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); + match >::tokens(token_id) { Some(token) => { - >::burn_token(source, token_id)?; + >::burn_token(source, token_id)?; let resource_id = T::Erc721Id::get(); - let tid: &mut [u8] = &mut[0; 32]; + let tid: &mut [u8] = &mut [0; 32]; token_id.to_big_endian(tid); - >::transfer_nonfungible(dest_id, resource_id, tid.to_vec(), recipient, token.metadata) - } - None => Err(Error::::InvalidTransfer)? + >::transfer_nonfungible( + dest_id, + resource_id, + tid.to_vec(), + recipient, + token.metadata, + ) + }, + None => Err(Error::::InvalidTransfer)?, } } @@ -112,26 +138,38 @@ decl_module! { // /// Executes a simple currency transfer using the bridge account as the source - #[weight = 195_000_000] - pub fn transfer(origin, to: T::AccountId, amount: BalanceOf) -> DispatchResult { + #[pallet::call_index(3)] + #[pallet::weight(195_000_000)] + pub fn transfer( + origin: OriginFor, + to: T::AccountId, + amount: BalanceOf, + ) -> DispatchResult { let source = T::BridgeOrigin::ensure_origin(origin)?; ::Currency::transfer(&source, &to, amount, AllowDeath)?; Ok(()) } /// This can be called by the bridge to demonstrate an arbitrary call from a proposal. - #[weight = 195_000_000] - pub fn remark(origin, hash: T::Hash) -> DispatchResult { + #[pallet::call_index(4)] + #[pallet::weight(195_000_000)] + pub fn remark(origin: OriginFor, hash: T::Hash) -> DispatchResult { T::BridgeOrigin::ensure_origin(origin)?; - Self::deposit_event(RawEvent::Remark(hash)); + Self::deposit_event(Event::::Remark(hash)); Ok(()) } /// Allows the bridge to issue new erc721 tokens - #[weight = 195_000_000] - pub fn mint_erc721(origin, recipient: T::AccountId, id: U256, metadata: Vec) -> DispatchResult { + #[pallet::call_index(5)] + #[pallet::weight(195_000_000)] + pub fn mint_erc721( + origin: OriginFor, + recipient: T::AccountId, + id: U256, + metadata: Vec, + ) -> DispatchResult { T::BridgeOrigin::ensure_origin(origin)?; - >::mint_token(recipient, id, metadata)?; + >::mint_token(recipient, id, metadata)?; Ok(()) } } diff --git a/pallets/erc20/src/mock.rs b/pallets/erc20/src/mock.rs index e35085a5c..4402ed635 100644 --- a/pallets/erc20/src/mock.rs +++ b/pallets/erc20/src/mock.rs @@ -12,7 +12,7 @@ use sp_runtime::{ Perbill, }; -use crate::{self as example, Trait}; +use crate::{self as example, Config}; use chainbridge as bridge; pub use pallet_balances as balances; @@ -23,7 +23,7 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } -impl frame_system::Trait for Test { +impl frame_system::Config for Test { type BaseCallFilter = (); type Origin = Origin; type Call = Call; @@ -59,7 +59,7 @@ ord_parameter_types! { pub const One: u64 = 1; } -impl pallet_balances::Trait for Test { +impl pallet_balances::Config for Test { type Balance = u64; type DustRemoval = (); type Event = Event; @@ -73,7 +73,7 @@ parameter_types! { pub const ProposalLifetime: u64 = 100; } -impl bridge::Trait for Test { +impl bridge::Config for Test { type Event = Event; type AdminOrigin = frame_system::EnsureRoot; type Proposal = Call; @@ -87,12 +87,12 @@ parameter_types! { pub Erc721Id: bridge::ResourceId = bridge::derive_resource_id(1, &blake2_128(b"NFT")); } -impl erc721::Trait for Test { +impl erc721::Config for Test { type Event = Event; type Identifier = Erc721Id; } -impl Trait for Test { +impl Config for Test { type Event = Event; type BridgeOrigin = bridge::EnsureBridge; type Currency = Balances; diff --git a/pallets/erc721/Cargo.toml b/pallets/erc721/Cargo.toml index cf2012922..ad0dfa3f6 100644 --- a/pallets/erc721/Cargo.toml +++ b/pallets/erc721/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-erc721" -version = "4.8.4" +version = "4.8.5" authors = ["Parity Technologies "] edition = "2021" homepage = "https://substrate.dev" @@ -14,15 +14,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } pallet-chainbridge = { version = "4.2.0", default-features = false, path = "../chainbridge" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/pallets/erc721/src/lib.rs b/pallets/erc721/src/lib.rs index 638dc864a..090ce27e0 100644 --- a/pallets/erc721/src/lib.rs +++ b/pallets/erc721/src/lib.rs @@ -4,10 +4,13 @@ use codec::{Decode, Encode}; use frame_support::{ - decl_error, decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, + dispatch::DispatchResult, + ensure, + pallet_prelude::{ValueQuery, *}, traits::Get, }; -use frame_system::{self as system, ensure_root, ensure_signed}; +use frame_system::{ensure_root, ensure_signed, pallet_prelude::*}; +pub use pallet::*; use sp_core::U256; use sp_runtime::RuntimeDebug; use sp_std::prelude::*; @@ -23,17 +26,47 @@ pub struct Erc721Token { pub metadata: Vec, } -pub trait Config: system::Config { - type RuntimeEvent: From> + Into<::RuntimeEvent>; +#[frame_support::pallet] +pub mod pallet { + use super::*; - /// Some identifier for this token type, possibly the originating ethereum address. - /// This is not explicitly used for anything, but may reflect the bridge's notion of resource - /// ID. - type Identifier: Get<[u8; 32]>; -} + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + + /// Some identifier for this token type, possibly the originating ethereum address. + /// This is not explicitly used for anything, but may reflect the bridge's notion of + /// resource ID. + type Identifier: Get<[u8; 32]>; + } -decl_error! { - pub enum Error for Module { + /// Maps tokenId to Erc721 object + #[pallet::storage] + #[pallet::getter(fn tokens)] + pub type Tokens = StorageMap<_, Blake2_128Concat, TokenId, Erc721Token>; + + /// Maps tokenId to owner + #[pallet::storage] + #[pallet::getter(fn owner_of)] + pub type TokenOwner = StorageMap<_, Blake2_128Concat, TokenId, T::AccountId>; + + #[pallet::type_value] + pub fn DefaultTokenCount() -> U256 { + U256::zero() + } + + #[pallet::storage] + #[pallet::getter(fn token_count)] + pub type TokenCount = + StorageValue>; + + #[pallet::error] + pub enum Error { /// ID not recognized TokenIdDoesNotExist, /// Already exists with an owner @@ -41,41 +74,29 @@ decl_error! { /// Origin is not owner NotOwner, } -} - -decl_storage! { - trait Store for Module as TokenStorage { - /// Maps tokenId to Erc721 object - Tokens get(fn tokens): map hasher(opaque_blake2_256) TokenId => Option; - /// Maps tokenId to owner - TokenOwner get(fn owner_of): map hasher(opaque_blake2_256) TokenId => Option; - /// Total number of tokens in existence - TokenCount get(fn token_count): U256 = U256::zero(); - } -} -decl_event!( - pub enum Event - where - ::AccountId, - { + #[pallet::event] + #[pallet::generate_deposit(pub(crate) fn deposit_event)] + pub enum Event { /// New token created - Minted(AccountId, TokenId), + Minted(T::AccountId, TokenId), /// Token transfer between two parties - Transferred(AccountId, AccountId, TokenId), + Transferred(T::AccountId, T::AccountId, TokenId), /// Token removed from the system Burned(TokenId), } -); - -decl_module! { - pub struct Module for enum Call where origin: T::RuntimeOrigin { - type Error = Error; - fn deposit_event() = default; + #[pallet::call] + impl Pallet { /// Creates a new token with the given token ID and metadata, and gives ownership to owner - #[weight = 195_000_000] - pub fn mint(origin, owner: T::AccountId, id: TokenId, metadata: Vec) -> DispatchResult { + #[pallet::call_index(0)] + #[pallet::weight(195_000_000)] + pub fn mint( + origin: OriginFor, + owner: T::AccountId, + id: TokenId, + metadata: Vec, + ) -> DispatchResult { ensure_root(origin)?; Self::mint_token(owner, id, metadata)?; @@ -84,8 +105,9 @@ decl_module! { } /// Changes ownership of a token sender owns - #[weight = 195_000_000] - pub fn transfer(origin, to: T::AccountId, id: TokenId) -> DispatchResult { + #[pallet::call_index(1)] + #[pallet::weight(195_000_000)] + pub fn transfer(origin: OriginFor, to: T::AccountId, id: TokenId) -> DispatchResult { let sender = ensure_signed(origin)?; Self::transfer_from(sender, to, id)?; @@ -94,8 +116,9 @@ decl_module! { } /// Remove token from the system - #[weight = 195_000_000] - pub fn burn(origin, id: TokenId) -> DispatchResult { + #[pallet::call_index(2)] + #[pallet::weight(195_000_000)] + pub fn burn(origin: OriginFor, id: TokenId) -> DispatchResult { ensure_root(origin)?; let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; @@ -105,50 +128,50 @@ decl_module! { Ok(()) } } -} -impl Module { - /// Creates a new token in the system. - pub fn mint_token(owner: T::AccountId, id: TokenId, metadata: Vec) -> DispatchResult { - ensure!(!Tokens::contains_key(id), Error::::TokenAlreadyExists); + impl Pallet { + /// Creates a new token in the system. + pub fn mint_token(owner: T::AccountId, id: TokenId, metadata: Vec) -> DispatchResult { + ensure!(!Tokens::::contains_key(id), Error::::TokenAlreadyExists); - let new_token = Erc721Token { id, metadata }; + let new_token = Erc721Token { id, metadata }; - ::insert(id, new_token); - >::insert(id, owner.clone()); - let new_total = ::get().saturating_add(U256::one()); - ::put(new_total); + >::insert(id, new_token); + >::insert(id, owner.clone()); + let new_total = >::get().saturating_add(U256::one()); + >::put(new_total); - Self::deposit_event(RawEvent::Minted(owner, id)); + Self::deposit_event(Event::Minted(owner, id)); - Ok(()) - } + Ok(()) + } - /// Modifies ownership of a token - pub fn transfer_from(from: T::AccountId, to: T::AccountId, id: TokenId) -> DispatchResult { - // Check from is owner and token exists - let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; - ensure!(owner == from, Error::::NotOwner); - // Update owner - >::insert(id, to.clone()); + /// Modifies ownership of a token + pub fn transfer_from(from: T::AccountId, to: T::AccountId, id: TokenId) -> DispatchResult { + // Check from is owner and token exists + let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; + ensure!(owner == from, Error::::NotOwner); + // Update owner + >::insert(id, to.clone()); - Self::deposit_event(RawEvent::Transferred(from, to, id)); + Self::deposit_event(Event::Transferred(from, to, id)); - Ok(()) - } + Ok(()) + } - /// Deletes a token from the system. - pub fn burn_token(from: T::AccountId, id: TokenId) -> DispatchResult { - let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; - ensure!(owner == from, Error::::NotOwner); + /// Deletes a token from the system. + pub fn burn_token(from: T::AccountId, id: TokenId) -> DispatchResult { + let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; + ensure!(owner == from, Error::::NotOwner); - ::remove(id); - >::remove(id); - let new_total = ::get().saturating_sub(U256::one()); - ::put(new_total); + >::remove(id); + >::remove(id); + let new_total = >::get().saturating_sub(U256::one()); + >::put(new_total); - Self::deposit_event(RawEvent::Burned(id)); + Self::deposit_event(Event::Burned(id)); - Ok(()) + Ok(()) + } } } diff --git a/pallets/erc721/src/tests.rs b/pallets/erc721/src/tests.rs index 2a2add321..e4bfb0ca0 100644 --- a/pallets/erc721/src/tests.rs +++ b/pallets/erc721/src/tests.rs @@ -40,12 +40,12 @@ fn mint_burn_tokens() { assert_ok!(Erc721::burn(RuntimeOrigin::root(), id_a)); assert_eq!(Erc721::token_count(), 1.into()); - assert!(!::contains_key(id_a)); + assert!(!>::contains_key(id_a)); assert!(!>::contains_key(id_a)); assert_ok!(Erc721::burn(RuntimeOrigin::root(), id_b)); assert_eq!(Erc721::token_count(), 0.into()); - assert!(!::contains_key(id_b)); + assert!(!>::contains_key(id_b)); assert!(!>::contains_key(id_b)); }) } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 8a4202751..4bd45931c 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ddc-primitives" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] @@ -8,8 +8,8 @@ codec = { package = "parity-scale-codec", version = "3.1.5", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", default-features = false, features = ["derive"], optional = true } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 03391ffa8..c355ecfa4 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,29 +1,29 @@ [package] name = "cere-rpc" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] -jsonrpsee = { version = "0.15.1", features = ["server"] } -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +jsonrpsee = { version = "0.16.2", features = ["server"] } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } diff --git a/runtime/cere-dev/Cargo.toml b/runtime/cere-dev/Cargo.toml index db465766e..7df96cc33 100644 --- a/runtime/cere-dev/Cargo.toml +++ b/runtime/cere-dev/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cere-dev-runtime" -version = "4.8.4" +version = "4.8.5" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" @@ -20,90 +20,90 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" static_assertions = "1.1.0" # primitives -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false, version = "4.0.0-dev" } -sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false, version = "4.0.0-dev" } +sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } # frame dependencies -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -pallet-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-bags-list = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-chainbridge = { version = "4.8.4", default-features = false, path = "../../pallets/chainbridge" } -pallet-child-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-contracts-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-election-provider-support-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -pallet-elections-phragmen = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } -pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-identity = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-indices = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-multisig = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.33" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } -pallet-offences = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false, optional = true } -pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-recovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-session = { features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false, optional = true } -pallet-society = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-tips = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +pallet-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-bags-list = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-chainbridge = { version = "4.8.1", default-features = false, path = "../../pallets/chainbridge" } +pallet-child-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-contracts-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-election-provider-support-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +pallet-elections-phragmen = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } +pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-identity = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-indices = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-multisig = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.36" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } +pallet-offences = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false, optional = true } +pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-recovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-session = { features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false, optional = true } +pallet-society = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-tips = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } # cere dependencies cere-dev-runtime-constants = { path = "./constants", default-features = false } cere-runtime-common = { path = "../common", default-features = false } -ddc-traits = { version = "4.8.4", default-features = false, path = "../../traits" } -pallet-ddc-clusters = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-clusters" } -pallet-ddc-customers = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-customers" } -pallet-ddc-nodes = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-nodes" } -pallet-ddc-payouts = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-payouts" } -pallet-ddc-staking = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-staking" } -pallet-erc20 = { version = "4.8.4", default-features = false, path = "../../pallets/erc20" } -pallet-erc721 = { version = "4.8.4", default-features = false, path = "../../pallets/erc721" } +ddc-traits = { version = "4.8.5", default-features = false, path = "../../traits" } +pallet-ddc-clusters = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-clusters" } +pallet-ddc-customers = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-customers" } +pallet-ddc-nodes = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-nodes" } +pallet-ddc-payouts = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-payouts" } +pallet-ddc-staking = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-staking" } +pallet-erc20 = { version = "4.8.5", default-features = false, path = "../../pallets/erc20" } +pallet-erc721 = { version = "4.8.5", default-features = false, path = "../../pallets/erc721" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/runtime/cere-dev/constants/Cargo.toml b/runtime/cere-dev/constants/Cargo.toml index ca686e257..b62471377 100644 --- a/runtime/cere-dev/constants/Cargo.toml +++ b/runtime/cere-dev/constants/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "cere-dev-runtime-constants" -version = "4.8.4" +version = "4.8.5" authors = ["Parity Technologies "] edition = "2021" [dependencies] -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 4e3ea2f50..b76e36c77 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -31,12 +31,14 @@ use frame_support::{ pallet_prelude::Get, parameter_types, traits::{ - ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse, EqualPrivilegeOnly, Everything, - Imbalance, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing, OnUnbalanced, - U128CurrencyToVote, WithdrawReasons, + ConstBool, ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse, EqualPrivilegeOnly, + Everything, Imbalance, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing, + OnUnbalanced, U128CurrencyToVote, WithdrawReasons, }, weights::{ - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + constants::{ + BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND, + }, ConstantMultiplier, IdentityFee, Weight, }, PalletId, RuntimeDebug, @@ -130,8 +132,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // is and increment impl_version. spec_version: 48400, impl_version: 0, + transaction_version: 10, apis: RUNTIME_API_VERSIONS, - transaction_version: 9, state_version: 0, }; @@ -173,7 +175,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(u64::MAX); +const MAXIMUM_BLOCK_WEIGHT: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX); parameter_types! { pub const BlockHashCount: BlockNumber = 2400; @@ -1009,6 +1012,8 @@ impl pallet_contracts::Config for Runtime { type AddressGenerator = pallet_contracts::DefaultAddressGenerator; type MaxCodeLen = ConstU32<{ 128 * 1024 }>; type MaxStorageKeyLen = ConstU32<128>; + type UnsafeUnstableInterface = ConstBool; + type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; } impl pallet_sudo::Config for Runtime { @@ -1461,11 +1466,15 @@ pub type UncheckedExtrinsic = pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; + +// TODO Remove me after 0.9.36 upgrade +parameter_types! { + pub const DummyPalletId: PalletId = PalletId(*b"piddummy"); + pub DummyPalletAccountId: AccountId = DummyPalletId::get().into_account_truncating(); +} /// Runtime migrations -type Migrations = ( - pallet_election_provider_multi_phase::migrations::v1::MigrateToV1, - pallet_fast_unstake::migrations::v1::MigrateToV1, -); +type Migrations = + (pallet_balances::migration::MigrateToTrackInactive,); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/runtime/cere/Cargo.toml b/runtime/cere/Cargo.toml index 8638ce17e..e2681d2ad 100644 --- a/runtime/cere/Cargo.toml +++ b/runtime/cere/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cere-runtime" -version = "4.8.4" +version = "4.8.5" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" @@ -20,90 +20,90 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" static_assertions = "1.1.0" # primitives -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false, version = "4.0.0-dev" } -sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false, version = "4.0.0-dev" } +sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } # frame dependencies -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -pallet-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-bags-list = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-chainbridge = { version = "4.8.4", default-features = false, path = "../../pallets/chainbridge" } -pallet-child-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-contracts-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-election-provider-support-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", optional = true } -pallet-elections-phragmen = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } -pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-identity = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-indices = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-multisig = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.33" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } -pallet-offences = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false, optional = true } -pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-recovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-session = { features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false, optional = true } -pallet-society = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-tips = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +pallet-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-bags-list = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-chainbridge = { version = "4.8.5", default-features = false, path = "../../pallets/chainbridge" } +pallet-child-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-contracts-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-election-provider-support-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", optional = true } +pallet-elections-phragmen = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } +pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-identity = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-indices = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-multisig = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.36" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } +pallet-offences = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false, optional = true } +pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-recovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-session = { features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36", default-features = false, optional = true } +pallet-society = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-tips = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } # cere dependencies cere-runtime-common = { path = "../common", default-features = false } cere-runtime-constants = { path = "./constants", default-features = false } -ddc-traits = { version = "4.8.4", default-features = false, path = "../../traits" } -pallet-ddc-clusters = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-clusters" } -pallet-ddc-customers = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-customers" } -pallet-ddc-nodes = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-nodes" } -pallet-ddc-payouts = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-payouts" } -pallet-ddc-staking = { version = "4.8.4", default-features = false, path = "../../pallets/ddc-staking" } -pallet-erc20 = { version = "4.8.4", default-features = false, path = "../../pallets/erc20" } -pallet-erc721 = { version = "4.8.4", default-features = false, path = "../../pallets/erc721" } +ddc-traits = { version = "4.8.5", default-features = false, path = "../../traits" } +pallet-ddc-clusters = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-clusters" } +pallet-ddc-customers = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-customers" } +pallet-ddc-nodes = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-nodes" } +pallet-ddc-payouts = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-payouts" } +pallet-ddc-staking = { version = "4.8.5", default-features = false, path = "../../pallets/ddc-staking" } +pallet-erc20 = { version = "4.8.5", default-features = false, path = "../../pallets/erc20" } +pallet-erc721 = { version = "4.8.5", default-features = false, path = "../../pallets/erc721" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/runtime/cere/constants/Cargo.toml b/runtime/cere/constants/Cargo.toml index c70315108..92ccb55f7 100644 --- a/runtime/cere/constants/Cargo.toml +++ b/runtime/cere/constants/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "cere-runtime-constants" -version = "4.8.4" +version = "4.8.5" authors = ["Parity Technologies "] edition = "2021" [dependencies] -node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } [features] default = ["std"] diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index f43d0cf55..14f60c00d 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -31,12 +31,14 @@ use frame_support::{ pallet_prelude::Get, parameter_types, traits::{ - ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse, EqualPrivilegeOnly, Everything, - Imbalance, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing, OnUnbalanced, - U128CurrencyToVote, WithdrawReasons, + ConstBool, ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse, EqualPrivilegeOnly, + Everything, Imbalance, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing, + OnUnbalanced, U128CurrencyToVote, WithdrawReasons, }, weights::{ - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + constants::{ + BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND, + }, ConstantMultiplier, IdentityFee, Weight, }, PalletId, RuntimeDebug, @@ -126,7 +128,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 48400, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 9, + transaction_version: 10, state_version: 0, }; @@ -168,7 +170,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(u64::MAX); +const MAXIMUM_BLOCK_WEIGHT: Weight = + Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX); parameter_types! { pub const BlockHashCount: BlockNumber = 2400; @@ -1014,6 +1017,8 @@ impl pallet_contracts::Config for Runtime { type AddressGenerator = pallet_contracts::DefaultAddressGenerator; type MaxCodeLen = ConstU32<{ 128 * 1024 }>; type MaxStorageKeyLen = ConstU32<128>; + type UnsafeUnstableInterface = ConstBool; + type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; } impl pallet_sudo::Config for Runtime { @@ -1466,11 +1471,16 @@ pub type UncheckedExtrinsic = pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; + +// TODO Remove me after 0.9.36 upgrade +parameter_types! { + pub const DummyPalletId: PalletId = PalletId(*b"piddummy"); + pub DummyPalletAccountId: AccountId = DummyPalletId::get().into_account_truncating(); +} /// Runtime migrations -type Migrations = ( - pallet_election_provider_multi_phase::migrations::v1::MigrateToV1, - pallet_fast_unstake::migrations::v1::MigrateToV1, -); +type Migrations = + (pallet_balances::migration::MigrateToTrackInactive,); + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 2064abed7..4d3b72376 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cere-runtime-common" -version = "4.8.4" +version = "4.8.5" authors = ["Parity Technologies "] edition = "2021" @@ -10,7 +10,7 @@ no_std = [] std = [] [dependencies] -frame-support = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.33" } -node-primitives = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.36" } +node-primitives = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.36" } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7e60322a9..8440b5e39 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2022-10-09" +channel = "nightly-2022-11-15" components = ["clippy", "rustfmt"] targets = ["wasm32-unknown-unknown"] diff --git a/scripts/init.sh b/scripts/init.sh index 1472424dc..7607252c9 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -4,9 +4,9 @@ set -e echo "*** Initializing WASM build environment" -rustup install nightly-2022-10-09 +rustup install nightly-2022-11-15 -rustup target add wasm32-unknown-unknown --toolchain nightly-2022-10-09 +rustup target add wasm32-unknown-unknown --toolchain nightly-2022-11-15 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/shell.nix b/shell.nix index d5a72b802..2ba4a10c2 100644 --- a/shell.nix +++ b/shell.nix @@ -13,9 +13,10 @@ let rev = "1fe6ed37fd9beb92afe90671c0c2a662a03463dd"; }; nixpkgs = import pinned { overlays = [ mozillaOverlay ]; }; - toolchain = with nixpkgs; (rustChannelOf { date = "2022-10-09"; channel = "nightly"; }); + toolchain = with nixpkgs; (rustChannelOf { date = "2022-11-15"; channel = "nightly"; }); rust-wasm = toolchain.rust.override { targets = [ "wasm32-unknown-unknown" ]; + extensions = ["rust-src"]; }; in with nixpkgs; pkgs.mkShell { diff --git a/traits/Cargo.toml b/traits/Cargo.toml index d36062845..7d3d7dbfd 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "ddc-traits" -version = "4.8.4" +version = "4.8.5" edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -ddc-primitives = { version = "4.8.4", default-features = false, path = "../primitives" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +ddc-primitives = { version = "4.8.5", default-features = false, path = "../primitives" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.36" } From 60462137aafbf193ec996c7586fe2de80638825c Mon Sep 17 00:00:00 2001 From: rakanalh Date: Wed, 10 Jan 2024 16:52:35 +0300 Subject: [PATCH 2/7] Update runtime versions based on crate version --- runtime/cere-dev/src/lib.rs | 2 +- runtime/cere/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index b76e36c77..402dc7f40 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -130,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 48400, + spec_version: 48500, impl_version: 0, transaction_version: 10, apis: RUNTIME_API_VERSIONS, diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index 14f60c00d..ce78fec8a 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -125,7 +125,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 48400, + spec_version: 48500, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 10, From d289f080e07e07e546cae712e5dc82405e1020b0 Mon Sep 17 00:00:00 2001 From: rakanalh Date: Thu, 11 Jan 2024 11:03:15 +0300 Subject: [PATCH 3/7] Build artifacts when merging into dev --- .github/workflows/stage.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stage.yaml b/.github/workflows/stage.yaml index 700d7d937..93fe6a587 100644 --- a/.github/workflows/stage.yaml +++ b/.github/workflows/stage.yaml @@ -2,9 +2,10 @@ name: Release to stage on: push: branches: + - dev + - master - 'release/**' - 'hotfix/**' - - 'master' env: PROFILE: release From d1efd3800dc0d10aa6819127985f629b6c517444 Mon Sep 17 00:00:00 2001 From: Rakan Al-Huneiti Date: Fri, 12 Jan 2024 15:51:50 +0300 Subject: [PATCH 4/7] Add latest tag to docker image (#229) ### Description ### Types of Changes - [x] 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 - [ ] This change requires a runtime migration. - [ ] Modifies `on_initialize` - [ ] Modifies `on_finalize` ### Checklist - [ ] Change has been tested locally. - [ ] Change adds / updates tests. - [ ] Changelog doc updated. --- .github/workflows/publish-docker-image-to-dockerhub.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-image-to-dockerhub.yaml b/.github/workflows/publish-docker-image-to-dockerhub.yaml index 7260d3174..2b3a62d61 100644 --- a/.github/workflows/publish-docker-image-to-dockerhub.yaml +++ b/.github/workflows/publish-docker-image-to-dockerhub.yaml @@ -28,6 +28,7 @@ jobs: docker pull $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA docker image tag $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA $DOCKERHUB_REPOSITORY/$PACKAGE_NAME:${GITHUB_REF##*/} docker image tag $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_REF##*/} + docker image tag $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA $DOCKERHUB_REPOSITORY/$PACKAGE_NAME:latest docker push $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_REF##*/} - name: Login to DockerHub uses: docker/login-action@v1 @@ -37,6 +38,6 @@ jobs: - name: Publish image to DockerHub id: docker_publish run: | - docker push $DOCKERHUB_REPOSITORY/$PACKAGE_NAME:${GITHUB_REF##*/} + docker push -a $DOCKERHUB_REPOSITORY/$PACKAGE_NAME - name: Image digest run: echo ${{ steps.docker_publish.outputs.digest }} From e6e464df158056f92587681412700715490ceec7 Mon Sep 17 00:00:00 2001 From: Rakan Al-Huneiti Date: Fri, 12 Jan 2024 17:38:03 +0300 Subject: [PATCH 5/7] Chainbridge constants fix (#231) ### Description Constant declarations were accidentally removed in #210 ### Types of Changes - [x] 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 - [ ] This change requires a runtime migration. - [ ] Modifies `on_initialize` - [ ] Modifies `on_finalize` ### Checklist - [x] Change has been tested locally. - [ ] Change adds / updates tests. - [ ] Changelog doc updated. --- pallets/chainbridge/src/lib.rs | 7 ++++++- pallets/chainbridge/src/mock.rs | 2 ++ pallets/erc20/src/lib.rs | 3 +++ runtime/cere-dev/src/lib.rs | 4 +++- runtime/cere/src/lib.rs | 2 ++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pallets/chainbridge/src/lib.rs b/pallets/chainbridge/src/lib.rs index a03bf2ee7..2b848939c 100644 --- a/pallets/chainbridge/src/lib.rs +++ b/pallets/chainbridge/src/lib.rs @@ -141,9 +141,14 @@ pub mod pallet { /// The identifier for this chain. /// This must be unique and must not collide with existing IDs within a set of bridged /// chains. + #[pallet::constant] type ChainId: Get; - type ProposalLifetime: Get; + #[pallet::constant] + type ProposalLifetime: Get<::BlockNumber>; + + #[pallet::constant] + type BridgeAccountId: Get; } /// All whitelisted chains and their respective transaction counts diff --git a/pallets/chainbridge/src/mock.rs b/pallets/chainbridge/src/mock.rs index c980befec..bb4f3c5b4 100644 --- a/pallets/chainbridge/src/mock.rs +++ b/pallets/chainbridge/src/mock.rs @@ -72,6 +72,7 @@ impl pallet_balances::Config for Test { parameter_types! { pub const TestChainId: u8 = 5; pub const ProposalLifetime: u64 = 50; + pub BridgeAccountId: u64 = AccountIdConversion::::into_account_truncating(&MODULE_ID); } impl crate::pallet::Config for Test { @@ -80,6 +81,7 @@ impl crate::pallet::Config for Test { type Proposal = RuntimeCall; type ChainId = TestChainId; type ProposalLifetime = ProposalLifetime; + type BridgeAccountId = BridgeAccountId; } type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; diff --git a/pallets/erc20/src/lib.rs b/pallets/erc20/src/lib.rs index 6d3b9f07f..5c2fee14a 100644 --- a/pallets/erc20/src/lib.rs +++ b/pallets/erc20/src/lib.rs @@ -41,8 +41,11 @@ pub mod pallet { type Currency: Currency; /// Ids can be defined by the runtime and passed in, perhaps from blake2b_128 hashes. + #[pallet::constant] type HashId: Get; + #[pallet::constant] type NativeTokenId: Get; + #[pallet::constant] type Erc721Id: Get; } diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 402dc7f40..1733f3677 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -130,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 48500, + spec_version: 48501, impl_version: 0, transaction_version: 10, apis: RUNTIME_API_VERSIONS, @@ -1226,6 +1226,7 @@ impl pallet_vesting::Config for Runtime { parameter_types! { pub const ChainId: u8 = 1; pub const ProposalLifetime: BlockNumber = 1000; + pub BridgeAccountId: AccountId = AccountIdConversion::::into_account_truncating(&pallet_chainbridge::MODULE_ID); } /// Configure the send data pallet @@ -1235,6 +1236,7 @@ impl pallet_chainbridge::Config for Runtime { type Proposal = RuntimeCall; type ChainId = ChainId; type ProposalLifetime = ProposalLifetime; + type BridgeAccountId = BridgeAccountId; } parameter_types! { diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index ce78fec8a..4e2be9717 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -1231,6 +1231,7 @@ impl pallet_vesting::Config for Runtime { parameter_types! { pub const ChainId: u8 = 1; pub const ProposalLifetime: BlockNumber = 1000; + pub BridgeAccountId: AccountId = AccountIdConversion::::into_account_truncating(&pallet_chainbridge::MODULE_ID); } /// Configure the send data pallet @@ -1240,6 +1241,7 @@ impl pallet_chainbridge::Config for Runtime { type Proposal = RuntimeCall; type ChainId = ChainId; type ProposalLifetime = ProposalLifetime; + type BridgeAccountId = BridgeAccountId; } parameter_types! { From 3f005d1e56504e464db9fe1400f60568ed403861 Mon Sep 17 00:00:00 2001 From: rakanalh Date: Tue, 16 Jan 2024 15:20:58 +0300 Subject: [PATCH 6/7] Add contracts migration --- runtime/cere/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index 4e2be9717..356b9dc1e 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -125,7 +125,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 48500, + spec_version: 48501, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 10, @@ -1480,8 +1480,10 @@ parameter_types! { pub DummyPalletAccountId: AccountId = DummyPalletId::get().into_account_truncating(); } /// Runtime migrations -type Migrations = - (pallet_balances::migration::MigrateToTrackInactive,); +type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + pallet_contracts::Migration, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< From 08c714b390fda61e3b6ce401b51555a71ea54d98 Mon Sep 17 00:00:00 2001 From: Maksim Ramanenkau Date: Wed, 17 Jan 2024 19:07:22 +0400 Subject: [PATCH 7/7] Rename constant to what bridge relayers expect (#235) ### Description ### Types of Changes - [x] 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 - [ ] This change requires a runtime migration. - [ ] Modifies `on_initialize` - [ ] Modifies `on_finalize` ### Checklist - [x] Change has been tested locally. - [ ] Change adds / updates tests. - [ ] Changelog doc updated. --- pallets/chainbridge/src/lib.rs | 4 ++-- pallets/chainbridge/src/mock.rs | 2 +- pallets/erc20/src/mock.rs | 2 +- runtime/cere-dev/src/lib.rs | 2 +- runtime/cere/src/lib.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pallets/chainbridge/src/lib.rs b/pallets/chainbridge/src/lib.rs index 2b848939c..fbb608346 100644 --- a/pallets/chainbridge/src/lib.rs +++ b/pallets/chainbridge/src/lib.rs @@ -142,7 +142,7 @@ pub mod pallet { /// This must be unique and must not collide with existing IDs within a set of bridged /// chains. #[pallet::constant] - type ChainId: Get; + type ChainIdentity: Get; #[pallet::constant] type ProposalLifetime: Get<::BlockNumber>; @@ -482,7 +482,7 @@ pub mod pallet { /// Whitelist a chain ID for transfer pub fn whitelist(id: ChainId) -> DispatchResult { // Cannot whitelist this chain - ensure!(id != T::ChainId::get(), Error::::InvalidChainId); + ensure!(id != T::ChainIdentity::get(), Error::::InvalidChainId); // Cannot whitelist with an existing entry ensure!(!Self::chain_whitelisted(id), Error::::ChainAlreadyWhitelisted); >::insert(id, 0); diff --git a/pallets/chainbridge/src/mock.rs b/pallets/chainbridge/src/mock.rs index bb4f3c5b4..6dbdb2d64 100644 --- a/pallets/chainbridge/src/mock.rs +++ b/pallets/chainbridge/src/mock.rs @@ -79,7 +79,7 @@ impl crate::pallet::Config for Test { type RuntimeEvent = RuntimeEvent; type AdminOrigin = frame_system::EnsureRoot; type Proposal = RuntimeCall; - type ChainId = TestChainId; + type ChainIdentity = TestChainId; type ProposalLifetime = ProposalLifetime; type BridgeAccountId = BridgeAccountId; } diff --git a/pallets/erc20/src/mock.rs b/pallets/erc20/src/mock.rs index 4402ed635..365518f4e 100644 --- a/pallets/erc20/src/mock.rs +++ b/pallets/erc20/src/mock.rs @@ -77,7 +77,7 @@ impl bridge::Config for Test { type Event = Event; type AdminOrigin = frame_system::EnsureRoot; type Proposal = Call; - type ChainId = TestChainId; + type ChainIdentity = TestChainId; type ProposalLifetime = ProposalLifetime; } diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 1733f3677..94a37d51c 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -1234,7 +1234,7 @@ impl pallet_chainbridge::Config for Runtime { type RuntimeEvent = RuntimeEvent; type AdminOrigin = frame_system::EnsureRoot; type Proposal = RuntimeCall; - type ChainId = ChainId; + type ChainIdentity = ChainId; type ProposalLifetime = ProposalLifetime; type BridgeAccountId = BridgeAccountId; } diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index 356b9dc1e..bed08978e 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -1239,7 +1239,7 @@ impl pallet_chainbridge::Config for Runtime { type RuntimeEvent = RuntimeEvent; type AdminOrigin = frame_system::EnsureRoot; type Proposal = RuntimeCall; - type ChainId = ChainId; + type ChainIdentity = ChainId; type ProposalLifetime = ProposalLifetime; type BridgeAccountId = BridgeAccountId; }