From 51c6c93e614107696519af5236a6ced5301b3cf0 Mon Sep 17 00:00:00 2001 From: zktony Date: Tue, 12 Sep 2023 15:09:32 +0530 Subject: [PATCH 01/51] Merged parachain and solochain --- .docker/ci/release/Dockerfile | 8 +- .github/workflows/ci.yml | 20 +- .../docker-compose.yml | 26 +- Cargo.lock | 4134 +++++++++++++++-- Cargo.toml | 38 +- README.md | 32 +- client/Cargo.toml | 2 +- dockerfile | 8 +- .../polkadex-mainnet-node}/Cargo.toml | 16 +- .../polkadex-mainnet-node}/build.rs | 0 .../src/benchmarking.rs | 0 .../polkadex-mainnet-node}/src/chain_spec.rs | 0 .../polkadex-mainnet-node}/src/cli.rs | 9 +- .../polkadex-mainnet-node}/src/command.rs | 14 +- .../polkadex-mainnet-node}/src/lib.rs | 0 .../polkadex-mainnet-node}/src/main.rs | 0 .../polkadex-mainnet-node}/src/rpc.rs | 16 +- .../polkadex-mainnet-node}/src/service.rs | 21 +- nodes/polkadex-parachain-node/Cargo.toml | 84 + nodes/polkadex-parachain-node/build.rs | 7 + .../polkadex-parachain-node/src/chain_spec.rs | 279 ++ nodes/polkadex-parachain-node/src/cli.rs | 103 + nodes/polkadex-parachain-node/src/command.rs | 438 ++ nodes/polkadex-parachain-node/src/main.rs | 14 + nodes/polkadex-parachain-node/src/rpc.rs | 58 + nodes/polkadex-parachain-node/src/service.rs | 435 ++ pallets/liquidity/src/lib.rs | 2 +- pallets/liquidity/src/mock.rs | 2 +- pallets/liquidity/src/weights.rs | 2 +- pallets/ocex/rpc/src/lib.rs | 13 +- pallets/ocex/src/lib.rs | 2 +- pallets/ocex/src/mock.rs | 2 +- pallets/ocex/src/storage.rs | 3 +- pallets/ocex/src/weights.rs | 2 +- pallets/pdex-migration/src/lib.rs | 3 +- pallets/pdex-migration/src/mock.rs | 4 +- pallets/pdex-migration/src/weights.rs | 2 +- pallets/rewards/rpc/src/lib.rs | 8 +- pallets/rewards/src/lib.rs | 2 +- pallets/rewards/src/mock.rs | 2 +- pallets/rewards/src/weights.rs | 2 +- pallets/thea-council/Cargo.toml | 59 + pallets/thea-council/src/benchmarking.rs | 101 + pallets/thea-council/src/lib.rs | 383 ++ pallets/thea-council/src/mock.rs | 223 + pallets/thea-council/src/tests.rs | 204 + pallets/thea-council/src/weights.rs | 120 + pallets/thea-executor/src/lib.rs | 3 +- pallets/thea-executor/src/mock.rs | 4 +- pallets/thea-executor/src/weights.rs | 2 +- pallets/thea-message-handler/src/mock.rs | 4 +- pallets/thea-message-handler/src/weights.rs | 2 +- pallets/thea/src/lib.rs | 4 +- pallets/thea/src/mock.rs | 4 +- pallets/thea/src/session.rs | 8 +- pallets/thea/src/weights.rs | 2 +- pallets/xcm-helper/Cargo.toml | 70 + pallets/xcm-helper/src/benchmarking.rs | 118 + pallets/xcm-helper/src/lib.rs | 709 +++ pallets/xcm-helper/src/mock.rs | 210 + pallets/xcm-helper/src/tests.rs | 175 + pallets/xcm-helper/src/weights.rs | 106 + rpc/assets/src/lib.rs | 6 +- .../polkadex-mainnet}/Cargo.toml | 28 +- .../polkadex-mainnet}/build.rs | 0 .../polkadex-mainnet}/src/constants.rs | 2 +- .../polkadex-mainnet}/src/impls.rs | 6 +- .../polkadex-mainnet}/src/lib.rs | 27 +- runtimes/polkadex-parachain/Cargo.toml | 189 + runtimes/polkadex-parachain/build.rs | 9 + runtimes/polkadex-parachain/src/constants.rs | 21 + runtimes/polkadex-parachain/src/lib.rs | 852 ++++ .../src/weights/block_weights.rs | 53 + .../src/weights/extrinsic_weights.rs | 53 + .../polkadex-parachain/src/weights/mod.rs | 28 + .../src/weights/paritydb_weights.rs | 63 + .../src/weights/rocksdb_weights.rs | 63 + runtimes/polkadex-parachain/src/xcm_config.rs | 389 ++ scripts/start_chain.sh | 14 +- 79 files changed, 9481 insertions(+), 646 deletions(-) rename {node => nodes/polkadex-mainnet-node}/Cargo.toml (94%) rename {node => nodes/polkadex-mainnet-node}/build.rs (100%) rename {node => nodes/polkadex-mainnet-node}/src/benchmarking.rs (100%) rename {node => nodes/polkadex-mainnet-node}/src/chain_spec.rs (100%) rename {node => nodes/polkadex-mainnet-node}/src/cli.rs (92%) rename {node => nodes/polkadex-mainnet-node}/src/command.rs (94%) rename {node => nodes/polkadex-mainnet-node}/src/lib.rs (100%) rename {node => nodes/polkadex-mainnet-node}/src/main.rs (100%) rename {node => nodes/polkadex-mainnet-node}/src/rpc.rs (90%) rename {node => nodes/polkadex-mainnet-node}/src/service.rs (96%) create mode 100644 nodes/polkadex-parachain-node/Cargo.toml create mode 100644 nodes/polkadex-parachain-node/build.rs create mode 100644 nodes/polkadex-parachain-node/src/chain_spec.rs create mode 100644 nodes/polkadex-parachain-node/src/cli.rs create mode 100644 nodes/polkadex-parachain-node/src/command.rs create mode 100644 nodes/polkadex-parachain-node/src/main.rs create mode 100644 nodes/polkadex-parachain-node/src/rpc.rs create mode 100644 nodes/polkadex-parachain-node/src/service.rs create mode 100644 pallets/thea-council/Cargo.toml create mode 100644 pallets/thea-council/src/benchmarking.rs create mode 100644 pallets/thea-council/src/lib.rs create mode 100644 pallets/thea-council/src/mock.rs create mode 100644 pallets/thea-council/src/tests.rs create mode 100644 pallets/thea-council/src/weights.rs create mode 100644 pallets/xcm-helper/Cargo.toml create mode 100644 pallets/xcm-helper/src/benchmarking.rs create mode 100644 pallets/xcm-helper/src/lib.rs create mode 100644 pallets/xcm-helper/src/mock.rs create mode 100644 pallets/xcm-helper/src/tests.rs create mode 100644 pallets/xcm-helper/src/weights.rs rename {runtime => runtimes/polkadex-mainnet}/Cargo.toml (88%) rename {runtime => runtimes/polkadex-mainnet}/build.rs (100%) rename {runtime => runtimes/polkadex-mainnet}/src/constants.rs (98%) rename {runtime => runtimes/polkadex-mainnet}/src/impls.rs (98%) rename {runtime => runtimes/polkadex-mainnet}/src/lib.rs (98%) create mode 100644 runtimes/polkadex-parachain/Cargo.toml create mode 100644 runtimes/polkadex-parachain/build.rs create mode 100644 runtimes/polkadex-parachain/src/constants.rs create mode 100644 runtimes/polkadex-parachain/src/lib.rs create mode 100644 runtimes/polkadex-parachain/src/weights/block_weights.rs create mode 100644 runtimes/polkadex-parachain/src/weights/extrinsic_weights.rs create mode 100644 runtimes/polkadex-parachain/src/weights/mod.rs create mode 100644 runtimes/polkadex-parachain/src/weights/paritydb_weights.rs create mode 100644 runtimes/polkadex-parachain/src/weights/rocksdb_weights.rs create mode 100644 runtimes/polkadex-parachain/src/xcm_config.rs diff --git a/.docker/ci/release/Dockerfile b/.docker/ci/release/Dockerfile index 581bb9d2a..4dd4f8cf7 100644 --- a/.docker/ci/release/Dockerfile +++ b/.docker/ci/release/Dockerfile @@ -22,11 +22,11 @@ RUN apt-get update && apt-get install --assume-yes ca-certificates COPY ./polkadex-node /usr/local/bin -RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-node polkadex-node && \ - mkdir -p /polkadex-node/.local/share && \ +RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-polkadex-mainnet-polkadex-parachain-node polkadex-polkadex-mainnet-polkadex-parachain-node && \ + mkdir -p /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share && \ mkdir /data && \ - chown -R polkadex-node:polkadex-node /data && \ - ln -s /data /polkadex-node/.local/share/polkadex-node && \ + chown -R polkadex-polkadex-mainnet-polkadex-parachain-node:polkadex-polkadex-mainnet-polkadex-parachain-node /data && \ + ln -s /data /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share/polkadex-polkadex-mainnet-polkadex-parachain-node && \ rm -rf /usr/bin /usr/sbin COPY ./extras/customSpecRaw.json /data diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bef597fa..0feba0dc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,14 +84,14 @@ jobs: run: | taplo lint taplo fmt --check - - name: Build Project with try-runtime - run: cargo build --features try-runtime + - name: Build Project with try-polkadex-mainnet + run: cargo build --features try-polkadex-mainnet - name: Runtime build - run: cargo build -p node-polkadex-runtime - - name: Build Project with runtime benchmarks - run: cargo build --features runtime-benchmarks + run: cargo build -p polkadex-mainnet-polkadex-parachain-node-polkadex-polkadex-mainnet + - name: Build Project with polkadex-mainnet benchmarks + run: cargo build --features polkadex-mainnet-benchmarks - name: Test weights generation - run: ./target/debug/polkadex-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1 + run: ./target/debug/polkadex-polkadex-mainnet-polkadex-parachain-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1 - name: Normal Build in release mode if: contains(github.ref, 'Develop') run: RUSTFLAGS="-D warnings" cargo build --release @@ -108,7 +108,7 @@ jobs: uses: actions-rs/tarpaulin@v0.1 with: version: '0.22.0' - args: '--avoid-cfg-tarpaulin --exclude polkadex-node node-polkadex-runtime --workspace --timeout 180' + args: '--avoid-cfg-tarpaulin --exclude polkadex-polkadex-mainnet-polkadex-parachain-node polkadex-mainnet-polkadex-parachain-node-polkadex-polkadex-mainnet --workspace --timeout 180' - name: Upload to codecov.io uses: codecov/codecov-action@v3 with: @@ -123,13 +123,13 @@ jobs: - name: Zip compiled binaries if: contains(github.ref, 'Develop') # Zipping is required since billing is based on the raw uploaded size. - run: zip -r -j polkadex-node.zip ./target/release/polkadex-node + run: zip -r -j polkadex-polkadex-mainnet-polkadex-parachain-node.zip ./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node - name: Upload zipped binaries as an artifact if: contains(github.ref, 'Develop') uses: actions/upload-artifact@v3 with: - name: polkadex-node - path: ./polkadex-node.zip + name: polkadex-polkadex-mainnet-polkadex-parachain-node + path: ./polkadex-polkadex-mainnet-polkadex-parachain-node.zip if-no-files-found: error stop-runner: name: Stop self-hosted EC2 runner diff --git a/.maintain/local-docker-test-network/docker-compose.yml b/.maintain/local-docker-test-network/docker-compose.yml index 32c9b0a9f..cdcfc6f64 100644 --- a/.maintain/local-docker-test-network/docker-compose.yml +++ b/.maintain/local-docker-test-network/docker-compose.yml @@ -16,24 +16,24 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Docker compose file to start a multi node local test network. +# Docker compose file to start a multi polkadex-mainnet-polkadex-parachain-node local test network. # # # Nodes # -# - Validator node A -# - Validator node B -# - Full node C +# - Validator polkadex-mainnet-polkadex-parachain-node A +# - Validator polkadex-mainnet-polkadex-parachain-node B +# - Full polkadex-mainnet-polkadex-parachain-node C # # # Auxiliary nodes # -# - Prometheus monitoring each node. -# - Grafana pointed at the Prometheus node, configured with all dashboards. +# - Prometheus monitoring each polkadex-mainnet-polkadex-parachain-node. +# - Grafana pointed at the Prometheus polkadex-mainnet-polkadex-parachain-node, configured with all dashboards. # # # Usage # # 1. Build `target/release/substrate` binary: `cargo build --release` # 2. Start networks and containers: -# `sudo docker-compose -f .maintain/sentry-node/docker-compose.yml up` +# `sudo docker-compose -f .maintain/sentry-polkadex-mainnet-polkadex-parachain-node/docker-compose.yml up` # 3. Connect to nodes: # - validator-a: localhost:9944 # - validator-b: localhost:9945 @@ -50,12 +50,12 @@ services: - "9944:9944" - "9615:9615" volumes: - - ../../target/release/polkadex-node:/usr/local/bin/polkadex-node + - ../../target/release/polkadex-polkadex-mainnet-polkadex-parachain-node:/usr/local/bin/polkadex-polkadex-mainnet-polkadex-parachain-node image: parity/substrate networks: - internet command: - - "--node-key" + - "--polkadex-mainnet-polkadex-parachain-node-key" - "0000000000000000000000000000000000000000000000000000000000000001" - "--base-path" - "/tmp/alice" @@ -81,11 +81,11 @@ services: ports: - "9945:9944" volumes: - - ../../target/release/polkadex-node:/usr/local/bin/polkadex-node + - ../../target/release/polkadex-polkadex-mainnet-polkadex-parachain-node:/usr/local/bin/polkadex-polkadex-mainnet-polkadex-parachain-node networks: - internet command: - - "--node-key" + - "--polkadex-mainnet-polkadex-parachain-node-key" - "0000000000000000000000000000000000000000000000000000000000000002" - "--base-path" - "/tmp/bob" @@ -111,11 +111,11 @@ services: ports: - "9946:9944" volumes: - - ../../target/release/polkadex-node:/usr/local/bin/polkadex-node + - ../../target/release/polkadex-polkadex-mainnet-polkadex-parachain-node:/usr/local/bin/polkadex-polkadex-mainnet-polkadex-parachain-node networks: - internet command: - - "--node-key" + - "--polkadex-mainnet-polkadex-parachain-node-key" - "0000000000000000000000000000000000000000000000000000000000000003" - "--base-path" - "/tmp/light" diff --git a/Cargo.lock b/Cargo.lock index c92dd1253..c16d296d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -179,6 +179,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "always-assert" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -369,6 +375,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-channel" version = "1.9.0" @@ -632,6 +644,7 @@ dependencies = [ "cc", "cfg-if", "constant_time_eq 0.3.0", + "digest 0.10.7", ] [[package]] @@ -746,6 +759,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bounded-vec" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68534a48cbf63a4b1323c433cf21238c9ec23711e0df13b08c33e5c2082663ce" +dependencies = [ + "thiserror", +] + [[package]] name = "bs58" version = "0.4.0" @@ -1081,6 +1103,18 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +[[package]] +name = "coarsetime" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a90d114103adbc625300f346d4d09dfb4ab1c4a8df6868435dd903392ecf4354" +dependencies = [ + "libc", + "once_cell", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + [[package]] name = "codespan-reporting" version = "0.11.1" @@ -1148,6 +1182,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "core-foundation" version = "0.9.3" @@ -1182,6 +1222,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "cpu-time" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "cpufeatures" version = "0.2.9" @@ -1282,7 +1332,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -1347,6 +1397,16 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -1469,493 +1529,1013 @@ dependencies = [ ] [[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +name = "cumulus-client-cli" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle", - "zeroize", + "clap 4.4.0", + "parity-scale-codec", + "sc-chain-spec", + "sc-cli", + "sc-service", + "sp-core", + "sp-runtime", + "url", ] [[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +name = "cumulus-client-collator" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", + "cumulus-client-consensus-common", + "cumulus-client-network", + "cumulus-primitives-core", + "futures 0.3.28", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sc-client-api", + "sp-api", + "sp-consensus", + "sp-core", + "sp-runtime", + "tracing", ] [[package]] -name = "curve25519-dalek" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +name = "cumulus-client-consensus-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "platforms 3.0.2", - "rustc_version", - "subtle", - "zeroize", + "async-trait", + "cumulus-client-collator", + "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "futures 0.3.28", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-overseer", + "polkadot-primitives", + "sc-client-api", + "sc-consensus", + "sc-consensus-aura", + "sc-consensus-slots", + "sc-telemetry", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-timestamp", + "substrate-prometheus-endpoint", + "tracing", ] [[package]] -name = "curve25519-dalek-derive" +name = "cumulus-client-consensus-common" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", + "async-trait", + "cumulus-client-pov-recovery", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "dyn-clone", + "futures 0.3.28", + "log", + "parity-scale-codec", + "polkadot-primitives", + "sc-client-api", + "sc-consensus", + "schnellru", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-trie", + "substrate-prometheus-endpoint", + "tracing", ] [[package]] -name = "cxx" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28403c86fc49e3401fdf45499ba37fad6493d9329449d6449d7f0e10f4654d28" +name = "cumulus-client-consensus-proposer" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", + "anyhow", + "async-trait", + "cumulus-primitives-parachain-inherent", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "thiserror", ] [[package]] -name = "cxx-build" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78da94fef01786dc3e0c76eafcd187abcaa9972c78e05ff4041e24fdf059c285" +name = "cumulus-client-network" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.29", + "async-trait", + "cumulus-relay-chain-interface", + "futures 0.3.28", + "futures-timer", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-primitives", + "polkadot-parachain", + "polkadot-primitives", + "sc-client-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", + "tracing", ] [[package]] -name = "cxxbridge-flags" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a6f5e1dfb4b34292ad4ea1facbfdaa1824705b231610087b00b17008641809" +name = "cumulus-client-pov-recovery" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures 0.3.28", + "futures-timer", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "rand 0.8.5", + "sc-client-api", + "sc-consensus", + "sp-consensus", + "sp-maybe-compressed-blob", + "sp-runtime", + "tracing", +] [[package]] -name = "cxxbridge-macro" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", +name = "cumulus-client-service" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +dependencies = [ + "cumulus-client-cli", + "cumulus-client-collator", + "cumulus-client-consensus-common", + "cumulus-client-network", + "cumulus-client-pov-recovery", + "cumulus-primitives-core", + "cumulus-relay-chain-inprocess-interface", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", + "futures 0.3.28", + "polkadot-primitives", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-sync", + "sc-network-transactions", + "sc-rpc", + "sc-service", + "sc-sysinfo", + "sc-telemetry", + "sc-transaction-pool", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-transaction-pool", ] [[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +name = "cumulus-pallet-aura-ext" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", + "frame-support", + "frame-system", + "pallet-aura", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-aura", + "sp-runtime", + "sp-std", ] [[package]] -name = "darling" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +name = "cumulus-pallet-dmp-queue" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", ] [[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +name = "cumulus-pallet-parachain-system" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "bytes", + "cumulus-pallet-parachain-system-proc-macro", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "environmental", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "polkadot-parachain", + "scale-info", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", + "xcm", ] [[package]] -name = "darling_core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +name = "cumulus-pallet-parachain-system-proc-macro" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "fnv", - "ident_case", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "strsim 0.10.0", "syn 2.0.29", ] [[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +name = "cumulus-pallet-session-benchmarking" +version = "3.0.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", + "parity-scale-codec", + "sp-runtime", + "sp-std", ] [[package]] -name = "darling_macro" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +name = "cumulus-pallet-xcm" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "darling_core 0.20.3", - "quote", - "syn 2.0.29", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", ] [[package]] -name = "data-encoding" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" - -[[package]] -name = "data-encoding-macro" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +name = "cumulus-pallet-xcmp-queue" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "data-encoding", - "data-encoding-macro-internal", + "cumulus-primitives-core", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "polkadot-runtime-common", + "rand_chacha 0.3.1", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", + "xcm-executor", ] [[package]] -name = "data-encoding-macro-internal" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +name = "cumulus-primitives-core" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "data-encoding", - "syn 1.0.109", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain", + "polkadot-primitives", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", + "sp-trie", + "xcm", ] [[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +name = "cumulus-primitives-parachain-inherent" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "cumulus-test-relay-sproof-builder", + "parity-scale-codec", + "sc-client-api", + "scale-info", + "sp-api", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-storage", + "sp-trie", + "tracing", ] [[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +name = "cumulus-primitives-timestamp" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "const-oid", - "zeroize", + "cumulus-primitives-core", + "futures 0.3.28", + "parity-scale-codec", + "sp-inherents", + "sp-std", + "sp-timestamp", ] [[package]] -name = "der-parser" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +name = "cumulus-primitives-utility" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", + "cumulus-primitives-core", + "frame-support", + "log", + "parity-scale-codec", + "polkadot-runtime-common", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", + "xcm-builder", + "xcm-executor", ] [[package]] -name = "der-parser" -version = "8.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +name = "cumulus-relay-chain-inprocess-interface" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "asn1-rs 0.5.2", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures 0.3.28", + "futures-timer", + "polkadot-cli", + "polkadot-client", + "polkadot-service", + "sc-cli", + "sc-client-api", + "sc-sysinfo", + "sc-telemetry", + "sc-tracing", + "sp-api", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", ] [[package]] -name = "deranged" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +name = "cumulus-relay-chain-interface" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "serde", + "async-trait", + "cumulus-primitives-core", + "futures 0.3.28", + "jsonrpsee-core", + "parity-scale-codec", + "polkadot-overseer", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-state-machine", + "thiserror", ] [[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +name = "cumulus-relay-chain-minimal-node" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "array-bytes 6.1.0", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-rpc-interface", + "futures 0.3.28", + "lru 0.9.0", + "polkadot-availability-recovery", + "polkadot-collator-protocol", + "polkadot-core-primitives", + "polkadot-network-bridge", + "polkadot-node-collation-generation", + "polkadot-node-core-runtime-api", + "polkadot-node-network-protocol", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "sc-authority-discovery", + "sc-client-api", + "sc-network", + "sc-network-common", + "sc-service", + "sc-tracing", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-runtime", + "tokio", + "tracing", ] [[package]] -name = "derive-syn-parse" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" +name = "cumulus-relay-chain-rpc-interface" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures 0.3.28", + "futures-timer", + "jsonrpsee", + "lru 0.9.0", + "parity-scale-codec", + "polkadot-overseer", + "sc-client-api", + "sc-rpc-api", + "sc-service", + "serde", + "serde_json", + "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-core", + "sp-state-machine", + "sp-storage", + "tokio", + "tracing", + "url", ] [[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +name = "cumulus-test-relay-sproof-builder" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "derive_builder_macro", + "cumulus-primitives-core", + "parity-scale-codec", + "polkadot-primitives", + "sp-runtime", + "sp-state-machine", + "sp-std", ] [[package]] -name = "derive_builder_core" -version = "0.11.2" +name = "curve25519-dalek" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" dependencies = [ - "darling 0.14.4", - "proc-macro2", - "quote", - "syn 1.0.109", + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle", + "zeroize", ] [[package]] -name = "derive_builder_macro" -version = "0.11.2" +name = "curve25519-dalek" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ - "derive_builder_core", - "syn 1.0.109", + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "curve25519-dalek" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms 3.0.2", + "rustc_version", + "subtle", + "zeroize", ] [[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "difflib" -version = "0.4.0" +name = "curve25519-dalek-derive" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" +checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] [[package]] -name = "digest" -version = "0.8.1" +name = "cxx" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "28403c86fc49e3401fdf45499ba37fad6493d9329449d6449d7f0e10f4654d28" dependencies = [ - "generic-array 0.12.4", + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", ] [[package]] -name = "digest" -version = "0.9.0" +name = "cxx-build" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "78da94fef01786dc3e0c76eafcd187abcaa9972c78e05ff4041e24fdf059c285" dependencies = [ - "generic-array 0.14.7", + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn 2.0.29", ] [[package]] -name = "digest" -version = "0.10.7" +name = "cxxbridge-flags" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", -] +checksum = "e2a6f5e1dfb4b34292ad4ea1facbfdaa1824705b231610087b00b17008641809" [[package]] -name = "directories" -version = "4.0.1" +name = "cxxbridge-macro" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ - "dirs-sys", + "proc-macro2", + "quote", + "syn 2.0.29", ] [[package]] -name = "directories-next" -version = "2.0.0" +name = "darling" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "cfg-if", - "dirs-sys-next", + "darling_core 0.14.4", + "darling_macro 0.14.4", ] [[package]] -name = "dirs-sys" -version = "0.3.7" +name = "darling" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "libc", - "redox_users", - "winapi", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "darling_core" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ - "libc", - "redox_users", - "winapi", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", ] [[package]] -name = "displaydoc" -version = "0.2.4" +name = "darling_core" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ + "fnv", + "ident_case", "proc-macro2", "quote", + "strsim 0.10.0", "syn 2.0.29", ] [[package]] -name = "downcast" -version = "0.11.0" +name = "darling_macro" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] [[package]] -name = "downcast-rs" -version = "1.2.0" +name = "darling_macro" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core 0.20.3", + "quote", + "syn 2.0.29", +] [[package]] -name = "dtoa" -version = "1.0.9" +name = "data-encoding" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] -name = "dyn-clonable" -version = "0.9.0" +name = "data-encoding-macro" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" dependencies = [ - "dyn-clonable-impl", - "dyn-clone", + "data-encoding", + "data-encoding-macro-internal", ] [[package]] -name = "dyn-clonable-impl" -version = "0.9.0" +name = "data-encoding-macro-internal" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" dependencies = [ - "proc-macro2", - "quote", + "data-encoding", "syn 1.0.109", ] [[package]] -name = "dyn-clone" -version = "1.0.13" +name = "der" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] [[package]] -name = "ecdsa" -version = "0.14.8" +name = "der" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", + "const-oid", + "zeroize", ] [[package]] -name = "ecdsa" -version = "0.16.8" +name = "der-parser" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" dependencies = [ - "der 0.7.8", - "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "asn1-rs 0.3.1", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", ] [[package]] -name = "ed25519" -version = "1.5.3" +name = "der-parser" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "signature 1.6.4", + "asn1-rs 0.5.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +dependencies = [ + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive-syn-parse" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "directories" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "directories-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "dyn-clone" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" + +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +dependencies = [ + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.5", + "rfc6979 0.4.0", + "signature 2.1.0", + "spki 0.7.2", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature 1.6.4", ] [[package]] @@ -2094,15 +2674,39 @@ dependencies = [ ] [[package]] -name = "env_logger" -version = "0.10.0" +name = "enumn" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "env_logger" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", "termcolor", ] @@ -2154,6 +2758,30 @@ dependencies = [ "futures 0.3.28", ] +[[package]] +name = "expander" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a718c0675c555c5f976fff4ea9e2c150fa06cefa201cadef87cfbf9324075881" +dependencies = [ + "blake3", + "fs-err", + "proc-macro2", + "quote", +] + +[[package]] +name = "expander" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3774182a5df13c3d1690311ad32fbe913feef26baba609fa2dd5f72042bd2ab6" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", +] + [[package]] name = "expander" version = "1.0.0" @@ -2167,6 +2795,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "expander" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -2194,6 +2835,31 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +[[package]] +name = "fatality" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad875162843b0d046276327afe0136e9ed3a23d5a754210fb6f1f33610d39ab" +dependencies = [ + "fatality-proc-macro", + "thiserror", +] + +[[package]] +name = "fatality-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" +dependencies = [ + "expander 0.0.4", + "indexmap 1.9.3", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "thiserror", +] + [[package]] name = "fdlimit" version = "0.2.1" @@ -2235,7 +2901,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger", + "env_logger 0.10.0", "log", ] @@ -2374,7 +3040,7 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "itertools", + "itertools 0.10.5", "lazy_static", "linked-hash-map", "log", @@ -2411,7 +3077,7 @@ name = "frame-election-provider-solution-type" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.29", @@ -2527,7 +3193,7 @@ dependencies = [ "cfg-expr", "derive-syn-parse", "frame-support-procedural-tools", - "itertools", + "itertools 0.10.5", "proc-macro-warning", "proc-macro2", "quote", @@ -2540,7 +3206,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.29", @@ -3353,6 +4019,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "integer-encoding" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" + [[package]] name = "integer-sqrt" version = "0.1.5" @@ -3436,6 +4108,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -3550,7 +4231,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck 0.4.1", - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -3626,6 +4307,119 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "kusama-runtime" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal 0.4.1", + "kusama-runtime-constants", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-multisig", + "pallet-nis", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-ranked-collective", + "pallet-recovery", + "pallet-referenda", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-society", + "pallet-staking", + "pallet-staking-runtime-api", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-transaction-pool", + "sp-version", + "static_assertions", + "substrate-wasm-builder", + "xcm", + "xcm-builder", + "xcm-executor", +] + +[[package]] +name = "kusama-runtime-constants" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", +] + [[package]] name = "kvdb" version = "0.13.0" @@ -4304,6 +5098,15 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "lru" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +dependencies = [ + "hashbrown 0.13.2", +] + [[package]] name = "lru" version = "0.10.1" @@ -4475,6 +5278,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "mick-jaeger" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" +dependencies = [ + "futures 0.3.28", + "rand 0.8.5", + "thrift", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -4501,6 +5315,41 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mmr-gadget" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "futures 0.3.28", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-offchain", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-beefy", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", +] + +[[package]] +name = "mmr-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "anyhow", + "jsonrpsee", + "parity-scale-codec", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", +] + [[package]] name = "mockall" version = "0.11.4" @@ -4590,11 +5439,11 @@ dependencies = [ [[package]] name = "multihash-derive" -version = "0.8.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" +checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -4658,6 +5507,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" + [[package]] name = "netlink-packet-core" version = "0.4.2" @@ -4978,6 +5833,38 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "orchestra" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" +dependencies = [ + "async-trait", + "dyn-clonable", + "futures 0.3.28", + "futures-timer", + "orchestra-proc-macro", + "pin-project", + "prioritized-metered-channel", + "thiserror", + "tracing", +] + +[[package]] +name = "orchestra-proc-macro" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066" +dependencies = [ + "expander 0.0.6", + "itertools 0.10.5", + "petgraph", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "orderbook-primitives" version = "1.1.0" @@ -5003,13 +5890,55 @@ dependencies = [ ] [[package]] -name = "orml-vesting" +name = "ordered-float" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" +dependencies = [ + "num-traits", +] + +[[package]] +name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/Polkadex-Substrate/open-runtime-module-library.git?branch=polkadot-v0.9.43#30b1ec3d11d61380cd457fb30f93bedce6a45f9b" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=28a2e6f#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" dependencies = [ "frame-support", - "frame-system", - "parity-scale-codec", + "impl-trait-for-tuples", + "num-traits", + "orml-utilities", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", +] + +[[package]] +name = "orml-utilities" +version = "0.4.1-dev" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=28a2e6f#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +dependencies = [ + "frame-support", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "orml-vesting" +version = "0.4.1-dev" +source = "git+https://github.com/Polkadex-Substrate/open-runtime-module-library.git?branch=polkadot-v0.9.43#30b1ec3d11d61380cd457fb30f93bedce6a45f9b" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", "scale-info", "serde", "sp-io", @@ -5017,6 +5946,41 @@ dependencies = [ "sp-std", ] +[[package]] +name = "orml-xcm-support" +version = "0.4.1-dev" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=28a2e6f#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +dependencies = [ + "frame-support", + "orml-traits", + "parity-scale-codec", + "sp-runtime", + "sp-std", + "xcm", + "xcm-executor", +] + +[[package]] +name = "orml-xtokens" +version = "0.4.1-dev" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=28a2e6f#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "frame-system", + "orml-traits", + "orml-xcm-support", + "pallet-xcm", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", + "xcm-executor", +] + [[package]] name = "p256" version = "0.11.1" @@ -5054,6 +6018,22 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-aura" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-support", + "frame-system", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-aura", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" @@ -5108,6 +6088,26 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-bags-list" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", +] + [[package]] name = "pallet-balances" version = "4.0.0-dev" @@ -5203,6 +6203,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-collator-selection" +version = "3.0.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-collective" version = "4.0.0-dev" @@ -5220,6 +6239,23 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-democracy" version = "4.0.0-dev" @@ -5292,6 +6328,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-fast-unstake" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-grandpa" version = "4.0.0-dev" @@ -5385,6 +6439,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" @@ -5418,6 +6491,70 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-nis" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-nomination-pools" +version = "1.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-nomination-pools-benchmarking" +version = "1.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "pallet-bags-list", + "pallet-nomination-pools", + "pallet-staking", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-runtime-interface", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-nomination-pools-runtime-api" +version = "1.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "pallet-nomination-pools", + "parity-scale-codec", + "sp-api", + "sp-std", +] + [[package]] name = "pallet-ocex-lmp" version = "5.3.0" @@ -5505,6 +6642,30 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-offences-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-babe", + "pallet-balances", + "pallet-grandpa", + "pallet-im-online", + "pallet-offences", + "pallet-session", + "pallet-staking", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-preimage" version = "4.0.0-dev" @@ -5538,45 +6699,82 @@ dependencies = [ ] [[package]] -name = "pallet-recovery" +name = "pallet-ranked-collective" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", + "sp-core", "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-rewards" -version = "1.1.0" +name = "pallet-recovery" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "pallet-assets", - "pallet-balances", - "pallet-timestamp", "parity-scale-codec", - "polkadex-primitives", "scale-info", - "sp-core", "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-rewards-rpc" -version = "0.1.0" +name = "pallet-referenda" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ - "jsonrpsee", - "pallet-rewards-runtime-api", + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-rewards" +version = "1.1.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-assets", + "pallet-balances", + "pallet-timestamp", + "parity-scale-codec", + "polkadex-primitives", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-rewards-rpc" +version = "0.1.0" +dependencies = [ + "jsonrpsee", + "pallet-rewards-runtime-api", "parity-scale-codec", "polkadex-primitives", "serde", @@ -5652,6 +6850,36 @@ dependencies = [ "sp-trie", ] +[[package]] +name = "pallet-session-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-session", + "pallet-staking", + "rand 0.8.5", + "sp-runtime", + "sp-session", + "sp-std", +] + +[[package]] +name = "pallet-society" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "rand_chacha 0.2.2", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-staking" version = "4.0.0-dev" @@ -5665,6 +6893,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", + "rand_chacha 0.2.2", "scale-info", "serde", "sp-application-crypto", @@ -5679,12 +6908,47 @@ name = "pallet-staking-reward-curve" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.29", ] +[[package]] +name = "pallet-staking-reward-fn" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "log", + "sp-arithmetic", +] + +[[package]] +name = "pallet-staking-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "parity-scale-codec", + "sp-api", +] + +[[package]] +name = "pallet-state-trie-migration" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-sudo" version = "4.0.0-dev" @@ -5718,6 +6982,25 @@ dependencies = [ "sp-timestamp", ] +[[package]] +name = "pallet-tips" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" @@ -5796,116 +7079,327 @@ dependencies = [ ] [[package]] -name = "parity-db" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +name = "pallet-vesting" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ - "blake2", - "crc32fast", - "fs2", - "hex", - "libc", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "lz4", - "memmap2", - "parking_lot 0.12.1", - "rand 0.8.5", - "siphasher", - "snap", -] - -[[package]] -name = "parity-scale-codec" -version = "3.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" -dependencies = [ - "arrayvec 0.7.4", - "bitvec", - "byte-slice-cast", - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", ] [[package]] -name = "parity-scale-codec-derive" -version = "3.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +name = "pallet-whitelist" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", ] [[package]] -name = "parity-send-wrapper" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" - -[[package]] -name = "parity-wasm" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" - -[[package]] -name = "parking" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +name = "pallet-xcm" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", + "bounded-collections", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", + "xcm-executor", ] [[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +name = "pallet-xcm-benchmarks" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ - "lock_api", - "parking_lot_core 0.9.8", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", + "xcm-builder", + "xcm-executor", ] [[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +name = "parachain-info" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", ] [[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +name = "parachain-polkadex-node" +version = "1.0.0" dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "smallvec", - "windows-targets 0.48.5", + "clap 4.4.0", + "cumulus-client-cli", + "cumulus-client-consensus-aura", + "cumulus-client-consensus-common", + "cumulus-client-network", + "cumulus-client-service", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-inprocess-interface", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", + "cumulus-relay-chain-rpc-interface", + "frame-benchmarking", + "frame-benchmarking-cli", + "hex-literal 0.3.4", + "jsonrpsee", + "log", + "pallet-transaction-payment-rpc", + "parachain-polkadex-runtime", + "parity-scale-codec", + "polkadot-cli", + "polkadot-primitives", + "polkadot-service", + "sc-basic-authorship", + "sc-chain-spec", + "sc-cli", + "sc-client-api", + "sc-consensus", + "sc-executor", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-rpc", + "sc-service", + "sc-sysinfo", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus-aura", + "sp-core", + "sp-io", + "sp-keystore", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-timestamp", + "sp-transaction-pool", + "substrate-build-script-utils 3.0.0", + "substrate-frame-rpc-system", + "substrate-prometheus-endpoint", + "try-runtime-cli", + "xcm", +] + +[[package]] +name = "parachain-polkadex-runtime" +version = "1.0.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-timestamp", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal 0.3.4", + "log", + "orml-traits", + "orml-xcm-support", + "orml-xtokens", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-bags-list", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-xcm", + "parachain-info", + "parity-scale-codec", + "polkadex-primitives", + "polkadot-parachain", + "polkadot-runtime-common", + "scale-info", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder", + "thea", + "thea-council", + "thea-message-handler", + "thea-primitives", + "xcm", + "xcm-builder", + "xcm-executor", + "xcm-helper", +] + +[[package]] +name = "parity-db" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +dependencies = [ + "blake2", + "crc32fast", + "fs2", + "hex", + "libc", + "log", + "lz4", + "memmap2", + "parking_lot 0.12.1", + "rand 0.8.5", + "siphasher", + "snap", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" +dependencies = [ + "arrayvec 0.7.4", + "bitvec", + "byte-slice-cast", + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parity-send-wrapper" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" + +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + +[[package]] +name = "parking" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.8", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "smallvec", + "windows-targets 0.48.5", ] [[package]] @@ -6134,7 +7628,7 @@ dependencies = [ "frame-try-runtime", "futures 0.3.28", "hex-literal 0.4.1", - "itertools", + "itertools 0.10.5", "jsonrpsee", "node-polkadex-runtime", "pallet-im-online", @@ -6150,72 +7644,1244 @@ dependencies = [ "sc-authority-discovery", "sc-basic-authorship", "sc-chain-spec", - "sc-cli", + "sc-cli", + "sc-client-api", + "sc-consensus", + "sc-consensus-babe", + "sc-consensus-babe-rpc", + "sc-consensus-epochs", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", + "sc-consensus-slots", + "sc-executor", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-rpc", + "sc-rpc-api", + "sc-service", + "sc-service-test", + "sc-storage-monitor", + "sc-sync-state-rpc", + "sc-sysinfo", + "sc-telemetry", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-grandpa", + "sp-core", + "sp-inherents", + "sp-keyring", + "sp-keystore", + "sp-runtime", + "sp-timestamp", + "sp-tracing", + "sp-transaction-storage-proof", + "structopt", + "substrate-build-script-utils 5.0.0", + "substrate-frame-rpc-system", + "tempfile", + "thea", + "try-runtime-cli", +] + +[[package]] +name = "polkadex-primitives" +version = "1.1.0" +dependencies = [ + "anyhow", + "frame-support", + "frame-system", + "parity-scale-codec", + "pretty_assertions", + "primitive-types", + "rust_decimal", + "scale-info", + "serde", + "serde_json", + "sp-application-crypto", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "polkadot-approval-distribution" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "polkadot-node-jaeger", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-primitives", + "rand 0.8.5", + "tracing-gum", +] + +[[package]] +name = "polkadot-availability-bitfield-distribution" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "polkadot-node-network-protocol", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand 0.8.5", + "tracing-gum", +] + +[[package]] +name = "polkadot-availability-distribution" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "derive_more", + "fatality", + "futures 0.3.28", + "lru 0.9.0", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand 0.8.5", + "sp-core", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-availability-recovery" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "fatality", + "futures 0.3.28", + "lru 0.9.0", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand 0.8.5", + "sc-network", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-cli" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "clap 4.4.0", + "frame-benchmarking-cli", + "futures 0.3.28", + "log", + "polkadot-client", + "polkadot-node-core-pvf-worker", + "polkadot-node-metrics", + "polkadot-performance-test", + "polkadot-service", + "sc-cli", + "sc-executor", + "sc-service", + "sc-storage-monitor", + "sc-sysinfo", + "sc-tracing", + "sp-core", + "sp-io", + "sp-keyring", + "sp-maybe-compressed-blob", + "substrate-build-script-utils 3.0.0", + "thiserror", + "try-runtime-cli", +] + +[[package]] +name = "polkadot-client" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "async-trait", + "frame-benchmarking", + "frame-benchmarking-cli", + "frame-system", + "frame-system-rpc-runtime-api", + "futures 0.3.28", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "polkadot-core-primitives", + "polkadot-node-core-parachains-inherent", + "polkadot-primitives", + "polkadot-runtime", + "polkadot-runtime-common", + "sc-client-api", + "sc-consensus", + "sc-executor", + "sc-service", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", + "sp-inherents", + "sp-keyring", + "sp-mmr-primitives", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-storage", + "sp-timestamp", + "sp-transaction-pool", +] + +[[package]] +name = "polkadot-collator-protocol" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "always-assert", + "bitvec", + "fatality", + "futures 0.3.28", + "futures-timer", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-core", + "sp-keystore", + "sp-runtime", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-core-primitives" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "polkadot-dispute-distribution" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "derive_more", + "fatality", + "futures 0.3.28", + "futures-timer", + "indexmap 1.9.3", + "lru 0.9.0", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sc-network", + "sp-application-crypto", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-erasure-coding" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-primitives", + "reed-solomon-novelpoly", + "sp-core", + "sp-trie", + "thiserror", +] + +[[package]] +name = "polkadot-gossip-support" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "futures-timer", + "polkadot-node-network-protocol", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand 0.8.5", + "rand_chacha 0.3.1", + "sc-network", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "tracing-gum", +] + +[[package]] +name = "polkadot-network-bridge" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "always-assert", + "async-trait", + "bytes", + "fatality", + "futures 0.3.28", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sc-network", + "sp-consensus", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-collation-generation" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-core", + "sp-maybe-compressed-blob", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-approval-voting" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "derive_more", + "futures 0.3.28", + "futures-timer", + "kvdb", + "lru 0.9.0", + "merlin", + "parity-scale-codec", + "polkadot-node-jaeger", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "sc-keystore", + "schnorrkel", + "sp-application-crypto", + "sp-consensus", + "sp-consensus-slots", + "sp-runtime", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-av-store" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "futures 0.3.28", + "futures-timer", + "kvdb", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "sp-consensus", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-backing" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "fatality", + "futures 0.3.28", + "polkadot-erasure-coding", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "polkadot-statement-table", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-bitfield-signing" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-keystore", + "thiserror", + "tracing-gum", + "wasm-timer", +] + +[[package]] +name = "polkadot-node-core-candidate-validation" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "async-trait", + "futures 0.3.28", + "futures-timer", + "parity-scale-codec", + "polkadot-node-core-pvf", + "polkadot-node-metrics", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-parachain", + "polkadot-primitives", + "sp-maybe-compressed-blob", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-chain-api" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "polkadot-node-metrics", + "polkadot-node-subsystem", + "polkadot-primitives", + "sc-client-api", + "sc-consensus-babe", + "sp-blockchain", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-chain-selection" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "futures-timer", + "kvdb", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-dispute-coordinator" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "fatality", + "futures 0.3.28", + "kvdb", + "lru 0.9.0", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sc-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-parachains-inherent" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "async-trait", + "futures 0.3.28", + "futures-timer", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sp-blockchain", + "sp-inherents", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-provisioner" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "fatality", + "futures 0.3.28", + "futures-timer", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "rand 0.8.5", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "always-assert", + "futures 0.3.28", + "futures-timer", + "libc", + "parity-scale-codec", + "pin-project", + "polkadot-core-primitives", + "polkadot-node-metrics", + "polkadot-node-primitives", + "polkadot-parachain", + "polkadot-primitives", + "rand 0.8.5", + "slotmap", + "sp-core", + "sp-maybe-compressed-blob", + "sp-tracing", + "sp-wasm-interface", + "substrate-build-script-utils 3.0.0", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-checker" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-worker" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "assert_matches", + "cpu-time", + "futures 0.3.28", + "libc", + "parity-scale-codec", + "polkadot-node-core-pvf", + "polkadot-parachain", + "polkadot-primitives", + "rayon", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-core", + "sp-externalities", + "sp-io", + "sp-maybe-compressed-blob", + "sp-tracing", + "substrate-build-script-utils 3.0.0", + "tempfile", + "tikv-jemalloc-ctl", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-runtime-api" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "futures 0.3.28", + "lru 0.9.0", + "polkadot-node-metrics", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types", + "polkadot-primitives", + "sp-consensus-babe", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-jaeger" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "lazy_static", + "log", + "mick-jaeger", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-primitives", + "polkadot-primitives", + "sc-network", + "sp-core", + "thiserror", + "tokio", +] + +[[package]] +name = "polkadot-node-metrics" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bs58", + "futures 0.3.28", + "futures-timer", + "log", + "parity-scale-codec", + "polkadot-primitives", + "prioritized-metered-channel", + "sc-cli", + "sc-service", + "sc-tracing", + "substrate-prometheus-endpoint", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-network-protocol" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "async-channel", + "async-trait", + "derive_more", + "fatality", + "futures 0.3.28", + "hex", + "parity-scale-codec", + "polkadot-node-jaeger", + "polkadot-node-primitives", + "polkadot-primitives", + "rand 0.8.5", + "sc-authority-discovery", + "sc-network", + "strum", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-primitives" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bounded-vec", + "futures 0.3.28", + "parity-scale-codec", + "polkadot-parachain", + "polkadot-primitives", + "schnorrkel", + "serde", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-keystore", + "sp-maybe-compressed-blob", + "sp-runtime", + "thiserror", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "polkadot-node-subsystem" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "polkadot-node-jaeger", + "polkadot-node-subsystem-types", + "polkadot-overseer", +] + +[[package]] +name = "polkadot-node-subsystem-types" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "async-trait", + "derive_more", + "futures 0.3.28", + "orchestra", + "polkadot-node-jaeger", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-primitives", + "polkadot-statement-table", + "sc-network", + "smallvec", + "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "polkadot-node-subsystem-util" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "async-trait", + "derive_more", + "fatality", + "futures 0.3.28", + "futures-channel", + "itertools 0.10.5", + "kvdb", + "lru 0.9.0", + "parity-db", + "parity-scale-codec", + "parking_lot 0.11.2", + "pin-project", + "polkadot-node-jaeger", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "prioritized-metered-channel", + "rand 0.8.5", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-overseer" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "async-trait", + "futures 0.3.28", + "futures-timer", + "lru 0.9.0", + "orchestra", + "parking_lot 0.12.1", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem-types", + "polkadot-primitives", + "sc-client-api", + "sp-api", + "sp-core", + "tikv-jemalloc-ctl", + "tracing-gum", +] + +[[package]] +name = "polkadot-parachain" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bounded-collections", + "derive_more", + "frame-support", + "parity-scale-codec", + "polkadot-core-primitives", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "polkadot-performance-test" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "env_logger 0.9.3", + "kusama-runtime", + "log", + "polkadot-erasure-coding", + "polkadot-node-core-pvf-worker", + "polkadot-node-primitives", + "polkadot-primitives", + "quote", + "sc-executor-common", + "sp-maybe-compressed-blob", + "thiserror", +] + +[[package]] +name = "polkadot-primitives" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "hex-literal 0.4.1", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "polkadot-rpc" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "jsonrpsee", + "mmr-rpc", + "pallet-transaction-payment-rpc", + "polkadot-primitives", + "sc-chain-spec", + "sc-client-api", + "sc-consensus-babe", + "sc-consensus-babe-rpc", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", + "sc-consensus-epochs", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", + "sc-rpc", + "sc-sync-state-rpc", + "sc-transaction-pool-api", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-keystore", + "sp-runtime", + "substrate-frame-rpc-system", + "substrate-state-trie-migration-rpc", +] + +[[package]] +name = "polkadot-runtime" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal 0.4.1", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-multisig", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-referenda", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-staking-runtime-api", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-constants", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-transaction-pool", + "sp-version", + "static_assertions", + "substrate-wasm-builder", + "xcm", + "xcm-builder", + "xcm-executor", +] + +[[package]] +name = "polkadot-runtime-common" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "libsecp256k1", + "log", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-election-provider-multi-phase", + "pallet-fast-unstake", + "pallet-session", + "pallet-staking", + "pallet-staking-reward-fn", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-treasury", + "pallet-vesting", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "slot-range-helper", + "sp-api", + "sp-core", + "sp-inherents", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "static_assertions", + "xcm", +] + +[[package]] +name = "polkadot-runtime-constants" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "polkadot-runtime-metrics" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bs58", + "parity-scale-codec", + "polkadot-primitives", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "polkadot-runtime-parachains" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitflags 1.3.2", + "bitvec", + "derive_more", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-message-queue", + "pallet-session", + "pallet-staking", + "pallet-timestamp", + "pallet-vesting", + "parity-scale-codec", + "polkadot-parachain", + "polkadot-primitives", + "polkadot-runtime-metrics", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rustc-hex", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "static_assertions", + "xcm", + "xcm-executor", +] + +[[package]] +name = "polkadot-service" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "async-trait", + "frame-benchmarking-cli", + "frame-support", + "frame-system-rpc-runtime-api", + "futures 0.3.28", + "hex-literal 0.4.1", + "kusama-runtime", + "kvdb", + "kvdb-rocksdb", + "log", + "lru 0.9.0", + "mmr-gadget", + "pallet-babe", + "pallet-im-online", + "pallet-staking", + "pallet-transaction-payment-rpc-runtime-api", + "parity-db", + "polkadot-approval-distribution", + "polkadot-availability-bitfield-distribution", + "polkadot-availability-distribution", + "polkadot-availability-recovery", + "polkadot-client", + "polkadot-collator-protocol", + "polkadot-dispute-distribution", + "polkadot-gossip-support", + "polkadot-network-bridge", + "polkadot-node-collation-generation", + "polkadot-node-core-approval-voting", + "polkadot-node-core-av-store", + "polkadot-node-core-backing", + "polkadot-node-core-bitfield-signing", + "polkadot-node-core-candidate-validation", + "polkadot-node-core-chain-api", + "polkadot-node-core-chain-selection", + "polkadot-node-core-dispute-coordinator", + "polkadot-node-core-parachains-inherent", + "polkadot-node-core-provisioner", + "polkadot-node-core-pvf-checker", + "polkadot-node-core-runtime-api", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-parachain", + "polkadot-primitives", + "polkadot-rpc", + "polkadot-runtime", + "polkadot-runtime-constants", + "polkadot-runtime-parachains", + "polkadot-statement-distribution", + "rococo-runtime", + "sc-authority-discovery", + "sc-basic-authorship", + "sc-block-builder", + "sc-chain-spec", "sc-client-api", + "sc-client-db", "sc-consensus", "sc-consensus-babe", - "sc-consensus-babe-rpc", - "sc-consensus-epochs", + "sc-consensus-beefy", "sc-consensus-grandpa", - "sc-consensus-grandpa-rpc", "sc-consensus-slots", "sc-executor", "sc-keystore", "sc-network", "sc-network-common", "sc-network-sync", - "sc-rpc", - "sc-rpc-api", + "sc-offchain", "sc-service", - "sc-service-test", - "sc-storage-monitor", "sc-sync-state-rpc", "sc-sysinfo", "sc-telemetry", "sc-transaction-pool", - "sc-transaction-pool-api", "serde", + "serde_json", "sp-api", "sp-authority-discovery", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", "sp-inherents", - "sp-keyring", + "sp-io", "sp-keystore", + "sp-mmr-primitives", + "sp-offchain", "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-storage", "sp-timestamp", - "sp-tracing", - "sp-transaction-storage-proof", - "structopt", - "substrate-build-script-utils", - "substrate-frame-rpc-system", - "tempfile", - "thea", - "try-runtime-cli", + "sp-transaction-pool", + "sp-trie", + "substrate-prometheus-endpoint", + "thiserror", + "tracing-gum", + "westend-runtime", ] [[package]] -name = "polkadex-primitives" -version = "1.1.0" +name = "polkadot-statement-distribution" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ - "anyhow", - "frame-support", - "frame-system", + "arrayvec 0.5.2", + "fatality", + "futures 0.3.28", + "indexmap 1.9.3", "parity-scale-codec", - "pretty_assertions", - "primitive-types", - "rust_decimal", - "scale-info", - "serde", - "serde_json", - "sp-application-crypto", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-keystore", + "sp-staking", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-statement-table" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "parity-scale-codec", + "polkadot-primitives", "sp-core", - "sp-runtime", - "sp-std", ] [[package]] @@ -6289,7 +8955,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -6354,6 +9020,22 @@ dependencies = [ "uint", ] +[[package]] +name = "prioritized-metered-channel" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" +dependencies = [ + "coarsetime", + "crossbeam-queue", + "derive_more", + "futures 0.3.28", + "futures-timer", + "nanorand", + "thiserror", + "tracing", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -6365,12 +9047,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.3" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ - "thiserror", - "toml 0.5.11", + "once_cell", + "toml_edit", ] [[package]] @@ -6472,7 +9154,7 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck 0.4.1", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", @@ -6493,7 +9175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -6771,6 +9453,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "reed-solomon-novelpoly" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0b8e056bbbda75b717e53c87f349936ef234bb84a8f665360ca4b3552a79e9" +dependencies = [ + "derive_more", + "fs-err", + "itertools 0.11.0", + "static_init", + "thiserror", +] + [[package]] name = "ref-cast" version = "1.0.20" @@ -6940,6 +9635,107 @@ dependencies = [ "librocksdb-sys", ] +[[package]] +name = "rococo-runtime" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "binary-merkle-tree", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal 0.4.1", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-democracy", + "pallet-elections-phragmen", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nis", + "pallet-offences", + "pallet-preimage", + "pallet-proxy", + "pallet-recovery", + "pallet-scheduler", + "pallet-session", + "pallet-society", + "pallet-staking", + "pallet-state-trie-migration", + "pallet-sudo", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-parachain", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rococo-runtime-constants", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-transaction-pool", + "sp-version", + "static_assertions", + "substrate-wasm-builder", + "xcm", + "xcm-builder", + "xcm-executor", +] + +[[package]] +name = "rococo-runtime-constants" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", +] + [[package]] name = "rpassword" version = "7.2.0" @@ -7346,7 +10142,7 @@ name = "sc-chain-spec-derive" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.29", @@ -7470,6 +10266,35 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "async-trait", + "futures 0.3.28", + "log", + "parity-scale-codec", + "sc-block-builder", + "sc-client-api", + "sc-consensus", + "sc-consensus-slots", + "sc-telemetry", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" @@ -7507,23 +10332,78 @@ dependencies = [ ] [[package]] -name = "sc-consensus-babe-rpc" -version = "0.10.0-dev" +name = "sc-consensus-babe-rpc" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "futures 0.3.28", + "jsonrpsee", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-rpc-api", + "serde", + "sp-api", + "sp-application-crypto", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-keystore", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "sc-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "array-bytes 4.2.0", + "async-channel", + "async-trait", + "fnv", + "futures 0.3.28", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-consensus", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-network-sync", + "sc-utils", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-beefy", + "sp-core", + "sp-keystore", + "sp-mmr-primitives", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", + "wasm-timer", +] + +[[package]] +name = "sc-consensus-beefy-rpc" +version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures 0.3.28", "jsonrpsee", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-rpc-api", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-consensus-beefy", + "sc-rpc", "serde", - "sp-api", - "sp-application-crypto", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", - "sp-keystore", "sp-runtime", "thiserror", ] @@ -8268,7 +11148,7 @@ name = "sc-tracing-proc-macro" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.29", @@ -8350,7 +11230,7 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -8768,6 +11648,27 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" +[[package]] +name = "slot-range-helper" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "enumn", + "parity-scale-codec", + "paste", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "slotmap" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.11.0" @@ -8861,8 +11762,8 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e dependencies = [ "Inflector", "blake2", - "expander", - "proc-macro-crate 1.1.3", + "expander 1.0.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.29", @@ -9334,7 +12235,7 @@ version = "6.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "Inflector", - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.29", @@ -9737,6 +12638,14 @@ dependencies = [ "zeroize", ] +[[package]] +name = "substrate-build-script-utils" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "platforms 2.0.0", +] + [[package]] name = "substrate-build-script-utils" version = "5.0.0" @@ -9790,6 +12699,25 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "substrate-state-trie-migration-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-rpc-api", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-trie", + "trie-db", +] + [[package]] name = "substrate-test-client" version = "2.0.1" @@ -10024,7 +12952,7 @@ dependencies = [ name = "thea" version = "5.3.0" dependencies = [ - "env_logger", + "env_logger 0.10.0", "frame-benchmarking", "frame-support", "frame-system", @@ -10048,6 +12976,34 @@ dependencies = [ "thea-primitives", ] +[[package]] +name = "thea-council" +version = "0.1.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "orml-traits", + "orml-xtokens", + "pallet-assets", + "pallet-balances", + "pallet-xcm", + "parachain-info", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "thea", + "thea-message-handler", + "thea-primitives", + "xcm", + "xcm-builder", + "xcm-executor", + "xcm-helper", +] + [[package]] name = "thea-executor" version = "5.3.0" @@ -10165,6 +13121,30 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "thrift" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e" +dependencies = [ + "byteorder", + "integer-encoding", + "log", + "ordered-float", + "threadpool", +] + +[[package]] +name = "tikv-jemalloc-ctl" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619bfed27d807b54f7f776b9430d4f8060e66ee138a28632ca898584d462c31c" +dependencies = [ + "libc", + "paste", + "tikv-jemalloc-sys", +] + [[package]] name = "tikv-jemalloc-sys" version = "0.5.4+5.3.0-patched" @@ -10475,6 +13455,29 @@ dependencies = [ "tracing", ] +[[package]] +name = "tracing-gum" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "polkadot-node-jaeger", + "polkadot-primitives", + "tracing", + "tracing-gum-proc-macro", +] + +[[package]] +name = "tracing-gum-proc-macro" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "expander 2.0.0", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "tracing-log" version = "0.1.3" @@ -11506,6 +14509,113 @@ dependencies = [ "winapi", ] +[[package]] +name = "westend-runtime" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal 0.4.1", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-collective", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-multisig", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-recovery", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-society", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-staking-runtime-api", + "pallet-state-trie-migration", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-parachain", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder", + "westend-runtime-constants", + "xcm", + "xcm-builder", + "xcm-executor", +] + +[[package]] +name = "westend-runtime-constants" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", +] + [[package]] name = "which" version = "4.4.0" @@ -11852,6 +14962,78 @@ dependencies = [ "xcm-procedural", ] +[[package]] +name = "xcm-builder" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment", + "parity-scale-codec", + "polkadot-parachain", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", + "xcm", + "xcm-executor", +] + +[[package]] +name = "xcm-executor" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +dependencies = [ + "environmental", + "frame-benchmarking", + "frame-support", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", + "xcm", +] + +[[package]] +name = "xcm-helper" +version = "0.1.0" +dependencies = [ + "cumulus-primitives-core", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex", + "orml-traits", + "orml-xtokens", + "pallet-assets", + "pallet-balances", + "pallet-xcm", + "parity-scale-codec", + "polkadex-primitives", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "thea", + "thea-message-handler", + "thea-primitives", + "xcm", + "xcm-builder", + "xcm-executor", +] + [[package]] name = "xcm-procedural" version = "0.9.43" diff --git a/Cargo.toml b/Cargo.toml index e85b72410..0632cf478 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,10 @@ panic = "unwind" resolver = "2" members = [ "client", - "node", - "runtime", + "nodes/polkadex-mainnet-node", + "nodes/polkadex-parachain-node", + "runtimes/polkadex-mainnet", + "runtimes/polkadex-parachain", "rpc/assets", "rpc/assets/runtime-api", "pallets/pdex-migration", @@ -41,14 +43,18 @@ members = [ "pallets/thea-message-handler", "pallets/rewards/rpc", "pallets/rewards/rpc/runtime-api", + "pallets/thea-council", + "pallets/xcm-helper", "misc/load-testing", "misc/crowdloan-verifier", ] default-members = [ "client", - "node", - "runtime", + "nodes/polkadex-mainnet-node", + "nodes/polkadex-parachain-node", + "runtimes/polkadex-mainnet", + "runtimes/polkadex-parachain", "pallets/pdex-migration", "pallets/pdex-migration", "pallets/ocex", @@ -72,6 +78,7 @@ smallvec = "1.6.1" jsonrpsee = "0.16.2" parking_lot = "0.12.1" tokio = "1.32.0" +hex-literal = { version = "0.3.4" } blake2-rfc = { version = "0.2.18", default-features = false } static_assertions = "1.1.0" parity-scale-codec = { version = "3.1.5", default-features = false } @@ -193,3 +200,26 @@ serde = { version = "1.0.171", default-features = false, features = ["derive"] } serde_json = { version = "1.0.102", default-features = false, features = ["alloc"] } hash-db = { version = "0.16.0", default-features = false } trie-db = { version = "0.27.1", default-features = false } + +#Parachain Dependencies +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", rev = "28a2e6f", default-features = false } #FIXME: Remove rev +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", rev = "28a2e6f", default-features = false } #FIXME: Remove rev +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } #FIXME: Remove rev +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +parachain-info = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false, version = "3.0.0" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", rev = "28a2e6f", default-features = false } #FIXME: Remove rev +pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +pallet-collator-selection = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } diff --git a/README.md b/README.md index 7a9eb1f0e..f86eddeee 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Note that cloning master might result in an unstable build. If you want a stable git clone https://github.com/Polkadex-Substrate/Polkadex.git cd Polkadex -# Build the node (The first build will be long (~30min)) +# Build the polkadex-mainnet-polkadex-parachain-node (The first build will be long (~30min)) cargo build --release ``` @@ -54,7 +54,7 @@ source $HOME/.cargo/env Then, you will want to run the node in dev mode using the following command: ```bash -./target/release/polkadex-node --dev +./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node --dev ``` > For people not familiar with Substrate, the --dev flag is a way to run a Substrate-based node in a single node developer configuration for testing purposes. You can learn more about `--dev` in [this Substrate tutorial](https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/interact). @@ -62,7 +62,7 @@ Then, you will want to run the node in dev mode using the following command: When running a node via the binary file, data is stored in a local directory typically located in ~/.local/shared/polkadex-node/chains/development/db. If you want to start a fresh instance of the node, you can either delete the content of the folder, or run the following command inside the polkadex folder: ```bash -./target/release/node-polkadex purge-chain --dev +./target/release/polkadex-mainnet-polkadex-parachain-node-polkadex purge-chain --dev ``` This will remove the data folder, note that all chain data is now lost. @@ -84,16 +84,16 @@ Alice_Node_Key=$(subkey generate --scheme Ed25519 --output-type Json | jq -r '.s ```bash # Purge any chain data from previous runs -./target/release/polkadex-node purge-chain --base-path /tmp/alice --chain local +./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node purge-chain --base-path /tmp/alice --chain local -# Start Alice's node -./target/release/polkadex-node --base-path /tmp/alice \ +# Start Alice's polkadex-mainnet-polkadex-parachain-node +./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node --base-path /tmp/alice \ --chain local \ --alice \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ - --node-key $Alice_Node_Key \ + --polkadex-mainnet-polkadex-parachain-node-key $Alice_Node_Key \ --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \ --validator ``` @@ -106,13 +106,13 @@ Alice_Node_Key=$(subkey generate --scheme Ed25519 --output-type Json | jq -r '.s 2021-06-30 08:12:38 🏷 Node name: Alice 2021-06-30 08:12:38 👤 Role: AUTHORITY 2021-06-30 08:12:38 💾 Database: RocksDb at /tmp/alice/chains/local_testnet/db -2021-06-30 08:12:38 ⛓ Native runtime: node-polkadex-265 (node-polkadex-1.tx2.au10) +2021-06-30 08:12:38 ⛓ Native polkadex-mainnet: polkadex-mainnet-polkadex-parachain-node-polkadex-265 (polkadex-mainnet-polkadex-parachain-node-polkadex-1.tx2.au10) 2021-06-30 08:12:39 🔨 Initializing Genesis block/state (state: 0xbe0a…5ef3, header-hash: 0xa55f…7888) 2021-06-30 08:12:39 👴 Loading GRANDPA authority set from genesis on what appears to be first startup. 2021-06-30 08:12:39 ⏱ Loaded block-time = 3s from genesis on first-launch 2021-06-30 08:12:39 👶 Creating empty BABE epoch changes on what appears to be first startup. 2021-06-30 08:12:39 Using default protocol ID "sup" because none is configured in the chain specs -2021-06-30 08:12:39 🏷 Local node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp +2021-06-30 08:12:39 🏷 Local polkadex-mainnet-polkadex-parachain-node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp 2021-06-30 08:12:39 📦 Highest known block at #0 2021-06-30 08:12:39 〽️ Prometheus server started at 127.0.0.1:9615 2021-06-30 08:12:39 Listening for new connections on 127.0.0.1:9945. @@ -126,8 +126,8 @@ Local node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp sho Now that Alice's node is up and running, Bob can join the network by bootstrapping from her node. ```bash -./target/release/polkadex-node purge-chain --base-path /tmp/bob --chain local -./target/release/polkadex-node \ +./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node purge-chain --base-path /tmp/bob --chain local +./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node \ --base-path /tmp/bob \ --chain local \ --bob \ @@ -149,18 +149,18 @@ If all is going well, after a few seconds, the nodes should peer together and st 2021-06-30 08:16:52 🏷 Node name: Bob 2021-06-30 08:16:52 👤 Role: AUTHORITY 2021-06-30 08:16:52 💾 Database: RocksDb at /tmp/bob/chains/local_testnet/db -2021-06-30 08:16:52 ⛓ Native runtime: node-polkadex-265 (node-polkadex-1.tx2.au10) +2021-06-30 08:16:52 ⛓ Native polkadex-mainnet: polkadex-mainnet-polkadex-parachain-node-polkadex-265 (polkadex-mainnet-polkadex-parachain-node-polkadex-1.tx2.au10) 2021-06-30 08:16:52 🔨 Initializing Genesis block/state (state: 0xbe0a…5ef3, header-hash: 0xa55f…7888) 2021-06-30 08:16:52 👴 Loading GRANDPA authority set from genesis on what appears to be first startup. 2021-06-30 08:16:52 ⏱ Loaded block-time = 3s from genesis on first-launch 2021-06-30 08:16:52 👶 Creating empty BABE epoch changes on what appears to be first startup. 2021-06-30 08:16:52 Using default protocol ID "sup" because none is configured in the chain specs -2021-06-30 08:16:52 🏷 Local node identity is: 12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 +2021-06-30 08:16:52 🏷 Local polkadex-mainnet-polkadex-parachain-node identity is: 12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 2021-06-30 08:16:53 📦 Highest known block at #0 2021-06-30 08:16:53 Listening for new connections on 127.0.0.1:9946. 2021-06-30 08:16:53 👶 Starting BABE Authorship worker -2021-06-30 08:16:53 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 -2021-06-30 08:16:53 🔍 Discovered new external address for our node: /ip4/192.168.1.37/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 +2021-06-30 08:16:53 🔍 Discovered new external address for our polkadex-mainnet-polkadex-parachain-node: /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 +2021-06-30 08:16:53 🔍 Discovered new external address for our polkadex-mainnet-polkadex-parachain-node: /ip4/192.168.1.37/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 2021-06-30 08:16:53 Creating inherent data providers took more time than we had left for the slot. 2021-06-30 08:16:54 🙌 Starting consensus session on top of parent 0xa55fa19cc37ca1f8d93bc06ca1f6fee767f18200516d9e349938601a3fe97888 2021-06-30 08:16:54 🎁 Prepared block for proposing at 1 [hash: 0x2959db5e42a7192434d3699d335e5d920da73409963e3081ad43afd93a8cdb4b; parent_hash: 0xa55f…7888; extrinsics (1): [0x4431…4eff]] @@ -180,7 +180,7 @@ If all is going well, after a few seconds, the nodes should peer together and st The following commands will setup a local polkadex network made of 2 nodes. It's using the node key (0000000000000000000000000000000000000000000000000000000000000001). But you should generate your own node key using the subkey as the above. ```bash -docker build . -t polkadex-node +docker build . -t polkadex-polkadex-mainnet-polkadex-parachain-node docker-compose -f 2nodes.yml up --force-recreate ``` diff --git a/client/Cargo.toml b/client/Cargo.toml index e2d98b3be..7f165b725 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -5,5 +5,5 @@ edition = "2021" [dependencies] sc-executor = { workspace = true } -node-polkadex-runtime = { path = "../runtime" } +node-polkadex-runtime = { path = "../runtimes/polkadex-mainnet" } frame-benchmarking = { workspace = true } diff --git a/dockerfile b/dockerfile index b8d62e8cf..77d3c0f4e 100644 --- a/dockerfile +++ b/dockerfile @@ -35,11 +35,11 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ FROM docker.io/library/ubuntu:20.04 COPY --from=builder /Polkadex/target/release/polkadex-node /usr/local/bin -RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-node polkadex-node && \ - mkdir -p /polkadex-node/.local/share && \ +RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-polkadex-mainnet-polkadex-parachain-node polkadex-polkadex-mainnet-polkadex-parachain-node && \ + mkdir -p /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share && \ mkdir /data && \ - chown -R polkadex-node:polkadex-node /data && \ - ln -s /data /polkadex-node/.local/share/polkadex-node && \ + chown -R polkadex-polkadex-mainnet-polkadex-parachain-node:polkadex-polkadex-mainnet-polkadex-parachain-node /data && \ + ln -s /data /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share/polkadex-polkadex-mainnet-polkadex-parachain-node && \ rm -rf /usr/bin /usr/sbin COPY --from=builder /Polkadex/extras/customSpecRaw.json /data diff --git a/node/Cargo.toml b/nodes/polkadex-mainnet-node/Cargo.toml similarity index 94% rename from node/Cargo.toml rename to nodes/polkadex-mainnet-node/Cargo.toml index 55a69856c..d4af361f6 100644 --- a/node/Cargo.toml +++ b/nodes/polkadex-mainnet-node/Cargo.toml @@ -26,14 +26,14 @@ clap = { version = "4.0.9", features = ["derive"] } itertools = "0.10.1" jsonrpsee = { version = "0.16.2", features = ["server"] } # local dependencies -node-polkadex-runtime = { path = "../runtime" } -rpc-assets = { path = "../rpc/assets" } -pallet-rewards-rpc = { path = "../pallets/rewards/rpc" } -pallet-ocex-rpc = { path = "../pallets/ocex/rpc" } -polkadex-client = { path = "../client" } +node-polkadex-runtime = { path = "../../runtimes/polkadex-mainnet" } +rpc-assets = { path = "../../rpc/assets" } +pallet-rewards-rpc = { path = "../../pallets/rewards/rpc" } +pallet-ocex-rpc = { path = "../../pallets/ocex/rpc" } +polkadex-client = { path = "../../client" } -thea = { path = "../pallets/thea" } -pallet-ocex-lmp = { path = "../pallets/ocex" } +thea = { path = "../../pallets/thea" } +pallet-ocex-lmp = { path = "../../pallets/ocex" } # Substrate dependencies frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } @@ -78,7 +78,7 @@ sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", bra sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } #Primitives -polkadex-primitives = { path = "../primitives/polkadex" } +polkadex-primitives = { path = "../../primitives/polkadex" } sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } diff --git a/node/build.rs b/nodes/polkadex-mainnet-node/build.rs similarity index 100% rename from node/build.rs rename to nodes/polkadex-mainnet-node/build.rs diff --git a/node/src/benchmarking.rs b/nodes/polkadex-mainnet-node/src/benchmarking.rs similarity index 100% rename from node/src/benchmarking.rs rename to nodes/polkadex-mainnet-node/src/benchmarking.rs diff --git a/node/src/chain_spec.rs b/nodes/polkadex-mainnet-node/src/chain_spec.rs similarity index 100% rename from node/src/chain_spec.rs rename to nodes/polkadex-mainnet-node/src/chain_spec.rs diff --git a/node/src/cli.rs b/nodes/polkadex-mainnet-node/src/cli.rs similarity index 92% rename from node/src/cli.rs rename to nodes/polkadex-mainnet-node/src/cli.rs index e59008807..91f957705 100644 --- a/node/src/cli.rs +++ b/nodes/polkadex-mainnet-node/src/cli.rs @@ -54,18 +54,19 @@ pub enum Subcommand { // /// The custom inspect subcommmand for decoding blocks and extrinsics. // #[clap( // name = "inspect", - // about = "Decode given block or extrinsic using current native runtime." + // about = "Decode given block or extrinsic using current native polkadex-mainnet." // )] // Inspect(node_inspect::cli::InspectCmd), - /// The custom benchmark subcommmand benchmarking runtime pallets. + /// The custom benchmark subcommmand benchmarking polkadex-mainnet pallets. #[clap(subcommand)] Benchmark(Box), - /// Try some command against runtime state. + /// Try some command against polkadex-mainnet state. #[cfg(feature = "try-runtime")] TryRuntime(try_runtime_cli::TryRuntimeCmd), - /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. + /// Try some command against polkadex-mainnet state. Note: `try-polkadex-mainnet` feature must + /// be enabled. #[cfg(not(feature = "try-runtime"))] TryRuntime, diff --git a/node/src/command.rs b/nodes/polkadex-mainnet-node/src/command.rs similarity index 94% rename from node/src/command.rs rename to nodes/polkadex-mainnet-node/src/command.rs index ca71c50f5..654945464 100644 --- a/node/src/command.rs +++ b/nodes/polkadex-mainnet-node/src/command.rs @@ -104,10 +104,10 @@ pub fn run() -> Result<()> { // which sub-commands it wants to support. match cmd.as_ref() { BenchmarkCmd::Pallet(cmd) => { - if !cfg!(feature = "runtime-benchmarks") { + if !cfg!(feature = "polkadex-mainnet-benchmarks") { return Err( - "Runtime benchmarking wasn't enabled when building the node. \ - You can enable it with `--features runtime-benchmarks`." + "Runtime benchmarking wasn't enabled when building the polkadex-mainnet-polkadex-parachain-node. \ + You can enable it with `--features polkadex-mainnet-benchmarks`." .into(), ) } @@ -120,7 +120,7 @@ pub fn run() -> Result<()> { }, #[cfg(not(feature = "runtime-benchmarks"))] BenchmarkCmd::Storage(_) => Err( - "Storage benchmarking can be enabled with `--features runtime-benchmarks`." + "Storage benchmarking can be enabled with `--features polkadex-mainnet-benchmarks`." .into(), ), #[cfg(feature = "runtime-benchmarks")] @@ -229,7 +229,7 @@ pub fn run() -> Result<()> { Some(Subcommand::TryRuntime(cmd)) => { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { - // we don't need any of the components of new_partial, just a runtime, or a task + // we don't need any of the components of new_partial, just a polkadex-mainnet, or a task // manager to do `async_run`. let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); let task_manager = @@ -250,8 +250,8 @@ pub fn run() -> Result<()> { }, #[cfg(not(feature = "try-runtime"))] - Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ - You can enable it with `--features try-runtime`." + Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the polkadex-mainnet-polkadex-parachain-node. \ + You can enable it with `--features try-polkadex-mainnet`." .into()), } } diff --git a/node/src/lib.rs b/nodes/polkadex-mainnet-node/src/lib.rs similarity index 100% rename from node/src/lib.rs rename to nodes/polkadex-mainnet-node/src/lib.rs diff --git a/node/src/main.rs b/nodes/polkadex-mainnet-node/src/main.rs similarity index 100% rename from node/src/main.rs rename to nodes/polkadex-mainnet-node/src/main.rs diff --git a/node/src/rpc.rs b/nodes/polkadex-mainnet-node/src/rpc.rs similarity index 90% rename from node/src/rpc.rs rename to nodes/polkadex-mainnet-node/src/rpc.rs index 52a6c58ad..1a07e043f 100644 --- a/node/src/rpc.rs +++ b/nodes/polkadex-mainnet-node/src/rpc.rs @@ -15,18 +15,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! A collection of node-specific RPC methods. +//! A collection of polkadex-mainnet-polkadex-parachain-node-specific RPC methods. //! //! Since `substrate` core functionality makes no assumptions -//! about the modules used inside the runtime, so do +//! about the modules used inside the polkadex-mainnet, so do //! RPC methods defined in `sc-rpc` crate. //! It means that `client/rpc` can't have any methods that -//! need some strong assumptions about the particular runtime. +//! need some strong assumptions about the particular polkadex-mainnet. //! //! The RPCs available in this crate however can make some assumptions -//! about how the runtime is constructed and what FRAME pallets -//! are part of it. Therefore all node-runtime-specific RPCs can -//! be placed here or imported from corresponding FRAME RPC definitions. +//! about how the polkadex-mainnet is constructed and what FRAME pallets +//! are part of it. Therefore all polkadex-mainnet-polkadex-parachain-node-polkadex-mainnet-specific +//! RPCs can be placed here or imported from corresponding FRAME RPC definitions. #![warn(missing_docs)] @@ -59,7 +59,7 @@ use std::sync::Arc; pub struct BabeDeps { /// A handle to the BABE worker for issuing requests. pub babe_worker_handle: BabeWorkerHandle, - /// The keystore that manages the keys of the node. + /// The keystore that manages the keys of the polkadex-mainnet-polkadex-parachain-node. pub keystore: KeystorePtr, } @@ -93,7 +93,7 @@ pub struct FullDeps { pub babe: BabeDeps, /// GRANDPA specific dependencies. pub grandpa: GrandpaDeps, - /// The backend used by the node. + /// The backend used by the polkadex-mainnet-polkadex-parachain-node. pub backend: Arc, } diff --git a/node/src/service.rs b/nodes/polkadex-mainnet-node/src/service.rs similarity index 96% rename from node/src/service.rs rename to nodes/polkadex-mainnet-node/src/service.rs index 9b889d7e7..75bb895cf 100644 --- a/node/src/service.rs +++ b/nodes/polkadex-mainnet-node/src/service.rs @@ -289,17 +289,17 @@ pub fn new_partial( pub type TransactionPool = sc_transaction_pool::FullPool; pub struct NewFullBase { - /// The task manager of the node. + /// The task manager of the polkadex-mainnet-polkadex-parachain-node. pub task_manager: TaskManager, - /// The client instance of the node. + /// The client instance of the polkadex-mainnet-polkadex-parachain-node. pub client: Arc, - /// The networking service of the node. + /// The networking service of the polkadex-mainnet-polkadex-parachain-node. pub network: Arc::Hash>>, - /// The syncing service of the node. + /// The syncing service of the polkadex-mainnet-polkadex-parachain-node. pub sync: Arc>, - /// The transaction pool of the node. + /// The transaction pool of the polkadex-mainnet-polkadex-parachain-node. pub transaction_pool: Arc, - /// The rpc handlers of the node. + /// The rpc handlers of the polkadex-mainnet-polkadex-parachain-node. pub rpc_handlers: RpcHandlers, } @@ -511,8 +511,8 @@ pub fn new_full_base( ); } - // if the node isn't actively participating in consensus then it doesn't - // need a keystore, regardless of which protocol we use below. + // if the polkadex-mainnet-polkadex-parachain-node isn't actively participating in consensus + // then it doesn't need a keystore, regardless of which protocol we use below. let keystore = if role.is_authority() { Some(keystore_container.keystore()) } else { None }; let grandpa_config = sc_consensus_grandpa::Config { @@ -613,8 +613,9 @@ mod tests { type AccountPublic = ::Signer; #[test] - // It is "ignored", but the node-cli ignored tests are running on the CI. - // This can be run locally with `cargo test --release -p node-cli test_sync -- --ignored`. + // It is "ignored", but the polkadex-mainnet-polkadex-parachain-node-cli ignored tests are + // running on the CI. This can be run locally with `cargo test --release -p + // polkadex-mainnet-polkadex-parachain-node-cli test_sync -- --ignored`. #[ignore] fn test_sync() { sp_tracing::try_init_simple(); diff --git a/nodes/polkadex-parachain-node/Cargo.toml b/nodes/polkadex-parachain-node/Cargo.toml new file mode 100644 index 000000000..ae4a1f291 --- /dev/null +++ b/nodes/polkadex-parachain-node/Cargo.toml @@ -0,0 +1,84 @@ +[package] +name = "parachain-polkadex-node" +version = "1.0.0" +authors = ["Polkadex OÜ "] +description = "Polkadex parachain node" +license = "GNU GPL v3" +homepage = "https://polkadex.trade" +repository = "https://github.com/Polkadex-Substrate/parachain/" +edition = "2021" +build = "build.rs" + +[dependencies] +clap = { version = "4.0.32", features = ["derive"] } +log = "0.4.17" +codec = { package = "parity-scale-codec", version = "3.0.0" } +serde = { version = "1.0.152", features = ["derive"] } +jsonrpsee = { version = "0.16.2", features = ["server"] } + +# Local +parachain-polkadex-runtime = { path = "../../runtimes/polkadex-parachain" } +hex-literal = { workspace = true, optional = false } + +# Substrate +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } + +# Polkadot +polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } + +# Cumulus +cumulus-client-cli = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-client-network = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-client-service = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } + +[build-dependencies] +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } + +[features] +default = [] +runtime-benchmarks = ["parachain-polkadex-runtime/runtime-benchmarks", "polkadot-cli/runtime-benchmarks"] +try-runtime = ["parachain-polkadex-runtime/try-runtime", "try-runtime-cli/try-runtime"] diff --git a/nodes/polkadex-parachain-node/build.rs b/nodes/polkadex-parachain-node/build.rs new file mode 100644 index 000000000..e3bfe3116 --- /dev/null +++ b/nodes/polkadex-parachain-node/build.rs @@ -0,0 +1,7 @@ +use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; + +fn main() { + generate_cargo_keys(); + + rerun_if_git_head_changed(); +} diff --git a/nodes/polkadex-parachain-node/src/chain_spec.rs b/nodes/polkadex-parachain-node/src/chain_spec.rs new file mode 100644 index 000000000..9a99674fc --- /dev/null +++ b/nodes/polkadex-parachain-node/src/chain_spec.rs @@ -0,0 +1,279 @@ +use cumulus_primitives_core::ParaId; +use hex_literal::hex; +use parachain_polkadex_runtime::{AccountId, AuraId, Signature, EXISTENTIAL_DEPOSIT}; +use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; +use sc_service::ChainType; +use serde::{Deserialize, Serialize}; +use sp_core::{sr25519, Pair, Public}; +use sp_runtime::traits::{IdentifyAccount, Verify}; + +/// Specialized `ChainSpec` for the normal parachain runtime. +pub type ChainSpec = + sc_service::GenericChainSpec; + +/// The default XCM version to set in genesis config. +const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; + +/// Helper function to generate a crypto pair from seed +pub fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{seed}"), None) + .expect("static values are valid; qed") + .public() +} + +/// The extensions for the [`ChainSpec`]. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)] +#[serde(deny_unknown_fields)] +pub struct Extensions { + /// The relay chain of the Parachain. + pub relay_chain: String, + /// The id of the Parachain. + pub para_id: u32, +} + +impl Extensions { + /// Try to get the extension from the given `ChainSpec`. + pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> { + sc_chain_spec::get_extension(chain_spec.extensions()) + } +} + +type AccountPublic = ::Signer; + +/// Generate collator keys from seed. +/// +/// This function's return type must always match the session keys of the chain in tuple format. +pub fn get_collator_keys_from_seed(seed: &str) -> AuraId { + get_from_seed::(seed) +} + +/// Helper function to generate an account ID from seed +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} + +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn template_session_keys(keys: AuraId) -> parachain_polkadex_runtime::SessionKeys { + parachain_polkadex_runtime::SessionKeys { aura: keys } +} + +pub fn development_config() -> ChainSpec { + // Give your base currency a unit name and decimal places + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("tokenSymbol".into(), "PDEX".into()); + properties.insert("tokenDecimals".into(), 12.into()); + properties.insert("ss58Format".into(), 89.into()); + + ChainSpec::from_genesis( + // Name + "Polkadex Development", + // ID + "dev", + ChainType::Development, + move || { + create_genesis_config( + // initial collators. + vec![ + ( + get_account_id_from_seed::("Alice"), + get_collator_keys_from_seed("Alice"), + ), + ( + get_account_id_from_seed::("Bob"), + get_collator_keys_from_seed("Bob"), + ), + ], + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ], + 2040.into(), + get_account_id_from_seed::("Alice"), + ) + }, + Vec::new(), + None, + None, + None, + None, + Extensions { + relay_chain: "rococo-local".into(), // You MUST set this to the correct network! + para_id: 2040, + }, + ) +} + +pub fn local_testnet_config() -> ChainSpec { + // Give your base currency a unit name and decimal places + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("tokenSymbol".into(), "PDEX".into()); + properties.insert("tokenDecimals".into(), 12.into()); + properties.insert("ss58Format".into(), 89.into()); + let root_key: AccountId = get_account_id_from_seed::("Alice"); + + ChainSpec::from_genesis( + // Name + "Polkadex Parachain Testnet", + // ID + "local_testnet", + ChainType::Local, + move || { + create_genesis_config( + // initial collators. + vec![ + ( + get_account_id_from_seed::("Alice"), + get_collator_keys_from_seed("Alice"), + ), + ( + get_account_id_from_seed::("Bob"), + get_collator_keys_from_seed("Bob"), + ), + ], + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ], + 2040.into(), + root_key.clone(), + ) + }, + // Bootnodes + Vec::new(), + // Telemetry + None, + // Protocol ID + Some("polkadex-parachain"), + // Fork ID + None, + // Properties + Some(properties), + // Extensions + Extensions { + relay_chain: "rococo-local".into(), // You MUST set this to the correct network! + para_id: 2040, + }, + ) +} + +fn create_genesis_config( + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, + root_key: AccountId, +) -> parachain_polkadex_runtime::GenesisConfig { + parachain_polkadex_runtime::GenesisConfig { + system: parachain_polkadex_runtime::SystemConfig { + code: parachain_polkadex_runtime::WASM_BINARY + .expect("WASM binary was not build, please build it!") + .to_vec(), + }, + balances: parachain_polkadex_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, EXISTENTIAL_DEPOSIT * 16)) + .collect(), + }, + parachain_info: parachain_polkadex_runtime::ParachainInfoConfig { parachain_id: id }, + collator_selection: parachain_polkadex_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: EXISTENTIAL_DEPOSIT * 16, + ..Default::default() + }, + session: parachain_polkadex_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + template_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: parachain_polkadex_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + }, + sudo: parachain_polkadex_runtime::SudoConfig { key: Some(root_key) }, + assets: Default::default(), + } +} + +pub fn mainnet_config() -> ChainSpec { + // Give your base currency a unit name and decimal places + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("tokenSymbol".into(), "PDEX".into()); + properties.insert("tokenDecimals".into(), 12.into()); + properties.insert("ss58Format".into(), 89.into()); + + let root_key: AccountId = + hex!["10d063a8244f2bce1f34e973891bc3b115bbd552d4f163e731047ace72e59d5f"].into(); + let initial_collator: AccountId = + hex!["f27b16d1059ea3cf4ed15a5ef18bc8c5c662e1abe82d96cf6f57c50af95e056e"].into(); + use sp_core::crypto::UncheckedInto; + let initial_collator_aura_id: AuraId = + hex!["f27b16d1059ea3cf4ed15a5ef18bc8c5c662e1abe82d96cf6f57c50af95e056e"].unchecked_into(); + ChainSpec::from_genesis( + // Name + "Polkadex Parachain", + // ID + "parachain_live", + ChainType::Live, + move || { + create_genesis_config( + // initial collators. + vec![(initial_collator.clone(), initial_collator_aura_id.clone())], + vec![root_key.clone(), initial_collator.clone()], + 2040.into(), + root_key.clone(), + ) + }, + // Bootnodes + Vec::new(), + // Telemetry + None, + // Protocol ID + Some("polkadex-parachain"), + // Fork ID + None, + // Properties + Some(properties), + // Extensions + Extensions { + relay_chain: "polkadot".into(), // You MUST set this to the correct network! + para_id: 2040, + }, + ) +} diff --git a/nodes/polkadex-parachain-node/src/cli.rs b/nodes/polkadex-parachain-node/src/cli.rs new file mode 100644 index 000000000..e6cc3b1dc --- /dev/null +++ b/nodes/polkadex-parachain-node/src/cli.rs @@ -0,0 +1,103 @@ +use std::path::PathBuf; + +/// Sub-commands supported by the collator. +#[derive(Debug, clap::Subcommand)] +#[allow(clippy::large_enum_variant)] +pub enum Subcommand { + /// Build a chain specification. + BuildSpec(sc_cli::BuildSpecCmd), + + /// Validate blocks. + CheckBlock(sc_cli::CheckBlockCmd), + + /// Export blocks. + ExportBlocks(sc_cli::ExportBlocksCmd), + + /// Export the state of a given block into a chain spec. + ExportState(sc_cli::ExportStateCmd), + + /// Import blocks. + ImportBlocks(sc_cli::ImportBlocksCmd), + + /// Revert the chain to a previous state. + Revert(sc_cli::RevertCmd), + + /// Remove the whole chain. + PurgeChain(cumulus_client_cli::PurgeChainCmd), + + /// Export the genesis state of the parachain. + ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand), + + /// Export the genesis wasm of the parachain. + ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand), + + /// Sub-commands concerned with benchmarking. + /// The pallet benchmarking moved to the `pallet` sub-command. + #[command(subcommand)] + Benchmark(frame_benchmarking_cli::BenchmarkCmd), + + /// Try some testing command against a specified runtime state. + #[cfg(feature = "try-runtime")] + TryRuntime(try_runtime_cli::TryRuntimeCmd), + + /// Errors since the binary was not build with `--features try-runtime`. + #[cfg(not(feature = "try-runtime"))] + TryRuntime, +} + +#[derive(Debug, clap::Parser)] +#[command( + propagate_version = true, + args_conflicts_with_subcommands = true, + subcommand_negates_reqs = true +)] +pub struct Cli { + #[command(subcommand)] + pub subcommand: Option, + + #[command(flatten)] + pub run: cumulus_client_cli::RunCmd, + + /// Disable automatic hardware benchmarks. + /// + /// By default these benchmarks are automatically ran at startup and measure + /// the CPU speed, the memory bandwidth and the disk speed. + /// + /// The results are then printed out in the logs, and also sent as part of + /// telemetry, if telemetry is enabled. + #[arg(long)] + pub no_hardware_benchmarks: bool, + + /// Relay chain arguments + #[arg(raw = true)] + pub relay_chain_args: Vec, +} + +#[derive(Debug)] +pub struct RelayChainCli { + /// The actual relay chain cli object. + pub base: polkadot_cli::RunCmd, + + /// Optional chain id that should be passed to the relay chain. + pub chain_id: Option, + + /// The base path that should be used by the relay chain. + pub base_path: Option, +} + +impl RelayChainCli { + /// Parse the relay chain CLI parameters using the para chain `Configuration`. + pub fn new<'a>( + para_config: &sc_service::Configuration, + relay_chain_args: impl Iterator, + ) -> Self { + let extension = crate::chain_spec::Extensions::try_get(&*para_config.chain_spec); + let chain_id = extension.map(|e| e.relay_chain.clone()); + let base_path = para_config.base_path.path().join("polkadot"); + Self { + base_path: Some(base_path), + chain_id, + base: clap::Parser::parse_from(relay_chain_args), + } + } +} diff --git a/nodes/polkadex-parachain-node/src/command.rs b/nodes/polkadex-parachain-node/src/command.rs new file mode 100644 index 000000000..88ec9f1d5 --- /dev/null +++ b/nodes/polkadex-parachain-node/src/command.rs @@ -0,0 +1,438 @@ +use codec::Encode; +use cumulus_client_cli::generate_genesis_block; +use cumulus_primitives_core::ParaId; +use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; +use log::{info, warn}; +use parachain_polkadex_runtime::Block; +use sc_cli::{ + ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, + NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli, +}; +use sc_service::config::{BasePath, PrometheusConfig}; +use sp_core::hexdisplay::HexDisplay; +use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; + +use crate::{ + chain_spec, + cli::{Cli, RelayChainCli, Subcommand}, + service::{new_partial, ParachainNativeExecutor}, +}; + +fn load_spec(id: &str) -> std::result::Result, String> { + Ok(match id { + "dev" => Box::new(chain_spec::development_config()), + "xcm-helper-rococo" => Box::new(chain_spec::local_testnet_config()), + "" | "local" => Box::new(chain_spec::local_testnet_config()), + "mainnet" => Box::new(chain_spec::mainnet_config()), + path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), + }) +} + +impl SubstrateCli for Cli { + fn impl_name() -> String { + "Polkadex Parachain Collator".into() + } + + fn impl_version() -> String { + env!("SUBSTRATE_CLI_IMPL_VERSION").into() + } + + fn description() -> String { + format!( + "Polkadex Collator \n\nThe command-line arguments provided first will be \ + passed to the parachain polkadex-parachain-node, while the arguments provided after -- will be passed \ + to the relay chain polkadex-parachain-node.\n\n\ + {} -- ", + Self::executable_name() + ) + } + + fn author() -> String { + env!("CARGO_PKG_AUTHORS").into() + } + + fn support_url() -> String { + "https://github.com/Polkadex-Substrate/parachain/issues/new".into() + } + + fn copyright_start_year() -> i32 { + 2020 + } + + fn load_spec(&self, id: &str) -> std::result::Result, String> { + load_spec(id) + } + + fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { + ¶chain_polkadex_runtime::VERSION + } +} + +impl SubstrateCli for RelayChainCli { + fn impl_name() -> String { + "Polkadex Collator".into() + } + + fn impl_version() -> String { + env!("SUBSTRATE_CLI_IMPL_VERSION").into() + } + + fn description() -> String { + format!( + "Polkadex Collator \n\nThe command-line arguments provided first will be \ + passed to the parachain polkadex-parachain-node, while the arguments provided after -- will be passed \ + to the relay chain polkadex-parachain-node.\n\n\ + {} -- ", + Self::executable_name() + ) + } + + fn author() -> String { + env!("CARGO_PKG_AUTHORS").into() + } + + fn support_url() -> String { + "https://github.com/paritytech/cumulus/issues/new".into() + } + + fn copyright_start_year() -> i32 { + 2020 + } + + fn load_spec(&self, id: &str) -> std::result::Result, String> { + polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id) + } + + fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { + polkadot_cli::Cli::native_runtime_version(chain_spec) + } +} + +macro_rules! construct_async_run { + (|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{ + let runner = $cli.create_runner($cmd)?; + runner.async_run(|$config| { + let $components = new_partial(&$config)?; + let task_manager = $components.task_manager; + { $( $code )* }.map(|v| (v, task_manager)) + }) + }} +} + +/// Parse command line arguments into service configuration. +pub fn run() -> Result<()> { + let cli = Cli::from_args(); + + match &cli.subcommand { + Some(Subcommand::BuildSpec(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) + }, + Some(Subcommand::CheckBlock(cmd)) => { + construct_async_run!(|components, cli, cmd, config| { + Ok(cmd.run(components.client, components.import_queue)) + }) + }, + Some(Subcommand::ExportBlocks(cmd)) => { + construct_async_run!(|components, cli, cmd, config| { + Ok(cmd.run(components.client, config.database)) + }) + }, + Some(Subcommand::ExportState(cmd)) => { + construct_async_run!(|components, cli, cmd, config| { + Ok(cmd.run(components.client, config.chain_spec)) + }) + }, + Some(Subcommand::ImportBlocks(cmd)) => { + construct_async_run!(|components, cli, cmd, config| { + Ok(cmd.run(components.client, components.import_queue)) + }) + }, + Some(Subcommand::Revert(cmd)) => { + construct_async_run!(|components, cli, cmd, config| { + Ok(cmd.run(components.client, components.backend, None)) + }) + }, + Some(Subcommand::PurgeChain(cmd)) => { + let runner = cli.create_runner(cmd)?; + + runner.sync_run(|config| { + let polkadot_cli = RelayChainCli::new( + &config, + [RelayChainCli::executable_name()].iter().chain(cli.relay_chain_args.iter()), + ); + + let polkadot_config = SubstrateCli::create_configuration( + &polkadot_cli, + &polkadot_cli, + config.tokio_handle.clone(), + ) + .map_err(|err| format!("Relay chain argument error: {err}"))?; + + cmd.run(config, polkadot_config) + }) + }, + Some(Subcommand::ExportGenesisState(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|_config| { + let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; + let state_version = Cli::native_runtime_version(&spec).state_version(); + cmd.run::(&*spec, state_version) + }) + }, + Some(Subcommand::ExportGenesisWasm(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|_config| { + let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; + cmd.run(&*spec) + }) + }, + Some(Subcommand::Benchmark(cmd)) => { + let runner = cli.create_runner(cmd)?; + // Switch on the concrete benchmark sub-command- + match cmd { + BenchmarkCmd::Pallet(cmd) => + if cfg!(feature = "runtime-benchmarks") { + runner.sync_run(|config| cmd.run::(config)) + } else { + Err("Benchmarking wasn't enabled when building the polkadex-parachain-node. \ + You can enable it with `--features runtime-benchmarks`." + .into()) + }, + BenchmarkCmd::Block(cmd) => runner.sync_run(|config| { + let partials = new_partial(&config)?; + cmd.run(partials.client) + }), + #[cfg(not(feature = "runtime-benchmarks"))] + BenchmarkCmd::Storage(_) => Err(sc_cli::Error::Input( + "Compile with --features=runtime-benchmarks \ + to enable storage benchmarks." + .into(), + )), + #[cfg(feature = "runtime-benchmarks")] + BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| { + let partials = new_partial(&config)?; + let db = partials.backend.expose_db(); + let storage = partials.backend.expose_storage(); + cmd.run(config, partials.client.clone(), db, storage) + }), + BenchmarkCmd::Machine(cmd) => + runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())), + // NOTE: this allows the Client to leniently implement + // new benchmark commands without requiring a companion MR. + #[allow(unreachable_patterns)] + _ => Err("Benchmarking sub-command unsupported".into()), + } + }, + #[cfg(feature = "try-runtime")] + Some(Subcommand::TryRuntime(cmd)) => { + let runner = cli.create_runner(cmd)?; + + use parachain_polkadex_runtime::MILLISECS_PER_BLOCK; + use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; + use try_runtime_cli::block_building_info::timestamp_with_aura_info; + + type HostFunctionsOf = ExtendedHostFunctions< + sp_io::SubstrateHostFunctions, + ::ExtendHostFunctions, + >; + + // grab the task manager. + let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry); + let info_provider = timestamp_with_aura_info(MILLISECS_PER_BLOCK); + let task_manager = + sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry) + .map_err(|e| format!("Error: {:?}", e))?; + + runner.async_run(|_| { + Ok(( + cmd.run::, _>(Some( + info_provider, + )), + task_manager, + )) + }) + }, + #[cfg(not(feature = "try-runtime"))] + Some(Subcommand::TryRuntime) => + Err("Try-runtime was not enabled when building the polkadex-parachain-node. \ + You can enable it with `--features try-runtime`." + .into()), + None => { + let runner = cli.create_runner(&cli.run.normalize())?; + let collator_options = cli.run.collator_options(); + + runner.run_node_until_exit(|config| async move { + let hwbench = if !cli.no_hardware_benchmarks { + config.database.path().map(|database_path| { + let _ = std::fs::create_dir_all(database_path); + sc_sysinfo::gather_hwbench(Some(database_path)) + }) + } else { + None + }; + + let para_id = chain_spec::Extensions::try_get(&*config.chain_spec) + .map(|e| e.para_id) + .ok_or("Could not find parachain ID in chain-spec.")?; + + let polkadot_cli = RelayChainCli::new( + &config, + [RelayChainCli::executable_name()].iter().chain(cli.relay_chain_args.iter()), + ); + + let id = ParaId::from(para_id); + + let parachain_account = + AccountIdConversion::::into_account_truncating(&id); + + let state_version = Cli::native_runtime_version(&config.chain_spec).state_version(); + let block: Block = generate_genesis_block(&*config.chain_spec, state_version) + .map_err(|e| format!("{e:?}"))?; + let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode())); + + let tokio_handle = config.tokio_handle.clone(); + let polkadot_config = + SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle) + .map_err(|err| format!("Relay chain argument error: {err}"))?; + + info!("Parachain id: {:?}", id); + info!("Parachain Account: {}", parachain_account); + info!("Parachain genesis state: {}", genesis_state); + info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" }); + + if !collator_options.relay_chain_rpc_urls.is_empty() && !cli.relay_chain_args.is_empty() { + warn!("Detected relay chain polkadex-parachain-node arguments together with --relay-chain-rpc-url. This command starts a minimal Polkadot polkadex-parachain-node that only uses a network-related subset of all relay chain CLI options."); + } + + crate::service::start_parachain_node( + config, + polkadot_config, + collator_options, + id, + hwbench, + ) + .await + .map(|r| r.0) + .map_err(Into::into) + }) + }, + } +} + +impl DefaultConfigurationValues for RelayChainCli { + fn p2p_listen_port() -> u16 { + 30334 + } + + fn rpc_listen_port() -> u16 { + 9945 + } + + fn prometheus_listen_port() -> u16 { + 9616 + } +} + +impl CliConfiguration for RelayChainCli { + fn shared_params(&self) -> &SharedParams { + self.base.base.shared_params() + } + + fn import_params(&self) -> Option<&ImportParams> { + self.base.base.import_params() + } + + fn network_params(&self) -> Option<&NetworkParams> { + self.base.base.network_params() + } + + fn keystore_params(&self) -> Option<&KeystoreParams> { + self.base.base.keystore_params() + } + + fn base_path(&self) -> Result> { + Ok(self + .shared_params() + .base_path()? + .or_else(|| self.base_path.clone().map(Into::into))) + } + + fn prometheus_config( + &self, + default_listen_port: u16, + chain_spec: &Box, + ) -> Result> { + self.base.base.prometheus_config(default_listen_port, chain_spec) + } + + fn init( + &self, + _support_url: &String, + _impl_version: &String, + _logger_hook: F, + _config: &sc_service::Configuration, + ) -> Result<()> + where + F: FnOnce(&mut sc_cli::LoggerBuilder, &sc_service::Configuration), + { + unreachable!("PolkadotCli is never initialized; qed"); + } + + fn chain_id(&self, is_dev: bool) -> Result { + let chain_id = self.base.base.chain_id(is_dev)?; + + Ok(if chain_id.is_empty() { self.chain_id.clone().unwrap_or_default() } else { chain_id }) + } + + fn role(&self, is_dev: bool) -> Result { + self.base.base.role(is_dev) + } + + fn transaction_pool(&self, is_dev: bool) -> Result { + self.base.base.transaction_pool(is_dev) + } + + fn trie_cache_maximum_size(&self) -> Result> { + self.base.base.trie_cache_maximum_size() + } + + fn rpc_methods(&self) -> Result { + self.base.base.rpc_methods() + } + + fn rpc_cors(&self, is_dev: bool) -> Result>> { + self.base.base.rpc_cors(is_dev) + } + + fn default_heap_pages(&self) -> Result> { + self.base.base.default_heap_pages() + } + + fn force_authoring(&self) -> Result { + self.base.base.force_authoring() + } + + fn disable_grandpa(&self) -> Result { + self.base.base.disable_grandpa() + } + + fn max_runtime_instances(&self) -> Result> { + self.base.base.max_runtime_instances() + } + + fn announce_block(&self) -> Result { + self.base.base.announce_block() + } + + fn telemetry_endpoints( + &self, + chain_spec: &Box, + ) -> Result> { + self.base.base.telemetry_endpoints(chain_spec) + } + + fn node_name(&self) -> Result { + self.base.base.node_name() + } +} diff --git a/nodes/polkadex-parachain-node/src/main.rs b/nodes/polkadex-parachain-node/src/main.rs new file mode 100644 index 000000000..ba9f28b35 --- /dev/null +++ b/nodes/polkadex-parachain-node/src/main.rs @@ -0,0 +1,14 @@ +//! Substrate Parachain Node Template CLI + +#![warn(missing_docs)] + +mod chain_spec; +#[macro_use] +mod service; +mod cli; +mod command; +mod rpc; + +fn main() -> sc_cli::Result<()> { + command::run() +} diff --git a/nodes/polkadex-parachain-node/src/rpc.rs b/nodes/polkadex-parachain-node/src/rpc.rs new file mode 100644 index 000000000..992ba60b5 --- /dev/null +++ b/nodes/polkadex-parachain-node/src/rpc.rs @@ -0,0 +1,58 @@ +//! A collection of polkadex-parachain-node-specific RPC methods. +//! Substrate provides the `sc-rpc` crate, which defines the core RPC layer +//! used by Substrate nodes. This file extends those RPC definitions with +//! capabilities that are specific to this project's runtime configuration. + +#![warn(missing_docs)] + +use std::sync::Arc; + +use parachain_polkadex_runtime::{opaque::Block, AccountId, Balance, Index as Nonce}; + +use sc_client_api::AuxStore; +pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; +use sc_transaction_pool_api::TransactionPool; +use sp_api::ProvideRuntimeApi; +use sp_block_builder::BlockBuilder; +use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; + +/// A type representing all RPC extensions. +pub type RpcExtension = jsonrpsee::RpcModule<()>; + +/// Full client dependencies +pub struct FullDeps { + /// The client instance to use. + pub client: Arc, + /// Transaction pool instance. + pub pool: Arc

, + /// Whether to deny unsafe calls + pub deny_unsafe: DenyUnsafe, +} + +/// Instantiate all RPC extensions. +pub fn create_full( + deps: FullDeps, +) -> Result> +where + C: ProvideRuntimeApi + + HeaderBackend + + AuxStore + + HeaderMetadata + + Send + + Sync + + 'static, + C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, + C::Api: substrate_frame_rpc_system::AccountNonceApi, + C::Api: BlockBuilder, + P: TransactionPool + Sync + Send + 'static, +{ + use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; + use substrate_frame_rpc_system::{System, SystemApiServer}; + + let mut module = RpcExtension::new(()); + let FullDeps { client, pool, deny_unsafe } = deps; + + module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; + module.merge(TransactionPayment::new(client).into_rpc())?; + Ok(module) +} diff --git a/nodes/polkadex-parachain-node/src/service.rs b/nodes/polkadex-parachain-node/src/service.rs new file mode 100644 index 000000000..885ef9383 --- /dev/null +++ b/nodes/polkadex-parachain-node/src/service.rs @@ -0,0 +1,435 @@ +//! Service and ServiceFactory implementation. Specialized wrapper over substrate service. + +// std +use cumulus_client_cli::CollatorOptions; +use cumulus_client_service::{ + build_network, build_relay_chain_interface, prepare_node_config, start_collator, + start_full_node, BuildNetworkParams, StartCollatorParams, StartFullNodeParams, +}; +use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; +use std::{sync::Arc, time::Duration}; +// Local Runtime Types +use parachain_polkadex_runtime::{opaque::Block, RuntimeApi}; +// Cumulus Imports +use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; +use cumulus_client_consensus_common::{ + ParachainBlockImport as TParachainBlockImport, ParachainConsensus, +}; +use cumulus_primitives_core::ParaId; +use cumulus_relay_chain_interface::RelayChainInterface; +// Substrate Imports +use sc_consensus::ImportQueue; +use sc_executor::{ + HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY, +}; +use sc_network::NetworkBlock; +use sc_network_sync::SyncingService; +use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; +use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; +use sp_keystore::KeystorePtr; +use substrate_prometheus_endpoint::Registry; + +/// Native executor type. +pub struct ParachainNativeExecutor; + +impl sc_executor::NativeExecutionDispatch for ParachainNativeExecutor { + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + + fn dispatch(method: &str, data: &[u8]) -> Option> { + parachain_polkadex_runtime::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + parachain_polkadex_runtime::native_version() + } +} + +type ParachainExecutor = NativeElseWasmExecutor; + +type ParachainClient = TFullClient; + +type ParachainBackend = TFullBackend; + +type ParachainBlockImport = TParachainBlockImport, ParachainBackend>; + +type ParachainPartialComponents = PartialComponents< + ParachainClient, + ParachainBackend, + (), + sc_consensus::DefaultImportQueue, + sc_transaction_pool::FullPool, + (ParachainBlockImport, Option, Option), +>; + +/// Starts a `ServiceBuilder` for a full service. +/// +/// Use this macro if you don't actually need the full service, but just the builder in order to +/// be able to perform chain operations. +pub fn new_partial( + config: &Configuration, +) -> Result { + let telemetry = config + .telemetry_endpoints + .clone() + .filter(|x| !x.is_empty()) + .map(|endpoints| -> Result<_, sc_telemetry::Error> { + let worker = TelemetryWorker::new(16)?; + let telemetry = worker.handle().new_telemetry(endpoints); + Ok((worker, telemetry)) + }) + .transpose()?; + + let heap_pages = config + .default_heap_pages + .map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ }); + + let wasm = WasmExecutor::builder() + .with_execution_method(config.wasm_method) + .with_onchain_heap_alloc_strategy(heap_pages) + .with_offchain_heap_alloc_strategy(heap_pages) + .with_max_runtime_instances(config.max_runtime_instances) + .with_runtime_cache_size(config.runtime_cache_size) + .build(); + + let executor = ParachainExecutor::new_with_wasm_executor(wasm); + + let (client, backend, keystore_container, task_manager) = + sc_service::new_full_parts::( + config, + telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), + executor, + )?; + let client = Arc::new(client); + + let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle()); + + let telemetry = telemetry.map(|(worker, telemetry)| { + task_manager.spawn_handle().spawn("telemetry", None, worker.run()); + telemetry + }); + + let transaction_pool = sc_transaction_pool::BasicPool::new_full( + config.transaction_pool.clone(), + config.role.is_authority().into(), + config.prometheus_registry(), + task_manager.spawn_essential_handle(), + client.clone(), + ); + + let block_import = ParachainBlockImport::new(client.clone(), backend.clone()); + + let import_queue = build_import_queue( + client.clone(), + block_import.clone(), + config, + telemetry.as_ref().map(|telemetry| telemetry.handle()), + &task_manager, + )?; + + Ok(PartialComponents { + backend, + client, + import_queue, + keystore_container, + task_manager, + transaction_pool, + select_chain: (), + other: (block_import, telemetry, telemetry_worker_handle), + }) +} + +/// Start a polkadex-parachain-node with the given parachain `Configuration` and relay chain +/// `Configuration`. +/// +/// This is the actual implementation that is abstract over the executor and the runtime api. +#[sc_tracing::logging::prefix_logs_with("Parachain")] +async fn start_node_impl( + parachain_config: Configuration, + polkadot_config: Configuration, + collator_options: CollatorOptions, + para_id: ParaId, + hwbench: Option, +) -> sc_service::error::Result<(TaskManager, Arc)> { + let parachain_config = prepare_node_config(parachain_config); + + let params = new_partial(¶chain_config)?; + let (block_import, mut telemetry, telemetry_worker_handle) = params.other; + let net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); + + let client = params.client.clone(); + let backend = params.backend.clone(); + let mut task_manager = params.task_manager; + + let (relay_chain_interface, collator_key) = build_relay_chain_interface( + polkadot_config, + ¶chain_config, + telemetry_worker_handle, + &mut task_manager, + collator_options.clone(), + hwbench.clone(), + ) + .await + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; + + let force_authoring = parachain_config.force_authoring; + let validator = parachain_config.role.is_authority(); + let prometheus_registry = parachain_config.prometheus_registry().cloned(); + let transaction_pool = params.transaction_pool.clone(); + let import_queue_service = params.import_queue.service(); + + let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = + build_network(BuildNetworkParams { + parachain_config: ¶chain_config, + net_config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + para_id, + spawn_handle: task_manager.spawn_handle(), + relay_chain_interface: relay_chain_interface.clone(), + import_queue: params.import_queue, + }) + .await?; + + if parachain_config.offchain_worker.enabled { + sc_service::build_offchain_workers( + ¶chain_config, + task_manager.spawn_handle(), + client.clone(), + network.clone(), + ); + } + + let rpc_builder = { + let client = client.clone(); + let transaction_pool = transaction_pool.clone(); + + Box::new(move |deny_unsafe, _| { + let deps = crate::rpc::FullDeps { + client: client.clone(), + pool: transaction_pool.clone(), + deny_unsafe, + }; + + crate::rpc::create_full(deps).map_err(Into::into) + }) + }; + + sc_service::spawn_tasks(sc_service::SpawnTasksParams { + rpc_builder, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + task_manager: &mut task_manager, + config: parachain_config, + keystore: params.keystore_container.keystore(), + backend, + network: network.clone(), + sync_service: sync_service.clone(), + system_rpc_tx, + tx_handler_controller, + telemetry: telemetry.as_mut(), + })?; + + if let Some(hwbench) = hwbench { + sc_sysinfo::print_hwbench(&hwbench); + // Here you can check whether the hardware meets your chains' requirements. Putting a link + // in there and swapping out the requirements for your own are probably a good idea. The + // requirements for a para-chain are dictated by its relay-chain. + if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) && validator { + log::warn!( + "⚠️ The hardware does not meet the minimal requirements for role 'Authority'." + ); + } + + if let Some(ref mut telemetry) = telemetry { + let telemetry_handle = telemetry.handle(); + task_manager.spawn_handle().spawn( + "telemetry_hwbench", + None, + sc_sysinfo::initialize_hwbench_telemetry(telemetry_handle, hwbench), + ); + } + } + + let announce_block = { + let sync_service = sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) + }; + + let relay_chain_slot_duration = Duration::from_secs(6); + + let overseer_handle = relay_chain_interface + .overseer_handle() + .map_err(|e| sc_service::Error::Application(Box::new(e)))?; + + if validator { + let parachain_consensus = build_consensus( + client.clone(), + block_import, + prometheus_registry.as_ref(), + telemetry.as_ref().map(|t| t.handle()), + &task_manager, + relay_chain_interface.clone(), + transaction_pool, + sync_service.clone(), + params.keystore_container.keystore(), + force_authoring, + para_id, + )?; + + let spawner = task_manager.spawn_handle(); + let params = StartCollatorParams { + para_id, + block_status: client.clone(), + announce_block, + client: client.clone(), + task_manager: &mut task_manager, + relay_chain_interface, + spawner, + parachain_consensus, + import_queue: import_queue_service, + collator_key: collator_key.expect("Command line arguments do not allow this. qed"), + relay_chain_slot_duration, + recovery_handle: Box::new(overseer_handle), + sync_service, + }; + + start_collator(params).await?; + } else { + let params = StartFullNodeParams { + client: client.clone(), + announce_block, + task_manager: &mut task_manager, + para_id, + relay_chain_interface, + relay_chain_slot_duration, + import_queue: import_queue_service, + recovery_handle: Box::new(overseer_handle), + sync_service, + }; + + start_full_node(params)?; + } + + start_network.start_network(); + + Ok((task_manager, client)) +} + +/// Build the import queue for the parachain runtime. +fn build_import_queue( + client: Arc, + block_import: ParachainBlockImport, + config: &Configuration, + telemetry: Option, + task_manager: &TaskManager, +) -> Result, sc_service::Error> { + let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; + + cumulus_client_consensus_aura::import_queue::< + sp_consensus_aura::sr25519::AuthorityPair, + _, + _, + _, + _, + _, + >(cumulus_client_consensus_aura::ImportQueueParams { + block_import, + client, + create_inherent_data_providers: move |_, _| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + + let slot = + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + + Ok((slot, timestamp)) + }, + registry: config.prometheus_registry(), + spawner: &task_manager.spawn_essential_handle(), + telemetry, + }) + .map_err(Into::into) +} + +#[allow(clippy::too_many_arguments)] +fn build_consensus( + client: Arc, + block_import: ParachainBlockImport, + prometheus_registry: Option<&Registry>, + telemetry: Option, + task_manager: &TaskManager, + relay_chain_interface: Arc, + transaction_pool: Arc>, + sync_oracle: Arc>, + keystore: KeystorePtr, + force_authoring: bool, + para_id: ParaId, +) -> Result>, sc_service::Error> { + let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; + + let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( + task_manager.spawn_handle(), + client.clone(), + transaction_pool, + prometheus_registry, + telemetry.clone(), + ); + + let params = BuildAuraConsensusParams { + proposer_factory, + create_inherent_data_providers: move |_, (relay_parent, validation_data)| { + let relay_chain_interface = relay_chain_interface.clone(); + async move { + let parachain_inherent = + cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( + relay_parent, + &relay_chain_interface, + &validation_data, + para_id, + ) + .await; + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + + let slot = + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + + let parachain_inherent = parachain_inherent.ok_or_else(|| { + Box::::from( + "Failed to create parachain inherent", + ) + })?; + Ok((slot, timestamp, parachain_inherent)) + } + }, + block_import, + para_client: client, + backoff_authoring_blocks: Option::<()>::None, + sync_oracle, + keystore, + force_authoring, + slot_duration, + // We got around 500ms for proposing + block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), + // And a maximum of 750ms if slots are skipped + max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), + telemetry, + }; + + Ok(AuraConsensus::build::(params)) +} + +/// Start a parachain polkadex-parachain-node. +pub async fn start_parachain_node( + parachain_config: Configuration, + polkadot_config: Configuration, + collator_options: CollatorOptions, + para_id: ParaId, + hwbench: Option, +) -> sc_service::error::Result<(TaskManager, Arc)> { + start_node_impl(parachain_config, polkadot_config, collator_options, para_id, hwbench).await +} diff --git a/pallets/liquidity/src/lib.rs b/pallets/liquidity/src/lib.rs index 348d5dbd7..7a1cec9b7 100644 --- a/pallets/liquidity/src/lib.rs +++ b/pallets/liquidity/src/lib.rs @@ -48,7 +48,7 @@ type BalanceOf = const LENGTH_OF_HALF_BYTES: usize = 16; -// Definition of the pallet logic, to be aggregated at runtime definition through +// Definition of the pallet logic, to be aggregated at polkadex-mainnet definition through // `construct_runtime`. // Trait to add liquidity in OCEX pallet diff --git a/pallets/liquidity/src/mock.rs b/pallets/liquidity/src/mock.rs index da37c607f..1310c3850 100644 --- a/pallets/liquidity/src/mock.rs +++ b/pallets/liquidity/src/mock.rs @@ -37,7 +37,7 @@ use sp_std::cell::RefCell; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; -// For testing the pallet, we construct a mock runtime. +// For testing the pallet, we construct a mock polkadex-mainnet. frame_support::construct_runtime!( pub enum Test where Block = Block, diff --git a/pallets/liquidity/src/weights.rs b/pallets/liquidity/src/weights.rs index 9b778d474..448231d1e 100644 --- a/pallets/liquidity/src/weights.rs +++ b/pallets/liquidity/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./polkadex-polkadex-mainnet-polkadex-parachain-node // benchmark // pallet // --pallet diff --git a/pallets/ocex/rpc/src/lib.rs b/pallets/ocex/rpc/src/lib.rs index 8e1ba361b..0f7c92e88 100644 --- a/pallets/ocex/rpc/src/lib.rs +++ b/pallets/ocex/rpc/src/lib.rs @@ -66,10 +66,10 @@ pub trait PolkadexOcexRpcApi { /// /// # Type Parameters /// -/// * `Client`: The client API used to interact with the Substrate runtime. -/// * `Block`: The block type of the Substrate runtime. +/// * `Client`: The client API used to interact with the Substrate polkadex-mainnet. +/// * `Block`: The block type of the Substrate polkadex-mainnet. pub struct PolkadexOcexRpc { - /// An `Arc` reference to the client API for accessing runtime functionality. + /// An `Arc` reference to the client API for accessing polkadex-mainnet functionality. client: Arc, /// Offchain storage @@ -113,8 +113,9 @@ where Some(at) => at, None => self.client.info().best_hash, }; - // WARN: this is a hack on beating the boundry of runtime -> node - // with decoding tuple of underlying data into solid std type + // WARN: this is a hack on beating the boundry of polkadex-mainnet -> + // polkadex-mainnet-polkadex-parachain-node with decoding tuple of underlying data into + // solid std type Decode::decode( &mut api .get_ob_recover_state(at) @@ -187,7 +188,7 @@ where } } -/// Converts a runtime trap into an RPC error. +/// Converts a polkadex-mainnet trap into an RPC error. fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -> JsonRpseeError { CallError::Custom(ErrorObject::owned(RUNTIME_ERROR, "Runtime error", Some(format!("{err:?}")))) .into() diff --git a/pallets/ocex/src/lib.rs b/pallets/ocex/src/lib.rs index 28114945c..5ea317538 100644 --- a/pallets/ocex/src/lib.rs +++ b/pallets/ocex/src/lib.rs @@ -126,7 +126,7 @@ pub trait OcexWeightInfo { fn whitelist_orderbook_operator() -> Weight; } -// Definition of the pallet logic, to be aggregated at runtime definition through +// Definition of the pallet logic, to be aggregated at polkadex-mainnet definition through // `construct_runtime`. #[allow(clippy::too_many_arguments)] #[frame_support::pallet] diff --git a/pallets/ocex/src/mock.rs b/pallets/ocex/src/mock.rs index 3cf6096ee..10428c7fb 100644 --- a/pallets/ocex/src/mock.rs +++ b/pallets/ocex/src/mock.rs @@ -40,7 +40,7 @@ use sp_runtime::{ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; -// For testing the pallet, we construct a mock runtime. +// For testing the pallet, we construct a mock polkadex-mainnet. frame_support::construct_runtime!( pub enum Test where Block = Block, diff --git a/pallets/ocex/src/storage.rs b/pallets/ocex/src/storage.rs index 126cbf390..dc1703b20 100644 --- a/pallets/ocex/src/storage.rs +++ b/pallets/ocex/src/storage.rs @@ -220,7 +220,8 @@ impl HashDB for State { } } -/// Derive a database key from hash value of the node (key) and the node prefix. +/// Derive a database key from hash value of the polkadex-mainnet-polkadex-parachain-node (key) and +/// the polkadex-mainnet-polkadex-parachain-node prefix. pub fn prefixed_key(key: &::Out, prefix: Prefix) -> Vec { let mut prefixed_key = Vec::with_capacity(key.as_ref().len() + prefix.0.len() + 1); prefixed_key.extend_from_slice(prefix.0); diff --git a/pallets/ocex/src/weights.rs b/pallets/ocex/src/weights.rs index 8f6f9e3ae..45e83ea0f 100644 --- a/pallets/ocex/src/weights.rs +++ b/pallets/ocex/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./polkadex-polkadex-mainnet-polkadex-parachain-node // benchmark // pallet // --pallet diff --git a/pallets/pdex-migration/src/lib.rs b/pallets/pdex-migration/src/lib.rs index 1d3352f9f..36e53cdec 100644 --- a/pallets/pdex-migration/src/lib.rs +++ b/pallets/pdex-migration/src/lib.rs @@ -71,7 +71,8 @@ pub mod pallet { #[pallet::config] /// Configure the pallet by specifying the parameters and types on which it depends. pub trait Config: frame_system::Config + pallet_balances::Config + pallet_sudo::Config { - /// Because this pallet emits events, it depends on the runtime's definition of an event. + /// Because this pallet emits events, it depends on the polkadex-mainnet's definition of an + /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Max Number of relayers #[pallet::constant] diff --git a/pallets/pdex-migration/src/mock.rs b/pallets/pdex-migration/src/mock.rs index d720ef8fe..b427c3f26 100644 --- a/pallets/pdex-migration/src/mock.rs +++ b/pallets/pdex-migration/src/mock.rs @@ -33,7 +33,7 @@ use frame_support::traits::GenesisBuild; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// Configure a mock runtime to test the pallet. +// Configure a mock polkadex-mainnet to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -114,7 +114,7 @@ impl pallet_sudo::Config for Test { type WeightInfo = (); } -// Build genesis storage according to the mock runtime. +// Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { let alice = 1u64; let mut t = system::GenesisConfig::default().build_storage::().unwrap(); diff --git a/pallets/pdex-migration/src/weights.rs b/pallets/pdex-migration/src/weights.rs index f907706c3..02494aa02 100644 --- a/pallets/pdex-migration/src/weights.rs +++ b/pallets/pdex-migration/src/weights.rs @@ -8,7 +8,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./polkadex-polkadex-mainnet-polkadex-parachain-node // benchmark // pallet // --pallet diff --git a/pallets/rewards/rpc/src/lib.rs b/pallets/rewards/rpc/src/lib.rs index e0b35061e..47d17d419 100644 --- a/pallets/rewards/rpc/src/lib.rs +++ b/pallets/rewards/rpc/src/lib.rs @@ -49,10 +49,10 @@ pub trait PolkadexRewardsRpcApi { /// /// # Type Parameters /// -/// * `Client`: The client API used to interact with the Substrate runtime. -/// * `Block`: The block type of the Substrate runtime. +/// * `Client`: The client API used to interact with the Substrate polkadex-mainnet. +/// * `Block`: The block type of the Substrate polkadex-mainnet. pub struct PolkadexRewardsRpc { - /// An `Arc` reference to the client API for accessing runtime functionality. + /// An `Arc` reference to the client API for accessing polkadex-mainnet functionality. client: Arc, /// A marker for the `Block` type parameter, used to ensure the struct @@ -97,7 +97,7 @@ where } } -/// Converts a runtime trap into an RPC error. +/// Converts a polkadex-mainnet trap into an RPC error. fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -> JsonRpseeError { CallError::Custom(ErrorObject::owned(RUNTIME_ERROR, "Runtime error", Some(format!("{err:?}")))) .into() diff --git a/pallets/rewards/src/lib.rs b/pallets/rewards/src/lib.rs index 9727b4698..d80e1ec9e 100644 --- a/pallets/rewards/src/lib.rs +++ b/pallets/rewards/src/lib.rs @@ -66,7 +66,7 @@ pub mod weights; const MIN_REWARDS_CLAIMABLE_AMOUNT: u128 = polkadex_primitives::UNIT_BALANCE; pub const REWARDS_LOCK_ID: LockIdentifier = *b"REWARDID"; -// Definition of the pallet logic, to be aggregated at runtime definition through +// Definition of the pallet logic, to be aggregated at polkadex-mainnet definition through // `construct_runtime`. #[frame_support::pallet] pub mod pallet { diff --git a/pallets/rewards/src/mock.rs b/pallets/rewards/src/mock.rs index 4f2e714a0..768ee3fd9 100644 --- a/pallets/rewards/src/mock.rs +++ b/pallets/rewards/src/mock.rs @@ -37,7 +37,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// For testing the pallet, we construct a mock runtime. +// For testing the pallet, we construct a mock polkadex-mainnet. frame_support::construct_runtime!( pub enum Test where Block = Block, diff --git a/pallets/rewards/src/weights.rs b/pallets/rewards/src/weights.rs index e305e8ce5..8f410fd61 100644 --- a/pallets/rewards/src/weights.rs +++ b/pallets/rewards/src/weights.rs @@ -8,7 +8,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./polkadex-polkadex-mainnet-polkadex-parachain-node // benchmark // pallet // --pallet diff --git a/pallets/thea-council/Cargo.toml b/pallets/thea-council/Cargo.toml new file mode 100644 index 000000000..82500837d --- /dev/null +++ b/pallets/thea-council/Cargo.toml @@ -0,0 +1,59 @@ +[package] +name = "thea-council" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +frame-benchmarking = { workspace = true, default-features = false, optional = true } +frame-support = { workspace = true, default-features = false } +frame-system = { workspace = true, default-features = false } +sp-std = { workspace = true, default-features = false } +xcm-helper = { path = "../xcm-helper", default-features = false } +sp-runtime = { workspace = true, default-features = false } +thea-primitives = { workspace = true, default-features = false } + +[dev-dependencies] +sp-core = { workspace = true, default-features = false } +sp-io = { workspace = true, default-features = false } +orml-xtokens = { workspace = true, default-features = false } +orml-traits = { workspace = true, default-features = false } +xcm-executor = { workspace = true, default-features = false } +xcm = { workspace = true, default-features = false } +pallet-xcm = { workspace = true, default-features = false } +xcm-builder = { workspace = true, default-features = false } +pallet-balances = { workspace = true, default-features = false } +pallet-assets = { workspace = true, default-features = false } +thea-message-handler = { path = "../thea-message-handler", default-features = false } +parachain-info = { workspace = true, default-features = false } +thea = { path = "../thea", default-features = false } + +[features] +default = ["std"] +std = [ + "thea-message-handler/std", + "thea-primitives/std", + "codec/std", + "frame-benchmarking?/std", + "frame-support/std", + "frame-system/std", + "scale-info/std", + "xcm-helper/std", + "orml-xtokens/std", + "orml-traits/std", + "xcm-executor/std", + "xcm/std", + "pallet-xcm/std", + "xcm-builder/std", + "pallet-balances/std", + "pallet-assets/std", + "thea/std", +] +runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "xcm-builder/runtime-benchmarks"] +try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/thea-council/src/benchmarking.rs b/pallets/thea-council/src/benchmarking.rs new file mode 100644 index 000000000..fa4a2f8de --- /dev/null +++ b/pallets/thea-council/src/benchmarking.rs @@ -0,0 +1,101 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use super::*; + +#[allow(unused)] +use crate::Pallet as TheaCouncil; +use frame_benchmarking::{account, benchmarks}; +use frame_support::{sp_runtime::SaturatedConversion, BoundedVec}; +use frame_system::RawOrigin; +use sp_std::{vec, vec::Vec}; +use thea_primitives::types::Withdraw; +const SEED: u32 = 0; + +benchmarks! { + add_member { + // Add sender to council member + let b in 1 .. 1000; + let council_member: T::AccountId = account("mem1", b, SEED); + let mut active_council_member = >::get(); + active_council_member.try_push(council_member.clone()).unwrap(); + >::put(active_council_member); + let new_member: T::AccountId = account("mem2", b, SEED); + }: _(RawOrigin::Signed(council_member.clone()), new_member) + verify { + let active_members = >::get(); + assert!(active_members.contains(&council_member)); + } + + remove_member { + let b in 1 .. 1000; + let first_council_member: T::AccountId = account("mem1", b, SEED); + let sec_council_member: T::AccountId = account("mem2", b, SEED); + let third_council_member: T::AccountId = account("mem3", b, SEED); + let mut active_council_member = >::get(); + active_council_member.try_push(first_council_member.clone()).unwrap(); + active_council_member.try_push(sec_council_member.clone()).unwrap(); + active_council_member.try_push(third_council_member.clone()).unwrap(); + >::put(active_council_member); + let proposal = Proposal::RemoveExistingMember(third_council_member.clone()); + let votes = BoundedVec::try_from(vec![Voted(first_council_member)]).unwrap(); + >::insert(proposal, votes); + }: _(RawOrigin::Signed(sec_council_member), third_council_member.clone()) + verify { + let active_members = >::get(); + assert!(!active_members.contains(&third_council_member)); + } + + claim_membership { + let b in 1 .. 1000; + let pending_council_member: T::AccountId = account("mem1", b, SEED); + let mut pending_council_members = >::get(); + pending_council_members.try_push((b.into(),pending_council_member.clone())).unwrap(); + >::put(pending_council_members); + }: _(RawOrigin::Signed(pending_council_member.clone())) + verify { + let active_members = >::get(); + assert!(active_members.contains(&pending_council_member)); + } + + delete_transaction { + let b in 1 .. 1000; + let council_member: T::AccountId = account("mem1", b, SEED); + let mut active_council_member = >::get(); + active_council_member.try_push(council_member.clone()).unwrap(); + >::put(active_council_member); + // Add Pending Withdrawal + let block_no: T::BlockNumber = 100u64.saturated_into(); + let pending_withdrawal = Withdraw { + id: Vec::new(), + asset_id: 0, + amount: 0, + destination: vec![], + is_blocked: false, + extra: vec![] + }; + xcm_helper::Pallet::::insert_pending_withdrawal(block_no, pending_withdrawal); + }: _(RawOrigin::Signed(council_member), block_no, 0u32) + verify { + let pending_withdrawal = xcm_helper::Pallet::::get_pending_withdrawals(block_no).pop().unwrap(); + assert!(pending_withdrawal.is_blocked); + } +} + +#[cfg(test)] +use frame_benchmarking::impl_benchmark_test_suite; + +#[cfg(test)] +impl_benchmark_test_suite!(TheaCouncil, crate::mock::new_test_ext(), crate::mock::Test); diff --git a/pallets/thea-council/src/lib.rs b/pallets/thea-council/src/lib.rs new file mode 100644 index 000000000..7a32429ff --- /dev/null +++ b/pallets/thea-council/src/lib.rs @@ -0,0 +1,383 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +#![cfg_attr(not(feature = "std"), no_std)] + +//! Thea Council Pallet +//! +//! Thea Council Pallet provides functionality to maintain council members on Parachain. +//! +//! - [`Config`] +//! - [`Call`] +//! - [`Pallet`] +//! +//! ## Overview +//! +//! Thea Council Pallet provides following functionalities:- +//! +//! - Adds member to Council. +//! - Removes member from Council. +//! - Block Transaction. +//! +//! ## Interface +//! +//! ### Dispatchable Functions +//! - `add_member` - Adds member to council. +//! - `remove_member` - Removes member from council. +//! - `claim_membership` - Converts Council member status from pending to Active. +//! - `delete_transaction` - Blocks withdrawal request. +//! +//! ### Public Inspection functions - Immutable (getters) +//! - `is_council_member` - Checks if given member is council member. +//! +//! ### Storage Items +//! - `ActiveCouncilMembers` - Stores Active Council Member List. +//! - `PendingCouncilMembers` - Stores Pending Council Member List. +//! - `Proposals` - Stores active proposals. +//! - +//! # Events +//! - `NewPendingMemberAdded` - New Pending Member added. +//! - `NewActiveMemberAdded` - New Active Member added. +//! - `MemberRemoved` - Council Member removed. +//! - `TransactionDeleted` - Transaction blocked. +pub use pallet::*; + +#[cfg(test)] +mod mock; + +#[cfg(test)] +mod tests; + +#[cfg(feature = "polkadex-mainnet-benchmarks")] +mod benchmarking; + +pub mod weights; +pub use weights::*; + +#[frame_support::pallet] +pub mod pallet { + use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; + use sp_runtime::{Percent, SaturatedConversion}; + + #[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Copy, Clone)] + pub enum Proposal { + AddNewMember(AccountId), + RemoveExistingMember(AccountId), + } + + #[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Copy, Clone, Eq, PartialEq, Debug)] + pub struct Voted(pub AccountId); + + pub trait TheaCouncilWeightInfo { + fn add_member(b: u32) -> Weight; + fn remove_member(_b: u32) -> Weight; + fn claim_membership(b: u32) -> Weight; + fn delete_transaction(_b: u32) -> Weight; + } + + #[pallet::pallet] + #[pallet::without_storage_info] + pub struct Pallet(_); + + /// Configure the pallet by specifying the parameters and types on which it depends. + #[pallet::config] + pub trait Config: frame_system::Config + xcm_helper::Config { + /// Because this pallet emits events, it depends on the polkadex-mainnet's definition of an + /// event. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Minimum Active Council Size below witch Removal is not possible + #[pallet::constant] + type MinimumActiveCouncilSize: Get; + /// How long pending council member have to claim membership + #[pallet::constant] + type RetainPeriod: Get; + /// Wight Info + type TheaCouncilWeightInfo: TheaCouncilWeightInfo; + } + + /// Active Council Members + #[pallet::storage] + #[pallet::getter(fn get_council_members)] + pub(super) type ActiveCouncilMembers = + StorageValue<_, BoundedVec>, ValueQuery>; + + /// Pending Council Members + #[pallet::storage] + #[pallet::getter(fn get_pending_council_members)] + pub(super) type PendingCouncilMembers = + StorageValue<_, BoundedVec<(u64, T::AccountId), ConstU32<10>>, ValueQuery>; + + /// Proposals + #[pallet::storage] + #[pallet::getter(fn proposal_status)] + pub(super) type Proposals = StorageMap< + _, + frame_support::Blake2_128Concat, + Proposal, + BoundedVec, ConstU32<10>>, + ValueQuery, + >; + + // Pallets use events to inform users when important changes are made. + // https://docs.substrate.io/main-docs/build/events-errors/ + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// New Council Member Added [new_pending_member] + NewPendingMemberAdded(T::AccountId), + /// New active member added [new_active_member] + NewActiveMemberAdded(T::AccountId), + /// Member removed [member] + MemberRemoved(T::AccountId), + /// Transaction deleted + TransactionDeleted(u32), + /// Removed some unclaimed proposed council members + RetainPeriodExpiredForCouncilProposal(u32), + } + + // Errors inform users that something went wrong. + #[pallet::error] + pub enum Error { + /// Storage Overflow + StorageOverflow, + /// Not a Valid Sender + BadOrigin, + /// Already Council Member + AlreadyMember, + /// Not Pending Member + NotPendingMember, + /// Sender not council member + SenderNotCouncilMember, + /// Sender Already Voted + SenderAlreadyVoted, + /// Not Active Member + NotActiveMember, + /// Active Council Size is below Threshold + ActiveCouncilSizeIsBelowThreshold, + /// Proposals Storage Overflow + ProposalsStorageOverflow, + /// Pending Council Storage Overflow + PendingCouncilStorageOverflow, + /// Active Council Storage Overflow + ActiveCouncilStorageOverflow, + } + + // Dispatchable functions allows users to interact with the pallet and invoke state changes. + // These functions materialize as "extrinsics", which are often compared to transactions. + // Dispatchable functions must be annotated with a weight and must return a DispatchResult. + #[pallet::call] + impl Pallet { + /// Adds member to Thea Council. + /// + /// # Parameters + /// + /// * `new_member`: AccountId of New Member. + #[pallet::call_index(0)] + #[pallet::weight(T::TheaCouncilWeightInfo::add_member(1))] + pub fn add_member(origin: OriginFor, new_member: T::AccountId) -> DispatchResult { + let sender = ensure_signed(origin)?; + ensure!(Self::is_council_member(&sender), Error::::SenderNotCouncilMember); + Self::do_add_member(sender, new_member)?; + Ok(()) + } + + /// Removes member from Thea Council. + /// + /// # Parameters + /// + /// * `member_to_be_removed`: AccountId for memebr to be removed. + #[pallet::call_index(1)] + #[pallet::weight(T::TheaCouncilWeightInfo::remove_member(1))] + pub fn remove_member( + origin: OriginFor, + member_to_be_removed: T::AccountId, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + ensure!(Self::is_council_member(&sender), Error::::SenderNotCouncilMember); + Self::do_remove_member(sender, member_to_be_removed)?; + Ok(()) + } + + /// Converts Pending Council Member to Active Council Member. + #[pallet::call_index(2)] + #[pallet::weight(T::TheaCouncilWeightInfo::claim_membership(1))] + pub fn claim_membership(origin: OriginFor) -> DispatchResult { + let sender = ensure_signed(origin)?; + Self::do_claim_membership(&sender)?; + Self::deposit_event(Event::::NewActiveMemberAdded(sender)); + Ok(()) + } + + /// Blocks malicious Pending Transaction. + /// + /// # Parameters + /// + /// * `block_no`: Block No which contains malicious transaction. + /// * `index`: Index of Malicious transaction in the list. + #[pallet::call_index(3)] + #[pallet::weight(T::TheaCouncilWeightInfo::delete_transaction(1))] + pub fn delete_transaction( + origin: OriginFor, + block_no: T::BlockNumber, + index: u32, + ) -> DispatchResult { + let sender = ensure_signed(origin)?; + ensure!(Self::is_council_member(&sender), Error::::SenderNotCouncilMember); + xcm_helper::Pallet::::block_by_ele(block_no, index)?; + Self::deposit_event(Event::::TransactionDeleted(index)); + Ok(()) + } + } + + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_initialize(n: T::BlockNumber) -> Weight { + let mut removed = 0; + >::mutate(|m| { + let was = m.len(); + m.retain(|i| { + T::RetainPeriod::get().saturating_add(i.0) >= n.saturated_into::() + }); + removed = was.saturating_sub(m.len()); + }); + Self::deposit_event(Event::::RetainPeriodExpiredForCouncilProposal( + removed.saturated_into(), + )); + T::DbWeight::get().reads_writes(1, removed.saturated_into()) + } + } + + impl Pallet { + fn is_council_member(sender: &T::AccountId) -> bool { + let active_members = >::get(); + active_members.contains(sender) + } + + fn is_pending_council_member(sender: &T::AccountId) -> bool { + let pending_members = >::get(); + pending_members.iter().any(|m| m.1 == *sender) + } + + fn do_add_member(sender: T::AccountId, new_member: T::AccountId) -> DispatchResult { + ensure!(!Self::is_council_member(&new_member), Error::::AlreadyMember); + ensure!(!Self::is_pending_council_member(&new_member), Error::::AlreadyMember); + let proposal = Proposal::AddNewMember(new_member); + Self::evaluate_proposal(proposal, sender)?; + Ok(()) + } + + fn do_remove_member( + sender: T::AccountId, + member_to_be_removed: T::AccountId, + ) -> DispatchResult { + let proposal = Proposal::RemoveExistingMember(member_to_be_removed); + Self::evaluate_proposal(proposal, sender)?; + Ok(()) + } + + pub(crate) fn get_expected_votes() -> usize { + let total_active_council_size = >::get().len(); + if total_active_council_size == 2 { + 2 + } else { + let p = Percent::from_percent(65); + p * total_active_council_size + } + } + + fn evaluate_proposal( + proposal: Proposal, + sender: T::AccountId, + ) -> DispatchResult { + let current_votes = + |votes: &BoundedVec, ConstU32<10>>| -> usize { votes.len() }; + let expected_votes = Self::get_expected_votes(); + let mut remove_proposal = false; + >::try_mutate(proposal.clone(), |votes| { + ensure!(!votes.contains(&Voted(sender.clone())), Error::::SenderAlreadyVoted); + votes + .try_push(Voted(sender)) + .map_err(|_| Error::::ProposalsStorageOverflow)?; + if current_votes(votes) >= expected_votes { + Self::execute_proposal(proposal.clone())?; + remove_proposal = true; + } + Ok::<(), sp_runtime::DispatchError>(()) + })?; + if remove_proposal { + Self::remove_proposal(proposal); + } + Ok(()) + } + + fn remove_proposal(proposal: Proposal) { + >::remove(proposal); + } + + fn execute_proposal(proposal: Proposal) -> DispatchResult { + match proposal { + Proposal::AddNewMember(new_member) => Self::execute_add_member(new_member), + Proposal::RemoveExistingMember(member_to_be_removed) => + Self::execute_remove_member(member_to_be_removed), + } + } + + fn execute_add_member(new_member: T::AccountId) -> DispatchResult { + let mut pending_council_member = >::get(); + pending_council_member + .try_push(( + >::block_number().saturated_into(), + new_member.clone(), + )) + .map_err(|_| Error::::PendingCouncilStorageOverflow)?; + >::put(pending_council_member); + Self::deposit_event(Event::::NewPendingMemberAdded(new_member)); + Ok(()) + } + + fn execute_remove_member(member_to_be_removed: T::AccountId) -> DispatchResult { + let mut active_council_member = >::get(); + ensure!( + active_council_member.len() > T::MinimumActiveCouncilSize::get().into(), + Error::::ActiveCouncilSizeIsBelowThreshold + ); + let index = active_council_member + .iter() + .position(|member| *member == member_to_be_removed) + .ok_or(Error::::NotActiveMember)?; + active_council_member.remove(index); + >::put(active_council_member); + Self::deposit_event(Event::::MemberRemoved(member_to_be_removed)); + Ok(()) + } + + fn do_claim_membership(sender: &T::AccountId) -> DispatchResult { + let mut pending_members = >::get(); + let index = pending_members + .iter() + .position(|member| member.1 == *sender) + .ok_or(Error::::NotPendingMember)?; + pending_members.remove(index); + >::put(pending_members); + let mut active_council_member = >::get(); + active_council_member + .try_push(sender.clone()) + .map_err(|_| Error::::ActiveCouncilStorageOverflow)?; + >::put(active_council_member); + Ok(()) + } + } +} diff --git a/pallets/thea-council/src/mock.rs b/pallets/thea-council/src/mock.rs new file mode 100644 index 000000000..ae2061318 --- /dev/null +++ b/pallets/thea-council/src/mock.rs @@ -0,0 +1,223 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use crate as thea_council; +use frame_support::{ + parameter_types, + traits::{ConstU16, ConstU64}, +}; +use frame_system as system; +use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; +use sp_core::{ConstU32, H256}; +use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, +}; +use thea::ecdsa::{AuthorityId, AuthoritySignature}; +use xcm::lts::{ + InteriorMultiLocation, + Junction::{GlobalConsensus, Parachain}, + Junctions::X2, +}; + +type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; +type Block = frame_system::mocking::MockBlock; + +// Configure a mock polkadex-mainnet to test the pallet. +frame_support::construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + XcmHnadler: xcm_helper, + TheaCouncil: thea_council, + XToken: orml_xtokens, + ParachainInfo: parachain_info, + TheaMessageHandler: thea_message_handler + } +); + +impl parachain_info::Config for Test {} + +parameter_types! { + pub const TheaMaxAuthorities: u32 = 10; +} + +impl thea_message_handler::Config for Test { + type RuntimeEvent = RuntimeEvent; + type TheaId = AuthorityId; + type Signature = AuthoritySignature; + type MaxAuthorities = TheaMaxAuthorities; + type Executor = XcmHnadler; + type WeightInfo = thea_message_handler::weights::WeightInfo; +} + +impl system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = ConstU16<42>; + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + +impl thea_council::Config for Test { + type RuntimeEvent = RuntimeEvent; + type MinimumActiveCouncilSize = frame_support::traits::ConstU8<2>; + type RetainPeriod = ConstU64<7200>; + type TheaCouncilWeightInfo = crate::weights::WeightInfo; // 24h +} + +use frame_support::{traits::AsEnsureOriginWithArg, PalletId}; +use frame_system::EnsureSigned; + +pub const TOKEN: u128 = 1_000_000_000_000; + +parameter_types! { + pub const ExistentialDeposit: u128 = TOKEN; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; +} + +impl pallet_balances::Config for Test { + type Balance = u128; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = frame_system::Pallet; + type MaxLocks = MaxLocks; + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type WeightInfo = (); + type RuntimeEvent = RuntimeEvent; + type HoldIdentifier = (); + type FreezeIdentifier = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; +} + +parameter_types! { + pub const AssetHandlerPalletId: PalletId = PalletId(*b"XcmHandl"); + pub const WithdrawalExecutionBlockDiff: u32 = 1000; + pub ParachainId: u32 = 2040; + pub NativeAssetId: u128 = 100; +} + +impl xcm_helper::Config for Test { + type RuntimeEvent = RuntimeEvent; + type AccountIdConvert = (); + type Assets = Assets; + type AssetId = u128; + type Currency = Balances; + type AssetCreateUpdateOrigin = EnsureSigned; + type Executor = TheaMessageHandler; + type AssetHandlerPalletId = AssetHandlerPalletId; + type WithdrawalExecutionBlockDiff = WithdrawalExecutionBlockDiff; + type ParachainId = ParachainId; + type SubstrateNetworkId = frame_support::traits::ConstU8<0>; + type NativeAssetId = NativeAssetId; + type WeightInfo = xcm_helper::weights::WeightInfo; +} + +parameter_types! { + pub const AssetDeposit: u128 = 100; + pub const ApprovalDeposit: u128 = 1; + pub const StringLimit: u32 = 50; + pub const MetadataDepositBase: u128 = 10; + pub const MetadataDepositPerByte: u128 = 1; +} + +impl pallet_assets::Config for Test { + type RuntimeEvent = RuntimeEvent; + type Balance = u128; + type RemoveItemsLimit = ConstU32<1000>; + type AssetId = u128; + type AssetIdParameter = codec::Compact; + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = EnsureSigned; + type AssetDeposit = AssetDeposit; + type AssetAccountDeposit = AssetDeposit; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type ApprovalDeposit = ApprovalDeposit; + type StringLimit = StringLimit; + type Freezer = (); + type Extra = (); + type CallbackHandle = (); + type WeightInfo = (); +} + +parameter_type_with_key! { + pub ParachainMinFee: |_location: MultiLocation| -> Option { + Some(1u128) + }; +} + +use xcm_builder::FixedWeightBounds; + +use xcm::lts::MultiLocation; + +parameter_types! { + // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. + pub UnitWeightCost: u64 = 1_000_000_000; + pub const MaxInstructions: u32 = 100; + pub Ancestry: xcm::lts::MultiLocation = MultiLocation::default(); + pub UniversalLocation: InteriorMultiLocation = + X2(GlobalConsensus(xcm::v3::NetworkId::Rococo), Parachain(ParachainInfo::parachain_id().into())); +} + +impl orml_xtokens::Config for Test { + type RuntimeEvent = RuntimeEvent; + type Balance = u128; + type CurrencyId = u128; + type CurrencyIdConvert = (); + type AccountIdToMultiLocation = (); + type SelfLocation = (); + type MinXcmFee = ParachainMinFee; + type XcmExecutor = (); + type MultiLocationsFilter = (); + type Weigher = FixedWeightBounds; + type BaseXcmWeight = (); + type MaxAssetsForTransfer = (); + type ReserveProvider = AbsoluteReserveProvider; + type UniversalLocation = UniversalLocation; +} + +// Build genesis storage according to the mock polkadex-mainnet. +pub fn new_test_ext() -> sp_io::TestExternalities { + system::GenesisConfig::default().build_storage::().unwrap().into() +} diff --git a/pallets/thea-council/src/tests.rs b/pallets/thea-council/src/tests.rs new file mode 100644 index 000000000..4ccec5283 --- /dev/null +++ b/pallets/thea-council/src/tests.rs @@ -0,0 +1,204 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use crate::{ + mock::*, ActiveCouncilMembers, Error, PendingCouncilMembers, Proposal, Proposals, Voted, +}; +use frame_support::{assert_noop, assert_ok, traits::Hooks}; +use sp_core::{bounded::BoundedVec, ConstU32}; +use sp_runtime::SaturatedConversion; + +#[test] +fn test_add_member_returns_ok() { + new_test_ext().execute_with(|| { + setup_council_members(); + let (first_council_member, second_council_member, _) = get_council_members(); + let new_member = 4; + assert_ok!(TheaCouncil::add_member( + RuntimeOrigin::signed(first_council_member), + new_member + )); + // Check total Votes + let proposal = Proposal::AddNewMember(new_member); + let expected_votes: BoundedVec, ConstU32<100>> = + BoundedVec::try_from(vec![Voted(first_council_member)]).unwrap(); + assert_eq!(>::get(proposal), expected_votes); + //Second vote + assert_ok!(TheaCouncil::add_member( + RuntimeOrigin::signed(second_council_member), + new_member + )); + let pending_set = >::get(); + assert!(pending_set.iter().any(|m| m.1 == new_member)); + >::remove(proposal); + assert!(!>::contains_key(proposal)); + }) +} + +#[test] +fn pending_council_member_cleaned_up_ok_test() { + new_test_ext().execute_with(|| { + setup_council_members(); + let (first_council_member, second_council_member, _) = get_council_members(); + let new_member = 4; + System::set_block_number(1); + assert_ok!(TheaCouncil::add_member( + RuntimeOrigin::signed(first_council_member), + new_member + )); + // Check total Votes + let proposal = Proposal::AddNewMember(new_member); + let expected_votes: BoundedVec, ConstU32<100>> = + BoundedVec::try_from(vec![Voted(first_council_member)]).unwrap(); + assert_eq!(>::get(proposal), expected_votes); + //Second vote + assert_ok!(TheaCouncil::add_member( + RuntimeOrigin::signed(second_council_member), + new_member + )); + let pending_set = >::get(); + assert!(pending_set.iter().any(|m| m.1 == new_member)); + // less than 24h + // we still have entry + let pending = >::get(); + assert!(!pending.is_empty()); + // re-initialize + System::set_block_number(7201); + TheaCouncil::on_initialize(7201); + // we still have entry 23h59m48s into + let pending = >::get(); + assert!(!pending.is_empty()); + // re-initialize + System::set_block_number(7202); + TheaCouncil::on_initialize(7202); + // it was cleaned up + let pending = >::get(); + assert!(pending.is_empty()); + }) +} + +#[test] +fn test_add_member_returns_sender_not_council_member() { + new_test_ext().execute_with(|| { + let wrong_council_member = 1; + let new_member = 4; + assert_noop!( + TheaCouncil::add_member(RuntimeOrigin::signed(wrong_council_member), new_member), + Error::::SenderNotCouncilMember + ); + }) +} + +#[test] +fn test_add_member_sender_already_voted() { + new_test_ext().execute_with(|| { + setup_council_members(); + let (first_council_member, _, _) = get_council_members(); + let new_member = 4; + assert_ok!(TheaCouncil::add_member( + RuntimeOrigin::signed(first_council_member), + new_member + )); + assert_noop!( + TheaCouncil::add_member(RuntimeOrigin::signed(first_council_member), new_member), + Error::::SenderAlreadyVoted + ); + }) +} + +#[test] +fn test_remove_member_returns_ok() { + new_test_ext().execute_with(|| { + setup_council_members(); + let (first_council_member, second_council_member, member_to_be_removed) = + get_council_members(); + assert_ok!(TheaCouncil::remove_member( + RuntimeOrigin::signed(first_council_member), + member_to_be_removed + )); + assert_ok!(TheaCouncil::remove_member( + RuntimeOrigin::signed(second_council_member), + member_to_be_removed + )); + let active_set = >::get(); + assert!(!active_set.contains(&member_to_be_removed)); + }) +} + +#[test] +fn test_claim_membership_returns_ok() { + new_test_ext().execute_with(|| { + setup_council_members(); + let (first_council_member, second_council_member, _) = get_council_members(); + let new_member = 4; + assert_ok!(TheaCouncil::add_member( + RuntimeOrigin::signed(first_council_member), + new_member + )); + assert_ok!(TheaCouncil::add_member( + RuntimeOrigin::signed(second_council_member), + new_member + )); + assert_ok!(TheaCouncil::claim_membership(RuntimeOrigin::signed(new_member))); + let active_set = >::get(); + assert!(active_set.contains(&new_member)); + }) +} + +#[test] +fn test_claim_membership_with_unregistered_pending_member_returns_not_pending_member() { + new_test_ext().execute_with(|| { + let not_a_pending_member = 1; + assert_noop!( + TheaCouncil::claim_membership(RuntimeOrigin::signed(not_a_pending_member)), + Error::::NotPendingMember + ); + }) +} + +#[test] +fn get_expected_votes_test() { + new_test_ext().execute_with(|| { + // at most 10 council members allowed + for i in 2..11 { + // we start with 1 and it can go up to 10 + let members_vec: Vec = (1u64..=i).enumerate().map(|(n, _)| n as u64 + 1).collect(); + let members = BoundedVec::try_from(members_vec).unwrap(); + >::put(members.clone()); + // we check if we have more than half of actual council members always + let expected: u64 = + TheaCouncil::get_expected_votes().saturated_into::().saturating_mul(2); + assert!(expected > i); + } + }) +} + +fn setup_council_members() { + let (first_council_member, second_council_member, third_council_member) = get_council_members(); + let council = BoundedVec::try_from(vec![ + first_council_member, + second_council_member, + third_council_member, + ]) + .unwrap(); + >::put(council); +} + +fn get_council_members() -> (u64, u64, u64) { + let first_council_member = 1; + let second_council_member = 2; + let third_council_member = 3; + (first_council_member, second_council_member, third_council_member) +} diff --git a/pallets/thea-council/src/weights.rs b/pallets/thea-council/src/weights.rs new file mode 100644 index 000000000..b577654e1 --- /dev/null +++ b/pallets/thea-council/src/weights.rs @@ -0,0 +1,120 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +//! Autogenerated weights for `thea_council` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-28, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Ubuntu-2204-jammy-amd64-base`, CPU: `Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// ./parachain-polkadex-polkadex-mainnet-polkadex-parachain-node +// benchmark +// pallet +// --pallet +// thea_council +// --steps +// 100 +// --repeat +// 200 +// --extrinsic +// * +// --output +// thea_council_weights.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `thea_council`. +pub struct WeightInfo(PhantomData); +impl crate::TheaCouncilWeightInfo for WeightInfo { + /// Storage: TheaCouncil ActiveCouncilMembers (r:1 w:0) + /// Proof: TheaCouncil ActiveCouncilMembers (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: TheaCouncil PendingCouncilMembers (r:1 w:1) + /// Proof: TheaCouncil PendingCouncilMembers (max_values: Some(1), max_size: Some(401), added: 896, mode: MaxEncodedLen) + /// Storage: TheaCouncil Proposals (r:1 w:1) + /// Proof: TheaCouncil Proposals (max_values: None, max_size: Some(370), added: 2845, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn add_member(_b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `168` + // Estimated: `3835` + // Minimum execution time: 13_313_000 picoseconds. + Weight::from_parts(14_011_349, 0) + .saturating_add(Weight::from_parts(0, 3835)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: TheaCouncil ActiveCouncilMembers (r:1 w:1) + /// Proof: TheaCouncil ActiveCouncilMembers (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: TheaCouncil Proposals (r:1 w:1) + /// Proof: TheaCouncil Proposals (max_values: None, max_size: Some(370), added: 2845, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn remove_member(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `339` + // Estimated: `3835` + // Minimum execution time: 14_352_000 picoseconds. + Weight::from_parts(14_981_588, 0) + .saturating_add(Weight::from_parts(0, 3835)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(19, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: TheaCouncil PendingCouncilMembers (r:1 w:1) + /// Proof: TheaCouncil PendingCouncilMembers (max_values: Some(1), max_size: Some(401), added: 896, mode: MaxEncodedLen) + /// Storage: TheaCouncil ActiveCouncilMembers (r:1 w:1) + /// Proof: TheaCouncil ActiveCouncilMembers (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn claim_membership(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `176` + // Estimated: `1886` + // Minimum execution time: 10_200_000 picoseconds. + Weight::from_parts(10_787_774, 0) + .saturating_add(Weight::from_parts(0, 1886)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: TheaCouncil ActiveCouncilMembers (r:1 w:0) + /// Proof: TheaCouncil ActiveCouncilMembers (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) + /// Storage: XcmHelper PendingWithdrawals (r:1 w:1) + /// Proof Skipped: XcmHelper PendingWithdrawals (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn delete_transaction(_b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `3721` + // Minimum execution time: 12_884_000 picoseconds. + Weight::from_parts(13_467_259, 0) + .saturating_add(Weight::from_parts(0, 3721)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/pallets/thea-executor/src/lib.rs b/pallets/thea-executor/src/lib.rs index 019a731c9..4a5839210 100644 --- a/pallets/thea-executor/src/lib.rs +++ b/pallets/thea-executor/src/lib.rs @@ -70,7 +70,8 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config { - /// Because this pallet emits events, it depends on the runtime's definition of an event. + /// Because this pallet emits events, it depends on the polkadex-mainnet's definition of an + /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Balances Pallet type Currency: frame_support::traits::tokens::fungible::Mutate diff --git a/pallets/thea-executor/src/mock.rs b/pallets/thea-executor/src/mock.rs index 52518c424..9fdcd7393 100644 --- a/pallets/thea-executor/src/mock.rs +++ b/pallets/thea-executor/src/mock.rs @@ -31,7 +31,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// Configure a mock runtime to test the pallet. +// Configure a mock polkadex-mainnet to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -176,7 +176,7 @@ where type OverarchingCall = RuntimeCall; } -// Build genesis storage according to the mock runtime. +// Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { let t = system::GenesisConfig::default().build_storage::().unwrap(); t.into() diff --git a/pallets/thea-executor/src/weights.rs b/pallets/thea-executor/src/weights.rs index bf8bff8f8..353728512 100644 --- a/pallets/thea-executor/src/weights.rs +++ b/pallets/thea-executor/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./polkadex-polkadex-mainnet-polkadex-parachain-node // benchmark // pallet // --pallet diff --git a/pallets/thea-message-handler/src/mock.rs b/pallets/thea-message-handler/src/mock.rs index 43a1cbbb5..63186378e 100644 --- a/pallets/thea-message-handler/src/mock.rs +++ b/pallets/thea-message-handler/src/mock.rs @@ -29,7 +29,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// Configure a mock runtime to test the pallet. +// Configure a mock polkadex-mainnet to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -184,7 +184,7 @@ where type OverarchingCall = RuntimeCall; } -// Build genesis storage according to the mock runtime. +// Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { let t = system::GenesisConfig::default().build_storage::().unwrap(); t.into() diff --git a/pallets/thea-message-handler/src/weights.rs b/pallets/thea-message-handler/src/weights.rs index 1b8eb5ead..0bdb65e39 100644 --- a/pallets/thea-message-handler/src/weights.rs +++ b/pallets/thea-message-handler/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./polkadex-polkadex-mainnet-polkadex-parachain-node // benchmark // pallet // --pallet diff --git a/pallets/thea/src/lib.rs b/pallets/thea/src/lib.rs index 005b4ba52..9244947d4 100644 --- a/pallets/thea/src/lib.rs +++ b/pallets/thea/src/lib.rs @@ -21,9 +21,9 @@ //! # Thea pallet. //! -//! The core logic for runtime is handled by the Thea pallet. The most important +//! The core logic for polkadex-mainnet is handled by the Thea pallet. The most important //! responsibilities of the Thea pallet are to: -//! * process ingress messages to the runtime; +//! * process ingress messages to the polkadex-mainnet; //! * keep track of egress messages; //! * handle validator session changes; diff --git a/pallets/thea/src/mock.rs b/pallets/thea/src/mock.rs index ea323ebd0..2967bb4f5 100644 --- a/pallets/thea/src/mock.rs +++ b/pallets/thea/src/mock.rs @@ -30,7 +30,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// Configure a mock runtime to test the pallet. +// Configure a mock polkadex-mainnet to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -175,7 +175,7 @@ where type OverarchingCall = RuntimeCall; } -// Build genesis storage according to the mock runtime. +// Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { let t = system::GenesisConfig::default().build_storage::().unwrap(); t.into() diff --git a/pallets/thea/src/session.rs b/pallets/thea/src/session.rs index 7355db27e..285953f8b 100644 --- a/pallets/thea/src/session.rs +++ b/pallets/thea/src/session.rs @@ -33,8 +33,8 @@ impl OneSessionHandler for Pallet { I: Iterator, { let authorities = validators.map(|(_, k)| k).collect::>(); - // we panic here as runtime maintainers can simply reconfigure genesis and restart the - // chain easily + // we panic here as polkadex-mainnet maintainers can simply reconfigure genesis and restart + // the chain easily Self::initialize_authorities(&authorities).expect("Authorities vec too big"); } @@ -46,7 +46,7 @@ impl OneSessionHandler for Pallet { let next_authorities = validators.map(|(_, k)| k).collect::>(); if next_authorities.len() as u32 > T::MaxAuthorities::get() { log::error!( - target: "runtime::thea", + target: "polkadex-mainnet::thea", "authorities list {:?} truncated to length {}", next_authorities, T::MaxAuthorities::get(), ); @@ -57,7 +57,7 @@ impl OneSessionHandler for Pallet { let next_queued_authorities = queued_validators.map(|(_, k)| k).collect::>(); if next_queued_authorities.len() as u32 > T::MaxAuthorities::get() { log::error!( - target: "runtime::thea", + target: "polkadex-mainnet::thea", "queued authorities list {:?} truncated to length {}", next_queued_authorities, T::MaxAuthorities::get(), ); diff --git a/pallets/thea/src/weights.rs b/pallets/thea/src/weights.rs index 7c097c3d1..37e2494e7 100644 --- a/pallets/thea/src/weights.rs +++ b/pallets/thea/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./polkadex-polkadex-mainnet-polkadex-parachain-node // benchmark // pallet // --pallet diff --git a/pallets/xcm-helper/Cargo.toml b/pallets/xcm-helper/Cargo.toml new file mode 100644 index 000000000..2954b077e --- /dev/null +++ b/pallets/xcm-helper/Cargo.toml @@ -0,0 +1,70 @@ +[package] +name = "xcm-helper" +authors = ["business@polkadex.trade"] +description = "XCM Handler." +version = "0.1.0" +license = "GNU GPL v3" +homepage = "https://polkadex.trade/" +repository = "https://github.com/Polkadex-Substrate/parachain" +edition = "2021" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +parity-scale-codec = { workspace = true, default-features = false, features = ["derive"] } +scale-info = { workspace = true, default-features = false, features = ["derive"] } +# Substrate +frame-benchmarking = { workspace = true, default-features = false, optional = true } +pallet-assets = { workspace = true, default-features = false, optional = true } +frame-support = { default-features = false, workspace = true } +frame-system = { workspace = true, default-features = false } +xcm-executor = { workspace = true, default-features = false } +xcm = { workspace = true, default-features = false } +pallet-xcm = { workspace = true, default-features = false } +xcm-builder = { workspace = true, default-features = false } +orml-xtokens = { workspace = true, default-features = false } +sp-runtime = { workspace = true, default-features = false } +sp-core = { workspace = true, default-features = false } +sp-std = { workspace = true, default-features = false } +sp-io = { workspace = true, default-features = false } +cumulus-primitives-core = { workspace = true, default-features = false } +thea-primitives = { workspace = true, default-features = false } +polkadex-primitives = { workspace = true, default-features = false } + +[dev-dependencies] +serde = { workspace = true } +sp-core = { workspace = true, default-features = false } +sp-io = { workspace = true, default-features = false } +sp-runtime = { workspace = true, default-features = false } +orml-traits = { workspace = true, default-features = false } +pallet-balances = { workspace = true, default-features = false } +thea-message-handler = { path = "../thea-message-handler", default-features = false } +thea = { path = "../thea", default-features = false } +hex = "*" + +[features] +default = ["std"] +runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "xcm-builder/runtime-benchmarks"] +std = [ + "parity-scale-codec/std", + "scale-info/std", + "frame-benchmarking/std", + "frame-support/std", + "frame-system/std", + "xcm-executor/std", + "pallet-xcm/std", + "orml-xtokens/std", + "sp-runtime/std", + "sp-core/std", + "cumulus-primitives-core/std", + "pallet-assets/std", + "xcm-builder/std", + "sp-std/std", + "pallet-balances/std", + "orml-traits/std", + "thea-primitives/std", + "thea-message-handler/std", + "thea/std", +] +try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/xcm-helper/src/benchmarking.rs b/pallets/xcm-helper/src/benchmarking.rs new file mode 100644 index 000000000..3b2a2292f --- /dev/null +++ b/pallets/xcm-helper/src/benchmarking.rs @@ -0,0 +1,118 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use super::*; + +#[allow(unused_imports)] +use crate::Pallet as XcmHelper; +use frame_benchmarking::{account, benchmarks}; +use frame_support::{ + sp_runtime::SaturatedConversion, + traits::fungible::{Inspect as NativeInspect, Mutate as NativeMutate}, +}; +use frame_system::RawOrigin; + +use sp_core::Get; +use sp_runtime::traits::AccountIdConversion; +use xcm::latest::{AssetId, Junction, Junctions, MultiLocation}; +const SEED: u32 = 0; + +benchmarks! { + whitelist_token { + let b in 1 .. 1000; + let token = b as u128; + let asset_location = MultiLocation::new(1, Junctions::X1(Junction::Parachain(b))); + let token: AssetId = AssetId::Concrete(asset_location); + }: _(RawOrigin::Root, token) + verify { + let token = XcmHelper::::generate_asset_id_for_parachain(token); + let whitelisted_tokens = >::get(); + assert!(whitelisted_tokens.contains(&token)); + } + + remove_whitelisted_token { + let b in 1 .. 1000; + let token = b as u128; + let asset_location = MultiLocation::new(1, Junctions::X1(Junction::Parachain(b))); + let token: AssetId = AssetId::Concrete(asset_location); + let token_id = XcmHelper::::generate_asset_id_for_parachain(token); + let mut whitelisted_tokens = >::get(); + whitelisted_tokens.push(token_id); + >::put(whitelisted_tokens); + }: _(RawOrigin::Root, token) + verify { + let whitelisted_tokens = >::get(); + assert!(!whitelisted_tokens.contains(&token_id)); + } + + transfer_fee { + let b in 1 .. 1000; + let pallet_account: T::AccountId = T::AssetHandlerPalletId::get().into_account_truncating(); + let asset = T::NativeAssetId::get(); + T::Currency::mint_into(&pallet_account, 2_000_000_000_000_000u128.saturated_into()).unwrap(); + let recipeint: T::AccountId = account("mem1", b, SEED); + }: _(RawOrigin::Root, recipeint.clone()) + verify { + assert_eq!(T::Currency::balance(&recipeint), 1999000000000000u128.saturated_into()); + } + // TODO: We need to adapt this benchmark to work in polkadex-mainnet context + // on_initialize { + // let x: T::BlockNumber = 1u64.saturated_into(); + // let pallet_account: T::AccountId = T::AssetHandlerPalletId::get().into_account_truncating(); + // let asset = T::NativeAssetId::get(); + // let asset_id = AssetId::Concrete(MultiLocation::new(1, Junctions::X1(Junction::Parachain(1000)))); + // let asset_id = XcmHelper::::generate_asset_id_for_parachain(asset_id); + // T::AssetManager::mint_into( + // asset, + // &pallet_account, + // 2_000_000_000_000_000u128.saturated_into() + // ).unwrap(); + // T::AssetManager::create( + // asset_id, + // T::AssetHandlerPalletId::get().into_account_truncating(), + // true, + // 1u128, + // )?; + // >::insert(asset_id, + // AssetId::Concrete(MultiLocation::new(1, Junctions::X1(Junction::Parachain(1000))))); + // let withdrawals: Vec = vec![Withdraw { + // id: Vec::new(), + // asset_id: asset_id, + // amount: UNIT_BALANCE * 10, + // destination: VersionedMultiLocation::V1(MultiLocation::new(1, + // Junctions::X2( + // Junction::Parachain(1000), + // Junction::PalletInstance(1) + // ) + // )).encode(), + // is_blocked: false, + // extra: Vec::new(), + // };100]; + // >::insert(x,withdrawals); + // }: { + // Pallet::::on_initialize(x); + // } verify { + // let withdrawals = >::get(x); + // let failed_withdrawals = >::get(x); + // assert!(failed_withdrawals.is_empty()); + // assert!(withdrawals.is_empty()) + // } +} + +#[cfg(test)] +use frame_benchmarking::impl_benchmark_test_suite; + +#[cfg(test)] +impl_benchmark_test_suite!(XcmHelper, crate::mock::new_test_ext(), crate::mock::Test); diff --git a/pallets/xcm-helper/src/lib.rs b/pallets/xcm-helper/src/lib.rs new file mode 100644 index 000000000..774c97e09 --- /dev/null +++ b/pallets/xcm-helper/src/lib.rs @@ -0,0 +1,709 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +//! XCM Helper Pallet +//! +//! The XCM Helper Pallet provides functionality to handle XCM Messages. Also it implements multiple +//! traits required by XCM Pallets. +//! +//! - [`Config`] +//! - [`Call`] +//! - [`Pallet`] +//! +//! ## Overview +//! +//! XCM Helper Pallet provides following functionalities:- +//! +//! - Handling withdrawal requests from Relayers. +//! - Managing Thea Public Key. +//! - Parachain asset management. +//! - Executing Withdrawal request every block. +//! +//! ## Terminology +//! +//! - **Thea key** Thea Key is Multi-party ECDSA Public Key which has access to transfer funds from +//! Polkadex Sovereign Accounts to Others on Native/Foreign Chain using XCMP. +//! +//! - **WithdrawalExecutionBlockDiff** Delays in Blocks after which Pending withdrawal will be +//! executed. +//! +//! - **ParachainAsset** Type using which native Parachain will identify assets from foregin +//! Parachain. +//! +//! ### Implementations +//! The XCM Helper pallet provides implementations for the following traits. If these traits provide +//! the functionality that you need, then you can avoid coupling with the XCM Helper pallet. +//! +//! -[`TransactAsset`]: Used by XCM Executor to deposit, withdraw and transfer native/non-native +//! asset on Native Chain. -[`AssetIdConverter`]: Converts Assets id from Multilocation Format to +//! Local Asset Id and vice-versa. +//! +//! ## Interface +//! +//! ### Dispatchable Functions +//! - `withdraw_asset` - Transfers Assets from Polkadex Sovereign Account to Others on +//! native/non-native parachains using XCMP. +//! - `deposit_asset` - Generate Ingress Message for new Deposit. +//! - `transfer_asset` - Transfers Asset from source account to destination account. +//! +//! ### Supported Origins +//! - `AssetCreateUpdateOrigin` - Origin which has access to Create Asset. +//! +//! ### Public Functions +//! - `handle_deposit` - Handles deposits from foreign chain. +//! - `generate_asset_id_for_parachain` - Retrieves the existing asset ID for given assetid or +//! generates and stores a new asset ID. +//! - `block_by_ele` - Blocks Transaction to be Executed. +//! - `convert_asset_id_to_location` - Converts asset_id to XCM::MultiLocation. +//! - `convert_location_to_asset_id` - Converts Multilocation to u128. +//! - `insert_pending_withdrawal` - Stores provided withdraw in a "PendingWithdrawals" collectiom. +//! - `multi_location_to_account_converter` - Resolves "AccountId" based on provided MultiLocatiom. +//! +//! ### Public Inspection functions - Immutable (accessors) +//! - `get_pallet_account` - Returns Pallet Id. +//! - `get_destination_account` - Converts Multilocation to AccountId. +//! - `is_polkadex_parachain_destination` - Checks if destination address belongs to native +//! parachain or not. +//! - `is_parachain_asset` - Checks if given asset is native asset or not. +//! - `get_amount` - Converts XCM::Fungibility into u128 +//! +//! ### Storage Items +//! - `PendingWithdrawals` - Stores all pending withdrawal. +//! - `FailedWithdrawals` - Stores failed withdrawals which failed during execution. +//! - `ParachainAssets` - Stores assets mapping from u128 asset to multi asset. +//! - `WhitelistedTokens` - Stores whitelisted Tokens. +//! - +//! # Events +//! - `AssetDeposited` - Asset Deposited from XCM. +//! - `AssetWithdrawn` - Asset burned/locked from native Parachain. +//! - `TheaAssetCreated` - New Asset Created. +//! - `TokenWhitelistedForXcm` - Token Whitelisted For Xcm Token. +//! - `XcmFeeTransferred` - Xcm Fee Transferred. +//! - `NativeAssetIdMappingRegistered` - Native asset id mapping is registered. + +#![cfg_attr(not(feature = "std"), no_std)] + +use frame_support::weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}; +pub use pallet::*; + +#[cfg(feature = "polkadex-mainnet-benchmarks")] +mod benchmarking; + +/// We allow for 0.5 of a second of compute with a 12 second average block time. +const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( + WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), + cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64, +); + +#[cfg(test)] +mod mock; +#[cfg(test)] +mod tests; + +pub mod weights; +pub use weights::*; + +#[frame_support::pallet] +pub mod pallet { + use frame_support::{ + dispatch::RawOrigin, + log, + pallet_prelude::*, + sp_runtime::traits::AccountIdConversion, + traits::{ + fungible::{Inspect as InspectNative, Mutate as MutateNative}, + fungibles::Inspect, + tokens::{Fortitude, Preservation}, + }, + PalletId, + }; + use frame_system::pallet_prelude::*; + + use polkadex_primitives::Resolver; + use sp_core::sp_std; + use sp_runtime::{traits::Convert, SaturatedConversion}; + + use crate::MAXIMUM_BLOCK_WEIGHT; + use sp_std::{boxed::Box, vec, vec::Vec}; + use thea_primitives::{ + types::{Deposit, Withdraw}, + Network, TheaIncomingExecutor, TheaOutgoingExecutor, + }; + use xcm::{ + latest::{ + Error as XcmError, Fungibility, Junction, Junctions, MultiAsset, MultiAssets, + MultiLocation, XcmContext, + }, + prelude::Parachain, + v3::AssetId, + VersionedMultiAssets, VersionedMultiLocation, + }; + use xcm_executor::{ + traits::{Convert as MoreConvert, TransactAsset}, + Assets, + }; + + pub trait XcmHelperWeightInfo { + fn whitelist_token(_b: u32) -> Weight; + fn remove_whitelisted_token(_b: u32) -> Weight; + fn transfer_fee(b: u32) -> Weight; + } + + pub trait AssetIdConverter { + /// Converts AssetId to MultiLocation + fn convert_asset_id_to_location(asset_id: u128) -> Option; + /// Converts Location to AssetId + fn convert_location_to_asset_id(location: MultiLocation) -> Option; + } + + pub trait WhitelistedTokenHandler { + /// Check if token is whitelisted + fn check_whitelisted_token(asset_id: u128) -> bool; + } + + /// Configure the pallet by specifying the parameters and types on which it depends. + #[pallet::config] + pub trait Config: frame_system::Config + orml_xtokens::Config { + /// Because this pallet emits events, it depends on the polkadex-mainnet's definition of an + /// event. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Multilocation to AccountId Convert + type AccountIdConvert: MoreConvert; + /// Assets + type Assets: frame_support::traits::tokens::fungibles::Mutate + + frame_support::traits::tokens::fungibles::Create + + frame_support::traits::tokens::fungibles::Inspect; + /// Asset Id + type AssetId: Member + + Parameter + + Copy + + MaybeSerializeDeserialize + + MaxEncodedLen + + Into<<::Assets as Inspect>::AssetId> + + From + + Into; + /// Balances Pallet + type Currency: frame_support::traits::tokens::fungible::Mutate + + frame_support::traits::tokens::fungible::Inspect; + /// Asset Create/ Update Origin + type AssetCreateUpdateOrigin: EnsureOrigin; + /// Message Executor + type Executor: thea_primitives::TheaOutgoingExecutor; + /// Pallet Id + #[pallet::constant] + type AssetHandlerPalletId: Get; + /// Pallet Id + #[pallet::constant] + type WithdrawalExecutionBlockDiff: Get; + /// PDEX Asset ID + #[pallet::constant] + type ParachainId: Get; + #[pallet::constant] + type SubstrateNetworkId: Get; + /// Native Asset Id + #[pallet::constant] + type NativeAssetId: Get; + /// Weight Info + type WeightInfo: XcmHelperWeightInfo; + } + + /// Pending Withdrawals + #[pallet::storage] + #[pallet::getter(fn get_pending_withdrawals)] + pub(super) type PendingWithdrawals = + StorageMap<_, Blake2_128Concat, T::BlockNumber, Vec, ValueQuery>; + + /// Failed Withdrawals + #[pallet::storage] + #[pallet::getter(fn get_failed_withdrawals)] + pub(super) type FailedWithdrawals = + StorageMap<_, Blake2_128Concat, T::BlockNumber, Vec, ValueQuery>; + + /// Asset mapping from u128 asset to multi asset. + #[pallet::storage] + #[pallet::getter(fn assets_mapping)] + pub type ParachainAssets = StorageMap<_, Identity, u128, AssetId, OptionQuery>; + + /// Whitelist Tokens + #[pallet::storage] + #[pallet::getter(fn get_whitelisted_tokens)] + pub type WhitelistedTokens = StorageValue<_, Vec, ValueQuery>; + + /// Nonce used to generate randomness for txn id + #[pallet::storage] + #[pallet::getter(fn randomness_nonce)] + pub type RandomnessNonce = StorageValue<_, u32, ValueQuery>; + + #[pallet::pallet] + #[pallet::without_storage_info] + pub struct Pallet(_); + + // Pallets use events to inform users when important changes are made. + // https://docs.substrate.io/v3/runtime/events-and-errors + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// Asset Deposited from XCM + /// parameters. [recipient, multiasset, asset_id] + AssetDeposited(Box, Box, u128), + AssetWithdrawn(T::AccountId, Box), + /// New Asset Created [asset_id] + TheaAssetCreated(u128), + /// Token Whitelisted For Xcm [token] + TokenWhitelistedForXcm(u128), + /// Xcm Fee Transferred [recipient, amount] + XcmFeeTransferred(T::AccountId, u128), + /// Native asset id mapping is registered + NativeAssetIdMappingRegistered(u128, Box), + /// Whitelisted Token removed + WhitelistedTokenRemoved(u128), + } + + // Errors inform users that something went wrong. + #[pallet::error] + pub enum Error { + /// Unable to generate asset + AssetGenerationFailed, + /// Index not found + IndexNotFound, + /// Identifier Length Mismatch + IdentifierLengthMismatch, + /// AssetId Abstract Not Handled + AssetIdAbstractNotHandled, + /// Pending withdrawal Limit Reached + PendingWithdrawalsLimitReached, + /// Token is already Whitelisted + TokenIsAlreadyWhitelisted, + /// Whitelisted Tokens limit reached + WhitelistedTokensLimitReached, + /// Unable to Decode + UnableToDecode, + /// Failed To Push Pending Withdrawal + FailedToPushPendingWithdrawal, + /// Unable to Convert to Multi location + UnableToConvertToMultiLocation, + /// Unable to Convert to Account + UnableToConvertToAccount, + /// Unable to get Assets + UnableToGetAssets, + /// Unable to get Deposit Amount + UnableToGetDepositAmount, + /// Withdrawal Execution Failed + WithdrawalExecutionFailed, + /// Token Is Not Whitelisted + TokenIsNotWhitelisted, + } + + #[pallet::hooks] + impl Hooks for Pallet { + fn on_initialize(n: T::BlockNumber) -> Weight { + let mut failed_withdrawal: Vec = Vec::default(); + >::mutate(n, |withdrawals| { + while let Some(withdrawal) = withdrawals.pop() { + if !withdrawal.is_blocked { + let destination = match VersionedMultiLocation::decode( + &mut &withdrawal.destination[..], + ) { + Ok(dest) => dest, + Err(_) => { + failed_withdrawal.push(withdrawal); + log::error!(target:"xcm-helper","Withdrawal failed: Not able to decode destination"); + continue + }, + }; + if !Self::is_polkadex_parachain_destination(&destination) { + if let Some(asset) = Self::assets_mapping(withdrawal.asset_id) { + let multi_asset = MultiAsset { + id: asset, + fun: Fungibility::Fungible(withdrawal.amount), + }; + let pallet_account: T::AccountId = + T::AssetHandlerPalletId::get().into_account_truncating(); + // Mint + if Self::resolver_deposit( + withdrawal.asset_id.into(), + withdrawal.amount, + &pallet_account, + pallet_account.clone(), + 1u128, + pallet_account.clone(), + ) + .is_err() + { + failed_withdrawal.push(withdrawal.clone()); + log::error!(target:"xcm-helper","Withdrawal failed: Not able to mint token"); + }; + if orml_xtokens::module::Pallet::::transfer_multiassets( + RawOrigin::Signed( + T::AssetHandlerPalletId::get().into_account_truncating(), + ) + .into(), + Box::new(multi_asset.into()), + 0, + Box::new(destination.clone()), + cumulus_primitives_core::WeightLimit::Unlimited, + ) + .is_err() + { + failed_withdrawal.push(withdrawal.clone()); + log::error!(target:"xcm-helper","Withdrawal failed: Not able to make xcm calls"); + } + } else { + failed_withdrawal.push(withdrawal) + } + } else if Self::handle_deposit(withdrawal.clone(), destination).is_err() { + failed_withdrawal.push(withdrawal); + log::error!(target:"xcm-helper","Withdrawal failed: Not able to handle dest"); + } + } else { + failed_withdrawal.push(withdrawal); + log::error!(target:"xcm-helper","Withdrawal failed: Withdrawal is blocked"); + } + } + }); + // Only update the storage if vector is not empty + if !failed_withdrawal.is_empty() { + >::insert(n, failed_withdrawal); + } + // TODO: We are currently over estimating the weight here to 1/4th of total block time + // Need a better way to estimate this hook + MAXIMUM_BLOCK_WEIGHT.saturating_div(4) + } + } + + #[pallet::call] + impl Pallet { + /// Whitelists Token . + /// + /// # Parameters + /// + /// * `token`: Token to be whitelisted. + #[pallet::call_index(1)] + #[pallet::weight(T::WeightInfo::whitelist_token(1))] + pub fn whitelist_token(origin: OriginFor, token: AssetId) -> DispatchResult { + T::AssetCreateUpdateOrigin::ensure_origin(origin)?; + let token = Self::generate_asset_id_for_parachain(token); + let mut whitelisted_tokens = >::get(); + ensure!(!whitelisted_tokens.contains(&token), Error::::TokenIsAlreadyWhitelisted); + let pallet_account: T::AccountId = + T::AssetHandlerPalletId::get().into_account_truncating(); + Self::resolve_create(token.into(), pallet_account, 1u128)?; + whitelisted_tokens.push(token); + >::put(whitelisted_tokens); + Self::deposit_event(Event::::TokenWhitelistedForXcm(token)); + Ok(()) + } + + #[pallet::call_index(2)] + #[pallet::weight(T::WeightInfo::remove_whitelisted_token(1))] + pub fn remove_whitelisted_token( + origin: OriginFor, + token_to_be_removed: AssetId, + ) -> DispatchResult { + T::AssetCreateUpdateOrigin::ensure_origin(origin)?; + let token_to_be_removed = Self::generate_asset_id_for_parachain(token_to_be_removed); + let mut whitelisted_tokens = >::get(); + let index = whitelisted_tokens + .iter() + .position(|token| *token == token_to_be_removed) + .ok_or(Error::::TokenIsNotWhitelisted)?; + whitelisted_tokens.remove(index); + >::put(whitelisted_tokens); + Self::deposit_event(Event::::WhitelistedTokenRemoved(token_to_be_removed)); + Ok(()) + } + + #[pallet::call_index(3)] + #[pallet::weight(T::WeightInfo::transfer_fee(1))] + pub fn transfer_fee(origin: OriginFor, to: T::AccountId) -> DispatchResult { + T::AssetCreateUpdateOrigin::ensure_origin(origin)?; + let from = T::AssetHandlerPalletId::get().into_account_truncating(); + let amount = + T::Currency::reducible_balance(&from, Preservation::Preserve, Fortitude::Polite); + T::Currency::transfer(&from, &to, amount, Preservation::Protect)?; + Self::deposit_event(Event::::XcmFeeTransferred(to, amount.saturated_into())); + Ok(()) + } + } + + impl Convert> for Pallet { + fn convert(asset_id: u128) -> Option { + Self::convert_asset_id_to_location(asset_id) + } + } + + impl TransactAsset for Pallet { + /// Generate Ingress Message for new Deposit + fn deposit_asset( + what: &MultiAsset, + who: &MultiLocation, + _context: &XcmContext, + ) -> xcm::latest::Result { + // Create approved deposit + let MultiAsset { id, fun } = what; + let recipient = + T::AccountIdConvert::convert_ref(who).map_err(|_| XcmError::FailedToDecode)?; + let amount: u128 = Self::get_amount(fun).ok_or(XcmError::Trap(101))?; + let asset_id = Self::generate_asset_id_for_parachain(*id); + let deposit: Deposit = Deposit { + id: Self::new_random_id(), + recipient, + asset_id, + amount, + extra: Vec::new(), + }; + + let parachain_network_id = T::SubstrateNetworkId::get(); + T::Executor::execute_withdrawals(parachain_network_id, sp_std::vec![deposit].encode()) + .map_err(|_| XcmError::Trap(102))?; + Self::deposit_event(Event::::AssetDeposited( + Box::new(*who), + Box::new(what.clone()), + asset_id, + )); + Ok(()) + } + + /// Burns/Lock asset from provided account. + //TODO: Check for context + fn withdraw_asset( + what: &MultiAsset, + who: &MultiLocation, + _context: Option<&XcmContext>, + ) -> sp_std::result::Result { + let MultiAsset { id: _, fun } = what; + let who = + T::AccountIdConvert::convert_ref(who).map_err(|_| XcmError::FailedToDecode)?; + let amount: u128 = Self::get_amount(fun).ok_or(XcmError::Trap(101))?; + let asset_id = Self::generate_asset_id_for_parachain(what.id); + let pallet_account: T::AccountId = + T::AssetHandlerPalletId::get().into_account_truncating(); + Self::resolver_withdraw(asset_id.into(), amount.saturated_into(), &who, pallet_account) + .map_err(|_| XcmError::Trap(25))?; + Ok(what.clone().into()) + } + + /// Transfers Asset from source account to destination account + fn transfer_asset( + asset: &MultiAsset, + from: &MultiLocation, + to: &MultiLocation, + _context: &XcmContext, + ) -> sp_std::result::Result { + let MultiAsset { id, fun } = asset; + let from = + T::AccountIdConvert::convert_ref(from).map_err(|_| XcmError::FailedToDecode)?; + let to = T::AccountIdConvert::convert_ref(to).map_err(|_| XcmError::FailedToDecode)?; + let amount: u128 = Self::get_amount(fun).ok_or(XcmError::Trap(101))?; + let asset_id = Self::generate_asset_id_for_parachain(*id); + Self::resolve_transfer(asset_id.into(), &from, &to, amount) + .map_err(|_| XcmError::Trap(102))?; + Ok(asset.clone().into()) + } + } + + impl Pallet { + /// Generates a new random id for withdrawals + fn new_random_id() -> Vec { + let mut nonce = >::get(); + nonce = nonce.wrapping_add(1); + >::put(nonce); + let network_id = T::SubstrateNetworkId::get(); + let entropy = sp_io::hashing::blake2_256(&((network_id, nonce).encode())); + entropy.to_vec() + } + + /// Get Pallet Id + pub fn get_pallet_account() -> T::AccountId { + T::AssetHandlerPalletId::get().into_account_truncating() + } + + /// Route deposit to destined function + pub fn handle_deposit( + withdrawal: Withdraw, + location: VersionedMultiLocation, + ) -> DispatchResult { + let destination_account = Self::get_destination_account( + location.try_into().map_err(|_| Error::::UnableToConvertToMultiLocation)?, + ) + .ok_or(Error::::UnableToConvertToAccount)?; + let pallet_account: T::AccountId = + T::AssetHandlerPalletId::get().into_account_truncating(); + Self::resolver_deposit( + withdrawal.asset_id.into(), + withdrawal.amount, + &destination_account, + pallet_account.clone(), + 1u128, + pallet_account, + )?; + Ok(()) + } + + /// Converts Multi-Location to AccountId + pub fn get_destination_account(location: MultiLocation) -> Option { + match location { + MultiLocation { parents, interior } if parents == 0 => { + if let Junctions::X1(Junction::AccountId32 { network: _, id }) = interior { + if let Ok(account) = T::AccountId::decode(&mut &id[..]) { + Some(account) + } else { + None + } + } else { + None + } + }, + _ => None, + } + } + + /// Check if location is meant for Native Parachain + pub fn is_polkadex_parachain_destination(destination: &VersionedMultiLocation) -> bool { + let destination: Option = destination.clone().try_into().ok(); + if let Some(destination) = destination { + destination.parents == 0 + } else { + false + } + } + + /// Checks if asset is meant for Parachain + pub fn is_parachain_asset(versioned_asset: &VersionedMultiAssets) -> bool { + let native_asset = MultiLocation { parents: 0, interior: Junctions::Here }; + let assets: Option = versioned_asset.clone().try_into().ok(); + if let Some(assets) = assets { + if let Some(asset) = assets.get(0) { + matches!(asset.id, AssetId::Concrete(location) if location == native_asset) + } else { + false + } + } else { + false + } + } + + /// Retrieves the existing assetid for given assetid or generates and stores a new assetid + pub fn generate_asset_id_for_parachain(asset: AssetId) -> u128 { + // Check if its native or not. + if asset == + AssetId::Concrete(MultiLocation { + parents: 1, + interior: Junctions::X1(Parachain(T::ParachainId::get())), + }) { + return T::NativeAssetId::get().into() + } + // If it's not native, then hash and generate the asset id + let asset_id = u128::from_be_bytes(sp_io::hashing::blake2_128(&asset.encode()[..])); + if !>::contains_key(asset_id) { + // Store the mapping + >::insert(asset_id, asset); + } + asset_id + } + + /// Converts XCM::Fungibility into u128 + pub fn get_amount(fun: &Fungibility) -> Option { + if let Fungibility::Fungible(amount) = fun { + Some(*amount) + } else { + None + } + } + + /// Block Transaction to be Executed. + pub fn block_by_ele(block_no: T::BlockNumber, index: u32) -> DispatchResult { + let mut pending_withdrawals = >::get(block_no); + let pending_withdrawal: &mut Withdraw = + pending_withdrawals.get_mut(index as usize).ok_or(Error::::IndexNotFound)?; + pending_withdrawal.is_blocked = true; + >::insert(block_no, pending_withdrawals); + Ok(()) + } + + /// Converts asset_id to XCM::MultiLocation + pub fn convert_asset_id_to_location(asset_id: u128) -> Option { + Self::assets_mapping(asset_id).and_then(|asset| match asset { + AssetId::Concrete(location) => Some(location), + AssetId::Abstract(_) => None, + }) + } + + /// Converts Multilocation to u128 + pub fn convert_location_to_asset_id(location: MultiLocation) -> u128 { + Self::generate_asset_id_for_parachain(AssetId::Concrete(location)) + } + + pub fn insert_pending_withdrawal(block_no: T::BlockNumber, withdrawal: Withdraw) { + >::insert(block_no, vec![withdrawal]); + } + + /// Converts Multilocation to AccountId + pub fn multi_location_to_account_converter(location: MultiLocation) -> T::AccountId { + T::AccountIdConvert::convert_ref(location).unwrap() + } + } + + impl AssetIdConverter for Pallet { + fn convert_asset_id_to_location(asset_id: u128) -> Option { + Self::convert_asset_id_to_location(asset_id) + } + + fn convert_location_to_asset_id(location: MultiLocation) -> Option { + Some(Self::convert_location_to_asset_id(location)) + } + } + + impl WhitelistedTokenHandler for Pallet { + fn check_whitelisted_token(asset_id: u128) -> bool { + let whitelisted_tokens = >::get(); + whitelisted_tokens.contains(&asset_id) + } + } + + impl TheaIncomingExecutor for Pallet { + fn execute_deposits(_: Network, deposits: Vec) { + let deposits = Vec::::decode(&mut &deposits[..]).unwrap_or_default(); + for deposit in deposits { + // Calculate the withdrawal execution delay + let withdrawal_execution_block: T::BlockNumber = + >::block_number() + .saturated_into::() + .saturating_add( + T::WithdrawalExecutionBlockDiff::get().saturated_into::(), + ) + .into(); + // Queue the withdrawal for execution + >::mutate( + withdrawal_execution_block, + |pending_withdrawals| { + pending_withdrawals.push(deposit); + }, + ); + } + } + } + + impl + polkadex_primitives::assets::Resolver< + T::AccountId, + T::Currency, + T::Assets, + T::AssetId, + T::NativeAssetId, + > for Pallet + { + } +} diff --git a/pallets/xcm-helper/src/mock.rs b/pallets/xcm-helper/src/mock.rs new file mode 100644 index 000000000..d3972a418 --- /dev/null +++ b/pallets/xcm-helper/src/mock.rs @@ -0,0 +1,210 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use crate as xcm_helper; +use frame_support::{ + parameter_types, + traits::{ConstU16, ConstU64}, +}; +use frame_system as system; +use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; +use sp_core::{ConstU32, H256}; +use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, +}; +use thea::ecdsa::{AuthorityId, AuthoritySignature}; + +type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; +type Block = frame_system::mocking::MockBlock; + +// Configure a mock polkadex-mainnet to test the pallet. +frame_support::construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + XcmHelper: xcm_helper, + TheaMessageHandler: thea_message_handler, + XToken: orml_xtokens + } +); + +impl system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type DbWeight = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = ConstU16<42>; + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + +use frame_support::{traits::AsEnsureOriginWithArg, PalletId}; +use frame_system::{EnsureRoot, EnsureSigned}; + +pub const TOKEN: u128 = 1_000_000_000_000; + +parameter_types! { + pub const ExistentialDeposit: u128 = TOKEN; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; +} + +impl pallet_balances::Config for Test { + type Balance = u128; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = frame_system::Pallet; + type MaxLocks = MaxLocks; + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type WeightInfo = (); + type RuntimeEvent = RuntimeEvent; + type HoldIdentifier = (); + type FreezeIdentifier = (); + type MaxHolds = (); + type MaxFreezes = (); +} + +parameter_types! { + pub const TheaMaxAuthorities: u32 = 10; +} + +impl thea_message_handler::Config for Test { + type RuntimeEvent = RuntimeEvent; + type TheaId = AuthorityId; + type Signature = AuthoritySignature; + type MaxAuthorities = TheaMaxAuthorities; + type Executor = XcmHelper; + type WeightInfo = thea_message_handler::weights::WeightInfo; +} + +parameter_types! { + pub const AssetHandlerPalletId: PalletId = PalletId(*b"XcmHandl"); + pub const WithdrawalExecutionBlockDiff: u32 = 1000; + pub const NativeAssetId: u128 = 100; +} + +impl xcm_helper::Config for Test { + type RuntimeEvent = RuntimeEvent; + type AccountIdConvert = (); + type Assets = Assets; + type AssetId = u128; + type Currency = Balances; + type AssetCreateUpdateOrigin = EnsureRoot; + type Executor = TheaMessageHandler; + type AssetHandlerPalletId = AssetHandlerPalletId; + type WithdrawalExecutionBlockDiff = WithdrawalExecutionBlockDiff; + type ParachainId = (); + type SubstrateNetworkId = (); + type NativeAssetId = NativeAssetId; + type WeightInfo = crate::weights::WeightInfo; +} + +parameter_types! { + pub const AssetDeposit: u128 = 100; + pub const ApprovalDeposit: u128 = 1; + pub const StringLimit: u32 = 50; + pub const MetadataDepositBase: u128 = 10; + pub const MetadataDepositPerByte: u128 = 1; +} + +impl pallet_assets::Config for Test { + type RuntimeEvent = RuntimeEvent; + type Balance = u128; + type RemoveItemsLimit = ConstU32<1000>; + type AssetId = u128; + type AssetIdParameter = parity_scale_codec::Compact; + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = EnsureSigned; + type AssetDeposit = AssetDeposit; + type AssetAccountDeposit = AssetDeposit; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type ApprovalDeposit = ApprovalDeposit; + type StringLimit = StringLimit; + type Freezer = (); + type Extra = (); + type CallbackHandle = (); + type WeightInfo = (); +} + +parameter_type_with_key! { + pub ParachainMinFee: |_location: MultiLocation| -> Option { + Some(1u128) + }; +} + +use cumulus_primitives_core::{GlobalConsensus, InteriorMultiLocation, Parachain}; +use xcm::latest::MultiLocation; +use xcm_builder::{ + test_utils::{NetworkId, X2}, + FixedWeightBounds, +}; + +parameter_types! { + // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. + pub UnitWeightCost: u64 = 1_000_000_000; + pub const MaxInstructions: u32 = 100; + pub Ancestry: xcm::latest::MultiLocation = MultiLocation::default(); + pub MaxAssetsForTransfer: usize = 2; + pub const RelayNetwork: NetworkId = NetworkId::Polkadot; + pub UniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(2040)); +} + +impl orml_xtokens::Config for Test { + type RuntimeEvent = RuntimeEvent; + type Balance = u128; + type CurrencyId = u128; + type CurrencyIdConvert = (); + type AccountIdToMultiLocation = (); + type SelfLocation = (); + type MinXcmFee = ParachainMinFee; + type XcmExecutor = (); + type MultiLocationsFilter = (); + type Weigher = FixedWeightBounds; + type BaseXcmWeight = (); + type MaxAssetsForTransfer = MaxAssetsForTransfer; + type ReserveProvider = AbsoluteReserveProvider; + type UniversalLocation = UniversalLocation; +} + +// Build genesis storage according to the mock polkadex-mainnet. +pub fn new_test_ext() -> sp_io::TestExternalities { + system::GenesisConfig::default().build_storage::().unwrap().into() +} diff --git a/pallets/xcm-helper/src/tests.rs b/pallets/xcm-helper/src/tests.rs new file mode 100644 index 000000000..6465d1956 --- /dev/null +++ b/pallets/xcm-helper/src/tests.rs @@ -0,0 +1,175 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use crate::{mock::*, Error, PendingWithdrawals}; +use frame_support::{assert_noop, assert_ok, traits::Currency, BoundedVec}; +use sp_core::ByteArray; +use sp_runtime::{traits::AccountIdConversion, DispatchError, SaturatedConversion}; +use thea_primitives::{types::Withdraw, Message, ValidatorSetId}; +use xcm::latest::{AssetId, MultiLocation}; + +#[test] +fn test_whitelist_token_returns_ok() { + new_test_ext().execute_with(|| { + let asset_location = MultiLocation::parent(); + let token: AssetId = AssetId::Concrete(asset_location); + assert_ok!(XcmHelper::whitelist_token(RuntimeOrigin::root(), token)); + }); +} + +#[test] +fn test_whitelist_token_with_bad_origin_will_return_bad_origin_error() { + new_test_ext().execute_with(|| { + let asset_location = MultiLocation::parent(); + let token: AssetId = AssetId::Concrete(asset_location); + + assert_noop!( + XcmHelper::whitelist_token(RuntimeOrigin::none(), token), + DispatchError::BadOrigin + ); + }); +} + +#[test] +fn test_remove_whitelisted_token_returns_ok() { + new_test_ext().execute_with(|| { + let asset_location = MultiLocation::parent(); + let token: AssetId = AssetId::Concrete(asset_location); + assert_ok!(XcmHelper::whitelist_token(RuntimeOrigin::root(), token)); + assert_ok!(XcmHelper::remove_whitelisted_token(RuntimeOrigin::root(), token)); + }); +} + +#[test] +fn test_remove_whitelisted_token_returns_token_not_found_error() { + new_test_ext().execute_with(|| { + let asset_location = MultiLocation::parent(); + let token: AssetId = AssetId::Concrete(asset_location); + assert_noop!( + XcmHelper::remove_whitelisted_token(RuntimeOrigin::root(), token), + Error::::TokenIsNotWhitelisted + ); + }); +} + +#[test] +fn test_remove_whitelisted_token_with_bad_origin_will_return_bad_origin_error() { + new_test_ext().execute_with(|| { + let asset_location = MultiLocation::parent(); + let token: AssetId = AssetId::Concrete(asset_location); + + assert_noop!( + XcmHelper::remove_whitelisted_token(RuntimeOrigin::none(), token), + DispatchError::BadOrigin + ); + }); +} + +#[test] +fn test_whitelist_token_returns_token_is_already_whitelisted() { + new_test_ext().execute_with(|| { + let asset_location = MultiLocation::parent(); + let token: AssetId = AssetId::Concrete(asset_location); + assert_ok!(XcmHelper::whitelist_token(RuntimeOrigin::root(), token)); + assert_noop!( + XcmHelper::whitelist_token(RuntimeOrigin::root(), token), + Error::::TokenIsAlreadyWhitelisted + ); + }); +} + +#[test] +fn test_transfer_fee_returns_ok() { + new_test_ext().execute_with(|| { + let recipient = 1; + let pallet_account = AssetHandlerPalletId::get().into_account_truncating(); + let _ = Balances::deposit_creating( + &pallet_account, + 5_000_000_000_000_000_000_000u128.saturated_into(), + ); + assert_ok!(XcmHelper::transfer_fee(RuntimeOrigin::root(), recipient)); + assert_eq!(Balances::free_balance(recipient), 4999999999000000000000u128.saturated_into()); + }); +} + +#[test] +fn test_transfer_fee_with_bad_origin_will_return_bad_origin_error() { + new_test_ext().execute_with(|| { + let recipient = 1; + let pallet_account = AssetHandlerPalletId::get().into_account_truncating(); + let _ = Balances::deposit_creating( + &pallet_account, + 5_000_000_000_000_000_000_000u128.saturated_into(), + ); + + assert_noop!( + XcmHelper::transfer_fee(RuntimeOrigin::none(), recipient), + DispatchError::BadOrigin + ); + }); +} + +#[test] +fn test_block_by_ele() { + new_test_ext().execute_with(|| { + let first_withdrawal = Withdraw { + id: Vec::new(), + asset_id: 1, + amount: 1, + destination: vec![], + is_blocked: false, + extra: vec![], + }; + let sec_withdrawal = Withdraw { + id: Vec::new(), + asset_id: 2, + amount: 2, + destination: vec![], + is_blocked: false, + extra: vec![], + }; + >::insert(1, vec![first_withdrawal, sec_withdrawal]); + assert_ok!(XcmHelper::block_by_ele(1, 1)); + let actual_withdrawals = >::get(1); + let expected_withdraw = Withdraw { + id: Vec::new(), + asset_id: 2, + amount: 2, + destination: vec![], + is_blocked: true, + extra: vec![], + }; + assert_eq!(actual_withdrawals[1], expected_withdraw); + assert_noop!(XcmHelper::block_by_ele(1, 4), Error::::IndexNotFound); + }); +} + +#[test] +fn real_test_vector() { + new_test_ext().execute_with(|| { + let public_bytes = hex::decode("020a1091341fe5664bfa1782d5e04779689068c916b04cb365ec3153755684d9a1").unwrap(); + let public = ::TheaId::from_slice(&public_bytes).unwrap(); + + let signature_bytes = hex::decode("f665f69c959c4a3cbc54ec4de8a566f1897c648fe6c33ab1056ef11fcdd7ad937f4bae4540c18c1a4c61acc4a8bb8c11cafaafe8a06cfb7298e3f9ffba71d33500").unwrap(); + let signature = sp_core::ecdsa::Signature::from_slice(&signature_bytes).unwrap(); + + assert_ok!(TheaMessageHandler::insert_authorities(RuntimeOrigin::root(), BoundedVec::truncate_from(vec![public]), 0)); + //>::put(0); + + let message = Message { block_no: 11, nonce: 1, data: vec![18, 52, 80], network: 1, is_key_change: false, validator_set_id: 0 }; + println!("Running the validation.."); + assert_ok!(TheaMessageHandler::incoming_message(RuntimeOrigin::none(), message, vec![(0, signature.into())])); + }) +} diff --git a/pallets/xcm-helper/src/weights.rs b/pallets/xcm-helper/src/weights.rs new file mode 100644 index 000000000..47fdebfc7 --- /dev/null +++ b/pallets/xcm-helper/src/weights.rs @@ -0,0 +1,106 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +//! Autogenerated weights for `xcm_helper` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-28, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Ubuntu-2204-jammy-amd64-base`, CPU: `Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// ./parachain-polkadex-polkadex-mainnet-polkadex-parachain-node +// benchmark +// pallet +// --pallet +// xcm_helper +// --steps +// 100 +// --repeat +// 200 +// --extrinsic +// * +// --output +// xcm_helper_weights.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `xcm_helper`. +pub struct WeightInfo(PhantomData); +impl crate::XcmHelperWeightInfo for WeightInfo { + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: XcmHelper ParachainAssets (r:1 w:1) + /// Proof Skipped: XcmHelper ParachainAssets (max_values: None, max_size: None, mode: Measured) + /// Storage: XcmHelper WhitelistedTokens (r:1 w:1) + /// Proof Skipped: XcmHelper WhitelistedTokens (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn whitelist_token(_b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `147` + // Estimated: `3687` + // Minimum execution time: 17_028_000 picoseconds. + Weight::from_parts(17_753_020, 0) + .saturating_add(Weight::from_parts(0, 3687)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: ParachainInfo ParachainId (r:1 w:0) + /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: XcmHelper ParachainAssets (r:1 w:0) + /// Proof Skipped: XcmHelper ParachainAssets (max_values: None, max_size: None, mode: Measured) + /// Storage: XcmHelper WhitelistedTokens (r:1 w:1) + /// Proof Skipped: XcmHelper WhitelistedTokens (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn remove_whitelisted_token(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `225` + // Estimated: `3690` + // Minimum execution time: 13_237_000 picoseconds. + Weight::from_parts(13_862_195, 0) + .saturating_add(Weight::from_parts(0, 3690)) + // Standard Error: 1 + .saturating_add(Weight::from_parts(12, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn transfer_fee(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `226` + // Estimated: `6196` + // Minimum execution time: 25_031_000 picoseconds. + Weight::from_parts(26_785_061, 0) + .saturating_add(Weight::from_parts(0, 6196)) + // Standard Error: 18 + .saturating_add(Weight::from_parts(364, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/rpc/assets/src/lib.rs b/rpc/assets/src/lib.rs index 474ced16f..311acd5ef 100644 --- a/rpc/assets/src/lib.rs +++ b/rpc/assets/src/lib.rs @@ -58,8 +58,8 @@ pub trait PolkadexAssetHandlerRpcApi { /// /// # Type Parameters /// -/// * `Client`: The client API used to interact with the Substrate runtime. -/// * `Block`: The block type of the Substrate runtime. +/// * `Client`: The client API used to interact with the Substrate polkadex-mainnet. +/// * `Block`: The block type of the Substrate polkadex-mainnet. pub struct PolkadexAssetHandlerRpc { client: Arc, _marker: std::marker::PhantomData, @@ -103,7 +103,7 @@ where } } -/// Converts a runtime trap into an RPC error. +/// Converts a polkadex-mainnet trap into an RPC error. fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -> JsonRpseeError { CallError::Custom(ErrorObject::owned(RUNTIME_ERROR, "Runtime error", Some(format!("{err:?}")))) .into() diff --git a/runtime/Cargo.toml b/runtimes/polkadex-mainnet/Cargo.toml similarity index 88% rename from runtime/Cargo.toml rename to runtimes/polkadex-mainnet/Cargo.toml index 84c81b388..b2574bb3b 100644 --- a/runtime/Cargo.toml +++ b/runtimes/polkadex-mainnet/Cargo.toml @@ -78,10 +78,10 @@ frame-election-provider-support = { default-features = false, workspace = true } pallet-assets = { default-features = false, workspace = true } #end added -# Used for the node template"s RPCs +# Used for the polkadex-mainnet-polkadex-parachain-node template"s RPCs frame-system-rpc-runtime-api = { default-features = false, workspace = true } -# Used for runtime benchmarking +# Used for polkadex-mainnet benchmarking frame-benchmarking = { default-features = false, workspace = true, optional = true } frame-system-benchmarking = { default-features = false, workspace = true, optional = true } @@ -90,28 +90,28 @@ orml-vesting = { workspace = true, default-features = false } # Local Dependecies polkadex-primitives = { workspace = true, default-features = false } -orderbook-primitives = { path = "../primitives/orderbook", default-features = false } -pdex-migration = { path = "../pallets/pdex-migration", default-features = false } +orderbook-primitives = { path = "../../primitives/orderbook", default-features = false } +pdex-migration = { path = "../../pallets/pdex-migration", default-features = false } # Orderbook -pallet-ocex-lmp = { path = "../pallets/ocex", default-features = false } +pallet-ocex-lmp = { path = "../../pallets/ocex", default-features = false } # Thea -thea = { path = "../pallets/thea", default-features = false } -thea-executor = { path = "../pallets/thea-executor", default-features = false } -thea-message-handler = { path = "../pallets/thea-message-handler", default-features = false, optional = true } +thea = { path = "../../pallets/thea", default-features = false } +thea-executor = { path = "../../pallets/thea-executor", default-features = false } +thea-message-handler = { path = "../../pallets/thea-message-handler", default-features = false, optional = true } # Liquidity Pallet -liquidity = { path = "../pallets/liquidity", default-features = false } +liquidity = { path = "../../pallets/liquidity", default-features = false } # Parachain Rewards -pallet-rewards = { path = "../pallets/rewards", default-features = false } +pallet-rewards = { path = "../../pallets/rewards", default-features = false } # Try Runtime frame-try-runtime = { workspace = true, optional = true, default-features = false } -rpc-assets-runtime-api = { path = "../rpc/assets/runtime-api", default-features = false } -pallet-rewards-runtime-api = { path = "../pallets/rewards/rpc/runtime-api", default-features = false } -pallet-ocex-runtime-api = { path = "../pallets/ocex/rpc/runtime-api", default-features = false } +rpc-assets-runtime-api = { path = "../../rpc/assets/runtime-api", default-features = false } +pallet-rewards-runtime-api = { path = "../../pallets/rewards/rpc/runtime-api", default-features = false } +pallet-ocex-runtime-api = { path = "../../pallets/ocex/rpc/runtime-api", default-features = false } [build-dependencies] substrate-wasm-builder = { workspace = true } @@ -243,7 +243,7 @@ try-runtime = [ "pdex-migration/try-runtime", "pallet-democracy/try-runtime", "pallet-preimage/try-runtime", - #"pallet-randomness-collective-flip/try-runtime", + #"pallet-randomness-collective-flip/try-polkadex-mainnet", "pallet-child-bounties/try-runtime", "pallet-assets/try-runtime", "pallet-ocex-lmp/try-runtime", diff --git a/runtime/build.rs b/runtimes/polkadex-mainnet/build.rs similarity index 100% rename from runtime/build.rs rename to runtimes/polkadex-mainnet/build.rs diff --git a/runtime/src/constants.rs b/runtimes/polkadex-mainnet/src/constants.rs similarity index 98% rename from runtime/src/constants.rs rename to runtimes/polkadex-mainnet/src/constants.rs index e51f59a93..35abc924d 100644 --- a/runtime/src/constants.rs +++ b/runtimes/polkadex-mainnet/src/constants.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! A set of constant values used in substrate runtime. +//! A set of constant values used in substrate polkadex-mainnet. /// Money matters. pub mod currency { diff --git a/runtime/src/impls.rs b/runtimes/polkadex-mainnet/src/impls.rs similarity index 98% rename from runtime/src/impls.rs rename to runtimes/polkadex-mainnet/src/impls.rs index 9d48d6f43..505e7e8f6 100644 --- a/runtime/src/impls.rs +++ b/runtimes/polkadex-mainnet/src/impls.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Some configurable implementations as associated type for the substrate runtime. +//! Some configurable implementations as associated type for the substrate polkadex-mainnet. use frame_support::traits::{Currency, OnUnbalanced}; @@ -65,7 +65,7 @@ mod multiplier_tests { TargetBlockFullness::get() * max_normal() } - // update based on runtime impl. + // update based on polkadex-mainnet impl. fn runtime_multiplier_update(fm: Multiplier) -> Multiplier { TargetedFeeAdjustment::< Runtime, @@ -158,7 +158,7 @@ mod multiplier_tests { #[test] fn time_to_reach_zero() { - // blocks per 24h in substrate-node: 28,800 (k) + // blocks per 24h in substrate-polkadex-mainnet-polkadex-parachain-node: 28,800 (k) // s* = 0.1875 // The bound from the research in an empty chain is: // v <~ (p / k(0 - s*)) diff --git a/runtime/src/lib.rs b/runtimes/polkadex-mainnet/src/lib.rs similarity index 98% rename from runtime/src/lib.rs rename to runtimes/polkadex-mainnet/src/lib.rs index 3401f0627..5c6cadcfd 100644 --- a/runtime/src/lib.rs +++ b/runtimes/polkadex-mainnet/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! The Substrate runtime. This can be compiled with `#[no_std]`, ready for Wasm. +//! The Substrate polkadex-mainnet. This can be compiled with `#[no_std]`, ready for Wasm. #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] @@ -88,10 +88,10 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; -/// Implementations of some helper traits passed into runtime modules as associated types. +/// Implementations of some helper traits passed into polkadex-mainnet modules as associated types. pub mod impls; -/// Constant values used within the runtime. +/// Constant values used within the polkadex-mainnet. pub mod constants; // Make the WASM binary available. @@ -110,11 +110,11 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { /// Runtime version. pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("node"), + spec_name: create_runtime_str!("polkadex-mainnet-polkadex-parachain-node"), impl_name: create_runtime_str!("polkadex-official"), authoring_version: 10, - // Per convention: if the runtime behavior changes, increment spec_version - // and set impl_version to 0. If only runtime + // Per convention: if the polkadex-mainnet behavior changes, increment spec_version + // and set impl_version to 0. If only polkadex-mainnet // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 308, @@ -1465,17 +1465,18 @@ construct_runtime!( pub type DigestItem = generic::DigestItem; /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; -/// Block header type as expected by this runtime. +/// Block header type as expected by this polkadex-mainnet. pub type Header = generic::Header; -/// Block type as expected by this runtime. +/// Block type as expected by this polkadex-mainnet. pub type Block = generic::Block; /// A Block signed with a Justification pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this runtime. +/// BlockId type as expected by this polkadex-mainnet. pub type BlockId = generic::BlockId; /// The SignedExtension to the basic transaction logic. /// -/// When you change this, you **MUST** modify [`sign`] in `bin/node/testing/src/keyring.rs`! +/// When you change this, you **MUST** modify [`sign`] in +/// `bin/polkadex-mainnet-polkadex-parachain-node/testing/src/keyring.rs`! /// /// [`sign`]: <../../testing/src/keyring.rs.html> pub type SignedExtra = ( @@ -1487,7 +1488,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, ); -/// Unchecked extrinsic type as expected by this runtime. +/// Unchecked extrinsic type as expected by this polkadex-mainnet. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// The payload being signed in transactions. @@ -1726,7 +1727,7 @@ impl_runtime_apis! { } - #[cfg(feature = "try-runtime")] + #[cfg(feature = "try-polkadex-mainnet")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to @@ -1748,7 +1749,7 @@ impl_runtime_apis! { } } - #[cfg(feature = "runtime-benchmarks")] + #[cfg(feature = "polkadex-mainnet-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( Vec, diff --git a/runtimes/polkadex-parachain/Cargo.toml b/runtimes/polkadex-parachain/Cargo.toml new file mode 100644 index 000000000..0dc51ae32 --- /dev/null +++ b/runtimes/polkadex-parachain/Cargo.toml @@ -0,0 +1,189 @@ +[package] +name = "parachain-polkadex-runtime" +version = "1.0.0" +authors = ["Anonymous"] +description = "A new Cumulus FRAME-based Substrate Runtime, ready for hacking together a parachain." +license = "Unlicense" +homepage = "https://substrate.io" +repository = "https://github.com/paritytech/cumulus/" +edition = "2021" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[build-dependencies] +substrate-wasm-builder = { workspace = true } + +[dependencies] +parity-scale-codec = { workspace = true, default-features = false, features = ["derive"] } +hex-literal = { workspace = true, optional = true } +log = { workspace = true, default-features = false } +scale-info = { workspace = true, default-features = false, features = ["derive"] } +smallvec = { workspace = true } + +# Substrate +frame-benchmarking = { workspace = true, default-features = false, optional = true } +frame-executive = { workspace = true, default-features = false } +frame-support = { workspace = true, default-features = false } +frame-system = { workspace = true, default-features = false } +frame-system-benchmarking = { workspace = true, default-features = false, optional = true } +frame-system-rpc-runtime-api = { workspace = true, default-features = false } +frame-try-runtime = { workspace = true, default-features = false, optional = true } +pallet-aura = { workspace = true, default-features = false } +pallet-authorship = { workspace = true, default-features = false } +pallet-assets = { workspace = true, default-features = false } +pallet-balances = { workspace = true, default-features = false } +pallet-bags-list = { workspace = true, default-features = false, optional = true } +pallet-session = { workspace = true, default-features = false } +pallet-sudo = { workspace = true, default-features = false } +pallet-timestamp = { workspace = true, default-features = false } +pallet-transaction-payment = { workspace = true, default-features = false } +pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = false } +sp-api = { workspace = true, default-features = false } +sp-block-builder = { workspace = true, default-features = false } +sp-consensus-aura = { workspace = true, default-features = false } +sp-core = { workspace = true, default-features = false } +sp-inherents = { workspace = true, default-features = false } +sp-offchain = { workspace = true, default-features = false } +sp-runtime = { workspace = true, default-features = false } +sp-session = { workspace = true, default-features = false } +sp-std = { workspace = true, default-features = false } +sp-transaction-pool = { workspace = true, default-features = false } +sp-version = { workspace = true, default-features = false } + +# Polkadot +pallet-xcm = { workspace = true, default-features = false } +polkadot-parachain = { workspace = true, default-features = false } +polkadot-runtime-common = { workspace = true, default-features = false } +xcm = { workspace = true, default-features = false } +xcm-builder = { workspace = true, default-features = false } +xcm-executor = { workspace = true, default-features = false } + +# Cumulus +cumulus-pallet-aura-ext = { workspace = true, default-features = false } +cumulus-pallet-dmp-queue = { workspace = true, default-features = false } +cumulus-pallet-parachain-system = { workspace = true, default-features = false } +cumulus-pallet-session-benchmarking = { workspace = true, default-features = false } +cumulus-pallet-xcm = { workspace = true, default-features = false } +cumulus-pallet-xcmp-queue = { workspace = true, default-features = false } +cumulus-primitives-core = { workspace = true, default-features = false } +cumulus-primitives-timestamp = { workspace = true, default-features = false } +cumulus-primitives-utility = { workspace = true, default-features = false } +pallet-collator-selection = { workspace = true, default-features = false } +parachain-info = { workspace = true, default-features = false } + +# ORML +orml-xtokens = { workspace = true, default-features = false } +orml-traits = { workspace = true, default-features = false } +orml-xcm-support = { workspace = true, default-features = false } + +# Local +xcm-helper = { path = "../../pallets/xcm-helper", default-features = false } +thea-council = { path = "../../pallets/thea-council", default-features = false } +thea-message-handler = { path = "../../pallets/thea-message-handler", default-features = false } +thea = { path = "../../pallets/thea", default-features = false } +thea-primitives = { path = "../../primitives/thea", default-features = false } +polkadex-primitives = { path = "../../primitives/polkadex", default-features = false } + +[features] +default = ["std"] +std = [ + "thea/std", + "parity-scale-codec/std", + "log/std", + "scale-info/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "cumulus-primitives-utility/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "pallet-aura/std", + "pallet-authorship/std", + "pallet-assets/std", + "pallet-balances/std", + "pallet-collator-selection/std", + "pallet-session/std", + "pallet-sudo/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-xcm/std", + "parachain-info/std", + "polkadot-parachain/std", + "polkadot-runtime-common/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", + "xcm-helper/std", + "orml-xtokens/std", + "orml-traits/std", + "thea-council/std", + "orml-xcm-support/std", + "thea-message-handler/std", + "thea-primitives/std", +] + +runtime-benchmarks = [ + "hex-literal", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "xcm-helper/runtime-benchmarks", + "thea-council/runtime-benchmarks", +] + +try-runtime = [ + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime", + "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", + "pallet-assets/try-runtime", + "pallet-balances/try-runtime", + "pallet-bags-list/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-session/try-runtime", + "pallet-sudo/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", + "polkadot-runtime-common/try-runtime", + "orml-xtokens/try-runtime", + "thea-message-handler/try-runtime", + "xcm-helper/try-runtime", + "thea-council/try-runtime", +] diff --git a/runtimes/polkadex-parachain/build.rs b/runtimes/polkadex-parachain/build.rs new file mode 100644 index 000000000..9b53d2457 --- /dev/null +++ b/runtimes/polkadex-parachain/build.rs @@ -0,0 +1,9 @@ +use substrate_wasm_builder::WasmBuilder; + +fn main() { + WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build() +} diff --git a/runtimes/polkadex-parachain/src/constants.rs b/runtimes/polkadex-parachain/src/constants.rs new file mode 100644 index 000000000..574c3d5b7 --- /dev/null +++ b/runtimes/polkadex-parachain/src/constants.rs @@ -0,0 +1,21 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +pub mod currency { + pub type Balance = u128; + pub const PDEX: Balance = 1_000_000_000_000; + pub const DOLLARS: Balance = PDEX; // 1_000_000_000_000 + pub const CENTS: Balance = DOLLARS / 100; // 10_000_000_000 +} diff --git a/runtimes/polkadex-parachain/src/lib.rs b/runtimes/polkadex-parachain/src/lib.rs new file mode 100644 index 000000000..55774ad2c --- /dev/null +++ b/runtimes/polkadex-parachain/src/lib.rs @@ -0,0 +1,852 @@ +#![cfg_attr(not(feature = "std"), no_std)] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. +#![recursion_limit = "256"] + +// Make the WASM binary available. +#[cfg(feature = "std")] +include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + +mod constants; +mod weights; +pub mod xcm_config; + +use crate::constants::currency::{CENTS, DOLLARS}; +use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; +use smallvec::smallvec; +use sp_api::impl_runtime_apis; +use sp_core::{crypto::KeyTypeId, ConstU32, ConstU64, Get, OpaqueMetadata}; +use sp_runtime::{ + create_runtime_str, generic, impl_opaque_keys, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, MultiSignature, +}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; + +use frame_support::{ + codec, construct_runtime, + dispatch::DispatchClass, + parameter_types, + traits::Everything, + weights::{ + constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient, + WeightToFeeCoefficients, WeightToFeePolynomial, + }, + PalletId, +}; +use frame_system::{ + limits::{BlockLength, BlockWeights}, + EnsureRoot, EnsureSigned, +}; +use polkadex_primitives::POLKADEX_NATIVE_ASSET_ID; +pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; +pub use sp_runtime::{MultiAddress, Perbill, Permill}; +use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; + +#[cfg(any(feature = "std", test))] +pub use sp_runtime::BuildStorage; + +// Polkadot imports +use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; + +use frame_support::traits::AsEnsureOriginWithArg; +use thea::ecdsa::{AuthorityId, AuthoritySignature}; +use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; + +// XCM Imports +use crate::xcm_config::LocationToAccountId; +use xcm::latest::prelude::BodyId; +use xcm_executor::XcmExecutor; + +/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. +pub type Signature = MultiSignature; + +/// Some way of identifying an account on the chain. We intentionally make it equivalent +/// to the public key of our transaction signing scheme. +pub type AccountId = <::Signer as IdentifyAccount>::AccountId; + +/// Balance of an account. +pub type Balance = u128; + +/// Index of a transaction in the chain. +pub type Index = u32; + +/// A hash of some data used by the chain. +pub type Hash = sp_core::H256; + +/// An index to a block. +pub type BlockNumber = u32; + +/// The address format for describing accounts. +pub type Address = MultiAddress; + +/// Block header type as expected by this polkadex-parachain. +pub type Header = generic::Header; + +/// Block type as expected by this polkadex-parachain. +pub type Block = generic::Block; + +/// A Block signed with a Justification +pub type SignedBlock = generic::SignedBlock; + +/// BlockId type as expected by this polkadex-parachain. +pub type BlockId = generic::BlockId; + +/// The SignedExtension to the basic transaction logic. +pub type SignedExtra = ( + frame_system::CheckNonZeroSender, + frame_system::CheckSpecVersion, + frame_system::CheckTxVersion, + frame_system::CheckGenesis, + frame_system::CheckEra, + frame_system::CheckNonce, + frame_system::CheckWeight, + pallet_transaction_payment::ChargeTransactionPayment, +); + +/// Unchecked extrinsic type as expected by this polkadex-parachain. +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; + +/// Extrinsic type that has already been checked. +pub type CheckedExtrinsic = generic::CheckedExtrinsic; + +/// Executive: handles dispatch to the various modules. +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, +>; + +/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the +/// polkadex-mainnet-polkadex-parachain-node's balance type. +/// +/// This should typically create a mapping between the following ranges: +/// - `[0, MAXIMUM_BLOCK_WEIGHT]` +/// - `[Balance::min, Balance::max]` +/// +/// Yet, it can be used for any other sort of change to weight-fee. Some examples being: +/// - Setting it to `0` will essentially disable the weight fee. +/// - Setting it to `1` will cause the literal `#[weight = x]` values to be charged. +pub struct WeightToFee; +impl WeightToFeePolynomial for WeightToFee { + type Balance = Balance; + fn polynomial() -> WeightToFeeCoefficients { + // Extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT: + let p = CENTS; + let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time()); + smallvec![WeightToFeeCoefficient { + degree: 1, + negative: false, + coeff_frac: Perbill::from_rational(p % q, q), + coeff_integer: p / q, + }] + } +} + +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the polkadex-parachain. They can then be made to be agnostic over specific +/// formats of data like extrinsics, allowing for them to continue syncing the network through +/// upgrades to even the core data structures. +pub mod opaque { + use super::*; + use sp_runtime::{generic, traits::BlakeTwo256}; + + pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; + /// Opaque block header type. + pub type Header = generic::Header; + /// Opaque block type. + pub type Block = generic::Block; + /// Opaque block identifier type. + pub type BlockId = generic::BlockId; +} + +impl_opaque_keys! { + pub struct SessionKeys { + pub aura: Aura, + } +} + +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("polkadex-parachain"), + impl_name: create_runtime_str!("polkadex-parachain"), + authoring_version: 1, + spec_version: 9, + impl_version: 0, + apis: RUNTIME_API_VERSIONS, + transaction_version: 1, + state_version: 1, +}; + +/// This determines the average expected block time that we are targeting. +/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. +/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked +/// up by `pallet_aura` to implement `fn slot_duration()`. +/// +/// Change this to adjust the block time. +pub const MILLISECS_PER_BLOCK: u64 = 12000; + +// NOTE: Currently it is not possible to change the slot duration after the chain has started. +// Attempting to do so will brick block production. +pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + +// Time is measured by number of blocks. +pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); +pub const HOURS: BlockNumber = MINUTES * 60; +pub const DAYS: BlockNumber = HOURS * 24; + +// Unit = the base number of indivisible units for balances +pub const UNIT: Balance = 1_000_000_000_000; +pub const MILLIUNIT: Balance = 1_000_000_000; +pub const MICROUNIT: Balance = 1_000_000; + +/// The existential deposit. Set to 1/10 of the Connected Relay Chain. +pub const EXISTENTIAL_DEPOSIT: Balance = UNIT; + +/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is +/// used to limit the maximal weight of a single extrinsic. +const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); + +/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by +/// `Operational` extrinsics. +const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); + +/// We allow for 0.5 of a second of compute with a 12 second average block time. +const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( + WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), + cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64, +); + +/// The version information used to identify this polkadex-parachain when compiled natively. +#[cfg(feature = "std")] +pub fn native_version() -> NativeVersion { + NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } +} + +parameter_types! { + pub const Version: RuntimeVersion = VERSION; + + // This part is copied from Substrate's `bin/polkadex-mainnet-polkadex-parachain-node/polkadex-parachain/src/lib.rs`. + // The `RuntimeBlockLength` and `RuntimeBlockWeights` exist here because the + // `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize + // the lazy contract deletion. + pub RuntimeBlockLength: BlockLength = + BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() + .base_block(BlockExecutionWeight::get()) + .for_class(DispatchClass::all(), |weights| { + weights.base_extrinsic = ExtrinsicBaseWeight::get(); + }) + .for_class(DispatchClass::Normal, |weights| { + weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + }) + .for_class(DispatchClass::Operational, |weights| { + weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); + // Operational transactions have some extra reserved space, so that they + // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. + weights.reserved = Some( + MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT + ); + }) + .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) + .build_or_panic(); + pub const SS58Prefix: u16 = 89; +} + +// Configure FRAME pallets to include in polkadex-parachain. + +impl frame_system::Config for Runtime { + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type RuntimeCall = RuntimeCall; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup; + /// The index type for storing how many extrinsics an account has signed. + type Index = Index; + /// The index type for blocks. + type BlockNumber = BlockNumber; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The header type. + type Header = generic::Header; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + /// The ubiquitous origin type. + type RuntimeOrigin = RuntimeOrigin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// Runtime version. + type Version = Version; + /// Converts a module to an index of this module in the polkadex-parachain. + type PalletInfo = PalletInfo; + /// The data to be stored in an account. + type AccountData = pallet_balances::AccountData; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The weight of database operations that the polkadex-parachain can invoke. + type DbWeight = RocksDbWeight; + /// The basic call filter to use in dispatchable. + type BaseCallFilter = Everything; + /// Weight information for the extrinsics of this pallet. + type SystemWeightInfo = (); + /// Block & extrinsics weights: base values and limits. + type BlockWeights = RuntimeBlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = RuntimeBlockLength; + /// This is used as an identifier of the chain. 42 is the generic substrate prefix. + type SS58Prefix = SS58Prefix; + /// The action to take on a Runtime Upgrade + type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + +parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl pallet_timestamp::Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = MinimumPeriod; + type WeightInfo = (); +} + +parameter_types! { + pub const UncleGenerations: u32 = 0; +} + +impl pallet_authorship::Config for Runtime { + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (CollatorSelection,); +} + +parameter_types! { + pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; + pub const MaxLocks: u32 = 50; + pub const MaxReserves: u32 = 50; +} + +impl pallet_balances::Config for Runtime { + type MaxLocks = MaxLocks; + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = pallet_balances::weights::SubstrateWeight; + type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; + type HoldIdentifier = (); + type FreezeIdentifier = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; +} + +parameter_types! { + /// Relay Chain `TransactionByteFee` / 10 + pub const TransactionByteFee: Balance = 10 * MICROUNIT; + pub const OperationalFeeMultiplier: u8 = 5; +} + +impl pallet_transaction_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; + type OperationalFeeMultiplier = OperationalFeeMultiplier; +} + +parameter_types! { + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); +} + +impl cumulus_pallet_parachain_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OnSystemEvent = (); + type SelfParaId = parachain_info::Pallet; + type OutboundXcmpMessageSource = XcmpQueue; + type DmpMessageHandler = DmpQueue; + type ReservedDmpWeight = ReservedDmpWeight; + type XcmpMessageHandler = XcmpQueue; + type ReservedXcmpWeight = ReservedXcmpWeight; + type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; +} + +impl parachain_info::Config for Runtime {} + +impl cumulus_pallet_aura_ext::Config for Runtime {} + +impl cumulus_pallet_xcmp_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; + type ChannelInfo = ParachainSystem; + type VersionWrapper = (); + type ExecuteOverweightOrigin = EnsureRoot; + type ControllerOrigin = EnsureRoot; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type PriceForSiblingDelivery = (); + type WeightInfo = (); +} + +impl cumulus_pallet_dmp_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; + type ExecuteOverweightOrigin = EnsureRoot; +} + +parameter_types! { + pub const Period: u32 = 6 * HOURS; + pub const Offset: u32 = 0; + pub const MaxAuthorities: u32 = 100_000; +} + +impl pallet_session::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions; + type NextSessionRotation = pallet_session::PeriodicSessions; + type SessionManager = CollatorSelection; + // Essentially just Aura, but lets be pedantic. + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = (); +} + +impl pallet_aura::Config for Runtime { + type AuthorityId = AuraId; + type DisabledValidators = (); + type MaxAuthorities = MaxAuthorities; +} + +parameter_types! { + pub const PotId: PalletId = PalletId(*b"PotStake"); + pub const MaxCandidates: u32 = 1000; + pub const MinCandidates: u32 = 5; + pub const SessionLength: BlockNumber = 6 * HOURS; + pub const MaxInvulnerables: u32 = 100; + pub const ExecutiveBody: BodyId = BodyId::Executive; +} + +// We allow root only to execute privileged collator selection operations. +pub type CollatorSelectionUpdateOrigin = EnsureRoot; + +impl pallet_collator_selection::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type UpdateOrigin = CollatorSelectionUpdateOrigin; + type PotId = PotId; + type MaxCandidates = MaxCandidates; + type MinCandidates = MinCandidates; + type MaxInvulnerables = MaxInvulnerables; + // should be a multiple of session or things will get inconsistent + type KickThreshold = Period; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ValidatorRegistration = Session; + type WeightInfo = (); +} + +impl pallet_sudo::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type WeightInfo = (); +} + +parameter_types! { + pub const AssetHandlerPalletId: PalletId = PalletId(*b"XcmHandl"); + pub const WithdrawalExecutionBlockDiff: u32 = 1000; + pub ParachainId: u32 = ParachainInfo::get().into(); + pub const ParachainNetworkId: u8 = 1; // Our parachain's thea id is one. + pub const PolkadexAssetid: u128 = POLKADEX_NATIVE_ASSET_ID; +} + +impl xcm_helper::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AccountIdConvert = LocationToAccountId; + type Assets = Assets; + type AssetId = u128; + type Currency = Balances; + type AssetCreateUpdateOrigin = EnsureRoot; + type Executor = TheaMessageHandler; + type AssetHandlerPalletId = AssetHandlerPalletId; + type WithdrawalExecutionBlockDiff = WithdrawalExecutionBlockDiff; + type ParachainId = ParachainId; + type SubstrateNetworkId = ParachainNetworkId; + type NativeAssetId = PolkadexAssetid; + type WeightInfo = xcm_helper::weights::WeightInfo; +} + +parameter_types! { + pub const MinimumActiveCouncilSize: u8 = 2; +} + +impl thea_council::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type MinimumActiveCouncilSize = MinimumActiveCouncilSize; + type RetainPeriod = ConstU64<7200>; + type TheaCouncilWeightInfo = thea_council::weights::WeightInfo; +} + +parameter_types! { + pub const AssetDeposit: Balance = 100 * DOLLARS; + pub const ApprovalDeposit: Balance = DOLLARS; + pub const StringLimit: u32 = 50; + pub const MetadataDepositBase: Balance = 10 * DOLLARS; + pub const MetadataDepositPerByte: Balance = DOLLARS; +} + +impl pallet_assets::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type RemoveItemsLimit = ConstU32<1000>; + type AssetId = u128; + type AssetIdParameter = codec::Compact; + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = EnsureRoot; + type AssetDeposit = AssetDeposit; + type AssetAccountDeposit = AssetDeposit; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type ApprovalDeposit = ApprovalDeposit; + type StringLimit = StringLimit; + type Freezer = (); + type Extra = (); + type CallbackHandle = (); + type WeightInfo = (); +} + +parameter_types! { + pub const TheaMaxAuthorities: u32 = 200; +} + +impl thea_message_handler::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type TheaId = AuthorityId; + type Signature = AuthoritySignature; + type MaxAuthorities = TheaMaxAuthorities; + type Executor = XcmHelper; + type WeightInfo = thea_message_handler::weights::WeightInfo; +} + +// Create the polkadex-parachain by composing the FRAME pallets that were previously configured. +construct_runtime!( + pub enum Runtime where + Block = Block, + NodeBlock = opaque::Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + // System support stuff. + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + ParachainSystem: cumulus_pallet_parachain_system::{ + Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, + } = 1, + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + + // Monetary stuff. + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, + TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + + // Collator support. The order of these 4 are important and shall not change. + Authorship: pallet_authorship::{Pallet, Storage} = 20, + CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, + Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, + Aura: pallet_aura::{Pallet, Storage, Config} = 23, + AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Assets: pallet_assets::{Pallet, Call, Storage, Event, Config} = 25, + + // XCM helpers. + XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, + PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin, Config} = 31, + CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, + XTokens: orml_xtokens::{Pallet, Call, Storage, Event} = 34, + + // Custom Pallets + XcmHelper: xcm_helper::{Pallet, Call, Storage, Event} = 40, + TheaCouncil: thea_council::{Pallet, Call, Storage, Event} = 41, + Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 45, + + // Thea Pallet + TheaMessageHandler: thea_message_handler::{Pallet, Call, Storage, Event, ValidateUnsigned} = 46 + } +); + +#[cfg(feature = "polkadex-parachain-benchmarks")] +#[macro_use] +extern crate frame_benchmarking; + +#[cfg(feature = "polkadex-parachain-benchmarks")] +mod benches { + define_benchmarks!( + [frame_system, SystemBench::] + [pallet_balances, Balances] + [pallet_session, SessionBench::] + [pallet_timestamp, Timestamp] + [pallet_collator_selection, CollatorSelection] + [cumulus_pallet_xcmp_queue, XcmpQueue] + [thea_council, TheaCouncil] + [xcm_helper, XcmHelper] + ); +} + +impl_runtime_apis! { + impl sp_consensus_aura::AuraApi for Runtime { + fn slot_duration() -> sp_consensus_aura::SlotDuration { + sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration()) + } + + fn authorities() -> Vec { + Aura::authorities().into_inner() + } + } + + impl sp_api::Core for Runtime { + fn version() -> RuntimeVersion { + VERSION + } + + fn execute_block(block: Block) { + Executive::execute_block(block) + } + + fn initialize_block(header: &::Header) { + Executive::initialize_block(header) + } + } + + impl sp_api::Metadata for Runtime { + fn metadata() -> OpaqueMetadata { + OpaqueMetadata::new(Runtime::metadata().into()) + } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> Vec { Runtime::metadata_versions() } + } + + impl sp_block_builder::BlockBuilder for Runtime { + fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { + Executive::apply_extrinsic(extrinsic) + } + + fn finalize_block() -> ::Header { + Executive::finalize_block() + } + + fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + data.create_extrinsics() + } + + fn check_inherents( + block: Block, + data: sp_inherents::InherentData, + ) -> sp_inherents::CheckInherentsResult { + data.check_extrinsics(&block) + } + } + + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { + fn validate_transaction( + source: TransactionSource, + tx: ::Extrinsic, + block_hash: ::Hash, + ) -> TransactionValidity { + Executive::validate_transaction(source, tx, block_hash) + } + } + + impl sp_offchain::OffchainWorkerApi for Runtime { + fn offchain_worker(header: &::Header) { + Executive::offchain_worker(header) + } + } + + impl sp_session::SessionKeys for Runtime { + fn generate_session_keys(seed: Option>) -> Vec { + SessionKeys::generate(seed) + } + + fn decode_session_keys( + encoded: Vec, + ) -> Option, KeyTypeId)>> { + SessionKeys::decode_into_raw_public_keys(&encoded) + } + } + + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Index { + System::account_nonce(account) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { + fn query_info(uxt: ::Extrinsic, len: u32) -> pallet_transaction_payment::RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details(uxt: ::Extrinsic, len: u32) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + for Runtime + { + fn query_call_info( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::RuntimeDispatchInfo { + TransactionPayment::query_call_info(call, len) + } + fn query_call_fee_details( + call: RuntimeCall, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_call_fee_details(call, len) + } + fn query_weight_to_fee(weight: Weight) -> Balance { + TransactionPayment::weight_to_fee(weight) + } + + fn query_length_to_fee(length: u32) -> Balance { + TransactionPayment::length_to_fee(length) + } + } + + impl cumulus_primitives_core::CollectCollationInfo for Runtime { + fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { + ParachainSystem::collect_collation_info(header) + } + } + + #[cfg(feature = "try-polkadex-parachain")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + log::info!("try-polkadex-parachain::on_runtime_upgrade parachain-polkadex."); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); + (weight, RuntimeBlockWeights::get().max_block) + } + + fn execute_block(block: Block, state_root_check: bool,signature_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight { + log::info!( + target: "polkadex-parachain::parachain-polkadex", "try-polkadex-parachain: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", + block.header.number, + block.header.hash(), + state_root_check, + select, + ); + Executive::try_execute_block(block, state_root_check,signature_check, select).expect("try_execute_block failed") + } + } + + #[cfg(feature = "polkadex-parachain-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn benchmark_metadata(extra: bool) -> ( + Vec, + Vec, + ) { + use frame_benchmarking::{Benchmarking, BenchmarkList}; + use frame_support::traits::StorageInfoTrait; + use frame_system_benchmarking::Pallet as SystemBench; + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + + let mut list = Vec::::new(); + list_benchmark!(list, extra, xcm_helper, XcmHelper); + list_benchmark!(list, extra, thea_council, TheaCouncil); + list_benchmarks!(list, extra); + + let storage_info = AllPalletsWithSystem::storage_info(); + (list, storage_info) + } + + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result, sp_runtime::RuntimeString> { + use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey}; + + use frame_system_benchmarking::Pallet as SystemBench; + impl frame_system_benchmarking::Config for Runtime {} + + use cumulus_pallet_session_benchmarking::Pallet as SessionBench; + impl cumulus_pallet_session_benchmarking::Config for Runtime {} + + let whitelist: Vec = vec![ + // Block Number + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), + // Total Issuance + hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), + // Execution Phase + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), + // Event Count + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), + // System Events + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), + ]; + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + add_benchmark!(params, batches, thea_council, TheaCouncil); + add_benchmark!(params, batches, xcm_helper, XcmHelper); + add_benchmarks!(params, batches); + + if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } + Ok(batches) + } + } +} + +struct CheckInherents; + +impl cumulus_pallet_parachain_system::CheckInherents for CheckInherents { + fn check_inherents( + block: &Block, + relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof, + ) -> sp_inherents::CheckInherentsResult { + let relay_chain_slot = relay_state_proof + .read_slot() + .expect("Could not read the relay chain slot from the proof"); + + let inherent_data = + cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration( + relay_chain_slot, + sp_std::time::Duration::from_secs(6), + ) + .create_inherent_data() + .expect("Could not create the timestamp inherent data"); + + inherent_data.check_extrinsics(block) + } +} + +cumulus_pallet_parachain_system::register_validate_block! { + Runtime = Runtime, + BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, + CheckInherents = CheckInherents, +} diff --git a/runtimes/polkadex-parachain/src/weights/block_weights.rs b/runtimes/polkadex-parachain/src/weights/block_weights.rs new file mode 100644 index 000000000..b2092d875 --- /dev/null +++ b/runtimes/polkadex-parachain/src/weights/block_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, Weight}, + }; + + parameter_types! { + /// Importing a block with 0 Extrinsics. + pub const BlockExecutionWeight: Weight = + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); + } + + #[cfg(test)] + mod test_weights { + use frame_support::weights::constants; + + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::constants::BlockExecutionWeight::get(); + + // At least 100 µs. + assert!( + w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 100 µs." + ); + // At most 50 ms. + assert!( + w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 50 ms." + ); + } + } +} diff --git a/runtimes/polkadex-parachain/src/weights/extrinsic_weights.rs b/runtimes/polkadex-parachain/src/weights/extrinsic_weights.rs new file mode 100644 index 000000000..332c3b324 --- /dev/null +++ b/runtimes/polkadex-parachain/src/weights/extrinsic_weights.rs @@ -0,0 +1,53 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, Weight}, + }; + + parameter_types! { + /// Executing a NO-OP `System::remarks` Extrinsic. + pub const ExtrinsicBaseWeight: Weight = + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); + } + + #[cfg(test)] + mod test_weights { + use frame_support::weights::constants; + + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::constants::ExtrinsicBaseWeight::get(); + + // At least 10 µs. + assert!( + w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + "Weight should be at least 10 µs." + ); + // At most 1 ms. + assert!( + w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Weight should be at most 1 ms." + ); + } + } +} diff --git a/runtimes/polkadex-parachain/src/weights/mod.rs b/runtimes/polkadex-parachain/src/weights/mod.rs new file mode 100644 index 000000000..ed0b4dbcd --- /dev/null +++ b/runtimes/polkadex-parachain/src/weights/mod.rs @@ -0,0 +1,28 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Expose the auto generated weight files. + +pub mod block_weights; +pub mod extrinsic_weights; +pub mod paritydb_weights; +pub mod rocksdb_weights; + +pub use block_weights::constants::BlockExecutionWeight; +pub use extrinsic_weights::constants::ExtrinsicBaseWeight; +pub use paritydb_weights::constants::ParityDbWeight; +pub use rocksdb_weights::constants::RocksDbWeight; diff --git a/runtimes/polkadex-parachain/src/weights/paritydb_weights.rs b/runtimes/polkadex-parachain/src/weights/paritydb_weights.rs new file mode 100644 index 000000000..db4579d9e --- /dev/null +++ b/runtimes/polkadex-parachain/src/weights/paritydb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; + + parameter_types! { + /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights + /// are available for brave polkadex-parachain engineers who may want to try this out as default. + pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { + read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } + + #[cfg(test)] + mod test_db_weights { + use super::constants::ParityDbWeight as W; + use frame_support::weights::constants; + + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } +} diff --git a/runtimes/polkadex-parachain/src/weights/rocksdb_weights.rs b/runtimes/polkadex-parachain/src/weights/rocksdb_weights.rs new file mode 100644 index 000000000..b153c19f0 --- /dev/null +++ b/runtimes/polkadex-parachain/src/weights/rocksdb_weights.rs @@ -0,0 +1,63 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod constants { + use frame_support::{ + parameter_types, + weights::{constants, RuntimeDbWeight}, + }; + + parameter_types! { + /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout + /// the polkadex-parachain. + pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { + read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + }; + } + + #[cfg(test)] + mod test_db_weights { + use super::constants::RocksDbWeight as W; + use frame_support::weights::constants; + + /// Checks that all weights exist and have sane values. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + // At least 1 µs. + assert!( + W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Read weight should be at least 1 µs." + ); + assert!( + W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + "Write weight should be at least 1 µs." + ); + // At most 1 ms. + assert!( + W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Read weight should be at most 1 ms." + ); + assert!( + W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + "Write weight should be at most 1 ms." + ); + } + } +} diff --git a/runtimes/polkadex-parachain/src/xcm_config.rs b/runtimes/polkadex-parachain/src/xcm_config.rs new file mode 100644 index 000000000..8ba3249a9 --- /dev/null +++ b/runtimes/polkadex-parachain/src/xcm_config.rs @@ -0,0 +1,389 @@ +// This file is part of Polkadex. + +// Copyright (C) 2020-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use super::{ + AccountId, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, +}; +use crate::{AllPalletsWithSystem, Balance, PolkadexAssetid, XcmHelper}; +use core::marker::PhantomData; +use frame_support::{ + match_types, parameter_types, + traits::{Contains, Everything, Nothing}, + weights::WeightToFee as WeightToFeeT, +}; +use frame_system::EnsureRoot; + +use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; +use orml_xcm_support::MultiNativeAsset; +use pallet_xcm::XcmPassthrough; +use polkadot_parachain::primitives::Sibling; +use polkadot_runtime_common::impls::ToAuthor; +use sp_core::{ConstU32, Get}; +use sp_runtime::{traits::Convert, SaturatedConversion}; +use xcm::latest::{prelude::*, Weight as XCMWeight, Weight}; +use xcm_builder::{ + AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, + AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, + IsConcrete, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, UsingComponents, +}; +use xcm_executor::{ + traits::{WeightTrader, WithOriginFilter}, + Assets, XcmExecutor, +}; +use xcm_helper::{AssetIdConverter, WhitelistedTokenHandler}; + +parameter_types! { + pub const RelayLocation: MultiLocation = MultiLocation::parent(); + pub const RelayNetwork: NetworkId = NetworkId::Polkadot; + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); + pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub PdexLocation: MultiLocation = Here.into(); + pub UniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())); + + +} + +/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used +/// when determining ownership of accounts for asset transacting and when attempting to use XCM +/// `Transact` in order to determine the dispatch Origin. +pub type LocationToAccountId = ( + // The parent (Relay-chain) origin converts to the parent `AccountId`. + ParentIsPreset, + // Sibling parachain origins convert to AccountId via the `ParaId::into`. + SiblingParachainConvertsVia, + // Straight up local `AccountId32` origins just alias directly to `AccountId`. + AccountId32Aliases, +); + +/// Means for transacting assets on this chain. +pub type LocalAssetTransactor = CurrencyAdapter< + // Use this currency: + Balances, + // Use this currency when it is a fungible asset matching the given location or name: + IsConcrete, + // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID: + LocationToAccountId, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We don't track any teleports. + (), +>; + +// Not using it for now. Saved for future. +pub struct SafeCallFilter; +impl SafeCallFilter { + // 1. RuntimeCall::EVM(..) & RuntimeCall::Ethereum(..) have to be prohibited since we cannot + // measure PoV size properly + // 2. RuntimeCall::Contracts(..) can be allowed, but it hasn't been tested properly yet. + + /// Checks whether the base (non-composite) call is allowed to be executed via `Transact` XCM + /// instruction. + pub fn allow_base_call(call: &RuntimeCall) -> bool { + matches!( + call, + RuntimeCall::System(..) | + RuntimeCall::Balances(..) | + RuntimeCall::Assets(..) | + RuntimeCall::PolkadotXcm(..) | + RuntimeCall::Session(..) + ) + } + /// Checks whether composite call is allowed to be executed via `Transact` XCM instruction. + /// + /// Each composite call's subcalls are checked against base call filter. No nesting of composite + /// calls is allowed. + pub fn allow_composite_call(_call: &RuntimeCall) -> bool { + false + } +} + +impl Contains for SafeCallFilter { + fn contains(call: &RuntimeCall) -> bool { + Self::allow_base_call(call) || Self::allow_composite_call(call) + } +} + +/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, +/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can +/// biases the kind of local `Origin` it will become. +pub type XcmOriginToTransactDispatchOrigin = ( + // Sovereign account converter; this attempts to derive an `AccountId` from the origin location + // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for + // foreign chains who want to have a local sovereign account on this chain which they control. + SovereignSignedViaLocation, + // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when + // recognized. + RelayChainAsNative, + // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when + // recognized. + SiblingParachainAsNative, + // Native signed account converter; this just converts an `AccountId32` origin into a normal + // `RuntimeOrigin::Signed` origin of the same 32-byte value. + SignedAccountId32AsNative, + // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. + XcmPassthrough, +); + +parameter_types! { + pub const UnitWeightCost: XCMWeight = XCMWeight::from_parts(200_000_000, 0); + pub const MaxInstructions: u32 = 100; +} + +match_types! { + pub type ParentOrParentsExecutivePlurality: impl Contains = { + MultiLocation { parents: 1, interior: Here } | + MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + }; +} + +pub type Barrier = ( + TakeWeightCredit, + AllowTopLevelPaidExecutionFrom, + // Expected responses are OK. + AllowKnownQueryResponses, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, +); + +pub struct XcmConfig; +impl xcm_executor::Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + // How to withdraw and deposit an asset. + type AssetTransactor = XcmHelper; + type OriginConverter = XcmOriginToTransactDispatchOrigin; + type IsReserve = MultiNativeAsset; + // Teleporting is disabled. + type IsTeleporter = (); + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = FixedWeightBounds; + type Trader = ( + // If the XCM message is paying the fees in PDEX ( the native ) then + // it will go to the author of the block as rewards + UsingComponents>, + ForeignAssetFeeHandler< + //TODO: Should we go for FixedRateOfForeignAsset + WeightToFee, + RevenueCollector, + XcmHelper, + XcmHelper, + >, + ); + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetLocker = (); + type AssetExchanger = (); + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = ConstU32<64>; + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = Everything; //Note: All kind of ext can be accessed through XCM +} + +/// No local origins on this chain are allowed to dispatch XCM sends/executions. +pub type LocalOriginToLocation = SignedToAccountId32; + +/// The means for routing XCM messages which are not for local execution into the right message +/// queues. +pub type XcmRouter = ( + // Two routers - use UMP to communicate with the relay chain: + cumulus_primitives_utility::ParentAsUmp, + // ..and XCMP to communicate with the sibling chains. + XcmpQueue, +); + +impl pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type CurrencyMatcher = (); + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = XcmRouter; + type ExecuteXcmOrigin = EnsureXcmOrigin; + type XcmExecuteFilter = Nothing; + // ^ Disable dispatchable execute on the XCM pallet. + // Needs to be `Everything` for local testing. + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Nothing; + type Weigher = FixedWeightBounds; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + // ^ Override for AdvertisedXcmVersion default + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type AdminOrigin = EnsureRoot; + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); + type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "polkadex-parachain-benchmarks")] + type ReachableDest = (); +} + +impl cumulus_pallet_xcm::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; +} + +pub struct AccountIdToMultiLocation; +impl Convert for AccountIdToMultiLocation { + fn convert(account: AccountId) -> MultiLocation { + X1(AccountId32 { network: None, id: account.into() }).into() + } +} + +parameter_types! { + pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into()))); + pub BaseXcmWeight: Weight = XCMWeight::from_parts(100_000_000, 0); + pub const MaxAssetsForTransfer: usize = 2; +} + +parameter_type_with_key! { + pub ParachainMinFee: |_location: MultiLocation| -> Option { + Some(1u128) + }; +} + +impl orml_xtokens::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type CurrencyId = u128; + type CurrencyIdConvert = XcmHelper; + type AccountIdToMultiLocation = AccountIdToMultiLocation; + type SelfLocation = SelfLocation; + type MinXcmFee = ParachainMinFee; + type XcmExecutor = XcmExecutor; + type MultiLocationsFilter = Everything; + type Weigher = FixedWeightBounds; + type BaseXcmWeight = BaseXcmWeight; + type MaxAssetsForTransfer = MaxAssetsForTransfer; + type ReserveProvider = AbsoluteReserveProvider; + type UniversalLocation = UniversalLocation; +} + +pub struct ForeignAssetFeeHandler +where + T: WeightToFeeT, + R: TakeRevenue, + AC: AssetIdConverter, + WH: WhitelistedTokenHandler, +{ + /// Total used weight + weight: Weight, + /// Total consumed assets + consumed: u128, + /// Asset Id (as MultiLocation) and units per second for payment + asset_location_and_units_per_second: Option<(MultiLocation, u128)>, + _pd: PhantomData<(T, R, AC, WH)>, +} + +impl WeightTrader for ForeignAssetFeeHandler +where + T: WeightToFeeT, + R: TakeRevenue, + AC: AssetIdConverter, + WH: WhitelistedTokenHandler, +{ + fn new() -> Self { + Self { + weight: Weight::zero(), + consumed: 0, + asset_location_and_units_per_second: None, + _pd: PhantomData, + } + } + + /// NOTE: If the token is allowlisted by AMM pallet ( probably using governance ) + /// then it will be allowed to execute for free even if the pool is not there. + /// If pool is not there and token is not present in allowlisted then it will be rejected. + fn buy_weight( + &mut self, + weight: Weight, + payment: Assets, + ) -> sp_std::result::Result { + let _fee_in_native_token = T::weight_to_fee(&weight); + let payment_asset = payment.fungible_assets_iter().next().ok_or(XcmError::Trap(1000))?; + if let AssetId::Concrete(location) = payment_asset.id { + let foreign_currency_asset_id = + AC::convert_location_to_asset_id(location).ok_or(XcmError::Trap(1001))?; + let _path = [PolkadexAssetid::get(), foreign_currency_asset_id]; + let (unused, expected_fee_in_foreign_currency) = + if WH::check_whitelisted_token(foreign_currency_asset_id) { + (payment, 0u128) + } else { + return Err(XcmError::Trap(1004)) + }; + self.weight = self.weight.saturating_add(weight); + if let Some((old_asset_location, _)) = self.asset_location_and_units_per_second { + if old_asset_location == location { + self.consumed = self + .consumed + .saturating_add((expected_fee_in_foreign_currency).saturated_into()); + } + } else { + self.consumed = self + .consumed + .saturating_add((expected_fee_in_foreign_currency).saturated_into()); + self.asset_location_and_units_per_second = Some((location, 0)); + } + Ok(unused) + } else { + Err(XcmError::Trap(1005)) + } + } +} + +impl Drop for ForeignAssetFeeHandler +where + T: WeightToFeeT, + R: TakeRevenue, + AC: AssetIdConverter, + WH: WhitelistedTokenHandler, +{ + fn drop(&mut self) { + if let Some((asset_location, _)) = self.asset_location_and_units_per_second { + if self.consumed > 0 { + R::take_revenue((asset_location, self.consumed).into()); + } + } + } +} + +pub struct TypeConv; +impl + Clone, Dest: TryFrom + Clone> + xcm_executor::traits::Convert for TypeConv +{ + fn convert(value: Source) -> Result { + Dest::try_from(value.clone()).map_err(|_| value) + } +} + +pub struct RevenueCollector; + +impl TakeRevenue for RevenueCollector { + fn take_revenue(_revenue: MultiAsset) {} +} diff --git a/scripts/start_chain.sh b/scripts/start_chain.sh index a981679f7..16ae5f5cc 100755 --- a/scripts/start_chain.sh +++ b/scripts/start_chain.sh @@ -24,7 +24,7 @@ start_boot_node() { echo "Starting boot node..." install -d ../ind_validators/validator1 cd ../ind_validators/validator1 - ../../target/$TARGET/polkadex-node --validator --base-path ./bootnode -lthea=trace -lorderbook=trace --rpc-port=9943 --thea-dummy-mode --chain=../../scripts/customSpecRaw.json --node-key=1f64f01767da8258fcb986bd68d6dff93dfcd49d0fc753cea27cf37ce91c3684 >out_boot_node 2>&1 & + ../../target/$TARGET/polkadex-polkadex-mainnet-polkadex-parachain-node --validator --base-path ./bootnode -lthea=trace -lorderbook=trace --rpc-port=9943 --thea-dummy-mode --chain=../../scripts/customSpecRaw.json --polkadex-mainnet-polkadex-parachain-node-key=1f64f01767da8258fcb986bd68d6dff93dfcd49d0fc753cea27cf37ce91c3684 >out_boot_node 2>&1 & BOOT_NODE_PID=$(echo $!) cd ../../scripts } @@ -33,11 +33,11 @@ start_validator_1() { echo "Starting validator 1..." install -d ../ind_validators/validator2 cd ../ind_validators/validator2 - ../../target/$TARGET/polkadex-node --validator --port 30334 --base-path ./validator01 --thea-dummy-mode \ + ../../target/$TARGET/polkadex-polkadex-mainnet-polkadex-parachain-node --validator --port 30334 --base-path ./validator01 --thea-dummy-mode \ -lthea=trace -lorderbook=trace --rpc-port=9944 --chain=../../scripts/customSpecRaw.json \ --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRozCnsH7zCYiNVpCRqgaoxukPdYxqaPQNs9rdDMDeN4t \ --bootnodes /ip4/127.0.0.1/tcp/30335/p2p/12D3KooWCMKvu1tJKQBjDZ4hN1saTP6D58e4WkwLZwks5cPpxqY7 \ - --node-key=d353c4b01db05aa66ddeab9d85c2fa2252368dd4961606e5985ed1e8f40dbc50 >out_validator_1 2>&1 & + --polkadex-mainnet-polkadex-parachain-node-key=d353c4b01db05aa66ddeab9d85c2fa2252368dd4961606e5985ed1e8f40dbc50 >out_validator_1 2>&1 & VALIDATOR_1_PID=$(echo $!) cd ../../scripts } @@ -46,11 +46,11 @@ start_validator_2() { echo "Starting validator 2..." install -d ../ind_validators/validator3 cd ../ind_validators/validator3 - ../../target/$TARGET/polkadex-node --validator --port 30335 --base-path ./validator02 -lthea=trace --thea-dummy-mode \ + ../../target/$TARGET/polkadex-polkadex-mainnet-polkadex-parachain-node --validator --port 30335 --base-path ./validator02 -lthea=trace --thea-dummy-mode \ --rpc-port=9945 --chain=../../scripts/customSpecRaw.json \ --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRozCnsH7zCYiNVpCRqgaoxukPdYxqaPQNs9rdDMDeN4t \ --bootnodes /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWEVBdwVmV1BeAdtqzhjANK31ibYmLQXxEoeai4fx7KhNh \ - --node-key=24f121a84149f784f9fe3f1e2fb04e8873191a510bc4b073a3a815d78a29cf2d >out_validator_2 2>&1 & + --polkadex-mainnet-polkadex-parachain-node-key=24f121a84149f784f9fe3f1e2fb04e8873191a510bc4b073a3a815d78a29cf2d >out_validator_2 2>&1 & VALIDATOR_2_PID=$(echo $!) cd ../../scripts } @@ -59,7 +59,7 @@ start_full_node() { echo "Starting fullnode..." install -d ../ind_validators/full_node cd ../ind_validators/full_node - ../../target/$TARGET/polkadex-node --chain=../../scripts/customSpecRaw.json --pruning=archive \ + ../../target/$TARGET/polkadex-polkadex-mainnet-polkadex-parachain-node --chain=../../scripts/customSpecRaw.json --pruning=archive \ --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRozCnsH7zCYiNVpCRqgaoxukPdYxqaPQNs9rdDMDeN4t \ --bootnodes /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWEVBdwVmV1BeAdtqzhjANK31ibYmLQXxEoeai4fx7KhNh >out_full_node 2>&1 & FULLNODE_PID=$(echo $!) @@ -68,7 +68,7 @@ start_full_node() { kill_nodes() { echo "Killing nodes..." - killall -2 polkadex-node + killall -2 polkadex-polkadex-mainnet-polkadex-parachain-node } start_chain() { From ff0f5874c7ab8295e38f6cea70b2cb55ad389c9e Mon Sep 17 00:00:00 2001 From: zktony Date: Sat, 16 Sep 2023 16:26:16 +0530 Subject: [PATCH 02/51] Upgraded depend --- Cargo.lock | 3340 ++++++++++------- Cargo.toml | 257 +- nodes/polkadex-mainnet-node/Cargo.toml | 108 +- nodes/polkadex-parachain-node/Cargo.toml | 100 +- pallets/ocex/src/lib.rs | 9 +- pallets/ocex/src/rpc.rs | 3 +- pallets/ocex/src/validator.rs | 5 +- pallets/pdex-migration/src/lib.rs | 7 +- pallets/rewards/src/lib.rs | 14 +- pallets/thea-council/src/lib.rs | 4 +- pallets/thea-executor/src/lib.rs | 8 +- pallets/thea/src/lib.rs | 2 +- pallets/thea/src/session.rs | 2 +- pallets/thea/src/validation.rs | 3 +- pallets/xcm-helper/src/lib.rs | 35 +- primitives/polkadex/Cargo.toml | 12 +- runtimes/polkadex-mainnet/src/lib.rs | 160 +- runtimes/polkadex-parachain/src/lib.rs | 66 +- runtimes/polkadex-parachain/src/xcm_config.rs | 18 +- 19 files changed, 2457 insertions(+), 1696 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c16d296d8..9d60c239b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,13 +172,19 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "always-assert" version = "0.1.3" @@ -225,9 +231,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" [[package]] name = "anstyle-parse" @@ -272,6 +278,20 @@ dependencies = [ "num-traits", ] +[[package]] +name = "aquamarine" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "arc-swap" version = "1.6.0" @@ -279,10 +299,175 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] -name = "array-bytes" -version = "4.2.0" +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-scale" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", +] + +[[package]] +name = "ark-secret-scalar" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] [[package]] name = "array-bytes" @@ -296,6 +481,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -321,7 +515,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -337,7 +531,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -392,6 +586,32 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-executor" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand 1.9.0", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock", + "autocfg", + "blocking", + "futures-lite", +] + [[package]] name = "async-io" version = "1.13.0" @@ -421,17 +641,53 @@ dependencies = [ "event-listener", ] +[[package]] +name = "async-net" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e67316bc7eff608fe723df5d32ed639946adcd69e07df41fd42a7b411f1f" +dependencies = [ + "async-io", + "autocfg", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-process" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +dependencies = [ + "async-io", + "async-lock", + "autocfg", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 0.37.23", + "signal-hook", + "windows-sys 0.48.0", +] + [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] +[[package]] +name = "async-task" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" + [[package]] name = "async-trait" version = "0.1.73" @@ -440,7 +696,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -456,6 +712,12 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + [[package]] name = "atomic-waker" version = "1.1.1" @@ -490,10 +752,32 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.0", + "object 0.32.1", "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.1" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-scale", + "ark-serialize", + "ark-std", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring 0.1.0", + "sha2 0.10.7", + "zeroize", +] + [[package]] name = "base-x" version = "0.2.11" @@ -520,9 +804,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -542,7 +826,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "log", @@ -569,15 +853,30 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.12", + "prettyplease 0.2.15", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.29", + "syn 2.0.35", +] + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", ] +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" @@ -611,26 +910,36 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "constant_time_eq 0.3.0", ] [[package]] name = "blake2s_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "constant_time_eq 0.3.0", ] [[package]] @@ -702,6 +1011,21 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "blocking" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand 1.9.0", + "futures-lite", + "log", +] + [[package]] name = "borsh" version = "0.10.3" @@ -774,11 +1098,20 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" -version = "1.6.0" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" dependencies = [ "memchr", "serde", @@ -795,9 +1128,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -835,9 +1168,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" @@ -847,9 +1180,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2-sys" @@ -926,9 +1259,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", ] @@ -957,6 +1290,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures", +] + [[package]] name = "chacha20poly1305" version = "0.9.1" @@ -964,37 +1308,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" dependencies = [ "aead 0.4.3", - "chacha20", + "chacha20 0.8.2", "cipher 0.3.0", - "poly1305", + "poly1305 0.7.2", "zeroize", ] [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "cid" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash 0.16.3", + "multihash", "serde", "unsigned-varint", ] @@ -1064,20 +1407,19 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.0" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d5f1946157a96594eb2d2c10eb7ad9a2b27518cb3000209dec700c35df9197d" +checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78116e32a042dd73c2901f0dc30790d20ff3447f3e3472fad359e8c3d282bcd6" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" dependencies = [ "anstream", "anstyle", @@ -1087,14 +1429,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -1133,9 +1475,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" dependencies = [ "strum", "strum_macros", @@ -1143,8 +1485,28 @@ dependencies = [ ] [[package]] -name = "concurrent-queue" -version = "2.2.0" +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "merlin 3.0.0", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "concurrent-queue" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" dependencies = [ @@ -1170,11 +1532,33 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +[[package]] +name = "const-random" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +dependencies = [ + "const-random-macro", + "proc-macro-hack", +] + +[[package]] +name = "const-random-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "proc-macro-hack", + "tiny-keccak", +] + [[package]] name = "constant_time_eq" -version = "0.2.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" @@ -1420,7 +1804,7 @@ dependencies = [ name = "crowdloan-verifier" version = "0.1.0" dependencies = [ - "clap 4.4.0", + "clap 4.4.3", "csv", "pallet-rewards", "polkadex-primitives", @@ -1448,9 +1832,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", @@ -1531,12 +1915,13 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.0", + "clap 4.4.3", "parity-scale-codec", "sc-chain-spec", "sc-cli", + "sc-client-api", "sc-service", "sp-core", "sp-runtime", @@ -1546,7 +1931,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1569,25 +1954,29 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", "futures 0.3.28", "parity-scale-codec", "polkadot-node-primitives", + "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-aura", + "sc-consensus-babe", "sc-consensus-slots", "sc-telemetry", + "schnellru", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -1607,7 +1996,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1620,11 +2009,14 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus", + "sc-consensus-babe", "schnellru", "sp-blockchain", "sp-consensus", + "sp-consensus-slots", "sp-core", "sp-runtime", + "sp-timestamp", "sp-trie", "substrate-prometheus-endpoint", "tracing", @@ -1633,7 +2025,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "anyhow", "async-trait", @@ -1648,7 +2040,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1657,7 +2049,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "sc-client-api", "sp-blockchain", @@ -1671,7 +2063,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1695,7 +2087,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1730,11 +2122,13 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "cumulus-pallet-parachain-system", "frame-support", "frame-system", "pallet-aura", + "pallet-timestamp", "parity-scale-codec", "scale-info", "sp-application-crypto", @@ -1746,7 +2140,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1757,13 +2151,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1775,7 +2169,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "sp-core", "sp-externalities", @@ -1786,24 +2180,25 @@ dependencies = [ "sp-std", "sp-trie", "sp-version", - "xcm", + "staging-xcm", + "trie-db", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "cumulus-pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -1817,7 +2212,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1827,13 +2222,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -1847,31 +2242,45 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "cumulus-primitives-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-primitives", + "sp-api", + "sp-consensus-aura", + "sp-runtime", + "sp-std", ] [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "scale-info", "sp-api", "sp-runtime", "sp-std", "sp-trie", - "xcm", + "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1894,7 +2303,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-primitives-core", "futures 0.3.28", @@ -1907,7 +2316,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1917,15 +2326,15 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1933,7 +2342,6 @@ dependencies = [ "futures 0.3.28", "futures-timer", "polkadot-cli", - "polkadot-client", "polkadot-service", "sc-cli", "sc-client-api", @@ -1950,7 +2358,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1968,15 +2376,14 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures 0.3.28", - "lru 0.9.0", "polkadot-availability-recovery", "polkadot-collator-protocol", "polkadot-core-primitives", @@ -1988,47 +2395,53 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-authority-discovery", - "sc-client-api", "sc-network", "sc-network-common", "sc-service", "sc-tracing", "sc-utils", + "schnellru", "sp-api", - "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", - "tokio", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", + "either", "futures 0.3.28", "futures-timer", "jsonrpsee", - "lru 0.9.0", "parity-scale-codec", + "pin-project", "polkadot-overseer", + "rand 0.8.5", "sc-client-api", "sc-rpc-api", "sc-service", + "schnellru", "serde", "serde_json", + "smoldot", + "smoldot-light", "sp-api", "sp-authority-discovery", "sp-consensus-babe", "sp-core", + "sp-runtime", "sp-state-machine", "sp-storage", + "thiserror", "tokio", + "tokio-util", "tracing", "url", ] @@ -2036,7 +2449,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2044,6 +2457,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", + "sp-trie", ] [[package]] @@ -2074,16 +2488,16 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "622178105f911d937a42cdb140730ba4a3ed2becd8ae6ce39c7d28b5d75d4588" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms 3.0.2", + "platforms 3.1.2", "rustc_version", "subtle", "zeroize", @@ -2097,14 +2511,27 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] [[package]] name = "cxx" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28403c86fc49e3401fdf45499ba37fad6493d9329449d6449d7f0e10f4654d28" +checksum = "bbe98ba1789d56fb3db3bee5e032774d4f421b685de7ba703643584ba24effbe" dependencies = [ "cc", "cxxbridge-flags", @@ -2114,9 +2541,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78da94fef01786dc3e0c76eafcd187abcaa9972c78e05ff4041e24fdf059c285" +checksum = "c4ce20f6b8433da4841b1dadfb9468709868022d829d5ca1f2ffbda928455ea3" dependencies = [ "cc", "codespan-reporting", @@ -2124,24 +2551,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "cxxbridge-flags" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a6f5e1dfb4b34292ad4ea1facbfdaa1824705b231610087b00b17008641809" +checksum = "20888d9e1d2298e2ff473cee30efe7d5036e437857ab68bbfea84c74dba91da2" [[package]] name = "cxxbridge-macro" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" +checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -2189,7 +2616,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -2211,7 +2638,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -2455,7 +2882,51 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", +] + +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "docify" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff509d6aa8e7ca86b36eb3d593132e64204597de3ccb763ffd8bfd2264d54cf3" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b135598b950330937f3a0ddfbe908106ee2ecd5fa95d8ae7952a3c3863efe8da" +dependencies = [ + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.35", + "termcolor", + "toml 0.7.8", + "walkdir", ] [[package]] @@ -2529,15 +3000,6 @@ dependencies = [ "spki 0.7.2", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.2" @@ -2548,26 +3010,14 @@ dependencies = [ "signature 2.1.0", ] -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "sha2 0.9.9", - "zeroize", -] - [[package]] name = "ed25519-dalek" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "curve25519-dalek 4.0.0", - "ed25519 2.2.2", + "curve25519-dalek 4.1.0", + "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.7", @@ -2588,6 +3038,21 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.0", + "ed25519", + "hashbrown 0.14.0", + "hex", + "rand_core 0.6.4", + "sha2 0.10.7", + "zeroize", +] + [[package]] name = "either" version = "1.9.0" @@ -2623,7 +3088,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ "base16ct 0.2.0", - "crypto-bigint 0.5.2", + "crypto-bigint 0.5.3", "digest 0.10.7", "ff 0.13.0", "generic-array 0.14.7", @@ -2655,22 +3120,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -2681,7 +3146,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -2724,9 +3189,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -2782,19 +3247,6 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "expander" version = "2.0.0" @@ -2805,7 +3257,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -2889,11 +3341,24 @@ dependencies = [ "subtle", ] +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#26a5045b24e169cffc1f9328ca83d71061145c40" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", +] + [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" [[package]] name = "file-per-thread-logger" @@ -2980,7 +3445,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", ] @@ -3003,7 +3468,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-support-procedural", @@ -3028,12 +3493,12 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", - "array-bytes 4.2.0", + "array-bytes", "chrono", - "clap 4.4.0", + "clap 4.4.3", "comfy-table", "frame-benchmarking", "frame-support", @@ -3062,12 +3527,13 @@ dependencies = [ "sp-database", "sp-externalities", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", "sp-storage", "sp-trie", + "sp-wasm-interface", "thiserror", "thousands", ] @@ -3075,18 +3541,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3103,11 +3569,12 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -3119,9 +3586,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", "parity-scale-codec", @@ -3132,7 +3599,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-recursion", "futures 0.3.28", @@ -3144,6 +3611,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", "spinners", "substrate-rpc-client", "tokio", @@ -3153,79 +3621,87 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "aquamarine", "bitflags 1.3.2", + "docify", "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", - "once_cell", + "macro_magic", "parity-scale-codec", "paste", "scale-info", "serde", + "serde_json", "smallvec", "sp-api", "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", "sp-debug-derive", + "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-metadata-ir", "sp-runtime", "sp-staking", "sp-state-machine", "sp-std", "sp-tracing", "sp-weights", + "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", + "expander 2.0.0", "frame-support-procedural-tools", "itertools 0.10.5", + "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cfg-if", "frame-support", @@ -3244,7 +3720,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -3259,7 +3735,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.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "sp-api", @@ -3268,7 +3744,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "parity-scale-codec", @@ -3299,7 +3775,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.9", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -3387,7 +3863,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -3397,8 +3873,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls 0.20.8", - "webpki 0.22.0", + "rustls 0.20.9", + "webpki 0.22.1", ] [[package]] @@ -3598,9 +4074,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.3.7" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" dependencies = [ "log", "pest", @@ -3648,6 +4124,11 @@ name = "hashbrown" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash 0.8.3", + "allocator-api2", + "serde", +] [[package]] name = "heck" @@ -3746,6 +4227,15 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "hostname" version = "0.3.1" @@ -3827,21 +4317,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "log", - "rustls 0.20.8", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", -] - [[package]] name = "hyper-rustls" version = "0.24.1" @@ -3852,10 +4327,10 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.6", + "rustls 0.21.7", "rustls-native-certs", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "webpki-roots 0.23.1", ] @@ -3967,6 +4442,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -3988,6 +4482,12 @@ dependencies = [ "hashbrown 0.14.0", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "indicatif" version = "0.17.6" @@ -4076,7 +4576,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.3", + "socket2 0.5.4", "widestring", "windows-sys 0.48.0", "winreg", @@ -4095,10 +4595,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.9", + "rustix 0.38.13", "windows-sys 0.48.0", ] +[[package]] +name = "is_executable" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" +dependencies = [ + "winapi", +] + [[package]] name = "itertools" version = "0.10.5" @@ -4171,7 +4680,7 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", "tracing", "webpki-roots 0.25.2", @@ -4213,7 +4722,7 @@ checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ "async-trait", "hyper", - "hyper-rustls 0.24.1", + "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -4308,108 +4817,9 @@ dependencies = [ ] [[package]] -name = "kusama-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal 0.4.1", - "kusama-runtime-constants", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-multisig", - "pallet-nis", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-society", - "pallet-staking", - "pallet-staking-runtime-api", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", -] - -[[package]] -name = "kusama-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "kusama-runtime-constants" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "polkadot-primitives", @@ -4453,13 +4863,24 @@ dependencies = [ "smallvec", ] +[[package]] +name = "landlock" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520baa32708c4e957d2fc3a186bc5bd8d26637c33137f399ddfc202adb240068" +dependencies = [ + "enumflags2", + "libc", + "thiserror", +] + [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin", + "spin 0.5.2", ] [[package]] @@ -4470,9 +4891,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libloading" @@ -4562,7 +4983,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -4618,11 +5039,11 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "bs58", - "ed25519-dalek 2.0.0", + "bs58 0.4.0", + "ed25519-dalek", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", @@ -4750,7 +5171,7 @@ dependencies = [ "parking_lot 0.12.1", "quinn-proto", "rand 0.8.5", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", "tokio", ] @@ -4830,10 +5251,10 @@ dependencies = [ "libp2p-core", "libp2p-identity", "rcgen 0.10.0", - "ring", - "rustls 0.20.8", + "ring 0.16.20", + "rustls 0.20.9", "thiserror", - "webpki 0.22.0", + "webpki 0.22.1", "x509-parser 0.14.0", "yasna", ] @@ -4869,7 +5290,7 @@ dependencies = [ "libp2p-identity", "libp2p-noise", "log", - "multihash 0.17.0", + "multihash", "quick-protobuf", "quick-protobuf-codec", "rand 0.8.5", @@ -5015,9 +5436,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de0b5f52a9f84544d268f5fabb71b38962d6aa3c6600b8bcd27d44ccf9c9c45" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", ] @@ -5036,9 +5457,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "liquidity" @@ -5091,30 +5512,18 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown 0.12.3", -] - -[[package]] -name = "lru" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ "hashbrown 0.13.2", ] [[package]] name = "lru" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" -dependencies = [ - "hashbrown 0.13.2", -] +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" [[package]] name = "lru-cache" @@ -5154,6 +5563,54 @@ dependencies = [ "libc", ] +[[package]] +name = "macro_magic" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.35", +] + +[[package]] +name = "macro_magic_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.35", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.35", +] + +[[package]] +name = "macro_magic_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.35", +] + [[package]] name = "maplit" version = "1.0.2" @@ -5202,9 +5659,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memfd" @@ -5260,12 +5717,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -5278,6 +5729,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mick-jaeger" version = "0.1.8" @@ -5318,7 +5781,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "log", @@ -5337,7 +5800,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "anyhow", "jsonrpsee", @@ -5388,7 +5851,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -5409,9 +5872,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.16.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "blake2b_simd", "blake2s_simd", @@ -5424,19 +5887,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "multihash" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" -dependencies = [ - "core2", - "digest 0.10.7", - "multihash-derive", - "sha2 0.10.7", - "unsigned-varint", -] - [[package]] name = "multihash-derive" version = "0.8.0" @@ -5591,6 +6041,12 @@ dependencies = [ "memoffset 0.6.5", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + [[package]] name = "node-polkadex-runtime" version = "5.3.0" @@ -5671,6 +6127,12 @@ dependencies = [ "thea-message-handler", ] +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -5784,9 +6246,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -5901,7 +6363,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=28a2e6f#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -5914,13 +6376,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=28a2e6f#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" dependencies = [ "frame-support", "parity-scale-codec", @@ -5934,7 +6396,7 @@ dependencies = [ [[package]] name = "orml-vesting" version = "0.4.1-dev" -source = "git+https://github.com/Polkadex-Substrate/open-runtime-module-library.git?branch=polkadot-v0.9.43#30b1ec3d11d61380cd457fb30f93bedce6a45f9b" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" dependencies = [ "frame-support", "frame-system", @@ -5949,21 +6411,21 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=28a2e6f#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" dependencies = [ "frame-support", "orml-traits", "parity-scale-codec", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=28a2e6f#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -5977,8 +6439,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", ] [[package]] @@ -6006,11 +6468,12 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -6021,10 +6484,11 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", + "log", "pallet-timestamp", "parity-scale-codec", "scale-info", @@ -6037,7 +6501,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -6053,7 +6517,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -6067,7 +6531,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6091,8 +6555,10 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "aquamarine", + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -6111,7 +6577,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6126,10 +6592,11 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", + "log", "pallet-authorship", "pallet-session", "parity-scale-codec", @@ -6145,9 +6612,9 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "binary-merkle-tree", "frame-support", "frame-system", @@ -6163,13 +6630,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", "sp-std", ] [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6187,7 +6655,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6206,7 +6674,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6225,7 +6693,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6242,7 +6710,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6259,7 +6727,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6277,7 +6745,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.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6300,7 +6768,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.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6308,12 +6776,13 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", + "sp-std", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6325,14 +6794,16 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", + "sp-staking", "sp-std", ] [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -6349,7 +6820,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6372,7 +6843,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6388,7 +6859,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6408,7 +6879,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6425,7 +6896,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6442,7 +6913,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6461,11 +6932,12 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -6478,7 +6950,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6494,7 +6966,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6510,11 +6982,12 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", @@ -6522,12 +6995,13 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-std", + "sp-tracing", ] [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6547,7 +7021,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.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6628,7 +7102,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -6645,7 +7119,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6669,7 +7143,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6686,7 +7160,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6701,7 +7175,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6719,7 +7193,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6734,7 +7208,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6797,26 +7271,12 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-root-testing" -version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -6832,7 +7292,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -6846,6 +7306,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", + "sp-state-machine", "sp-std", "sp-trie", ] @@ -6853,13 +7314,14 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", + "parity-scale-codec", "rand 0.8.5", "sp-runtime", "sp-session", @@ -6869,13 +7331,17 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", + "sp-arithmetic", + "sp-io", "sp-runtime", "sp-std", ] @@ -6883,7 +7349,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6906,18 +7372,18 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "sp-arithmetic", @@ -6926,7 +7392,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "sp-api", @@ -6935,7 +7401,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6952,7 +7418,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6967,7 +7433,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6979,13 +7445,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-storage", "sp-timestamp", ] [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7004,7 +7471,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "frame-system", @@ -7020,7 +7487,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7036,7 +7503,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.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7048,7 +7515,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7065,7 +7532,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7081,7 +7548,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7096,7 +7563,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7110,8 +7577,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -7125,14 +7592,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-executor", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7143,28 +7610,30 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-runtime", + "sp-std", ] [[package]] name = "parachain-polkadex-node" version = "1.0.0" dependencies = [ - "clap 4.4.0", + "clap 4.4.3", "cumulus-client-cli", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", @@ -7216,11 +7685,11 @@ dependencies = [ "sp-session", "sp-timestamp", "sp-transaction-pool", + "staging-xcm", "substrate-build-script-utils 3.0.0", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", "try-runtime-cli", - "xcm", ] [[package]] @@ -7263,7 +7732,7 @@ dependencies = [ "parachain-info", "parity-scale-codec", "polkadex-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "scale-info", "smallvec", @@ -7278,22 +7747,22 @@ dependencies = [ "sp-std", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-wasm-builder", "thea", "thea-council", "thea-message-handler", "thea-primitives", - "xcm", - "xcm-builder", - "xcm-executor", "xcm-helper", ] [[package]] name = "parity-db" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +checksum = "ab512a34b3c2c5e465731cc7668edf79208bbe520be03484eeb05e63ed221735" dependencies = [ "blake2", "crc32fast", @@ -7311,9 +7780,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.4" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -7326,9 +7795,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.4" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -7432,6 +7901,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "pdex-migration" version = "1.1.0" @@ -7480,19 +7958,20 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" +checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" +checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" dependencies = [ "pest", "pest_generator", @@ -7500,22 +7979,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" +checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "pest_meta" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" +checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" dependencies = [ "once_cell", "pest", @@ -7549,7 +8028,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -7604,9 +8083,9 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "platforms" -version = "3.0.2" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" [[package]] name = "polkadex-client" @@ -7621,7 +8100,7 @@ dependencies = [ name = "polkadex-node" version = "5.3.0" dependencies = [ - "clap 4.4.0", + "clap 4.4.3", "frame-benchmarking-cli", "frame-support", "frame-system", @@ -7714,15 +8193,17 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", + "futures-timer", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", "tracing-gum", @@ -7730,10 +8211,12 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "always-assert", "futures 0.3.28", + "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7744,13 +8227,12 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "derive_more", "fatality", "futures 0.3.28", - "lru 0.9.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7759,6 +8241,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", + "schnellru", "sp-core", "sp-keystore", "thiserror", @@ -7767,12 +8250,11 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fatality", "futures 0.3.28", - "lru 0.9.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7782,21 +8264,20 @@ dependencies = [ "polkadot-primitives", "rand 0.8.5", "sc-network", + "schnellru", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-cli" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.0", + "clap 4.4.3", "frame-benchmarking-cli", "futures 0.3.28", "log", - "polkadot-client", - "polkadot-node-core-pvf-worker", "polkadot-node-metrics", "polkadot-performance-test", "polkadot-service", @@ -7815,54 +8296,11 @@ dependencies = [ "try-runtime-cli", ] -[[package]] -name = "polkadot-client" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "async-trait", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-system", - "frame-system-rpc-runtime-api", - "futures 0.3.28", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "polkadot-core-primitives", - "polkadot-node-core-parachains-inherent", - "polkadot-primitives", - "polkadot-runtime", - "polkadot-runtime-common", - "sc-client-api", - "sc-consensus", - "sc-executor", - "sc-service", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-keyring", - "sp-mmr-primitives", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-storage", - "sp-timestamp", - "sp-transaction-pool", -] - [[package]] name = "polkadot-collator-protocol" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "always-assert", "bitvec", "fatality", "futures 0.3.28", @@ -7876,13 +8314,14 @@ dependencies = [ "sp-keystore", "sp-runtime", "thiserror", + "tokio-util", "tracing-gum", ] [[package]] name = "polkadot-core-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -7893,15 +8332,14 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "derive_more", "fatality", "futures 0.3.28", "futures-timer", "indexmap 1.9.3", - "lru 0.9.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7910,6 +8348,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "sc-network", + "schnellru", "sp-application-crypto", "sp-keystore", "thiserror", @@ -7918,8 +8357,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7932,8 +8371,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "futures-timer", @@ -7944,6 +8383,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", + "sc-network-common", "sp-application-crypto", "sp-core", "sp-keystore", @@ -7952,8 +8392,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "always-assert", "async-trait", @@ -7975,8 +8415,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "parity-scale-codec", @@ -7993,16 +8433,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitvec", "derive_more", "futures 0.3.28", "futures-timer", "kvdb", - "lru 0.9.0", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "polkadot-node-jaeger", "polkadot-node-primitives", @@ -8011,7 +8450,8 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-keystore", - "schnorrkel", + "schnellru", + "schnorrkel 0.9.1", "sp-application-crypto", "sp-consensus", "sp-consensus-slots", @@ -8022,8 +8462,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitvec", "futures 0.3.28", @@ -8031,6 +8471,7 @@ dependencies = [ "kvdb", "parity-scale-codec", "polkadot-erasure-coding", + "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -8043,8 +8484,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitvec", "fatality", @@ -8062,8 +8503,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "polkadot-node-subsystem", @@ -8077,8 +8518,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", @@ -8089,7 +8530,8 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", - "polkadot-parachain", + "polkadot-overseer", + "polkadot-parachain-primitives", "polkadot-primitives", "sp-maybe-compressed-blob", "tracing-gum", @@ -8097,8 +8539,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "polkadot-node-metrics", @@ -8112,8 +8554,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "futures-timer", @@ -8129,27 +8571,27 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fatality", "futures 0.3.28", "kvdb", - "lru 0.9.0", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", "sc-keystore", + "schnellru", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", @@ -8163,10 +8605,27 @@ dependencies = [ "tracing-gum", ] +[[package]] +name = "polkadot-node-core-prospective-parachains" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "bitvec", + "fatality", + "futures 0.3.28", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "thiserror", + "tracing-gum", +] + [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitvec", "fatality", @@ -8176,15 +8635,14 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "always-assert", "futures 0.3.28", @@ -8193,25 +8651,26 @@ dependencies = [ "parity-scale-codec", "pin-project", "polkadot-core-primitives", + "polkadot-node-core-pvf-common", "polkadot-node-metrics", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "rand 0.8.5", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-tracing", "sp-wasm-interface", "substrate-build-script-utils 3.0.0", + "tempfile", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "polkadot-node-primitives", @@ -8225,29 +8684,46 @@ dependencies = [ ] [[package]] -name = "polkadot-node-core-pvf-worker" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "polkadot-node-core-pvf-common" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "assert_matches", "cpu-time", "futures 0.3.28", + "landlock", "libc", "parity-scale-codec", - "polkadot-node-core-pvf", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", - "rayon", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", "sp-core", "sp-externalities", "sp-io", + "sp-tracing", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-prepare-worker" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "futures 0.3.28", + "libc", + "parity-scale-codec", + "polkadot-node-core-pvf-common", + "polkadot-parachain-primitives", + "polkadot-primitives", + "rayon", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-io", "sp-maybe-compressed-blob", "sp-tracing", - "substrate-build-script-utils 3.0.0", - "tempfile", "tikv-jemalloc-ctl", "tokio", "tracing-gum", @@ -8255,23 +8731,23 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", - "lru 0.9.0", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-primitives", + "schnellru", "sp-consensus-babe", "tracing-gum", ] [[package]] name = "polkadot-node-jaeger" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "lazy_static", "log", @@ -8288,10 +8764,10 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "bs58", + "bs58 0.5.0", "futures 0.3.28", "futures-timer", "log", @@ -8307,11 +8783,12 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-channel", "async-trait", + "bitvec", "derive_more", "fatality", "futures 0.3.28", @@ -8330,15 +8807,15 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bounded-vec", "futures 0.3.28", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-application-crypto", "sp-consensus-babe", @@ -8347,13 +8824,13 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-runtime", "thiserror", - "zstd 0.11.2+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] name = "polkadot-node-subsystem" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8362,8 +8839,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "derive_more", @@ -8375,6 +8852,7 @@ dependencies = [ "polkadot-primitives", "polkadot-statement-table", "sc-network", + "sc-transaction-pool-api", "smallvec", "sp-api", "sp-authority-discovery", @@ -8385,8 +8863,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "derive_more", @@ -8395,7 +8873,6 @@ dependencies = [ "futures-channel", "itertools 0.10.5", "kvdb", - "lru 0.9.0", "parity-db", "parity-scale-codec", "parking_lot 0.11.2", @@ -8409,6 +8886,7 @@ dependencies = [ "polkadot-primitives", "prioritized-metered-channel", "rand 0.8.5", + "schnellru", "sp-application-crypto", "sp-core", "sp-keystore", @@ -8418,13 +8896,12 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", "futures-timer", - "lru 0.9.0", "orchestra", "parking_lot 0.12.1", "polkadot-node-metrics", @@ -8433,6 +8910,7 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", + "schnellru", "sp-api", "sp-core", "tikv-jemalloc-ctl", @@ -8440,9 +8918,9 @@ dependencies = [ ] [[package]] -name = "polkadot-parachain" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "polkadot-parachain-primitives" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bounded-collections", "derive_more", @@ -8458,32 +8936,32 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "env_logger 0.9.3", - "kusama-runtime", "log", "polkadot-erasure-coding", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-primitives", "polkadot-primitives", "quote", "sc-executor-common", "sp-maybe-compressed-blob", + "staging-kusama-runtime", "thiserror", ] [[package]] name = "polkadot-primitives" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitvec", "hex-literal 0.4.1", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "serde", "sp-api", @@ -8502,8 +8980,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -8534,8 +9012,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitvec", "frame-benchmarking", @@ -8592,6 +9070,7 @@ dependencies = [ "pallet-vesting", "pallet-whitelist", "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-common", @@ -8618,19 +9097,20 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "polkadot-runtime-common" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitvec", "frame-benchmarking", @@ -8669,14 +9149,14 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "staging-xcm", "static_assertions", - "xcm", ] [[package]] name = "polkadot-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "polkadot-primitives", @@ -8689,10 +9169,11 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "bs58", + "bs58 0.5.0", + "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", "sp-std", @@ -8701,8 +9182,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -8710,6 +9191,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-authority-discovery", "pallet-authorship", @@ -8721,7 +9203,7 @@ dependencies = [ "pallet-timestamp", "pallet-vesting", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", "rand 0.8.5", @@ -8739,39 +9221,42 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "staging-xcm", + "staging-xcm-executor", "static_assertions", - "xcm", - "xcm-executor", ] [[package]] name = "polkadot-service" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", + "frame-benchmarking", "frame-benchmarking-cli", "frame-support", + "frame-system", "frame-system-rpc-runtime-api", "futures 0.3.28", "hex-literal 0.4.1", - "kusama-runtime", + "is_executable", "kvdb", "kvdb-rocksdb", "log", - "lru 0.9.0", "mmr-gadget", "pallet-babe", "pallet-im-online", "pallet-staking", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-db", + "parity-scale-codec", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", "polkadot-availability-recovery", - "polkadot-client", "polkadot-collator-protocol", + "polkadot-core-primitives", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -8785,7 +9270,9 @@ dependencies = [ "polkadot-node-core-chain-selection", "polkadot-node-core-dispute-coordinator", "polkadot-node-core-parachains-inherent", + "polkadot-node-core-prospective-parachains", "polkadot-node-core-provisioner", + "polkadot-node-core-pvf", "polkadot-node-core-pvf-checker", "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", @@ -8794,11 +9281,11 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", "polkadot-runtime", - "polkadot-runtime-constants", + "polkadot-runtime-common", "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", @@ -8824,6 +9311,8 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-transaction-pool", + "sc-transaction-pool-api", + "schnellru", "serde", "serde_json", "sp-api", @@ -8837,6 +9326,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-io", + "sp-keyring", "sp-keystore", "sp-mmr-primitives", "sp-offchain", @@ -8846,7 +9336,9 @@ dependencies = [ "sp-storage", "sp-timestamp", "sp-transaction-pool", - "sp-trie", + "sp-version", + "sp-weights", + "staging-kusama-runtime", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -8855,17 +9347,20 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.4", + "bitvec", "fatality", "futures 0.3.28", + "futures-timer", "indexmap 1.9.3", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "sp-keystore", @@ -8876,8 +9371,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8911,6 +9406,17 @@ dependencies = [ "universal-hash 0.4.1", ] +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash 0.5.1", +] + [[package]] name = "polyval" version = "0.5.3" @@ -8999,12 +9505,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -9079,22 +9585,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + [[package]] name = "proc-macro-warning" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" +checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -9133,7 +9645,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -9266,14 +9778,14 @@ checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", - "rustls 0.20.8", + "rustls 0.20.9", "slab", "thiserror", "tinyvec", "tracing", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] @@ -9406,8 +9918,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", - "ring", - "time 0.3.28", + "ring 0.16.20", + "time", "x509-parser 0.13.2", "yasna", ] @@ -9419,8 +9931,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", - "time 0.3.28", + "ring 0.16.20", + "time", "yasna", ] @@ -9483,7 +9995,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -9500,13 +10012,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.7", + "regex-automata 0.3.8", "regex-syntax 0.7.5", ] @@ -9521,9 +10033,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -9582,6 +10094,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "common", + "fflonk", + "merlin 3.0.0", +] + [[package]] name = "ring" version = "0.16.20" @@ -9591,7 +10118,7 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", + "spin 0.5.2", "untrusted", "web-sys", "winapi", @@ -9637,8 +10164,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -9690,7 +10217,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -9713,19 +10240,20 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "rococo-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "polkadot-primitives", @@ -9910,14 +10438,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.9" +version = "0.38.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfe0f2582b4931a45d1fa608f8a8722e8b3c7ac54dd6d5f3b3212791fedef49" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.7", "windows-sys 0.48.0", ] @@ -9929,32 +10457,32 @@ checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.1", "log", - "ring", + "ring 0.16.20", "sct 0.6.1", "webpki 0.21.4", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct 0.7.0", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] name = "rustls" -version = "0.21.6" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", - "ring", - "rustls-webpki 0.101.4", + "ring 0.16.20", + "rustls-webpki 0.101.5", "sct 0.7.0", ] @@ -9976,26 +10504,26 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", ] [[package]] name = "rustls-webpki" -version = "0.100.2" +version = "0.100.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -10005,6 +10533,17 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "ruzstd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +dependencies = [ + "byteorder", + "thiserror-core", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -10043,7 +10582,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "sp-core", @@ -10054,7 +10593,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", @@ -10062,14 +10601,13 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash 0.17.0", + "multihash", "parity-scale-codec", "prost", "prost-build", "rand 0.8.5", "sc-client-api", "sc-network", - "sc-network-common", "sp-api", "sp-authority-discovery", "sp-blockchain", @@ -10083,7 +10621,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "futures-timer", @@ -10106,7 +10644,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -10121,7 +10659,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -10140,22 +10678,22 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "chrono", - "clap 4.4.0", + "clap 4.4.3", "fdlimit", "futures 0.3.28", "libp2p-identity", @@ -10169,7 +10707,6 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -10191,7 +10728,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fnv", "futures 0.3.28", @@ -10207,7 +10744,6 @@ dependencies = [ "sp-core", "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", "sp-statement-store", @@ -10218,7 +10754,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "kvdb", @@ -10244,7 +10780,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", @@ -10269,7 +10805,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", @@ -10298,7 +10834,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "fork-tree", @@ -10313,8 +10849,8 @@ dependencies = [ "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", + "sc-transaction-pool-api", "scale-info", "sp-api", "sp-application-crypto", @@ -10334,7 +10870,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "jsonrpsee", @@ -10356,9 +10892,9 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-channel", "async-trait", "fnv", @@ -10368,9 +10904,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-consensus", - "sc-keystore", "sc-network", - "sc-network-common", "sc-network-gossip", "sc-network-sync", "sc-utils", @@ -10392,7 +10926,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "jsonrpsee", @@ -10411,7 +10945,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10424,10 +10958,10 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.3", - "array-bytes 4.2.0", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", @@ -10446,6 +10980,7 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -10464,7 +10999,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "finality-grandpa", "futures 0.3.28", @@ -10484,7 +11019,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", @@ -10507,13 +11042,13 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", "sp-externalities", @@ -10529,7 +11064,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10541,13 +11076,12 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "anyhow", "cfg-if", "libc", "log", - "once_cell", "rustix 0.36.15", "sc-allocator", "sc-executor-common", @@ -10559,7 +11093,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "futures 0.3.28", @@ -10575,9 +11109,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -10589,9 +11123,9 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-channel", "async-trait", "asynchronous-codec", @@ -10604,37 +11138,33 @@ dependencies = [ "libp2p", "linked_hash_set", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "parking_lot 0.12.1", + "partial_sort", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-client-api", - "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", - "snow", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-channel", "cid", @@ -10645,7 +11175,6 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", @@ -10655,45 +11184,33 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", "async-trait", "bitflags 1.3.2", - "bytes", "futures 0.3.28", - "futures-timer", "libp2p-identity", "parity-scale-codec", "prost-build", "sc-consensus", - "sc-peerset", - "sc-utils", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.3", "futures 0.3.28", "futures-timer", "libp2p", "log", - "lru 0.8.1", "sc-network", "sc-network-common", - "sc-peerset", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -10702,9 +11219,9 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-channel", "futures 0.3.28", "libp2p-identity", @@ -10714,8 +11231,6 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", @@ -10725,9 +11240,9 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-channel", "async-trait", "fork-tree", @@ -10735,7 +11250,6 @@ dependencies = [ "futures-timer", "libp2p", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "prost", @@ -10744,8 +11258,8 @@ dependencies = [ "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -10760,17 +11274,15 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "futures 0.3.28", "libp2p", "log", "parity-scale-codec", - "pin-project", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-consensus", "sp-runtime", @@ -10780,16 +11292,17 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "bytes", "fnv", "futures 0.3.28", "futures-timer", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", @@ -10798,36 +11311,22 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" -dependencies = [ - "futures 0.3.28", - "libp2p-identity", - "log", - "parking_lot 0.12.1", - "partial_sort", - "sc-utils", - "serde_json", - "sp-arithmetic", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10836,7 +11335,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "jsonrpsee", @@ -10867,7 +11366,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10886,7 +11385,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "http", "jsonrpsee", @@ -10901,9 +11400,9 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "futures 0.3.28", "futures-util", "hex", @@ -10914,6 +11413,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -10921,13 +11421,14 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", + "tokio", "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "directories", @@ -10954,11 +11455,9 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-network-transactions", - "sc-offchain", "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -10993,9 +11492,9 @@ dependencies = [ [[package]] name = "sc-service-test" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-channel", "fdlimit", "futures 0.3.28", @@ -11008,7 +11507,6 @@ dependencies = [ "sc-consensus", "sc-executor", "sc-network", - "sc-network-common", "sc-network-sync", "sc-service", "sc-transaction-pool-api", @@ -11031,7 +11529,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "log", "parity-scale-codec", @@ -11042,14 +11540,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.0", + "clap 4.4.3", "fs4", - "futures 0.3.28", "log", "sc-client-db", - "sc-utils", "sp-core", "thiserror", "tokio", @@ -11058,7 +11554,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11077,7 +11573,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "libc", @@ -11096,7 +11592,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "chrono", "futures 0.3.28", @@ -11115,7 +11611,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "atty", @@ -11123,12 +11619,10 @@ dependencies = [ "lazy_static", "libc", "log", - "once_cell", "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -11146,25 +11640,24 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", "futures-timer", "linked-hash-map", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -11184,13 +11677,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", "log", + "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -11198,7 +11693,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-channel", "futures 0.3.28", @@ -11266,7 +11761,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -11274,6 +11769,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin 3.0.0", + "rand_core 0.6.4", + "sha2 0.9.9", + "subtle-ng", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -11292,7 +11803,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -11302,7 +11813,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -11443,14 +11954,14 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -11479,7 +11990,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time 0.3.28", + "time", ] [[package]] @@ -11491,7 +12002,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -11575,9 +12086,19 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" + +[[package]] +name = "signal-hook" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] [[package]] name = "signal-hook-registry" @@ -11650,8 +12171,8 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "enumn", "parity-scale-codec", @@ -11676,48 +12197,155 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] -name = "snap" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" - -[[package]] -name = "snow" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" -dependencies = [ - "aes-gcm 0.9.4", - "blake2", - "chacha20poly1305", - "curve25519-dalek 4.0.0", - "rand_core 0.6.4", - "ring", - "rustc_version", - "sha2 0.10.7", - "subtle", -] - -[[package]] -name = "socket2" -version = "0.4.9" +name = "smol" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" dependencies = [ - "libc", - "winapi", + "async-channel", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-net", + "async-process", + "blocking", + "futures-lite", ] [[package]] -name = "socket2" -version = "0.5.3" +name = "smoldot" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" dependencies = [ - "libc", - "windows-sys 0.48.0", -] - + "arrayvec 0.7.4", + "async-lock", + "atomic-take", + "base64 0.21.4", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "chacha20 0.9.1", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener", + "fnv", + "futures-lite", + "futures-util", + "hashbrown 0.14.0", + "hex", + "hmac 0.12.1", + "itertools 0.11.0", + "libsecp256k1", + "merlin 3.0.0", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "poly1305 0.8.0", + "rand 0.8.5", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.10.2", + "serde", + "serde_json", + "sha2 0.10.7", + "sha3", + "siphasher", + "slab", + "smallvec", + "soketto", + "twox-hash", + "wasmi", + "x25519-dalek 2.0.0", + "zeroize", +] + +[[package]] +name = "smoldot-light" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" +dependencies = [ + "async-channel", + "async-lock", + "base64 0.21.4", + "blake2-rfc", + "derive_more", + "either", + "event-listener", + "fnv", + "futures-channel", + "futures-lite", + "futures-util", + "hashbrown 0.14.0", + "hex", + "itertools 0.11.0", + "log", + "lru 0.11.1", + "no-std-net", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher", + "slab", + "smol", + "smoldot", + "zeroize", +] + +[[package]] +name = "snap" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" + +[[package]] +name = "snow" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" +dependencies = [ + "aes-gcm 0.9.4", + "blake2", + "chacha20poly1305", + "curve25519-dalek 4.1.0", + "rand_core 0.6.4", + "ring 0.16.20", + "rustc_version", + "sha2 0.10.7", + "subtle", +] + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soketto" version = "0.7.1" @@ -11738,7 +12366,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "log", @@ -11746,6 +12374,7 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -11758,21 +12387,21 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "blake2", - "expander 1.0.0", + "expander 2.0.0", "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11784,8 +12413,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "integer-sqrt", "num-traits", @@ -11799,7 +12428,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11812,9 +12441,8 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", @@ -11824,13 +12452,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", "log", - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -11842,7 +12470,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "futures 0.3.28", @@ -11857,14 +12485,13 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", @@ -11875,7 +12502,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "parity-scale-codec", @@ -11883,11 +12510,9 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keystore", "sp-runtime", "sp-std", "sp-timestamp", @@ -11896,7 +12521,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11915,7 +12540,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "finality-grandpa", "log", @@ -11933,7 +12558,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11944,16 +12569,18 @@ dependencies = [ [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "arrayvec 0.7.4", + "bandersnatch_vrfs", "bitflags 1.3.2", "blake2", "bounded-collections", - "bs58", + "bs58 0.5.0", "dyn-clonable", - "ed25519-zebra", + "ed25519-zebra 3.1.0", "futures 0.3.28", "hash-db", "hash256-std-hasher", @@ -11961,7 +12588,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -11969,7 +12596,7 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1", "secrecy", "serde", @@ -11983,38 +12610,37 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", + "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.7", "sha3", - "sp-std", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -12022,18 +12648,18 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "environmental", "parity-scale-codec", @@ -12041,16 +12667,26 @@ dependencies = [ "sp-storage", ] +[[package]] +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "serde_json", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", "sp-runtime", "sp-std", "thiserror", @@ -12058,13 +12694,11 @@ dependencies = [ [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bytes", - "ed25519 1.5.3", - "ed25519-dalek 1.0.1", - "futures 0.3.28", + "ed25519-dalek", "libsecp256k1", "log", "parity-scale-codec", @@ -12084,8 +12718,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "lazy_static", "sp-core", @@ -12095,13 +12729,11 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.27.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", "parity-scale-codec", "parking_lot 0.12.1", - "serde", "sp-core", "sp-externalities", "thiserror", @@ -12110,7 +12742,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "thiserror", "zstd 0.12.4", @@ -12119,7 +12751,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -12130,7 +12762,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -12148,7 +12780,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", @@ -12162,7 +12794,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-api", "sp-core", @@ -12171,8 +12803,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "backtrace", "lazy_static", @@ -12182,7 +12814,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "rustc-hash", "serde", @@ -12191,8 +12823,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "either", "hash256-std-hasher", @@ -12213,8 +12845,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12231,25 +12863,26 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", "sp-std", @@ -12258,8 +12891,9 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -12270,8 +12904,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "0.28.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hash-db", "log", @@ -12286,16 +12920,22 @@ dependencies = [ "sp-trie", "thiserror", "tracing", + "trie-db", ] [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "log", + "aes-gcm 0.10.2", + "curve25519-dalek 4.1.0", + "ed25519-dalek", + "hkdf", "parity-scale-codec", + "rand 0.8.5", "scale-info", + "sha2 0.10.7", "sp-api", "sp-application-crypto", "sp-core", @@ -12304,17 +12944,18 @@ dependencies = [ "sp-runtime-interface", "sp-std", "thiserror", + "x25519-dalek 2.0.0", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12327,11 +12968,9 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures-timer", - "log", "parity-scale-codec", "sp-inherents", "sp-runtime", @@ -12341,8 +12980,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "parity-scale-codec", "sp-std", @@ -12354,7 +12993,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "sp-api", "sp-runtime", @@ -12363,10 +13002,9 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "log", "parity-scale-codec", "scale-info", "sp-core", @@ -12378,8 +13016,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ahash 0.8.3", "hash-db", @@ -12401,8 +13039,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12412,108 +13050,278 @@ dependencies = [ "sp-core-hashing-proc-macro", "sp-runtime", "sp-std", - "sp-version-proc-macro", - "thiserror", + "sp-version-proc-macro", + "thiserror", +] + +[[package]] +name = "sp-version-proc-macro" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.35", +] + +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std", + "wasmtime", +] + +[[package]] +name = "sp-weights" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spinners" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" +dependencies = [ + "lazy_static", + "maplit", + "strum", +] + +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der 0.6.1", +] + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der 0.7.8", +] + +[[package]] +name = "ss58-registry" +version = "1.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-kusama-runtime" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "binary-merkle-tree", + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal 0.4.1", + "kusama-runtime-constants", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nis", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-ranked-collective", + "pallet-recovery", + "pallet-referenda", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-society", + "pallet-staking", + "pallet-staking-runtime-api", + "pallet-state-trie-migration", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", + "substrate-wasm-builder", ] [[package]] -name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "staging-xcm" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "bounded-collections", + "derivative", + "environmental", + "impl-trait-for-tuples", + "log", "parity-scale-codec", - "proc-macro2", - "quote", - "syn 2.0.29", + "scale-info", + "serde", + "sp-weights", + "xcm-procedural", ] [[package]] -name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "staging-xcm-builder" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "anyhow", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", + "pallet-transaction-payment", "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", "sp-std", - "wasmi", - "wasmtime", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", ] [[package]] -name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "staging-xcm-executor" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "environmental", + "frame-benchmarking", + "frame-support", + "impl-trait-for-tuples", + "log", "parity-scale-codec", - "scale-info", - "serde", - "smallvec", "sp-arithmetic", "sp-core", - "sp-debug-derive", + "sp-io", + "sp-runtime", "sp-std", + "sp-weights", + "staging-xcm", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spinners" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" -dependencies = [ - "lazy_static", - "maplit", - "strum", -] - -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - -[[package]] -name = "spki" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" -dependencies = [ - "base64ct", - "der 0.7.8", -] - -[[package]] -name = "ss58-registry" -version = "1.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" -dependencies = [ - "Inflector", - "num-format", - "proc-macro2", - "quote", - "serde", - "serde_json", - "unicode-xid", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" @@ -12617,7 +13425,7 @@ dependencies = [ "lazy_static", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "subtle", "thiserror", "tokio", @@ -12633,7 +13441,7 @@ checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -12641,10 +13449,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" [[package]] name = "substrate-build-script-utils" @@ -12658,7 +13463,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.28", @@ -12677,7 +13482,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "hyper", "log", @@ -12689,7 +13494,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", "jsonrpsee", @@ -12702,14 +13507,12 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "jsonrpsee", - "log", "parity-scale-codec", "sc-client-api", "sc-rpc-api", - "scale-info", "serde", "sp-core", "sp-runtime", @@ -12721,9 +13524,9 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-trait", "futures 0.3.28", "parity-scale-codec", @@ -12747,41 +13550,36 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "frame-executive", "frame-support", "frame-system", "frame-system-rpc-runtime-api", "log", - "memory-db", "pallet-babe", "pallet-balances", - "pallet-beefy-mmr", - "pallet-root-testing", - "pallet-sudo", "pallet-timestamp", "parity-scale-codec", "sc-service", "scale-info", "serde", + "serde_json", "sp-api", "sp-application-crypto", "sp-block-builder", "sp-consensus-aura", "sp-consensus-babe", - "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", - "sp-debug-derive", "sp-externalities", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", "sp-offchain", "sp-runtime", - "sp-runtime-interface", "sp-session", "sp-state-machine", "sp-std", @@ -12795,12 +13593,10 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "futures 0.3.28", - "parity-scale-codec", "sc-block-builder", - "sc-chain-spec", "sc-client-api", "sc-consensus", "sp-api", @@ -12815,16 +13611,17 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", "strum", "tempfile", - "toml 0.7.6", + "toml 0.7.8", "walkdir", "wasm-opt", ] @@ -12844,6 +13641,12 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + [[package]] name = "syn" version = "1.0.109" @@ -12857,9 +13660,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "59bf04c28bee9043ed9ea1e41afc0552288d3aba9c6efdd78903b802926f4879" dependencies = [ "proc-macro2", "quote", @@ -12920,7 +13723,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.9", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -12995,12 +13798,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "thea", "thea-message-handler", "thea-primitives", - "xcm", - "xcm-builder", - "xcm-executor", "xcm-helper", ] @@ -13024,9 +13827,9 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-std", + "staging-xcm", "thea", "thea-primitives", - "xcm", ] [[package]] @@ -13073,27 +13876,47 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -13155,17 +13978,6 @@ dependencies = [ "libc", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.28" @@ -13213,6 +14025,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -13252,7 +14073,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -13265,7 +14086,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -13279,24 +14100,13 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki 0.22.0", -] - [[package]] name = "tokio-rustls" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.6", + "rustls 0.21.7", "tokio", ] @@ -13338,9 +14148,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -13359,9 +14169,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.0.0", "serde", @@ -13383,9 +14193,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "bitflags 2.4.0", "bytes", @@ -13432,7 +14242,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -13457,9 +14267,10 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "coarsetime", "polkadot-node-jaeger", "polkadot-primitives", "tracing", @@ -13468,14 +14279,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "expander 2.0.0", "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -13599,10 +14410,10 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "clap 4.4.0", + "clap 4.4.3", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -13610,7 +14421,6 @@ dependencies = [ "parity-scale-codec", "sc-cli", "sc-executor", - "sc-service", "serde", "serde_json", "sp-api", @@ -13651,7 +14461,7 @@ dependencies = [ "log", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "stun", "thiserror", "tokio", @@ -13672,9 +14482,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -13702,9 +14512,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -13755,9 +14565,9 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ "asynchronous-codec", "bytes", @@ -13773,9 +14583,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna 0.4.0", @@ -13844,9 +14654,9 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -13867,12 +14677,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -13900,7 +14704,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", "wasm-bindgen-shared", ] @@ -13934,7 +14738,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -13956,9 +14760,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.112.0" +version = "0.114.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" +checksum = "4d005a95f934878a1fb446a816d51c3601a0120ff929005ba3bab3c749cfd1c7" dependencies = [ "anyhow", "libc", @@ -13972,9 +14776,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.112.0" +version = "0.114.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" +checksum = "6d04e240598162810fad3b2e96fa0dec6dba1eb65a03f3bd99a9248ab8b56caa" dependencies = [ "anyhow", "cxx", @@ -13984,9 +14788,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.112.0" +version = "0.114.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" +checksum = "2efd2aaca519d64098c4faefc8b7433a97ed511caf4c9e516384eb6aef1ff4f9" dependencies = [ "anyhow", "cc", @@ -14011,35 +14815,33 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.13.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +checksum = "1f341edb80021141d4ae6468cbeefc50798716a347d4085c3811900049ea8945" dependencies = [ - "parity-wasm", - "wasmi-validation", + "smallvec", + "spin 0.9.8", + "wasmi_arena", "wasmi_core", + "wasmparser-nostd", ] [[package]] -name = "wasmi-validation" -version = "0.5.0" +name = "wasmi_arena" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] +checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" [[package]] name = "wasmi_core" -version = "0.2.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" dependencies = [ "downcast-rs", "libm", - "memory_units", - "num-rational", "num-traits", + "paste", ] [[package]] @@ -14052,6 +14854,15 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -14096,7 +14907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.3", + "base64 0.21.4", "bincode", "directories-next", "file-per-thread-logger", @@ -14263,17 +15074,17 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -14283,7 +15094,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] @@ -14292,7 +15103,7 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki 0.100.2", + "rustls-webpki 0.100.3", ] [[package]] @@ -14317,7 +15128,7 @@ dependencies = [ "rand 0.8.5", "rcgen 0.9.3", "regex", - "ring", + "ring 0.16.20", "rtcp", "rtp", "rustls 0.19.1", @@ -14327,7 +15138,7 @@ dependencies = [ "sha2 0.10.7", "stun", "thiserror", - "time 0.3.28", + "time", "tokio", "turn", "url", @@ -14381,7 +15192,7 @@ dependencies = [ "rand 0.8.5", "rand_core 0.6.4", "rcgen 0.10.0", - "ring", + "ring 0.16.20", "rustls 0.19.1", "sec1 0.3.0", "serde", @@ -14511,9 +15322,10 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ + "binary-merkle-tree", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -14530,6 +15342,8 @@ dependencies = [ "pallet-babe", "pallet-bags-list", "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", "pallet-collective", "pallet-democracy", "pallet-election-provider-multi-phase", @@ -14542,6 +15356,7 @@ dependencies = [ "pallet-indices", "pallet-membership", "pallet-message-queue", + "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -14569,7 +15384,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -14579,6 +15394,7 @@ dependencies = [ "serde_derive", "smallvec", "sp-api", + "sp-application-crypto", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", @@ -14593,19 +15409,20 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "westend-runtime-constants" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-support", "polkadot-primitives", @@ -14618,13 +15435,14 @@ dependencies = [ [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.13", ] [[package]] @@ -14903,7 +15721,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.0", "rand_core 0.6.4", "serde", "zeroize", @@ -14922,10 +15740,10 @@ dependencies = [ "lazy_static", "nom", "oid-registry 0.4.0", - "ring", + "ring 0.16.20", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -14943,65 +15761,7 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.28", -] - -[[package]] -name = "xcm" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "bounded-collections", - "derivative", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-weights", - "xcm-procedural", -] - -[[package]] -name = "xcm-builder" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-transaction-payment", - "parity-scale-codec", - "polkadot-parachain", - "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "xcm", - "xcm-executor", -] - -[[package]] -name = "xcm-executor" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" -dependencies = [ - "environmental", - "frame-benchmarking", - "frame-support", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", - "xcm", + "time", ] [[package]] @@ -15026,23 +15786,23 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "thea", "thea-message-handler", "thea-primitives", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "xcm-procedural" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] @@ -15071,7 +15831,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.28", + "time", ] [[package]] @@ -15091,7 +15851,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.35", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0632cf478..983d2a342 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,114 +86,114 @@ rust_decimal = { git = "https://github.com/Polkadex-Substrate/rust-decimal.git", scale-info = { version = "2.1.2", default-features = false } bls-primitives = { path = "primitives/bls-primitives", default-features = false } thea-primitives = { path = "primitives/thea", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-contracts-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -#pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -orml-vesting = { git = "https://github.com/Polkadex-Substrate/open-runtime-module-library.git", branch = "polkadot-v0.9.43", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-service-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -grandpa-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, package = "sp-finality-grandpa" } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-indices = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-society = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-contracts-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-asset-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +#pallet-randomness-collective-flip = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +orml-vesting = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-npos-elections = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-finality-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-service-test = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-sync-state-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-consensus-epochs = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-finality-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-nomination-pools = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +grandpa-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false, package = "sp-finality-grandpa" } polkadex-primitives = { path = "primitives/polkadex", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot.git", default-features = false, branch = "release-v0.9.43" } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } env_logger = { version = "0.10.0" } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } serde = { version = "1.0.171", default-features = false, features = ["derive"] } @@ -202,24 +202,25 @@ hash-db = { version = "0.16.0", default-features = false } trie-db = { version = "0.27.1", default-features = false } #Parachain Dependencies -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", rev = "28a2e6f", default-features = false } #FIXME: Remove rev -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", rev = "28a2e6f", default-features = false } #FIXME: Remove rev -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } #FIXME: Remove rev -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -parachain-info = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false, version = "3.0.0" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library.git", rev = "28a2e6f", default-features = false } #FIXME: Remove rev -pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43", default-features = false } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +orml-xtokens = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev +orml-traits = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } #FIXME: Remove rev +xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false, version = "3.0.0" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +#Here Oeml +orml-xcm-support = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } diff --git a/nodes/polkadex-mainnet-node/Cargo.toml b/nodes/polkadex-mainnet-node/Cargo.toml index d4af361f6..78c6bd0ff 100644 --- a/nodes/polkadex-mainnet-node/Cargo.toml +++ b/nodes/polkadex-mainnet-node/Cargo.toml @@ -35,57 +35,57 @@ polkadex-client = { path = "../../client" } thea = { path = "../../pallets/thea" } pallet-ocex-lmp = { path = "../../pallets/ocex" } # Substrate dependencies -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-storage-monitor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -grandpa-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", package = "sp-consensus-grandpa" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -#sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-sync-state-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-storage-monitor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +grandpa-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", package = "sp-consensus-grandpa" } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +#sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } #Primitives polkadex-primitives = { path = "../../primitives/polkadex" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", optional = true } -try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", optional = true } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", optional = true } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", optional = true } ## Force 0.9.2 as snow release to fix the compilation. @@ -96,12 +96,12 @@ try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch [dev-dependencies] futures = "0.3.9" tempfile = "3.1.0" -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-service-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-epochs = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-service-test = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } [features] default = [] diff --git a/nodes/polkadex-parachain-node/Cargo.toml b/nodes/polkadex-parachain-node/Cargo.toml index ae4a1f291..ca12f260d 100644 --- a/nodes/polkadex-parachain-node/Cargo.toml +++ b/nodes/polkadex-parachain-node/Cargo.toml @@ -21,62 +21,62 @@ parachain-polkadex-runtime = { path = "../../runtimes/polkadex-parachain" } hex-literal = { workspace = true, optional = false } # Substrate -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } # Polkadot -polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.43" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } # Cumulus -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-client-network = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.43" } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } [features] default = [] diff --git a/pallets/ocex/src/lib.rs b/pallets/ocex/src/lib.rs index 5ea317538..5e8cecdb3 100644 --- a/pallets/ocex/src/lib.rs +++ b/pallets/ocex/src/lib.rs @@ -59,6 +59,7 @@ use polkadex_primitives::ocex::TradingPairConfig; #[cfg(feature = "runtime-benchmarks")] use sp_runtime::traits::One; use sp_std::vec::Vec; +use frame_system::pallet_prelude::BlockNumberFor; #[cfg(test)] mod mock; @@ -386,7 +387,7 @@ pub mod pallet { /// What to do at the end of each block. /// /// Clean OnCHainEvents - fn on_initialize(_n: T::BlockNumber) -> Weight { + fn on_initialize(_n: BlockNumberFor) -> Weight { let len = >::get().len(); if len > 0 { >::kill(); @@ -398,7 +399,7 @@ pub mod pallet { } } - fn offchain_worker(block_number: T::BlockNumber) { + fn offchain_worker(block_number: BlockNumberFor) { log::debug!(target:"ocex", "offchain worker started"); match Self::run_on_chain_validation(block_number) { @@ -1429,7 +1430,7 @@ pub mod pallet { /// Exchange state has been updated ExchangeStateUpdated(bool), /// DisputePeriod has been updated - DisputePeriodUpdated(T::BlockNumber), + DisputePeriodUpdated(BlockNumberFor), /// Withdraw Assets from Orderbook WithdrawFromOrderbook(T::AccountId, AssetId, BalanceOf), /// Orderbook Operator Key Whitelisted @@ -1500,7 +1501,7 @@ pub mod pallet { pub(super) type IngressMessages = StorageMap< _, Identity, - T::BlockNumber, + BlockNumberFor, Vec>, ValueQuery, >; diff --git a/pallets/ocex/src/rpc.rs b/pallets/ocex/src/rpc.rs index 9fedf0cca..0db642186 100644 --- a/pallets/ocex/src/rpc.rs +++ b/pallets/ocex/src/rpc.rs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use frame_system::pallet_prelude::BlockNumberFor; use crate::{ pallet::{Accounts, AllowlistedToken, IngressMessages}, storage::OffchainState, @@ -124,7 +125,7 @@ impl Pallet { if current_blk > last_processed_blk { for blk in last_processed_blk.saturating_add(1)..=current_blk { let ingress_msgs = - >::get(blk.saturated_into::()); + >::get(blk.saturated_into::>()); for msg in ingress_msgs { if let polkadex_primitives::ingress::IngressMessages::Deposit(_, asset, amt) = msg diff --git a/pallets/ocex/src/validator.rs b/pallets/ocex/src/validator.rs index 2c4129bf3..f4bbebcc1 100644 --- a/pallets/ocex/src/validator.rs +++ b/pallets/ocex/src/validator.rs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use frame_system::pallet_prelude::BlockNumberFor; use crate::{ aggregator::AggregatorClient, pallet::ValidatorSetId, @@ -51,7 +52,7 @@ pub const AGGREGATOR: &str = "https://ob.aggregator.polkadex.trade"; impl Pallet { /// Runs the offchain worker computes the next batch of user actions and /// submits snapshot summary to aggregator endpoint - pub fn run_on_chain_validation(block_num: T::BlockNumber) -> Result { + pub fn run_on_chain_validation(block_num: BlockNumberFor) -> Result { let local_keys = T::AuthorityId::all(); let authorities = Self::validator_set().validators; let mut available_keys = authorities @@ -228,7 +229,7 @@ impl Pallet { /// Imports a block into the offchain state and handles the deposits fn import_blk( - blk: T::BlockNumber, + blk: BlockNumberFor, state: &mut OffchainState, state_info: &mut StateInfo, ) -> Result<(), &'static str> { diff --git a/pallets/pdex-migration/src/lib.rs b/pallets/pdex-migration/src/lib.rs index 36e53cdec..b2ade5533 100644 --- a/pallets/pdex-migration/src/lib.rs +++ b/pallets/pdex-migration/src/lib.rs @@ -45,6 +45,7 @@ pub mod pallet { }; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; + use frame_support::traits::GenesisBuild; use scale_info::TypeInfo; use sp_runtime::{ traits::{BlockNumberProvider, Saturating, Zero}, @@ -79,7 +80,7 @@ pub mod pallet { type MaxRelayers: Get; /// Lock Period #[pallet::constant] - type LockPeriod: Get<::BlockNumber>; + type LockPeriod: Get>; } #[pallet::pallet] @@ -105,7 +106,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn locked_holders)] pub(super) type LockedTokenHolders = - StorageMap<_, Blake2_128Concat, T::AccountId, T::BlockNumber, OptionQuery>; + StorageMap<_, Blake2_128Concat, T::AccountId, BlockNumberFor, OptionQuery>; /// Processed Eth Burn Transactions #[pallet::storage] @@ -343,7 +344,7 @@ pub mod pallet { amount.saturating_add(previous_balance), reasons, ); - let current_blocknumber: T::BlockNumber = + let current_blocknumber: BlockNumberFor = frame_system::Pallet::::current_block_number(); LockedTokenHolders::::insert(beneficiary.clone(), current_blocknumber); // Reduce possible mintable tokens diff --git a/pallets/rewards/src/lib.rs b/pallets/rewards/src/lib.rs index d80e1ec9e..2579f9f30 100644 --- a/pallets/rewards/src/lib.rs +++ b/pallets/rewards/src/lib.rs @@ -145,8 +145,8 @@ pub mod pallet { #[pallet::weight(::WeightInfo::create_reward_cycle(1, 1, 1))] pub fn create_reward_cycle( origin: OriginFor, - start_block: T::BlockNumber, - end_block: T::BlockNumber, + start_block: BlockNumberFor, + end_block: BlockNumberFor, initial_percentage: u32, reward_id: u32, ) -> DispatchResult { @@ -378,8 +378,8 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { RewardCycleCreated { - start_block: T::BlockNumber, - end_block: T::BlockNumber, + start_block: BlockNumberFor, + end_block: BlockNumberFor, reward_id: u32, }, UserUnlockedReward { @@ -431,8 +431,8 @@ pub mod pallet { #[derive(Clone, Encode, Decode, MaxEncodedLen, TypeInfo, Debug, PartialEq, Default)] #[scale_info(bounds(), skip_type_params(T))] pub struct RewardInfo { - pub start_block: T::BlockNumber, - pub end_block: T::BlockNumber, + pub start_block: BlockNumberFor, + pub end_block: BlockNumberFor, pub initial_percentage: u32, } @@ -444,7 +444,7 @@ pub mod pallet { pub is_initial_rewards_claimed: bool, pub is_initialized: bool, pub lock_id: [u8; 8], - pub last_block_rewards_claim: T::BlockNumber, + pub last_block_rewards_claim: BlockNumberFor, pub initial_rewards_claimable: BalanceOf, pub factor: BalanceOf, } diff --git a/pallets/thea-council/src/lib.rs b/pallets/thea-council/src/lib.rs index 7a32429ff..b5a19046a 100644 --- a/pallets/thea-council/src/lib.rs +++ b/pallets/thea-council/src/lib.rs @@ -231,7 +231,7 @@ pub mod pallet { #[pallet::weight(T::TheaCouncilWeightInfo::delete_transaction(1))] pub fn delete_transaction( origin: OriginFor, - block_no: T::BlockNumber, + block_no: BlockNumberFor, index: u32, ) -> DispatchResult { let sender = ensure_signed(origin)?; @@ -244,7 +244,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_initialize(n: T::BlockNumber) -> Weight { + fn on_initialize(n: BlockNumberFor) -> Weight { let mut removed = 0; >::mutate(|m| { let was = m.len(); diff --git a/pallets/thea-executor/src/lib.rs b/pallets/thea-executor/src/lib.rs index 4a5839210..3a921bef5 100644 --- a/pallets/thea-executor/src/lib.rs +++ b/pallets/thea-executor/src/lib.rs @@ -48,11 +48,11 @@ pub trait WeightInfo { pub mod pallet { use super::*; use frame_support::{ - log, pallet_prelude::*, sp_runtime::SaturatedConversion, traits::{fungible::Mutate, fungibles::Inspect, tokens::Preservation}, }; + use frame_support::__private::log; use frame_system::pallet_prelude::*; use polkadex_primitives::Resolver; use sp_runtime::{traits::AccountIdConversion, Saturating}; @@ -128,7 +128,7 @@ pub mod pallet { pub(super) type ReadyWithdrawals = StorageDoubleMap< _, Blake2_128Concat, - T::BlockNumber, + BlockNumberFor, Blake2_128Concat, Network, Vec, @@ -203,9 +203,9 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_initialize(block_no: T::BlockNumber) -> Weight { + fn on_initialize(block_no: BlockNumberFor) -> Weight { let pending_withdrawals = >::iter_prefix( - block_no.saturating_sub(T::BlockNumber::from(1u8)), + block_no.saturating_sub(1u8.into()), ); for (network_id, withdrawal) in pending_withdrawals { // This is fine as this trait is not supposed to fail diff --git a/pallets/thea/src/lib.rs b/pallets/thea/src/lib.rs index 9244947d4..2fdc4f79f 100644 --- a/pallets/thea/src/lib.rs +++ b/pallets/thea/src/lib.rs @@ -191,7 +191,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn offchain_worker(blk: T::BlockNumber) { + fn offchain_worker(blk: BlockNumberFor) { log::debug!(target:"thea","Thea offchain worker started"); if let Err(err) = Self::run_thea_validation(blk) { log::error!(target:"thea","Error while running thea: {:?}",err); diff --git a/pallets/thea/src/session.rs b/pallets/thea/src/session.rs index 285953f8b..1280d810b 100644 --- a/pallets/thea/src/session.rs +++ b/pallets/thea/src/session.rs @@ -17,7 +17,7 @@ // along with this program. If not, see . use crate::{Config, Pallet}; -use frame_support::{log, traits::OneSessionHandler}; +use frame_support::traits::OneSessionHandler; use sp_core::{bounded::BoundedVec, Get}; use sp_std::vec::Vec; diff --git a/pallets/thea/src/validation.rs b/pallets/thea/src/validation.rs index 744382953..06fd871fc 100644 --- a/pallets/thea/src/validation.rs +++ b/pallets/thea/src/validation.rs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use frame_system::pallet_prelude::BlockNumberFor; use crate::{ aggregator::AggregatorClient, pallet::{ActiveNetworks, IncomingNonce}, @@ -29,7 +30,7 @@ use thea_primitives::types::Destination; impl Pallet { /// Starts the offchain worker instance that checks for finalized next incoming messages /// for both solochain and parachain, signs it and submits to aggregator - pub fn run_thea_validation(_blk: T::BlockNumber) -> Result<(), &'static str> { + pub fn run_thea_validation(_blk: BlockNumberFor) -> Result<(), &'static str> { if !sp_io::offchain::is_validator() { return Ok(()) } diff --git a/pallets/xcm-helper/src/lib.rs b/pallets/xcm-helper/src/lib.rs index 774c97e09..8b013ea89 100644 --- a/pallets/xcm-helper/src/lib.rs +++ b/pallets/xcm-helper/src/lib.rs @@ -119,7 +119,6 @@ pub use weights::*; pub mod pallet { use frame_support::{ dispatch::RawOrigin, - log, pallet_prelude::*, sp_runtime::traits::AccountIdConversion, traits::{ @@ -129,6 +128,7 @@ pub mod pallet { }, PalletId, }; + use frame_support::__private::log; use frame_system::pallet_prelude::*; use polkadex_primitives::Resolver; @@ -151,7 +151,7 @@ pub mod pallet { VersionedMultiAssets, VersionedMultiLocation, }; use xcm_executor::{ - traits::{Convert as MoreConvert, TransactAsset}, + traits::{ConvertLocation as MoreConvert, TransactAsset}, Assets, }; @@ -180,7 +180,7 @@ pub mod pallet { /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Multilocation to AccountId Convert - type AccountIdConvert: MoreConvert; + type AccountIdConvert: MoreConvert; /// Assets type Assets: frame_support::traits::tokens::fungibles::Mutate + frame_support::traits::tokens::fungibles::Create @@ -206,7 +206,7 @@ pub mod pallet { type AssetHandlerPalletId: Get; /// Pallet Id #[pallet::constant] - type WithdrawalExecutionBlockDiff: Get; + type WithdrawalExecutionBlockDiff: Get>; /// PDEX Asset ID #[pallet::constant] type ParachainId: Get; @@ -223,13 +223,13 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn get_pending_withdrawals)] pub(super) type PendingWithdrawals = - StorageMap<_, Blake2_128Concat, T::BlockNumber, Vec, ValueQuery>; + StorageMap<_, Blake2_128Concat, BlockNumberFor, Vec, ValueQuery>; /// Failed Withdrawals #[pallet::storage] #[pallet::getter(fn get_failed_withdrawals)] pub(super) type FailedWithdrawals = - StorageMap<_, Blake2_128Concat, T::BlockNumber, Vec, ValueQuery>; + StorageMap<_, Blake2_128Concat, BlockNumberFor, Vec, ValueQuery>; /// Asset mapping from u128 asset to multi asset. #[pallet::storage] @@ -307,8 +307,8 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet { - fn on_initialize(n: T::BlockNumber) -> Weight { + impl Hooks> for Pallet { + fn on_initialize(n: BlockNumberFor) -> Weight { let mut failed_withdrawal: Vec = Vec::default(); >::mutate(n, |withdrawals| { while let Some(withdrawal) = withdrawals.pop() { @@ -454,7 +454,7 @@ pub mod pallet { // Create approved deposit let MultiAsset { id, fun } = what; let recipient = - T::AccountIdConvert::convert_ref(who).map_err(|_| XcmError::FailedToDecode)?; + T::AccountIdConvert::convert_location(who).ok_or(XcmError::FailedToDecode)?; let amount: u128 = Self::get_amount(fun).ok_or(XcmError::Trap(101))?; let asset_id = Self::generate_asset_id_for_parachain(*id); let deposit: Deposit = Deposit { @@ -485,7 +485,7 @@ pub mod pallet { ) -> sp_std::result::Result { let MultiAsset { id: _, fun } = what; let who = - T::AccountIdConvert::convert_ref(who).map_err(|_| XcmError::FailedToDecode)?; + T::AccountIdConvert::convert_location(who).ok_or(XcmError::FailedToDecode)?; let amount: u128 = Self::get_amount(fun).ok_or(XcmError::Trap(101))?; let asset_id = Self::generate_asset_id_for_parachain(what.id); let pallet_account: T::AccountId = @@ -504,8 +504,8 @@ pub mod pallet { ) -> sp_std::result::Result { let MultiAsset { id, fun } = asset; let from = - T::AccountIdConvert::convert_ref(from).map_err(|_| XcmError::FailedToDecode)?; - let to = T::AccountIdConvert::convert_ref(to).map_err(|_| XcmError::FailedToDecode)?; + T::AccountIdConvert::convert_location(from).ok_or(XcmError::FailedToDecode)?; + let to = T::AccountIdConvert::convert_location(to).ok_or(XcmError::FailedToDecode)?; let amount: u128 = Self::get_amount(fun).ok_or(XcmError::Trap(101))?; let asset_id = Self::generate_asset_id_for_parachain(*id); Self::resolve_transfer(asset_id.into(), &from, &to, amount) @@ -624,7 +624,7 @@ pub mod pallet { } /// Block Transaction to be Executed. - pub fn block_by_ele(block_no: T::BlockNumber, index: u32) -> DispatchResult { + pub fn block_by_ele(block_no: BlockNumberFor, index: u32) -> DispatchResult { let mut pending_withdrawals = >::get(block_no); let pending_withdrawal: &mut Withdraw = pending_withdrawals.get_mut(index as usize).ok_or(Error::::IndexNotFound)?; @@ -646,14 +646,9 @@ pub mod pallet { Self::generate_asset_id_for_parachain(AssetId::Concrete(location)) } - pub fn insert_pending_withdrawal(block_no: T::BlockNumber, withdrawal: Withdraw) { + pub fn insert_pending_withdrawal(block_no: BlockNumberFor, withdrawal: Withdraw) { >::insert(block_no, vec![withdrawal]); } - - /// Converts Multilocation to AccountId - pub fn multi_location_to_account_converter(location: MultiLocation) -> T::AccountId { - T::AccountIdConvert::convert_ref(location).unwrap() - } } impl AssetIdConverter for Pallet { @@ -678,7 +673,7 @@ pub mod pallet { let deposits = Vec::::decode(&mut &deposits[..]).unwrap_or_default(); for deposit in deposits { // Calculate the withdrawal execution delay - let withdrawal_execution_block: T::BlockNumber = + let withdrawal_execution_block: BlockNumberFor = >::block_number() .saturated_into::() .saturating_add( diff --git a/primitives/polkadex/Cargo.toml b/primitives/polkadex/Cargo.toml index 865b6a6fb..51f88f54d 100644 --- a/primitives/polkadex/Cargo.toml +++ b/primitives/polkadex/Cargo.toml @@ -10,12 +10,12 @@ anyhow = "1.0.56" codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] } serde = { version = "1.0.152", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" } +frame-system = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0" } +sp-core = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0" } +sp-std = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0" } +sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0" } +frame-support = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0" } rust_decimal = { git = "https://github.com/Polkadex-Substrate/rust-decimal.git", branch = "master", features = [ "scale-codec", "serde", diff --git a/runtimes/polkadex-mainnet/src/lib.rs b/runtimes/polkadex-mainnet/src/lib.rs index 5c6cadcfd..a0f527d99 100644 --- a/runtimes/polkadex-mainnet/src/lib.rs +++ b/runtimes/polkadex-mainnet/src/lib.rs @@ -1366,48 +1366,48 @@ construct_runtime!( NodeBlock = polkadex_primitives::Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - Utility: pallet_utility::{Pallet, Call, Event} = 1, - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 2, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - Authorship: pallet_authorship::{Pallet, Storage} = 4, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 5, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 6, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 7, - ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 8, - Staking: pallet_staking::{Pallet, Call, Config, Storage, Event} = 9, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 10, - Council: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 11, - TechnicalCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 12, - Elections: pallet_elections_phragmen::{Pallet, Call, Storage, Event, Config} = 13, - TechnicalMembership: pallet_membership::::{Pallet, Call, Storage, Event, Config} = 14, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 15, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 16, - Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event} = 17, - ImOnline: pallet_im_online::{Pallet, Call, Storage, Event, ValidateUnsigned, Config} = 18, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 19, - Offences: pallet_offences::{Pallet, Storage, Event} = 20, - Historical: pallet_session_historical::{Pallet} = 21, - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 22, - Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 23, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 24, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 25, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 26, - Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 27, - OrmlVesting: orml_vesting::{Pallet, Storage, Call, Event, Config} = 28, - PDEXMigration: pdex_migration::pallet::{Pallet, Storage, Call, Event, Config} = 29, - Democracy: pallet_democracy::{Pallet, Call, Storage, Event, Config} = 30, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 31, - //RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 32, + System: frame_system = 0, + Utility: pallet_utility = 1, + Babe: pallet_babe = 2, + Timestamp: pallet_timestamp = 3, + Authorship: pallet_authorship = 4, + Indices: pallet_indices = 5, + Balances: pallet_balances = 6, + TransactionPayment: pallet_transaction_payment = 7, + ElectionProviderMultiPhase: pallet_election_provider_multi_phase = 8, + Staking: pallet_staking = 9, + Session: pallet_session = 10, + Council: pallet_collective = 11, + TechnicalCommittee: pallet_collective:: = 12, + Elections: pallet_elections_phragmen = 13, + TechnicalMembership: pallet_membership:: = 14, + Grandpa: pallet_grandpa = 15, + Treasury: pallet_treasury = 16, + Sudo: pallet_sudo = 17, + ImOnline: pallet_im_online = 18, + AuthorityDiscovery: pallet_authority_discovery = 19, + Offences: pallet_offences = 20, + Historical: pallet_session_historical = 21, + Identity: pallet_identity = 22, + Recovery: pallet_recovery = 23, + Scheduler: pallet_scheduler = 24, + Proxy: pallet_proxy = 25, + Multisig: pallet_multisig = 26, + Bounties: pallet_bounties = 27, + OrmlVesting: orml_vesting = 28, + PDEXMigration: pdex_migration::pallet = 29, + Democracy: pallet_democracy = 30, + Preimage: pallet_preimage = 31, + //RandomnessCollectiveFlip: pallet_randomness_collective_flip = 32, ChildBounties: pallet_child_bounties = 33, - Assets: pallet_assets::{Pallet, Call, Storage, Event} = 34, - OCEX: pallet_ocex_lmp::{Pallet, Call, Storage, Event, ValidateUnsigned} = 35, - OrderbookCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event} = 36, - Thea: thea::pallet::{Pallet, Call, Storage, Event,ValidateUnsigned} = 39, - Rewards: pallet_rewards::{Pallet, Call, Storage, Event} = 40, - Liquidity: liquidity::{Pallet, Call, Storage, Event} = 41, - TheaExecutor: thea_executor::pallet::{Pallet, Call, Storage, Event} = 44, - TheaMH: thea_message_handler::pallet::{Pallet, Call, Storage, Event} = 45 + Assets: pallet_assets = 34, + OCEX: pallet_ocex_lmp = 35, + OrderbookCommittee: pallet_collective:: = 36, + Thea: thea::pallet = 39, + Rewards: pallet_rewards = 40, + Liquidity: liquidity = 41, + TheaExecutor: thea_executor::pallet = 44, + TheaMH: thea_message_handler::pallet = 45 } ); @@ -1418,47 +1418,47 @@ construct_runtime!( NodeBlock = polkadex_primitives::Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - Utility: pallet_utility::{Pallet, Call, Event} = 1, - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 2, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - Authorship: pallet_authorship::{Pallet, Storage} = 4, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 5, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 6, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 7, - ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 8, - Staking: pallet_staking::{Pallet, Call, Config, Storage, Event} = 9, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 10, - Council: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 11, - TechnicalCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 12, - Elections: pallet_elections_phragmen::{Pallet, Call, Storage, Event, Config} = 13, - TechnicalMembership: pallet_membership::::{Pallet, Call, Storage, Event, Config} = 14, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 15, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 16, - Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event} = 17, - ImOnline: pallet_im_online::{Pallet, Call, Storage, Event, ValidateUnsigned, Config} = 18, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 19, - Offences: pallet_offences::{Pallet, Storage, Event} = 20, - Historical: pallet_session_historical::{Pallet} = 21, - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 22, - Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 23, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 24, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 25, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 26, - Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 27, - OrmlVesting: orml_vesting::{Pallet, Storage, Call, Event, Config} = 28, - PDEXMigration: pdex_migration::pallet::{Pallet, Storage, Call, Event, Config} = 29, - Democracy: pallet_democracy::{Pallet, Call, Storage, Event, Config} = 30, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 31, + System: frame_system = 0, + Utility: pallet_utility = 1, + Babe: pallet_babe = 2, + Timestamp: pallet_timestamp = 3, + Authorship: pallet_authorship = 4, + Indices: pallet_indices = 5, + Balances: pallet_balances = 6, + TransactionPayment: pallet_transaction_payment = 7, + ElectionProviderMultiPhase: pallet_election_provider_multi_phase = 8, + Staking: pallet_staking = 9, + Session: pallet_session = 10, + Council: pallet_collective:: = 11, + TechnicalCommittee: pallet_collective:: = 12, + Elections: pallet_elections_phragmen = 13, + TechnicalMembership: pallet_membership:: = 14, + Grandpa: pallet_grandpa = 15, + Treasury: pallet_treasury = 16, + Sudo: pallet_sudo = 17, + ImOnline: pallet_im_online = 18, + AuthorityDiscovery: pallet_authority_discovery = 19, + Offences: pallet_offences = 20, + Historical: pallet_session_historical = 21, + Identity: pallet_identity = 22, + Recovery: pallet_recovery = 23, + Scheduler: pallet_scheduler = 24, + Proxy: pallet_proxy = 25, + Multisig: pallet_multisig = 26, + Bounties: pallet_bounties = 27, + OrmlVesting: orml_vesting = 28, + PDEXMigration: pdex_migration::pallet = 29, + Democracy: pallet_democracy = 30, + Preimage: pallet_preimage = 31, //RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 32, ChildBounties: pallet_child_bounties = 33, - Assets: pallet_assets::{Pallet, Call, Storage, Event} = 34, - OCEX: pallet_ocex_lmp::{Pallet, Call, Storage, Event, ValidateUnsigned} = 35, - OrderbookCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event} = 36, - Thea: thea::pallet::{Pallet, Call, Storage, Event,ValidateUnsigned} = 39, - Rewards: pallet_rewards::{Pallet, Call, Storage, Event} = 40, - Liquidity: liquidity::{Pallet, Call, Storage, Event} = 41, - TheaExecutor: thea_executor::pallet::{Pallet, Call, Storage, Event} = 44, + Assets: pallet_assets = 34, + OCEX: pallet_ocex_lmp = 35, + OrderbookCommittee: pallet_collective:: = 36, + Thea: thea::pallet = 39, + Rewards: pallet_rewards = 40, + Liquidity: liquidity = 41, + TheaExecutor: thea_executor::pallet = 44, } ); /// Digest item type. diff --git a/runtimes/polkadex-parachain/src/lib.rs b/runtimes/polkadex-parachain/src/lib.rs index 55774ad2c..353209e5f 100644 --- a/runtimes/polkadex-parachain/src/lib.rs +++ b/runtimes/polkadex-parachain/src/lib.rs @@ -25,9 +25,9 @@ use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; - +use sp_runtime::codec; use frame_support::{ - codec, construct_runtime, + construct_runtime, dispatch::DispatchClass, parameter_types, traits::Everything, @@ -52,7 +52,7 @@ pub use sp_runtime::BuildStorage; // Polkadot imports use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use frame_support::traits::AsEnsureOriginWithArg; +use frame_support::traits::{AsEnsureOriginWithArg, ConstBool}; use thea::ecdsa::{AuthorityId, AuthoritySignature}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -74,6 +74,9 @@ pub type Balance = u128; /// Index of a transaction in the chain. pub type Index = u32; +/// Index of a transaction in the chain. +pub type Nonce = u32; + /// A hash of some data used by the chain. pub type Hash = sp_core::H256; @@ -268,16 +271,10 @@ impl frame_system::Config for Runtime { type RuntimeCall = RuntimeCall; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. @@ -309,6 +306,8 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = Nonce; + type Block = Block; } parameter_types! { @@ -350,10 +349,10 @@ impl pallet_balances::Config for Runtime { type WeightInfo = pallet_balances::weights::SubstrateWeight; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; + type RuntimeHoldReason = (); } parameter_types! { @@ -434,6 +433,7 @@ impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; + type AllowMultipleBlocksPerSlot = ConstBool; } parameter_types! { @@ -454,7 +454,7 @@ impl pallet_collator_selection::Config for Runtime { type UpdateOrigin = CollatorSelectionUpdateOrigin; type PotId = PotId; type MaxCandidates = MaxCandidates; - type MinCandidates = MinCandidates; + type MinEligibleCollators = ConstU32<4>; type MaxInvulnerables = MaxInvulnerables; // should be a multiple of session or things will get inconsistent type KickThreshold = Period; @@ -555,39 +555,37 @@ construct_runtime!( UncheckedExtrinsic = UncheckedExtrinsic, { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, // Collator support. The order of these 4 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, - Assets: pallet_assets::{Pallet, Call, Storage, Event, Config} = 25, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, + Assets: pallet_assets = 25, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, - DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, - XTokens: orml_xtokens::{Pallet, Call, Storage, Event} = 34, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + DmpQueue: cumulus_pallet_dmp_queue = 33, + XTokens: orml_xtokens = 34, // Custom Pallets - XcmHelper: xcm_helper::{Pallet, Call, Storage, Event} = 40, - TheaCouncil: thea_council::{Pallet, Call, Storage, Event} = 41, - Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 45, + XcmHelper: xcm_helper = 40, + TheaCouncil: thea_council = 41, + Sudo: pallet_sudo = 45, // Thea Pallet - TheaMessageHandler: thea_message_handler::{Pallet, Call, Storage, Event, ValidateUnsigned} = 46 + TheaMessageHandler: thea_message_handler = 46 } ); diff --git a/runtimes/polkadex-parachain/src/xcm_config.rs b/runtimes/polkadex-parachain/src/xcm_config.rs index 8ba3249a9..72bc20e4b 100644 --- a/runtimes/polkadex-parachain/src/xcm_config.rs +++ b/runtimes/polkadex-parachain/src/xcm_config.rs @@ -170,6 +170,7 @@ impl xcm_executor::Config for XcmConfig { type IsReserve = MultiNativeAsset; // Teleporting is disabled. type IsTeleporter = (); + type Aliasers = Nothing; type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; @@ -324,6 +325,7 @@ where &mut self, weight: Weight, payment: Assets, + _context: &XcmContext, ) -> sp_std::result::Result { let _fee_in_native_token = T::weight_to_fee(&weight); let payment_asset = payment.fungible_assets_iter().next().ok_or(XcmError::Trap(1000))?; @@ -373,14 +375,14 @@ where } } -pub struct TypeConv; -impl + Clone, Dest: TryFrom + Clone> - xcm_executor::traits::Convert for TypeConv -{ - fn convert(value: Source) -> Result { - Dest::try_from(value.clone()).map_err(|_| value) - } -} +// pub struct TypeConv; +// impl + Clone, Dest: TryFrom + Clone> +// xcm_executor::traits::Convert for TypeConv +// { +// fn convert(value: Source) -> Result { +// Dest::try_from(value.clone()).map_err(|_| value) +// } +// } pub struct RevenueCollector; From 0f15057e21858bf5005629bc70c39b0a0c3b093a Mon Sep 17 00:00:00 2001 From: zktony Date: Sun, 17 Sep 2023 23:40:43 +0530 Subject: [PATCH 03/51] Fixed build --- Cargo.lock | 114 ++++---- nodes/polkadex-parachain-node/Cargo.toml | 4 + .../polkadex-parachain-node/src/chain_spec.rs | 5 +- nodes/polkadex-parachain-node/src/command.rs | 144 ++++------ nodes/polkadex-parachain-node/src/service.rs | 254 +++++++++--------- pallets/pdex-migration/src/lib.rs | 3 +- primitives/polkadex/src/lib.rs | 3 + runtimes/polkadex-mainnet/src/lib.rs | 35 +-- 8 files changed, 265 insertions(+), 297 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d60c239b..ae8e03268 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -679,7 +679,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -696,7 +696,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -859,7 +859,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -1436,7 +1436,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -2192,7 +2192,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -2511,7 +2511,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -2551,7 +2551,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -2568,7 +2568,7 @@ checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -2616,7 +2616,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -2638,7 +2638,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -2882,7 +2882,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -2923,7 +2923,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.35", + "syn 2.0.36", "termcolor", "toml 0.7.8", "walkdir", @@ -3135,7 +3135,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -3146,7 +3146,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -3257,7 +3257,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -3546,7 +3546,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -3673,7 +3673,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -3685,7 +3685,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -3695,7 +3695,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -3863,7 +3863,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -5572,7 +5572,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -5586,7 +5586,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -5597,7 +5597,7 @@ checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -5608,7 +5608,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -6363,7 +6363,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -6382,7 +6382,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ "frame-support", "parity-scale-codec", @@ -6396,7 +6396,7 @@ dependencies = [ [[package]] name = "orml-vesting" version = "0.4.1-dev" -source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ "frame-support", "frame-system", @@ -6411,7 +6411,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ "frame-support", "orml-traits", @@ -6425,7 +6425,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#0585c0ba3901678f7aa7d3c942e0b80c4b43e373" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -7377,7 +7377,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -7635,8 +7635,10 @@ version = "1.0.0" dependencies = [ "clap 4.4.3", "cumulus-client-cli", + "cumulus-client-collator", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", "cumulus-client-network", "cumulus-client-service", "cumulus-primitives-core", @@ -7647,6 +7649,7 @@ dependencies = [ "cumulus-relay-chain-rpc-interface", "frame-benchmarking", "frame-benchmarking-cli", + "futures 0.3.28", "hex-literal 0.3.4", "jsonrpsee", "log", @@ -7665,6 +7668,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-sync", + "sc-offchain", "sc-rpc", "sc-service", "sc-sysinfo", @@ -7987,7 +7991,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -8028,7 +8032,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -9510,7 +9514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -9599,7 +9603,7 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -9645,7 +9649,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -9995,7 +9999,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -10683,7 +10687,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -11645,7 +11649,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -11954,7 +11958,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -12002,7 +12006,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -12395,7 +12399,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -12634,7 +12638,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -12653,7 +12657,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -12870,7 +12874,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -13062,7 +13066,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -13660,9 +13664,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.35" +version = "2.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bf04c28bee9043ed9ea1e41afc0552288d3aba9c6efdd78903b802926f4879" +checksum = "91e02e55d62894af2a08aca894c6577281f76769ba47c94d5756bec8ac6e7373" dependencies = [ "proc-macro2", "quote", @@ -13916,7 +13920,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -14086,7 +14090,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -14242,7 +14246,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -14286,7 +14290,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -14704,7 +14708,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", "wasm-bindgen-shared", ] @@ -14738,7 +14742,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -15802,7 +15806,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] @@ -15851,7 +15855,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.35", + "syn 2.0.36", ] [[package]] diff --git a/nodes/polkadex-parachain-node/Cargo.toml b/nodes/polkadex-parachain-node/Cargo.toml index ca12f260d..6ce6838c0 100644 --- a/nodes/polkadex-parachain-node/Cargo.toml +++ b/nodes/polkadex-parachain-node/Cargo.toml @@ -15,6 +15,7 @@ log = "0.4.17" codec = { package = "parity-scale-codec", version = "3.0.0" } serde = { version = "1.0.152", features = ["derive"] } jsonrpsee = { version = "0.16.2", features = ["server"] } +futures = "0.3.28" # Local parachain-polkadex-runtime = { path = "../../runtimes/polkadex-parachain" } @@ -55,6 +56,7 @@ sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", bran substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } # Polkadot polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } @@ -74,6 +76,8 @@ cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } [build-dependencies] substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } diff --git a/nodes/polkadex-parachain-node/src/chain_spec.rs b/nodes/polkadex-parachain-node/src/chain_spec.rs index 9a99674fc..ee27357e8 100644 --- a/nodes/polkadex-parachain-node/src/chain_spec.rs +++ b/nodes/polkadex-parachain-node/src/chain_spec.rs @@ -192,6 +192,7 @@ fn create_genesis_config( code: parachain_polkadex_runtime::WASM_BINARY .expect("WASM binary was not build, please build it!") .to_vec(), + ..Default::default() }, balances: parachain_polkadex_runtime::BalancesConfig { balances: endowed_accounts @@ -200,7 +201,7 @@ fn create_genesis_config( .map(|k| (k, EXISTENTIAL_DEPOSIT * 16)) .collect(), }, - parachain_info: parachain_polkadex_runtime::ParachainInfoConfig { parachain_id: id }, + parachain_info: parachain_polkadex_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, collator_selection: parachain_polkadex_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: EXISTENTIAL_DEPOSIT * 16, @@ -225,9 +226,11 @@ fn create_genesis_config( parachain_system: Default::default(), polkadot_xcm: parachain_polkadex_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() }, sudo: parachain_polkadex_runtime::SudoConfig { key: Some(root_key) }, assets: Default::default(), + transaction_payment: Default::default(), } } diff --git a/nodes/polkadex-parachain-node/src/command.rs b/nodes/polkadex-parachain-node/src/command.rs index 88ec9f1d5..af739b8e4 100644 --- a/nodes/polkadex-parachain-node/src/command.rs +++ b/nodes/polkadex-parachain-node/src/command.rs @@ -1,36 +1,34 @@ -use codec::Encode; -use cumulus_client_cli::generate_genesis_block; +use std::net::SocketAddr; + use cumulus_primitives_core::ParaId; use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; -use log::{info, warn}; +use log::info; use parachain_polkadex_runtime::Block; use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, - NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli, + NetworkParams, Result, SharedParams, SubstrateCli, }; use sc_service::config::{BasePath, PrometheusConfig}; -use sp_core::hexdisplay::HexDisplay; -use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; +use sp_runtime::traits::AccountIdConversion; use crate::{ chain_spec, cli::{Cli, RelayChainCli, Subcommand}, - service::{new_partial, ParachainNativeExecutor}, + service::new_partial, }; fn load_spec(id: &str) -> std::result::Result, String> { Ok(match id { "dev" => Box::new(chain_spec::development_config()), - "xcm-helper-rococo" => Box::new(chain_spec::local_testnet_config()), + "template-rococo" => Box::new(chain_spec::local_testnet_config()), "" | "local" => Box::new(chain_spec::local_testnet_config()), - "mainnet" => Box::new(chain_spec::mainnet_config()), path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), }) } impl SubstrateCli for Cli { fn impl_name() -> String { - "Polkadex Parachain Collator".into() + "Parachain Collator Template".into() } fn impl_version() -> String { @@ -39,9 +37,9 @@ impl SubstrateCli for Cli { fn description() -> String { format!( - "Polkadex Collator \n\nThe command-line arguments provided first will be \ - passed to the parachain polkadex-parachain-node, while the arguments provided after -- will be passed \ - to the relay chain polkadex-parachain-node.\n\n\ + "Parachain Collator Template\n\nThe command-line arguments provided first will be \ + passed to the parachain node, while the arguments provided after -- will be passed \ + to the relay chain node.\n\n\ {} -- ", Self::executable_name() ) @@ -52,7 +50,7 @@ impl SubstrateCli for Cli { } fn support_url() -> String { - "https://github.com/Polkadex-Substrate/parachain/issues/new".into() + "https://github.com/paritytech/cumulus/issues/new".into() } fn copyright_start_year() -> i32 { @@ -62,15 +60,11 @@ impl SubstrateCli for Cli { fn load_spec(&self, id: &str) -> std::result::Result, String> { load_spec(id) } - - fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { - ¶chain_polkadex_runtime::VERSION - } } impl SubstrateCli for RelayChainCli { fn impl_name() -> String { - "Polkadex Collator".into() + "Parachain Collator Template".into() } fn impl_version() -> String { @@ -79,9 +73,9 @@ impl SubstrateCli for RelayChainCli { fn description() -> String { format!( - "Polkadex Collator \n\nThe command-line arguments provided first will be \ - passed to the parachain polkadex-parachain-node, while the arguments provided after -- will be passed \ - to the relay chain polkadex-parachain-node.\n\n\ + "Parachain Collator Template\n\nThe command-line arguments provided first will be \ + passed to the parachain node, while the arguments provided after -- will be passed \ + to the relay chain node.\n\n\ {} -- ", Self::executable_name() ) @@ -102,10 +96,6 @@ impl SubstrateCli for RelayChainCli { fn load_spec(&self, id: &str) -> std::result::Result, String> { polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id) } - - fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - polkadot_cli::Cli::native_runtime_version(chain_spec) - } } macro_rules! construct_async_run { @@ -167,17 +157,17 @@ pub fn run() -> Result<()> { &polkadot_cli, config.tokio_handle.clone(), ) - .map_err(|err| format!("Relay chain argument error: {err}"))?; + .map_err(|err| format!("Relay chain argument error: {}", err))?; cmd.run(config, polkadot_config) }) }, Some(Subcommand::ExportGenesisState(cmd)) => { let runner = cli.create_runner(cmd)?; - runner.sync_run(|_config| { - let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; - let state_version = Cli::native_runtime_version(&spec).state_version(); - cmd.run::(&*spec, state_version) + runner.sync_run(|config| { + let partials = new_partial(&config)?; + + cmd.run(&*config.chain_spec, &*partials.client) }) }, Some(Subcommand::ExportGenesisWasm(cmd)) => { @@ -193,9 +183,9 @@ pub fn run() -> Result<()> { match cmd { BenchmarkCmd::Pallet(cmd) => if cfg!(feature = "runtime-benchmarks") { - runner.sync_run(|config| cmd.run::(config)) + runner.sync_run(|config| cmd.run::(config)) } else { - Err("Benchmarking wasn't enabled when building the polkadex-parachain-node. \ + Err("Benchmarking wasn't enabled when building the node. \ You can enable it with `--features runtime-benchmarks`." .into()) }, @@ -204,11 +194,13 @@ pub fn run() -> Result<()> { cmd.run(partials.client) }), #[cfg(not(feature = "runtime-benchmarks"))] - BenchmarkCmd::Storage(_) => Err(sc_cli::Error::Input( - "Compile with --features=runtime-benchmarks \ + BenchmarkCmd::Storage(_) => + return Err(sc_cli::Error::Input( + "Compile with --features=runtime-benchmarks \ to enable storage benchmarks." - .into(), - )), + .into(), + ) + .into()), #[cfg(feature = "runtime-benchmarks")] BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| { let partials = new_partial(&config)?; @@ -224,53 +216,18 @@ pub fn run() -> Result<()> { _ => Err("Benchmarking sub-command unsupported".into()), } }, - #[cfg(feature = "try-runtime")] - Some(Subcommand::TryRuntime(cmd)) => { - let runner = cli.create_runner(cmd)?; - - use parachain_polkadex_runtime::MILLISECS_PER_BLOCK; - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; - use try_runtime_cli::block_building_info::timestamp_with_aura_info; - - type HostFunctionsOf = ExtendedHostFunctions< - sp_io::SubstrateHostFunctions, - ::ExtendHostFunctions, - >; - - // grab the task manager. - let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry); - let info_provider = timestamp_with_aura_info(MILLISECS_PER_BLOCK); - let task_manager = - sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry) - .map_err(|e| format!("Error: {:?}", e))?; - - runner.async_run(|_| { - Ok(( - cmd.run::, _>(Some( - info_provider, - )), - task_manager, - )) - }) - }, - #[cfg(not(feature = "try-runtime"))] - Some(Subcommand::TryRuntime) => - Err("Try-runtime was not enabled when building the polkadex-parachain-node. \ - You can enable it with `--features try-runtime`." - .into()), + Some(Subcommand::TryRuntime) => Err("The `try-runtime` subcommand has been migrated to a standalone CLI (https://github.com/paritytech/try-runtime-cli). It is no longer being maintained here and will be removed entirely some time after January 2024. Please remove this subcommand from your runtime and use the standalone CLI.".into()), None => { let runner = cli.create_runner(&cli.run.normalize())?; let collator_options = cli.run.collator_options(); runner.run_node_until_exit(|config| async move { - let hwbench = if !cli.no_hardware_benchmarks { - config.database.path().map(|database_path| { + let hwbench = (!cli.no_hardware_benchmarks) + .then_some(config.database.path().map(|database_path| { let _ = std::fs::create_dir_all(database_path); sc_sysinfo::gather_hwbench(Some(database_path)) - }) - } else { - None - }; + })) + .flatten(); let para_id = chain_spec::Extensions::try_get(&*config.chain_spec) .map(|e| e.para_id) @@ -284,27 +241,18 @@ pub fn run() -> Result<()> { let id = ParaId::from(para_id); let parachain_account = - AccountIdConversion::::into_account_truncating(&id); - - let state_version = Cli::native_runtime_version(&config.chain_spec).state_version(); - let block: Block = generate_genesis_block(&*config.chain_spec, state_version) - .map_err(|e| format!("{e:?}"))?; - let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode())); + AccountIdConversion::::into_account_truncating( + &id, + ); let tokio_handle = config.tokio_handle.clone(); let polkadot_config = SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle) - .map_err(|err| format!("Relay chain argument error: {err}"))?; + .map_err(|err| format!("Relay chain argument error: {}", err))?; - info!("Parachain id: {:?}", id); - info!("Parachain Account: {}", parachain_account); - info!("Parachain genesis state: {}", genesis_state); + info!("Parachain Account: {parachain_account}"); info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" }); - if !collator_options.relay_chain_rpc_urls.is_empty() && !cli.relay_chain_args.is_empty() { - warn!("Detected relay chain polkadex-parachain-node arguments together with --relay-chain-rpc-url. This command starts a minimal Polkadot polkadex-parachain-node that only uses a network-related subset of all relay chain CLI options."); - } - crate::service::start_parachain_node( config, polkadot_config, @@ -358,6 +306,10 @@ impl CliConfiguration for RelayChainCli { .or_else(|| self.base_path.clone().map(Into::into))) } + fn rpc_addr(&self, default_listen_port: u16) -> Result> { + self.base.base.rpc_addr(default_listen_port) + } + fn prometheus_config( &self, default_listen_port: u16, @@ -373,8 +325,8 @@ impl CliConfiguration for RelayChainCli { _logger_hook: F, _config: &sc_service::Configuration, ) -> Result<()> - where - F: FnOnce(&mut sc_cli::LoggerBuilder, &sc_service::Configuration), + where + F: FnOnce(&mut sc_cli::LoggerBuilder, &sc_service::Configuration), { unreachable!("PolkadotCli is never initialized; qed"); } @@ -401,6 +353,10 @@ impl CliConfiguration for RelayChainCli { self.base.base.rpc_methods() } + fn rpc_max_connections(&self) -> Result { + self.base.base.rpc_max_connections() + } + fn rpc_cors(&self, is_dev: bool) -> Result>> { self.base.base.rpc_cors(is_dev) } @@ -435,4 +391,4 @@ impl CliConfiguration for RelayChainCli { fn node_name(&self) -> Result { self.base.base.node_name() } -} +} \ No newline at end of file diff --git a/nodes/polkadex-parachain-node/src/service.rs b/nodes/polkadex-parachain-node/src/service.rs index 885ef9383..d48e40e26 100644 --- a/nodes/polkadex-parachain-node/src/service.rs +++ b/nodes/polkadex-parachain-node/src/service.rs @@ -1,23 +1,26 @@ //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. // std -use cumulus_client_cli::CollatorOptions; -use cumulus_client_service::{ - build_network, build_relay_chain_interface, prepare_node_config, start_collator, - start_full_node, BuildNetworkParams, StartCollatorParams, StartFullNodeParams, -}; -use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; use std::{sync::Arc, time::Duration}; + +use cumulus_client_cli::CollatorOptions; // Local Runtime Types -use parachain_polkadex_runtime::{opaque::Block, RuntimeApi}; +use parachain_polkadex_runtime::{Hash, opaque::Block, RuntimeApi}; + // Cumulus Imports -use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; -use cumulus_client_consensus_common::{ - ParachainBlockImport as TParachainBlockImport, ParachainConsensus, +use cumulus_client_collator::service::CollatorService; +use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport; +use cumulus_client_consensus_proposer::Proposer; +use cumulus_client_service::{ + build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, + BuildNetworkParams, CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams, }; -use cumulus_primitives_core::ParaId; -use cumulus_relay_chain_interface::RelayChainInterface; +use cumulus_primitives_core::{relay_chain::CollatorPair, ParaId}; +use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface}; + // Substrate Imports +use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; +use sc_client_api::Backend; use sc_consensus::ImportQueue; use sc_executor::{ HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY, @@ -26,6 +29,7 @@ use sc_network::NetworkBlock; use sc_network_sync::SyncingService; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_keystore::KeystorePtr; use substrate_prometheus_endpoint::Registry; @@ -52,22 +56,23 @@ type ParachainBackend = TFullBackend; type ParachainBlockImport = TParachainBlockImport, ParachainBackend>; -type ParachainPartialComponents = PartialComponents< - ParachainClient, - ParachainBackend, - (), - sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool, - (ParachainBlockImport, Option, Option), ->; - /// Starts a `ServiceBuilder` for a full service. /// /// Use this macro if you don't actually need the full service, but just the builder in order to /// be able to perform chain operations. pub fn new_partial( config: &Configuration, -) -> Result { +) -> Result< + PartialComponents< + ParachainClient, + ParachainBackend, + (), + sc_consensus::DefaultImportQueue, + sc_transaction_pool::FullPool, + (ParachainBlockImport, Option, Option), + >, + sc_service::Error, +> { let telemetry = config .telemetry_endpoints .clone() @@ -138,8 +143,7 @@ pub fn new_partial( }) } -/// Start a polkadex-parachain-node with the given parachain `Configuration` and relay chain -/// `Configuration`. +/// Start a node with the given parachain `Configuration` and relay chain `Configuration`. /// /// This is the actual implementation that is abstract over the executor and the runtime api. #[sc_tracing::logging::prefix_logs_with("Parachain")] @@ -168,10 +172,9 @@ async fn start_node_impl( collator_options.clone(), hwbench.clone(), ) - .await - .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; + .await + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; - let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); @@ -187,15 +190,30 @@ async fn start_node_impl( spawn_handle: task_manager.spawn_handle(), relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, + sybil_resistance_level: CollatorSybilResistance::Resistant, // because of Aura }) - .await?; + .await?; if parachain_config.offchain_worker.enabled { - sc_service::build_offchain_workers( - ¶chain_config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), + use futures::FutureExt; + + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: Some(params.keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + )), + network_provider: network.clone(), + is_validator: parachain_config.role.is_authority(), + enable_http_requests: false, + custom_extensions: move |_| vec![], + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); } @@ -261,8 +279,25 @@ async fn start_node_impl( .overseer_handle() .map_err(|e| sc_service::Error::Application(Box::new(e)))?; + start_relay_chain_tasks(StartRelayChainTasksParams { + client: client.clone(), + announce_block: announce_block.clone(), + para_id, + relay_chain_interface: relay_chain_interface.clone(), + task_manager: &mut task_manager, + da_recovery_profile: if validator { + DARecoveryProfile::Collator + } else { + DARecoveryProfile::FullNode + }, + import_queue: import_queue_service, + relay_chain_slot_duration, + recovery_handle: Box::new(overseer_handle.clone()), + sync_service: sync_service.clone(), + })?; + if validator { - let parachain_consensus = build_consensus( + start_consensus( client.clone(), block_import, prometheus_registry.as_ref(), @@ -272,42 +307,12 @@ async fn start_node_impl( transaction_pool, sync_service.clone(), params.keystore_container.keystore(), - force_authoring, - para_id, - )?; - - let spawner = task_manager.spawn_handle(); - let params = StartCollatorParams { - para_id, - block_status: client.clone(), - announce_block, - client: client.clone(), - task_manager: &mut task_manager, - relay_chain_interface, - spawner, - parachain_consensus, - import_queue: import_queue_service, - collator_key: collator_key.expect("Command line arguments do not allow this. qed"), relay_chain_slot_duration, - recovery_handle: Box::new(overseer_handle), - sync_service, - }; - - start_collator(params).await?; - } else { - let params = StartFullNodeParams { - client: client.clone(), - announce_block, - task_manager: &mut task_manager, para_id, - relay_chain_interface, - relay_chain_slot_duration, - import_queue: import_queue_service, - recovery_handle: Box::new(overseer_handle), - sync_service, - }; - - start_full_node(params)?; + collator_key.expect("Command line arguments do not allow this. qed"), + overseer_handle, + announce_block, + )?; } start_network.start_network(); @@ -322,39 +327,30 @@ fn build_import_queue( config: &Configuration, telemetry: Option, task_manager: &TaskManager, -) -> Result, sc_service::Error> { +) -> Result, sc_service::Error> { let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - cumulus_client_consensus_aura::import_queue::< + Ok(cumulus_client_consensus_aura::equivocation_import_queue::fully_verifying_import_queue::< sp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, - _, - >(cumulus_client_consensus_aura::ImportQueueParams { - block_import, + >( client, - create_inherent_data_providers: move |_, _| async move { + block_import, + move |_, _| async move { let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - - Ok((slot, timestamp)) + Ok(timestamp) }, - registry: config.prometheus_registry(), - spawner: &task_manager.spawn_essential_handle(), + slot_duration, + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), telemetry, - }) - .map_err(Into::into) + )) } -#[allow(clippy::too_many_arguments)] -fn build_consensus( +fn start_consensus( client: Arc, block_import: ParachainBlockImport, prometheus_registry: Option<&Registry>, @@ -364,9 +360,19 @@ fn build_consensus( transaction_pool: Arc>, sync_oracle: Arc>, keystore: KeystorePtr, - force_authoring: bool, + relay_chain_slot_duration: Duration, para_id: ParaId, -) -> Result>, sc_service::Error> { + collator_key: CollatorPair, + overseer_handle: OverseerHandle, + announce_block: Arc>) + Send + Sync>, +) -> Result<(), sc_service::Error> { + use cumulus_client_consensus_aura::collators::basic::{ + self as basic_aura, Params as BasicAuraParams, + }; + + // NOTE: because we use Aura here explicitly, we can use `CollatorSybilResistance::Resistant` + // when starting the network. + let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( @@ -377,53 +383,43 @@ fn build_consensus( telemetry.clone(), ); - let params = BuildAuraConsensusParams { - proposer_factory, - create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let relay_chain_interface = relay_chain_interface.clone(); - async move { - let parachain_inherent = - cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( - relay_parent, - &relay_chain_interface, - &validation_data, - para_id, - ) - .await; - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - - let parachain_inherent = parachain_inherent.ok_or_else(|| { - Box::::from( - "Failed to create parachain inherent", - ) - })?; - Ok((slot, timestamp, parachain_inherent)) - } - }, + let proposer = Proposer::new(proposer_factory); + + let collator_service = CollatorService::new( + client.clone(), + Arc::new(task_manager.spawn_handle()), + announce_block, + client.clone(), + ); + + let params = BasicAuraParams { + create_inherent_data_providers: move |_, ()| async move { Ok(()) }, block_import, para_client: client, - backoff_authoring_blocks: Option::<()>::None, + relay_client: relay_chain_interface, sync_oracle, keystore, - force_authoring, + collator_key, + para_id, + overseer_handle, slot_duration, - // We got around 500ms for proposing - block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32), - // And a maximum of 750ms if slots are skipped - max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)), - telemetry, + relay_chain_slot_duration, + proposer, + collator_service, + // Very limited proposal time. + authoring_duration: Duration::from_millis(500), }; - Ok(AuraConsensus::build::(params)) + let fut = + basic_aura::run::( + params, + ); + task_manager.spawn_essential_handle().spawn("aura", None, fut); + + Ok(()) } -/// Start a parachain polkadex-parachain-node. +/// Start a parachain node. pub async fn start_parachain_node( parachain_config: Configuration, polkadot_config: Configuration, @@ -432,4 +428,4 @@ pub async fn start_parachain_node( hwbench: Option, ) -> sc_service::error::Result<(TaskManager, Arc)> { start_node_impl(parachain_config, polkadot_config, collator_options, para_id, hwbench).await -} +} \ No newline at end of file diff --git a/pallets/pdex-migration/src/lib.rs b/pallets/pdex-migration/src/lib.rs index b2ade5533..022ccd6fb 100644 --- a/pallets/pdex-migration/src/lib.rs +++ b/pallets/pdex-migration/src/lib.rs @@ -126,7 +126,6 @@ pub mod pallet { pub max_tokens: T::Balance, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { Self { @@ -137,7 +136,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { Operational::::put(self.operational); MintableTokens::::put(self.max_tokens.saturated_into::()); diff --git a/primitives/polkadex/src/lib.rs b/primitives/polkadex/src/lib.rs index 538dbfebe..67e31d5ad 100644 --- a/primitives/polkadex/src/lib.rs +++ b/primitives/polkadex/src/lib.rs @@ -78,6 +78,9 @@ pub type Index = u32; /// A hash of some data used by the chain. pub type Hash = sp_core::H256; +/// Index of a transaction in the chain. +pub type Nonce = u32; + /// A timestamp: milliseconds since the unix epoch. /// `u64` is enough to represent a duration of half a billion years, when the /// time scale is milliseconds. diff --git a/runtimes/polkadex-mainnet/src/lib.rs b/runtimes/polkadex-mainnet/src/lib.rs index a0f527d99..973ad3a88 100644 --- a/runtimes/polkadex-mainnet/src/lib.rs +++ b/runtimes/polkadex-mainnet/src/lib.rs @@ -23,7 +23,7 @@ #![deny(unused_crate_dependencies)] use constants::{currency::*, time::*}; -use frame_election_provider_support::{onchain, ElectionDataProvider, SequentialPhragmen}; +use frame_election_provider_support::{onchain, ElectionDataProvider, SequentialPhragmen, bounds::ElectionBoundsBuilder}; use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -32,7 +32,7 @@ use frame_support::{ traits::{ AsEnsureOriginWithArg, ConstU16, Currency, EitherOfDiverse, EnsureOrigin, EqualPrivilegeOnly, Everything, Get, Imbalance, InstanceFilter, KeyOwnerProofSystem, - LockIdentifier, OnUnbalanced, U128CurrencyToVote, + LockIdentifier, OnUnbalanced, }, weights::{ constants::{ @@ -40,7 +40,7 @@ use frame_support::{ }, ConstantMultiplier, IdentityFee, Weight, }, - PalletId, RuntimeDebug, + PalletId }; #[cfg(any(feature = "std", test))] pub use frame_system::Call as SystemCall; @@ -60,7 +60,7 @@ pub use pallet_staking::StakerStatus; pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment}; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use polkadex_primitives::AssetId; +use polkadex_primitives::{AssetId, Nonce}; pub use polkadex_primitives::{ AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, Moment, Signature, }; @@ -87,6 +87,7 @@ use sp_std::{prelude::*, vec}; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; +use frame_support::pallet_prelude::RuntimeDebug; /// Implementations of some helper traits passed into polkadex-mainnet modules as associated types. pub mod impls; @@ -197,13 +198,10 @@ impl frame_system::Config for Runtime { type BlockLength = RuntimeBlockLength; type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; type Hash = Hash; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = Indices; - type Header = generic::Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; @@ -216,6 +214,8 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = Nonce; + type Block = Block; } impl pallet_utility::Config for Runtime { @@ -385,6 +385,7 @@ impl pallet_babe::Config for Runtime { type DisabledValidators = Session; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; type KeyOwnerProof = >::Proof; type EquivocationReportSystem = @@ -417,7 +418,7 @@ impl pallet_balances::Config for Runtime { type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; @@ -537,8 +538,7 @@ impl onchain::Config for OnChainSeqPhragmen { type DataProvider = ::DataProvider; type WeightInfo = frame_election_provider_support::weights::SubstrateWeight; type MaxWinners = ::MaxWinners; - type VotersBound = MaxOnChainElectingVoters; - type TargetsBound = MaxOnChainElectableTargets; + type Bounds = ElectionBounds; } impl pallet_staking::Config for Runtime { @@ -548,7 +548,7 @@ impl pallet_staking::Config for Runtime { type CurrencyToVote = U128CurrencyToVote; type ElectionProvider = ElectionProviderMultiPhase; type GenesisElectionProvider = onchain::OnChainExecution; - type MaxNominations = MaxNominations; + type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; type HistoryDepth = HistoryDepth; type RewardRemainder = Treasury; type RuntimeEvent = RuntimeEvent; @@ -571,7 +571,7 @@ impl pallet_staking::Config for Runtime { // This a placeholder, to be introduced in the next PR as an instance of bags-list type TargetList = pallet_staking::UseValidatorsMap; type MaxUnlockingChunks = ConstU32<32>; - type OnStakerSlash = (); + type EventListeners = (); //TODO: Should we update this? type BenchmarkingConfig = StakingBenchmarkingConfig; type WeightInfo = pallet_staking::weights::SubstrateWeight; } @@ -621,7 +621,7 @@ frame_election_provider_support::generate_solution_type!( // ::LIMIT as u32; parameter_types! { - pub MaxNominations: u32 = ::LIMIT as u32; + pub const MaxNominations: u32 = ::LIMIT as u32; pub MaxElectingVoters: u32 = 40_000; pub MaxElectableTargets: u16 = 10_000; // OnChain values are lower. @@ -630,6 +630,8 @@ parameter_types! { // The maximum winners that can be elected by the Election pallet which is equivalent to the // maximum active validators the staking pallet can have. pub MaxActiveValidators: u32 = 1000; + pub ElectionBounds: frame_election_provider_support::bounds::ElectionBounds = + ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); } /// The numbers configured here could always be more than the the maximum limits of staking pallet @@ -707,9 +709,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type SignedDepositBase = SignedDepositBase; type SignedDepositByte = SignedDepositByte; type SignedDepositWeight = (); - type MaxElectingVoters = MaxElectingVoters; - type MaxElectableTargets = ConstU16<{ u16::MAX }>; type MaxWinners = MaxActiveValidators; + type ElectionBounds = ElectionBounds; type SlashHandler = (); // burn slashes type RewardHandler = (); @@ -1086,7 +1087,6 @@ impl pallet_im_online::Config for Runtime { type AuthorityId = ImOnlineId; type MaxKeys = MaxKeys; type MaxPeerInHeartbeats = MaxPeerInHeartbeats; - type MaxPeerDataEncodingSize = MaxPeerDataEncodingSize; type RuntimeEvent = RuntimeEvent; type ValidatorSet = Historical; type NextSessionRotation = Babe; @@ -1113,6 +1113,7 @@ impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; type KeyOwnerProof = >::Proof; type EquivocationReportSystem = @@ -1152,6 +1153,8 @@ impl pallet_assets::Config for Runtime { pub struct AssetU128; #[cfg(feature = "runtime-benchmarks")] use pallet_assets::BenchmarkHelper; +use sp_staking::currency_to_vote::U128CurrencyToVote; + #[cfg(feature = "runtime-benchmarks")] impl BenchmarkHelper> for AssetU128 { fn create_asset_id_parameter(id: u32) -> parity_scale_codec::Compact { From 5f0301c1063a0d00186376ab120dacf58b45d231 Mon Sep 17 00:00:00 2001 From: Gautham Date: Mon, 18 Sep 2023 13:31:56 +0300 Subject: [PATCH 04/51] Install pallets --- Cargo.lock | 139 +++++++++++++++++---------- Cargo.toml | 4 + runtimes/polkadex-mainnet/Cargo.toml | 9 ++ runtimes/polkadex-mainnet/src/lib.rs | 92 +++++++++++++++--- 4 files changed, 181 insertions(+), 63 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ae8e03268..f4dcacb07 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -679,7 +679,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -696,7 +696,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -859,7 +859,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -1436,7 +1436,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2192,7 +2192,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2511,7 +2511,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2551,7 +2551,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2568,7 +2568,7 @@ checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2616,7 +2616,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2638,7 +2638,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2882,7 +2882,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2923,7 +2923,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.36", + "syn 2.0.37", "termcolor", "toml 0.7.8", "walkdir", @@ -3135,7 +3135,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3146,7 +3146,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3257,7 +3257,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3546,7 +3546,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3673,7 +3673,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3685,7 +3685,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3695,7 +3695,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3863,7 +3863,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -5572,7 +5572,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -5586,7 +5586,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -5597,7 +5597,7 @@ checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -5608,7 +5608,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -6064,6 +6064,8 @@ dependencies = [ "log", "orderbook-primitives", "orml-vesting", + "pallet-asset-conversion", + "pallet-asset-conversion-tx-payment", "pallet-assets", "pallet-authority-discovery", "pallet-authorship", @@ -6465,6 +6467,39 @@ dependencies = [ "sha2 0.10.7", ] +[[package]] +name = "pallet-asset-conversion" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-asset-conversion-tx-payment" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-support", + "frame-system", + "pallet-asset-conversion", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-assets" version = "4.0.0-dev" @@ -7377,7 +7412,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -7991,7 +8026,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -8032,7 +8067,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -9514,7 +9549,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -9603,7 +9638,7 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -9649,7 +9684,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -9971,9 +10006,9 @@ dependencies = [ [[package]] name = "reed-solomon-novelpoly" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0b8e056bbbda75b717e53c87f349936ef234bb84a8f665360ca4b3552a79e9" +checksum = "58130877ca403ab42c864fbac74bb319a0746c07a634a92a5cfc7f54af272582" dependencies = [ "derive_more", "fs-err", @@ -9999,7 +10034,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -10687,7 +10722,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -11649,7 +11684,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -11958,7 +11993,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -12006,7 +12041,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -12399,7 +12434,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -12638,7 +12673,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -12657,7 +12692,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -12874,7 +12909,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -13066,7 +13101,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -13664,9 +13699,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.36" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e02e55d62894af2a08aca894c6577281f76769ba47c94d5756bec8ac6e7373" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -13920,7 +13955,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -14090,7 +14125,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -14246,7 +14281,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -14290,7 +14325,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -14708,7 +14743,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -14742,7 +14777,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -15806,7 +15841,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -15855,7 +15890,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 983d2a342..15ba20f72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -133,6 +133,10 @@ pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot #pallet-randomness-collective-flip = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } + +pallet-asset-conversion = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-asset-conversion-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } + orml-vesting = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } diff --git a/runtimes/polkadex-mainnet/Cargo.toml b/runtimes/polkadex-mainnet/Cargo.toml index b2574bb3b..9494d3997 100644 --- a/runtimes/polkadex-mainnet/Cargo.toml +++ b/runtimes/polkadex-mainnet/Cargo.toml @@ -50,6 +50,10 @@ pallet-election-provider-multi-phase = { default-features = false, workspace = t pallet-authority-discovery = { default-features = false, workspace = true } pallet-child-bounties = { default-features = false, workspace = true } +# Assets pallet +pallet-asset-conversion = { default-features = false, workspace = true } +pallet-asset-conversion-tx-payment = { default-features = false, workspace = true } + #frame frame-support = { default-features = false, workspace = true } frame-system = { default-features = false, workspace = true } @@ -188,6 +192,8 @@ std = [ "frame-try-runtime?/std", "thea-message-handler?/std", "orderbook-primitives/std", + "pallet-asset-conversion/std", + "pallet-asset-conversion-tx-payment/std" ] runtime-benchmarks = [ #theirs @@ -207,6 +213,7 @@ runtime-benchmarks = [ "thea/runtime-benchmarks", "thea-executor/runtime-benchmarks", "thea-message-handler/runtime-benchmarks", + "pallet-asset-conversion/runtime-benchmarks", ] try-runtime = [ @@ -252,4 +259,6 @@ try-runtime = [ "pallet-rewards/try-runtime", "liquidity/try-runtime", "thea-executor/try-runtime", + "pallet-asset-conversion/try-runtime", + "pallet-asset-conversion-tx-payment/try-runtime" ] diff --git a/runtimes/polkadex-mainnet/src/lib.rs b/runtimes/polkadex-mainnet/src/lib.rs index 973ad3a88..85bff4baf 100644 --- a/runtimes/polkadex-mainnet/src/lib.rs +++ b/runtimes/polkadex-mainnet/src/lib.rs @@ -23,16 +23,18 @@ #![deny(unused_crate_dependencies)] use constants::{currency::*, time::*}; -use frame_election_provider_support::{onchain, ElectionDataProvider, SequentialPhragmen, bounds::ElectionBoundsBuilder}; +use frame_election_provider_support::{ + bounds::ElectionBoundsBuilder, onchain, ElectionDataProvider, SequentialPhragmen, +}; use frame_support::{ construct_runtime, dispatch::DispatchClass, - pallet_prelude::ConstU32, + pallet_prelude::{ConstU32, RuntimeDebug}, parameter_types, traits::{ - AsEnsureOriginWithArg, ConstU16, Currency, EitherOfDiverse, EnsureOrigin, - EqualPrivilegeOnly, Everything, Get, Imbalance, InstanceFilter, KeyOwnerProofSystem, - LockIdentifier, OnUnbalanced, + AsEnsureOriginWithArg, Currency, EitherOfDiverse, EnsureOrigin, EqualPrivilegeOnly, + Everything, Get, Imbalance, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, + OnUnbalanced, }, weights::{ constants::{ @@ -40,7 +42,7 @@ use frame_support::{ }, ConstantMultiplier, IdentityFee, Weight, }, - PalletId + PalletId, }; #[cfg(any(feature = "std", test))] pub use frame_system::Call as SystemCall; @@ -48,6 +50,7 @@ use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, EnsureSigned, RawOrigin, }; +use pallet_asset_conversion::{NativeOrAssetId, NativeOrAssetIdConverter}; #[cfg(any(feature = "std", test))] pub use pallet_balances::Call as BalancesCall; use pallet_grandpa::{ @@ -60,10 +63,10 @@ pub use pallet_staking::StakerStatus; pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment}; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use polkadex_primitives::{AssetId, Nonce}; pub use polkadex_primitives::{ AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, Moment, Signature, }; +use polkadex_primitives::{AssetId, Nonce}; use rust_decimal::Decimal; use sp_api::impl_runtime_apis; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; @@ -87,7 +90,6 @@ use sp_std::{prelude::*, vec}; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; -use frame_support::pallet_prelude::RuntimeDebug; /// Implementations of some helper traits passed into polkadex-mainnet modules as associated types. pub mod impls; @@ -1056,7 +1058,7 @@ where )), frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(tip), + pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::::from(tip, None), ); let raw_payload = SignedPayload::new(call, extra) .map_err(|e| { @@ -1361,6 +1363,50 @@ impl thea_message_handler::Config for Runtime { type Executor = TheaExecutor; type WeightInfo = thea_message_handler::weights::WeightInfo; } +use frame_support::ord_parameter_types; +ord_parameter_types! { + pub const AssetConversionOrigin: AccountId = AccountIdConversion::::into_account_truncating(&AssetConversionPalletId::get()); +} + +impl pallet_asset_conversion_tx_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Fungibles = Assets; + type OnChargeAssetTransaction = + pallet_asset_conversion_tx_payment::AssetConversionAdapter; +} + +parameter_types! { + pub const AssetConversionPalletId: PalletId = PalletId(*b"py/ascon"); + pub AllowMultiAssetPools: bool = true; + pub const PoolSetupFee: Balance = 1 * DOLLARS; // should be more or equal to the existential deposit + pub const MintMinLiquidity: Balance = 100; // 100 is good enough when the main currency has 10-12 decimals. + pub const LiquidityWithdrawalFee: Permill = Permill::from_percent(0); // should be non-zero if AllowMultiAssetPools is true, otherwise can be zero. +} + +impl pallet_asset_conversion::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type AssetBalance = ::Balance; + type HigherPrecisionBalance = u128; + type Assets = Assets; + type Balance = u128; + type PoolAssets = Assets; + type AssetId = ::AssetId; + type MultiAssetId = NativeOrAssetId; + type PoolAssetId = ::AssetId; + type PalletId = AssetConversionPalletId; + type LPFee = ConstU32<3>; // means 0.3% + type PoolSetupFee = PoolSetupFee; + type PoolSetupFeeReceiver = AssetConversionOrigin; + type LiquidityWithdrawalFee = LiquidityWithdrawalFee; + type WeightInfo = pallet_asset_conversion::weights::SubstrateWeight; + type AllowMultiAssetPools = AllowMultiAssetPools; + type MaxSwapPathLength = ConstU32<4>; + type MintMinLiquidity = MintMinLiquidity; + type MultiAssetIdConverter = NativeOrAssetIdConverter; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); +} #[cfg(feature = "runtime-benchmarks")] construct_runtime!( @@ -1410,7 +1456,9 @@ construct_runtime!( Rewards: pallet_rewards = 40, Liquidity: liquidity = 41, TheaExecutor: thea_executor::pallet = 44, - TheaMH: thea_message_handler::pallet = 45 + TheaMH: thea_message_handler::pallet = 45, + AssetConversion: pallet_asset_conversion = 46, + AssetConversionTxPayment: pallet_asset_conversion_tx_payment = 47, } ); @@ -1462,6 +1510,8 @@ construct_runtime!( Rewards: pallet_rewards = 40, Liquidity: liquidity = 41, TheaExecutor: thea_executor::pallet = 44, + AssetConversion: pallet_asset_conversion = 46, + AssetConversionTxPayment: pallet_asset_conversion_tx_payment = 47, } ); /// Digest item type. @@ -1489,7 +1539,7 @@ pub type SignedExtra = ( frame_system::CheckMortality, frame_system::CheckNonce, frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, + pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, ); /// Unchecked extrinsic type as expected by this polkadex-mainnet. pub type UncheckedExtrinsic = @@ -1524,6 +1574,26 @@ impl_runtime_apis! { } } + impl pallet_asset_conversion::AssetConversionApi< + Block, + Balance, + u128, + NativeOrAssetId + > for Runtime + { + fn quote_price_exact_tokens_for_tokens(asset1: NativeOrAssetId, asset2: NativeOrAssetId, amount: u128, include_fee: bool) -> Option { + AssetConversion::quote_price_exact_tokens_for_tokens(asset1, asset2, amount, include_fee) + } + + fn quote_price_tokens_for_exact_tokens(asset1: NativeOrAssetId, asset2: NativeOrAssetId, amount: u128, include_fee: bool) -> Option { + AssetConversion::quote_price_tokens_for_exact_tokens(asset1, asset2, amount, include_fee) + } + + fn get_reserves(asset1: NativeOrAssetId, asset2: NativeOrAssetId) -> Option<(Balance, Balance)> { + AssetConversion::get_reserves(&asset1, &asset2).ok() + } + } + impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) From 788df203f7b24308672f7804d778d6584cdf5b45 Mon Sep 17 00:00:00 2001 From: zktony Date: Wed, 20 Sep 2023 13:10:38 +0530 Subject: [PATCH 05/51] Fixed tests --- .../polkadex-parachain-node/src/chain_spec.rs | 16 +++++---- nodes/polkadex-parachain-node/src/command.rs | 26 +++++++------- nodes/polkadex-parachain-node/src/service.rs | 36 +++++++++---------- pallets/liquidity/src/mock.rs | 23 ++++++------ pallets/ocex/src/lib.rs | 2 +- pallets/ocex/src/mock.rs | 22 ++++++------ pallets/ocex/src/rpc.rs | 2 +- pallets/ocex/src/tests.rs | 3 +- pallets/ocex/src/validator.rs | 2 +- pallets/pdex-migration/src/lib.rs | 1 - pallets/pdex-migration/src/mock.rs | 24 ++++++------- pallets/rewards/src/mock.rs | 25 ++++++------- pallets/thea-council/Cargo.toml | 1 + pallets/thea-council/src/mock.rs | 10 +++--- pallets/thea-executor/src/lib.rs | 7 ++-- pallets/thea-executor/src/mock.rs | 22 ++++++------ pallets/thea-message-handler/src/mock.rs | 22 ++++++------ pallets/thea/src/mock.rs | 22 ++++++------ pallets/thea/src/validation.rs | 2 +- pallets/xcm-helper/src/lib.rs | 5 ++- pallets/xcm-helper/src/mock.rs | 10 +++--- runtimes/polkadex-mainnet/src/lib.rs | 11 ++---- runtimes/polkadex-parachain/src/lib.rs | 35 ++++++++---------- 23 files changed, 153 insertions(+), 176 deletions(-) diff --git a/nodes/polkadex-parachain-node/src/chain_spec.rs b/nodes/polkadex-parachain-node/src/chain_spec.rs index ee27357e8..8f688b287 100644 --- a/nodes/polkadex-parachain-node/src/chain_spec.rs +++ b/nodes/polkadex-parachain-node/src/chain_spec.rs @@ -1,6 +1,8 @@ use cumulus_primitives_core::ParaId; use hex_literal::hex; -use parachain_polkadex_runtime::{AccountId, AuraId, Signature, EXISTENTIAL_DEPOSIT}; +use parachain_polkadex_runtime::{ + AccountId, AuraId, RuntimeGenesisConfig, Signature, EXISTENTIAL_DEPOSIT, +}; use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use sc_service::ChainType; use serde::{Deserialize, Serialize}; @@ -8,8 +10,7 @@ use sp_core::{sr25519, Pair, Public}; use sp_runtime::traits::{IdentifyAccount, Verify}; /// Specialized `ChainSpec` for the normal parachain runtime. -pub type ChainSpec = - sc_service::GenericChainSpec; +pub type ChainSpec = sc_service::GenericChainSpec; /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; @@ -186,8 +187,8 @@ fn create_genesis_config( endowed_accounts: Vec, id: ParaId, root_key: AccountId, -) -> parachain_polkadex_runtime::GenesisConfig { - parachain_polkadex_runtime::GenesisConfig { +) -> RuntimeGenesisConfig { + RuntimeGenesisConfig { system: parachain_polkadex_runtime::SystemConfig { code: parachain_polkadex_runtime::WASM_BINARY .expect("WASM binary was not build, please build it!") @@ -201,7 +202,10 @@ fn create_genesis_config( .map(|k| (k, EXISTENTIAL_DEPOSIT * 16)) .collect(), }, - parachain_info: parachain_polkadex_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, + parachain_info: parachain_polkadex_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, collator_selection: parachain_polkadex_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: EXISTENTIAL_DEPOSIT * 16, diff --git a/nodes/polkadex-parachain-node/src/command.rs b/nodes/polkadex-parachain-node/src/command.rs index af739b8e4..00bfa3279 100644 --- a/nodes/polkadex-parachain-node/src/command.rs +++ b/nodes/polkadex-parachain-node/src/command.rs @@ -20,15 +20,16 @@ use crate::{ fn load_spec(id: &str) -> std::result::Result, String> { Ok(match id { "dev" => Box::new(chain_spec::development_config()), - "template-rococo" => Box::new(chain_spec::local_testnet_config()), + "xcm-helper-rococo" => Box::new(chain_spec::local_testnet_config()), "" | "local" => Box::new(chain_spec::local_testnet_config()), + "mainnet" => Box::new(chain_spec::mainnet_config()), path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), }) } impl SubstrateCli for Cli { fn impl_name() -> String { - "Parachain Collator Template".into() + "Polkadex Collator".into() } fn impl_version() -> String { @@ -37,7 +38,7 @@ impl SubstrateCli for Cli { fn description() -> String { format!( - "Parachain Collator Template\n\nThe command-line arguments provided first will be \ + "Polkadex Parachain\n\nThe command-line arguments provided first will be \ passed to the parachain node, while the arguments provided after -- will be passed \ to the relay chain node.\n\n\ {} -- ", @@ -50,7 +51,7 @@ impl SubstrateCli for Cli { } fn support_url() -> String { - "https://github.com/paritytech/cumulus/issues/new".into() + "https://github.com/Polkadex-Substrate/parachain/issues/new".into() } fn copyright_start_year() -> i32 { @@ -64,7 +65,7 @@ impl SubstrateCli for Cli { impl SubstrateCli for RelayChainCli { fn impl_name() -> String { - "Parachain Collator Template".into() + "Polkadex Parachain Collator".into() } fn impl_version() -> String { @@ -73,7 +74,7 @@ impl SubstrateCli for RelayChainCli { fn description() -> String { format!( - "Parachain Collator Template\n\nThe command-line arguments provided first will be \ + "Polkadex Collator Template\n\nThe command-line arguments provided first will be \ passed to the parachain node, while the arguments provided after -- will be passed \ to the relay chain node.\n\n\ {} -- ", @@ -86,7 +87,7 @@ impl SubstrateCli for RelayChainCli { } fn support_url() -> String { - "https://github.com/paritytech/cumulus/issues/new".into() + "https://github.com/Polkadex-Substrate/parachain/issues/new".into() } fn copyright_start_year() -> i32 { @@ -195,12 +196,11 @@ pub fn run() -> Result<()> { }), #[cfg(not(feature = "runtime-benchmarks"))] BenchmarkCmd::Storage(_) => - return Err(sc_cli::Error::Input( + Err(sc_cli::Error::Input( "Compile with --features=runtime-benchmarks \ to enable storage benchmarks." .into(), - ) - .into()), + )), #[cfg(feature = "runtime-benchmarks")] BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| { let partials = new_partial(&config)?; @@ -325,8 +325,8 @@ impl CliConfiguration for RelayChainCli { _logger_hook: F, _config: &sc_service::Configuration, ) -> Result<()> - where - F: FnOnce(&mut sc_cli::LoggerBuilder, &sc_service::Configuration), + where + F: FnOnce(&mut sc_cli::LoggerBuilder, &sc_service::Configuration), { unreachable!("PolkadotCli is never initialized; qed"); } @@ -391,4 +391,4 @@ impl CliConfiguration for RelayChainCli { fn node_name(&self) -> Result { self.base.base.node_name() } -} \ No newline at end of file +} diff --git a/nodes/polkadex-parachain-node/src/service.rs b/nodes/polkadex-parachain-node/src/service.rs index d48e40e26..43ec0845e 100644 --- a/nodes/polkadex-parachain-node/src/service.rs +++ b/nodes/polkadex-parachain-node/src/service.rs @@ -5,7 +5,7 @@ use std::{sync::Arc, time::Duration}; use cumulus_client_cli::CollatorOptions; // Local Runtime Types -use parachain_polkadex_runtime::{Hash, opaque::Block, RuntimeApi}; +use parachain_polkadex_runtime::{opaque::Block, Hash, RuntimeApi}; // Cumulus Imports use cumulus_client_collator::service::CollatorService; @@ -33,6 +33,15 @@ use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_keystore::KeystorePtr; use substrate_prometheus_endpoint::Registry; +type ParachainPartialComponents = PartialComponents< + ParachainClient, + ParachainBackend, + (), + sc_consensus::DefaultImportQueue, + sc_transaction_pool::FullPool, + (ParachainBlockImport, Option, Option), +>; + /// Native executor type. pub struct ParachainNativeExecutor; @@ -62,17 +71,7 @@ type ParachainBlockImport = TParachainBlockImport, P /// be able to perform chain operations. pub fn new_partial( config: &Configuration, -) -> Result< - PartialComponents< - ParachainClient, - ParachainBackend, - (), - sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool, - (ParachainBlockImport, Option, Option), - >, - sc_service::Error, -> { +) -> Result { let telemetry = config .telemetry_endpoints .clone() @@ -172,8 +171,8 @@ async fn start_node_impl( collator_options.clone(), hwbench.clone(), ) - .await - .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; + .await + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; let validator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); @@ -192,7 +191,7 @@ async fn start_node_impl( import_queue: params.import_queue, sybil_resistance_level: CollatorSybilResistance::Resistant, // because of Aura }) - .await?; + .await?; if parachain_config.offchain_worker.enabled { use futures::FutureExt; @@ -212,8 +211,8 @@ async fn start_node_impl( enable_http_requests: false, custom_extensions: move |_| vec![], }) - .run(client.clone(), task_manager.spawn_handle()) - .boxed(), + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); } @@ -350,6 +349,7 @@ fn build_import_queue( )) } +#[allow(clippy::too_many_arguments)] fn start_consensus( client: Arc, block_import: ParachainBlockImport, @@ -428,4 +428,4 @@ pub async fn start_parachain_node( hwbench: Option, ) -> sc_service::error::Result<(TaskManager, Arc)> { start_node_impl(parachain_config, polkadot_config, collator_options, para_id, hwbench).await -} \ No newline at end of file +} diff --git a/pallets/liquidity/src/mock.rs b/pallets/liquidity/src/mock.rs index 1310c3850..46d5e65bf 100644 --- a/pallets/liquidity/src/mock.rs +++ b/pallets/liquidity/src/mock.rs @@ -29,8 +29,8 @@ use frame_system::{EnsureRoot, EnsureSigned}; use polkadex_primitives::{AccountId, AssetId, Moment, Signature}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use sp_std::cell::RefCell; // use pallet_ocex_lmp; @@ -44,12 +44,12 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Assets: pallet_assets::{Pallet, Call, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - OCEX: pallet_ocex_lmp::{Pallet, Call, Storage, Event}, - Liquidity: liquidity::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Timestamp: pallet_timestamp, + OCEX: pallet_ocex_lmp, + Liquidity: liquidity, } ); @@ -63,13 +63,10 @@ impl frame_system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU64<250>; type DbWeight = (); @@ -82,6 +79,8 @@ impl frame_system::Config for Test { type SS58Prefix = (); type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; + type Block = Block; } impl pallet_balances::Config for Test { @@ -92,7 +91,7 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU128<1>; type AccountStore = System; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxLocks = (); type MaxReserves = (); @@ -214,7 +213,7 @@ impl Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); ext diff --git a/pallets/ocex/src/lib.rs b/pallets/ocex/src/lib.rs index 5e8cecdb3..a3ee4189c 100644 --- a/pallets/ocex/src/lib.rs +++ b/pallets/ocex/src/lib.rs @@ -50,6 +50,7 @@ use sp_runtime::{ }; use sp_std::{ops::Div, prelude::*}; // Re-export pallet items so that they can be accessed from the crate namespace. +use frame_system::pallet_prelude::BlockNumberFor; use orderbook_primitives::{ types::{AccountAsset, TradingPair}, SnapshotSummary, ValidatorSet, GENESIS_AUTHORITY_SET_ID, @@ -59,7 +60,6 @@ use polkadex_primitives::ocex::TradingPairConfig; #[cfg(feature = "runtime-benchmarks")] use sp_runtime::traits::One; use sp_std::vec::Vec; -use frame_system::pallet_prelude::BlockNumberFor; #[cfg(test)] mod mock; diff --git a/pallets/ocex/src/mock.rs b/pallets/ocex/src/mock.rs index 10428c7fb..81573c2dd 100644 --- a/pallets/ocex/src/mock.rs +++ b/pallets/ocex/src/mock.rs @@ -20,7 +20,6 @@ use crate::*; use frame_support::{ - dispatch::Weight, parameter_types, traits::{AsEnsureOriginWithArg, ConstU128, ConstU64, OnTimestampSet}, PalletId, @@ -32,8 +31,8 @@ use sp_std::cell::RefCell; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required. use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; // Reexport crate as its pallet name for construct_runtime. @@ -47,11 +46,11 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Assets: pallet_assets::{Pallet, Call, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - OCEX: crate::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Timestamp: pallet_timestamp, + OCEX: crate, } ); @@ -65,13 +64,10 @@ impl frame_system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = sp_runtime::AccountId32; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU64<250>; type DbWeight = (); @@ -84,6 +80,8 @@ impl frame_system::Config for Test { type SS58Prefix = (); type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; + type Block = Block; } impl pallet_balances::Config for Test { @@ -94,7 +92,7 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU128<1>; type AccountStore = System; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxLocks = (); type MaxReserves = (); @@ -167,7 +165,7 @@ impl pallet_assets::Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); ext diff --git a/pallets/ocex/src/rpc.rs b/pallets/ocex/src/rpc.rs index 0db642186..864855b67 100644 --- a/pallets/ocex/src/rpc.rs +++ b/pallets/ocex/src/rpc.rs @@ -16,13 +16,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use frame_system::pallet_prelude::BlockNumberFor; use crate::{ pallet::{Accounts, AllowlistedToken, IngressMessages}, storage::OffchainState, validator::WORKER_STATUS, Config, Pallet, }; +use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode}; use polkadex_primitives::{AccountId, AssetId}; use rust_decimal::Decimal; diff --git a/pallets/ocex/src/tests.rs b/pallets/ocex/src/tests.rs index ce6adfd4e..78f3be3bc 100644 --- a/pallets/ocex/src/tests.rs +++ b/pallets/ocex/src/tests.rs @@ -19,7 +19,7 @@ //! Tests for pallet-ocex. use crate::{storage::store_trie_root, *}; -use frame_support::{assert_noop, assert_ok, bounded_vec}; +use frame_support::{assert_noop, assert_ok}; use polkadex_primitives::{assets::AssetId, withdrawal::Withdrawal, Signature, UNIT_BALANCE}; use rust_decimal::prelude::{FromPrimitive, ToPrimitive}; use sp_std::collections::btree_map::BTreeMap; @@ -27,6 +27,7 @@ use std::str::FromStr; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required. use crate::mock::*; +use frame_support::testing_prelude::bounded_vec; use frame_system::EventRecord; use parity_scale_codec::Decode; use polkadex_primitives::{ingress::IngressMessages, AccountId, AssetsLimit}; diff --git a/pallets/ocex/src/validator.rs b/pallets/ocex/src/validator.rs index f4bbebcc1..791339a08 100644 --- a/pallets/ocex/src/validator.rs +++ b/pallets/ocex/src/validator.rs @@ -16,7 +16,6 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use frame_system::pallet_prelude::BlockNumberFor; use crate::{ aggregator::AggregatorClient, pallet::ValidatorSetId, @@ -25,6 +24,7 @@ use crate::{ storage::{store_trie_root, OffchainState}, Config, Pallet, SnapshotNonce, }; +use frame_system::pallet_prelude::BlockNumberFor; use orderbook_primitives::{ types::{ApprovedSnapshot, Trade, UserActionBatch, UserActions, WithdrawalRequest}, SnapshotSummary, diff --git a/pallets/pdex-migration/src/lib.rs b/pallets/pdex-migration/src/lib.rs index 022ccd6fb..7dba54fbe 100644 --- a/pallets/pdex-migration/src/lib.rs +++ b/pallets/pdex-migration/src/lib.rs @@ -45,7 +45,6 @@ pub mod pallet { }; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; - use frame_support::traits::GenesisBuild; use scale_info::TypeInfo; use sp_runtime::{ traits::{BlockNumberProvider, Saturating, Zero}, diff --git a/pallets/pdex-migration/src/mock.rs b/pallets/pdex-migration/src/mock.rs index b427c3f26..4aa173163 100644 --- a/pallets/pdex-migration/src/mock.rs +++ b/pallets/pdex-migration/src/mock.rs @@ -21,14 +21,11 @@ use frame_system as system; use sp_core::H256; // use sp_runtime::testing::H256; // use crate::benchmarking::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use crate::pallet as pdex_migration; - use frame_support::traits::GenesisBuild; +use sp_runtime::BuildStorage; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -40,10 +37,10 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - PDEXMigration: pdex_migration::{Pallet, Call, Config, Storage, Event}, + System: frame_system, + Sudo: pallet_sudo, + Balances: pallet_balances, + PDEXMigration: pdex_migration, } ); parameter_types! { @@ -56,13 +53,10 @@ impl system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -75,6 +69,8 @@ impl system::Config for Test { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; + type Block = Block; } pub const PDEX: Balance = 1000_000_000_000; @@ -91,7 +87,7 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; @@ -117,7 +113,7 @@ impl pallet_sudo::Config for Test { // Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { let alice = 1u64; - let mut t = system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); pallet_balances::GenesisConfig::::default() .assimilate_storage(&mut t) .unwrap(); diff --git a/pallets/rewards/src/mock.rs b/pallets/rewards/src/mock.rs index 768ee3fd9..9919c762f 100644 --- a/pallets/rewards/src/mock.rs +++ b/pallets/rewards/src/mock.rs @@ -24,14 +24,12 @@ use frame_support::{ use frame_system as system; use polkadex_primitives::{AccountId, Moment, Signature}; use sp_core::H256; -use sp_runtime::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use sp_std::convert::{TryFrom, TryInto}; use frame_support::{traits::AsEnsureOriginWithArg, PalletId}; use frame_system::{EnsureRoot, EnsureSigned}; +use sp_runtime::BuildStorage; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -44,11 +42,11 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - Assets: pallet_assets::{Pallet, Call, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Rewards: rewards::{Pallet, Call, Storage, Event} + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Timestamp: pallet_timestamp, + Rewards: rewards } ); @@ -63,13 +61,10 @@ impl system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -82,6 +77,8 @@ impl system::Config for Test { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; + type Block = Block; } pub const PDEX: Balance = 1_000_000_000_000; @@ -100,7 +97,7 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; @@ -171,7 +168,7 @@ impl pallet_timestamp::Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); ext diff --git a/pallets/thea-council/Cargo.toml b/pallets/thea-council/Cargo.toml index 82500837d..6d5cc8878 100644 --- a/pallets/thea-council/Cargo.toml +++ b/pallets/thea-council/Cargo.toml @@ -54,6 +54,7 @@ std = [ "pallet-balances/std", "pallet-assets/std", "thea/std", + "parachain-info/std" ] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "xcm-builder/runtime-benchmarks"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/thea-council/src/mock.rs b/pallets/thea-council/src/mock.rs index ae2061318..55085ceed 100644 --- a/pallets/thea-council/src/mock.rs +++ b/pallets/thea-council/src/mock.rs @@ -24,6 +24,7 @@ use sp_core::{ConstU32, H256}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use thea::ecdsa::{AuthorityId, AuthoritySignature}; use xcm::lts::{ @@ -75,13 +76,10 @@ impl system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU64<250>; type Version = (); @@ -93,6 +91,8 @@ impl system::Config for Test { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; + type Block = Block; } impl thea_council::Config for Test { @@ -123,10 +123,10 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; type WeightInfo = (); type RuntimeEvent = RuntimeEvent; - type HoldIdentifier = (); type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; + type RuntimeHoldReason = (); } parameter_types! { @@ -219,5 +219,5 @@ impl orml_xtokens::Config for Test { // Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { - system::GenesisConfig::default().build_storage::().unwrap().into() + frame_system::GenesisConfig::::default().build_storage().unwrap().into() } diff --git a/pallets/thea-executor/src/lib.rs b/pallets/thea-executor/src/lib.rs index 3a921bef5..27bb312b8 100644 --- a/pallets/thea-executor/src/lib.rs +++ b/pallets/thea-executor/src/lib.rs @@ -48,11 +48,11 @@ pub trait WeightInfo { pub mod pallet { use super::*; use frame_support::{ + __private::log, pallet_prelude::*, sp_runtime::SaturatedConversion, traits::{fungible::Mutate, fungibles::Inspect, tokens::Preservation}, }; - use frame_support::__private::log; use frame_system::pallet_prelude::*; use polkadex_primitives::Resolver; use sp_runtime::{traits::AccountIdConversion, Saturating}; @@ -204,9 +204,8 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_initialize(block_no: BlockNumberFor) -> Weight { - let pending_withdrawals = >::iter_prefix( - block_no.saturating_sub(1u8.into()), - ); + let pending_withdrawals = + >::iter_prefix(block_no.saturating_sub(1u8.into())); for (network_id, withdrawal) in pending_withdrawals { // This is fine as this trait is not supposed to fail if T::Executor::execute_withdrawals(network_id, withdrawal.encode()).is_err() { diff --git a/pallets/thea-executor/src/mock.rs b/pallets/thea-executor/src/mock.rs index 9fdcd7393..549613073 100644 --- a/pallets/thea-executor/src/mock.rs +++ b/pallets/thea-executor/src/mock.rs @@ -22,11 +22,10 @@ use frame_system as system; use frame_system::{EnsureRoot, EnsureSigned}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use thea::ecdsa::{AuthorityId, AuthoritySignature}; - type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; @@ -38,11 +37,11 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - Assets: pallet_assets::{Pallet, Call, Storage, Event}, - Thea: thea::{Pallet, Call, Storage, Event}, - TheaExecutor: thea_executor::{Pallet, Call, Storage, Event} + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Thea: thea, + TheaExecutor: thea_executor } ); @@ -57,13 +56,10 @@ impl system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -76,6 +72,8 @@ impl system::Config for Test { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; + type Block = Block; } parameter_types! { @@ -92,7 +90,7 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; @@ -178,6 +176,6 @@ where // Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { - let t = system::GenesisConfig::default().build_storage::().unwrap(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); t.into() } diff --git a/pallets/thea-message-handler/src/mock.rs b/pallets/thea-message-handler/src/mock.rs index 63186378e..d37446e0f 100644 --- a/pallets/thea-message-handler/src/mock.rs +++ b/pallets/thea-message-handler/src/mock.rs @@ -23,6 +23,7 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; @@ -36,12 +37,12 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - Assets: pallet_assets::{Pallet, Call, Storage, Event}, - Thea: thea::{Pallet, Call, Storage, Event}, - TheaExecutor: thea_executor::{Pallet, Call, Storage, Event}, - TheaHandler: crate::{Pallet, Call, Storage, Event} + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Thea: thea, + TheaExecutor: thea_executor, + TheaHandler: crate } ); @@ -56,13 +57,10 @@ impl system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -75,6 +73,8 @@ impl system::Config for Test { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; + type Block = Block; } parameter_types! { @@ -91,12 +91,12 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); type FreezeIdentifier = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type MaxHolds = (); type MaxFreezes = (); + type RuntimeHoldReason = (); } parameter_types! { @@ -186,6 +186,6 @@ where // Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { - let t = system::GenesisConfig::default().build_storage::().unwrap(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); t.into() } diff --git a/pallets/thea/src/mock.rs b/pallets/thea/src/mock.rs index 2967bb4f5..f15ed0cec 100644 --- a/pallets/thea/src/mock.rs +++ b/pallets/thea/src/mock.rs @@ -22,10 +22,9 @@ use frame_system as system; use frame_system::{EnsureRoot, EnsureSigned}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; - type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; @@ -37,11 +36,11 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - Assets: pallet_assets::{Pallet, Call, Storage, Event}, - Thea: crate::{Pallet, Call, Storage, Event}, - TheaExecutor: thea_executor::{Pallet, Call, Storage, Event} + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Thea: crate, + TheaExecutor: thea_executor } ); @@ -56,13 +55,10 @@ impl system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -75,6 +71,8 @@ impl system::Config for Test { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; + type Block = Block; } parameter_types! { @@ -91,12 +89,12 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); type FreezeIdentifier = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type MaxHolds = (); type MaxFreezes = (); + type RuntimeHoldReason = (); } parameter_types! { @@ -177,6 +175,6 @@ where // Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { - let t = system::GenesisConfig::default().build_storage::().unwrap(); + let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); t.into() } diff --git a/pallets/thea/src/validation.rs b/pallets/thea/src/validation.rs index 06fd871fc..b6de11901 100644 --- a/pallets/thea/src/validation.rs +++ b/pallets/thea/src/validation.rs @@ -16,13 +16,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use frame_system::pallet_prelude::BlockNumberFor; use crate::{ aggregator::AggregatorClient, pallet::{ActiveNetworks, IncomingNonce}, resolver::Resolver, Config, Pallet, }; +use frame_system::pallet_prelude::BlockNumberFor; use serde::{Deserialize, Serialize}; use sp_std::vec::Vec; use thea_primitives::types::Destination; diff --git a/pallets/xcm-helper/src/lib.rs b/pallets/xcm-helper/src/lib.rs index 8b013ea89..2d7a26cbf 100644 --- a/pallets/xcm-helper/src/lib.rs +++ b/pallets/xcm-helper/src/lib.rs @@ -127,8 +127,8 @@ pub mod pallet { tokens::{Fortitude, Preservation}, }, PalletId, + __private::log, }; - use frame_support::__private::log; use frame_system::pallet_prelude::*; use polkadex_primitives::Resolver; @@ -484,8 +484,7 @@ pub mod pallet { _context: Option<&XcmContext>, ) -> sp_std::result::Result { let MultiAsset { id: _, fun } = what; - let who = - T::AccountIdConvert::convert_location(who).ok_or(XcmError::FailedToDecode)?; + let who = T::AccountIdConvert::convert_location(who).ok_or(XcmError::FailedToDecode)?; let amount: u128 = Self::get_amount(fun).ok_or(XcmError::Trap(101))?; let asset_id = Self::generate_asset_id_for_parachain(what.id); let pallet_account: T::AccountId = diff --git a/pallets/xcm-helper/src/mock.rs b/pallets/xcm-helper/src/mock.rs index d3972a418..1f3f719b0 100644 --- a/pallets/xcm-helper/src/mock.rs +++ b/pallets/xcm-helper/src/mock.rs @@ -24,6 +24,7 @@ use sp_core::{ConstU32, H256}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use thea::ecdsa::{AuthorityId, AuthoritySignature}; @@ -52,13 +53,10 @@ impl system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = ConstU64<250>; type DbWeight = (); @@ -71,6 +69,8 @@ impl system::Config for Test { type SS58Prefix = ConstU16<42>; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u32; + type Block = Block; } use frame_support::{traits::AsEnsureOriginWithArg, PalletId}; @@ -94,10 +94,10 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; type WeightInfo = (); type RuntimeEvent = RuntimeEvent; - type HoldIdentifier = (); type FreezeIdentifier = (); type MaxHolds = (); type MaxFreezes = (); + type RuntimeHoldReason = (); } parameter_types! { @@ -206,5 +206,5 @@ impl orml_xtokens::Config for Test { // Build genesis storage according to the mock polkadex-mainnet. pub fn new_test_ext() -> sp_io::TestExternalities { - system::GenesisConfig::default().build_storage::().unwrap().into() + frame_system::GenesisConfig::::default().build_storage().unwrap().into() } diff --git a/runtimes/polkadex-mainnet/src/lib.rs b/runtimes/polkadex-mainnet/src/lib.rs index 85bff4baf..3aa3349e9 100644 --- a/runtimes/polkadex-mainnet/src/lib.rs +++ b/runtimes/polkadex-mainnet/src/lib.rs @@ -1410,10 +1410,7 @@ impl pallet_asset_conversion::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = polkadex_primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub struct Runtime { System: frame_system = 0, Utility: pallet_utility = 1, @@ -1464,11 +1461,7 @@ construct_runtime!( #[cfg(not(feature = "runtime-benchmarks"))] construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = polkadex_primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { + pub struct Runtime { System: frame_system = 0, Utility: pallet_utility = 1, Babe: pallet_babe = 2, diff --git a/runtimes/polkadex-parachain/src/lib.rs b/runtimes/polkadex-parachain/src/lib.rs index 353209e5f..11cc44751 100644 --- a/runtimes/polkadex-parachain/src/lib.rs +++ b/runtimes/polkadex-parachain/src/lib.rs @@ -12,22 +12,8 @@ pub mod xcm_config; use crate::constants::currency::{CENTS, DOLLARS}; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; -use smallvec::smallvec; -use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, ConstU32, ConstU64, Get, OpaqueMetadata}; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify}, - transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, MultiSignature, -}; -use sp_std::prelude::*; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -use sp_runtime::codec; use frame_support::{ - construct_runtime, + construct_runtime, dispatch::DispatchClass, parameter_types, traits::Everything, @@ -42,8 +28,21 @@ use frame_system::{ EnsureRoot, EnsureSigned, }; use polkadex_primitives::POLKADEX_NATIVE_ASSET_ID; +use smallvec::smallvec; +use sp_api::impl_runtime_apis; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::{crypto::KeyTypeId, ConstU32, ConstU64, Get, OpaqueMetadata}; +use sp_runtime::{ + codec, create_runtime_str, generic, impl_opaque_keys, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, MultiSignature, +}; pub use sp_runtime::{MultiAddress, Perbill, Permill}; +use sp_std::prelude::*; +#[cfg(feature = "std")] +use sp_version::NativeVersion; +use sp_version::RuntimeVersion; use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] @@ -549,11 +548,7 @@ impl thea_message_handler::Config for Runtime { // Create the polkadex-parachain by composing the FRAME pallets that were previously configured. construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = opaque::Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub struct Runtime { // System support stuff. System: frame_system = 0, ParachainSystem: cumulus_pallet_parachain_system = 1, From 402134abbaa338b7c9a7046759f5d0cc1596b092 Mon Sep 17 00:00:00 2001 From: zktony Date: Fri, 22 Sep 2023 09:41:57 +0530 Subject: [PATCH 06/51] Updated weights --- Cargo.lock | 586 +++++++++++++++++- Cargo.toml | 16 +- client/Cargo.toml | 2 +- .../Cargo.toml | 6 +- .../build.rs | 0 .../src/benchmarking.rs | 0 .../src/chain_spec.rs | 1 + .../src/cli.rs | 0 .../src/command.rs | 0 .../src/lib.rs | 2 +- .../src/main.rs | 0 .../src/rpc.rs => mainnet/src/node_rpc.rs} | 0 .../src/service.rs | 399 +++++++----- .../Cargo.toml | 2 +- .../build.rs | 0 .../src/chain_spec.rs | 0 .../src/cli.rs | 0 .../src/command.rs | 0 .../src/main.rs | 0 .../src/rpc.rs | 0 .../src/service.rs | 0 .../{polkadex-mainnet => mainnet}/Cargo.toml | 0 .../{polkadex-mainnet => mainnet}/build.rs | 0 .../src/constants.rs | 0 .../src/impls.rs | 0 .../{polkadex-mainnet => mainnet}/src/lib.rs | 3 + .../Cargo.toml | 0 .../build.rs | 0 .../src/constants.rs | 0 .../src/lib.rs | 0 .../src/weights/block_weights.rs | 0 .../src/weights/extrinsic_weights.rs | 0 .../src/weights/mod.rs | 0 .../src/weights/paritydb_weights.rs | 0 .../src/weights/rocksdb_weights.rs | 0 .../src/xcm_config.rs | 0 36 files changed, 828 insertions(+), 189 deletions(-) rename nodes/{polkadex-mainnet-node => mainnet}/Cargo.toml (94%) rename nodes/{polkadex-mainnet-node => mainnet}/build.rs (100%) rename nodes/{polkadex-mainnet-node => mainnet}/src/benchmarking.rs (100%) rename nodes/{polkadex-mainnet-node => mainnet}/src/chain_spec.rs (99%) rename nodes/{polkadex-mainnet-node => mainnet}/src/cli.rs (100%) rename nodes/{polkadex-mainnet-node => mainnet}/src/command.rs (100%) rename nodes/{polkadex-mainnet-node => mainnet}/src/lib.rs (97%) rename nodes/{polkadex-mainnet-node => mainnet}/src/main.rs (100%) rename nodes/{polkadex-mainnet-node/src/rpc.rs => mainnet/src/node_rpc.rs} (100%) rename nodes/{polkadex-mainnet-node => mainnet}/src/service.rs (70%) rename nodes/{polkadex-parachain-node => parachain}/Cargo.toml (98%) rename nodes/{polkadex-parachain-node => parachain}/build.rs (100%) rename nodes/{polkadex-parachain-node => parachain}/src/chain_spec.rs (100%) rename nodes/{polkadex-parachain-node => parachain}/src/cli.rs (100%) rename nodes/{polkadex-parachain-node => parachain}/src/command.rs (100%) rename nodes/{polkadex-parachain-node => parachain}/src/main.rs (100%) rename nodes/{polkadex-parachain-node => parachain}/src/rpc.rs (100%) rename nodes/{polkadex-parachain-node => parachain}/src/service.rs (100%) rename runtimes/{polkadex-mainnet => mainnet}/Cargo.toml (100%) rename runtimes/{polkadex-mainnet => mainnet}/build.rs (100%) rename runtimes/{polkadex-mainnet => mainnet}/src/constants.rs (100%) rename runtimes/{polkadex-mainnet => mainnet}/src/impls.rs (100%) rename runtimes/{polkadex-mainnet => mainnet}/src/lib.rs (99%) rename runtimes/{polkadex-parachain => parachain}/Cargo.toml (100%) rename runtimes/{polkadex-parachain => parachain}/build.rs (100%) rename runtimes/{polkadex-parachain => parachain}/src/constants.rs (100%) rename runtimes/{polkadex-parachain => parachain}/src/lib.rs (100%) rename runtimes/{polkadex-parachain => parachain}/src/weights/block_weights.rs (100%) rename runtimes/{polkadex-parachain => parachain}/src/weights/extrinsic_weights.rs (100%) rename runtimes/{polkadex-parachain => parachain}/src/weights/mod.rs (100%) rename runtimes/{polkadex-parachain => parachain}/src/weights/paritydb_weights.rs (100%) rename runtimes/{polkadex-parachain => parachain}/src/weights/rocksdb_weights.rs (100%) rename runtimes/{polkadex-parachain => parachain}/src/xcm_config.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index f4dcacb07..6bfa77fe4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -355,7 +355,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version", + "rustc_version 0.4.0", "zeroize", ] @@ -2498,7 +2498,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms 3.1.2", - "rustc_version", + "rustc_version 0.4.0", "subtle", "zeroize", ] @@ -2787,7 +2787,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.0", "syn 1.0.109", ] @@ -3538,6 +3538,21 @@ dependencies = [ "thousands", ] +[[package]] +name = "frame-benchmarking-pallet-pov" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" @@ -4422,6 +4437,17 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "impl-num-traits" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951641f13f873bff03d4bf19ae8bec531935ac0ac2cc775f84d7edfdcfed3f17" +dependencies = [ + "integer-sqrt", + "num-traits", + "uint", +] + [[package]] name = "impl-serde" version = "0.4.0" @@ -4816,6 +4842,120 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "kitchensink-runtime" +version = "3.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-benchmarking-pallet-pov", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "log", + "node-primitives", + "pallet-alliance", + "pallet-asset-conversion", + "pallet-asset-conversion-tx-payment", + "pallet-asset-rate", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-bounties", + "pallet-broker", + "pallet-child-bounties", + "pallet-collective", + "pallet-contracts", + "pallet-contracts-primitives", + "pallet-conviction-voting", + "pallet-core-fellowship", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-glutton", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-insecure-randomness-collective-flip", + "pallet-lottery", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nft-fractionalization", + "pallet-nfts", + "pallet-nfts-runtime-api", + "pallet-nis", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-ranked-collective", + "pallet-recovery", + "pallet-referenda", + "pallet-remark", + "pallet-root-testing", + "pallet-safe-mode", + "pallet-salary", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-society", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-staking-runtime-api", + "pallet-state-trie-migration", + "pallet-statement", + "pallet-sudo", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-transaction-storage", + "pallet-treasury", + "pallet-tx-pause", + "pallet-uniques", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "parity-scale-codec", + "primitive-types", + "scale-info", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-grandpa", + "sp-core", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-statement-store", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "static_assertions", + "substrate-wasm-builder", +] + [[package]] name = "kusama-runtime-constants" version = "1.0.0" @@ -6047,6 +6187,25 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" +[[package]] +name = "node-executor" +version = "3.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "kitchensink-runtime", + "node-primitives", + "parity-scale-codec", + "sc-executor", + "scale-info", + "sp-core", + "sp-keystore", + "sp-state-machine", + "sp-statement-store", + "sp-tracing", + "sp-trie", +] + [[package]] name = "node-polkadex-runtime" version = "5.3.0" @@ -6129,6 +6288,15 @@ dependencies = [ "thea-message-handler", ] +[[package]] +name = "node-primitives" +version = "2.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "sp-core", + "sp-runtime", +] + [[package]] name = "nodrop" version = "0.1.14" @@ -6467,6 +6635,26 @@ dependencies = [ "sha2 0.10.7", ] +[[package]] +name = "pallet-alliance" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-collective", + "pallet-identity", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-core-hashing", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-asset-conversion" version = "4.0.0-dev" @@ -6500,6 +6688,39 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-asset-rate" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-assets" version = "4.0.0-dev" @@ -6687,6 +6908,23 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-broker" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" @@ -6742,6 +6980,58 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-contracts" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "bitflags 1.3.2", + "environmental", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-balances", + "pallet-contracts-primitives", + "pallet-contracts-proc-macro", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "serde", + "smallvec", + "sp-api", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "wasm-instrument 0.4.0", + "wasmi", +] + +[[package]] +name = "pallet-contracts-primitives" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "bitflags 1.3.2", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" @@ -6759,6 +7049,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-core-fellowship" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-democracy" version = "4.0.0-dev" @@ -6852,6 +7160,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-glutton" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "blake2", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-grandpa" version = "4.0.0-dev" @@ -6928,6 +7254,34 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-insecure-randomness-collective-flip" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-lottery" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-membership" version = "4.0.0-dev" @@ -6998,6 +7352,51 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-nft-fractionalization" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-assets", + "pallet-nfts", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-nfts" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "enumflags2", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-nfts-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "pallet-nfts", + "parity-scale-codec", + "sp-api", +] + [[package]] name = "pallet-nis" version = "4.0.0-dev" @@ -7259,6 +7658,23 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-remark" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-rewards" version = "1.1.0" @@ -7306,6 +7722,57 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-root-testing" +version = "1.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-safe-mode" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-proxy", + "pallet-utility", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-salary" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-scheduler" version = "4.0.0-dev" @@ -7450,6 +7917,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-statement" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-core", + "sp-io", + "sp-runtime", + "sp-statement-store", + "sp-std", +] + [[package]] name = "pallet-sudo" version = "4.0.0-dev" @@ -7547,6 +8032,26 @@ dependencies = [ "sp-weights", ] +[[package]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-transaction-storage-proof", +] + [[package]] name = "pallet-treasury" version = "4.0.0-dev" @@ -7564,6 +8069,38 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-tx-pause" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-proxy", + "pallet-utility", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-uniques" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-utility" version = "4.0.0-dev" @@ -8148,6 +8685,7 @@ dependencies = [ "hex-literal 0.4.1", "itertools 0.10.5", "jsonrpsee", + "node-executor", "node-polkadex-runtime", "pallet-im-online", "pallet-ocex-lmp", @@ -8176,6 +8714,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-sync", + "sc-offchain", "sc-rpc", "sc-rpc-api", "sc-service", @@ -9560,6 +10099,7 @@ checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash", "impl-codec", + "impl-num-traits", "impl-serde", "scale-info", "uint", @@ -10429,6 +10969,15 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -10600,6 +11149,15 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +[[package]] +name = "safe-mix" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" +dependencies = [ + "rustc_version 0.2.3", +] + [[package]] name = "safe_arch" version = "0.7.1" @@ -11109,7 +11667,7 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-wasm-interface", "thiserror", - "wasm-instrument", + "wasm-instrument 0.3.0", ] [[package]] @@ -11961,6 +12519,15 @@ dependencies = [ "semver-parser", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.18" @@ -12360,7 +12927,7 @@ dependencies = [ "curve25519-dalek 4.1.0", "rand_core 0.6.4", "ring 0.16.20", - "rustc_version", + "rustc_version 0.4.0", "sha2 0.10.7", "subtle", ] @@ -14797,6 +15364,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.114.1" diff --git a/Cargo.toml b/Cargo.toml index 15ba20f72..39309ae98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,10 +23,10 @@ panic = "unwind" resolver = "2" members = [ "client", - "nodes/polkadex-mainnet-node", - "nodes/polkadex-parachain-node", - "runtimes/polkadex-mainnet", - "runtimes/polkadex-parachain", + "nodes/mainnet", + "nodes/parachain", + "runtimes/mainnet", + "runtimes/parachain", "rpc/assets", "rpc/assets/runtime-api", "pallets/pdex-migration", @@ -51,10 +51,10 @@ members = [ default-members = [ "client", - "nodes/polkadex-mainnet-node", - "nodes/polkadex-parachain-node", - "runtimes/polkadex-mainnet", - "runtimes/polkadex-parachain", + "nodes/mainnet", + "nodes/parachain", + "runtimes/mainnet", + "runtimes/parachain", "pallets/pdex-migration", "pallets/pdex-migration", "pallets/ocex", diff --git a/client/Cargo.toml b/client/Cargo.toml index 7f165b725..a8e15f8dc 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -5,5 +5,5 @@ edition = "2021" [dependencies] sc-executor = { workspace = true } -node-polkadex-runtime = { path = "../runtimes/polkadex-mainnet" } +node-polkadex-runtime = { path = "../runtimes/mainnet" } frame-benchmarking = { workspace = true } diff --git a/nodes/polkadex-mainnet-node/Cargo.toml b/nodes/mainnet/Cargo.toml similarity index 94% rename from nodes/polkadex-mainnet-node/Cargo.toml rename to nodes/mainnet/Cargo.toml index 78c6bd0ff..ebca51781 100644 --- a/nodes/polkadex-mainnet-node/Cargo.toml +++ b/nodes/mainnet/Cargo.toml @@ -26,7 +26,7 @@ clap = { version = "4.0.9", features = ["derive"] } itertools = "0.10.1" jsonrpsee = { version = "0.16.2", features = ["server"] } # local dependencies -node-polkadex-runtime = { path = "../../runtimes/polkadex-mainnet" } +node-polkadex-runtime = { path = "../../runtimes/mainnet" } rpc-assets = { path = "../../rpc/assets" } pallet-rewards-rpc = { path = "../../pallets/rewards/rpc" } pallet-ocex-rpc = { path = "../../pallets/ocex/rpc" } @@ -48,13 +48,14 @@ sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk", branc sc-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-consensus-babe-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +grandpa = { package = "sc-consensus-grandpa", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-storage-monitor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +node-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } @@ -62,6 +63,7 @@ sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } grandpa-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", package = "sp-consensus-grandpa" } diff --git a/nodes/polkadex-mainnet-node/build.rs b/nodes/mainnet/build.rs similarity index 100% rename from nodes/polkadex-mainnet-node/build.rs rename to nodes/mainnet/build.rs diff --git a/nodes/polkadex-mainnet-node/src/benchmarking.rs b/nodes/mainnet/src/benchmarking.rs similarity index 100% rename from nodes/polkadex-mainnet-node/src/benchmarking.rs rename to nodes/mainnet/src/benchmarking.rs diff --git a/nodes/polkadex-mainnet-node/src/chain_spec.rs b/nodes/mainnet/src/chain_spec.rs similarity index 99% rename from nodes/polkadex-mainnet-node/src/chain_spec.rs rename to nodes/mainnet/src/chain_spec.rs index 7476b3902..c3ad765c7 100644 --- a/nodes/polkadex-mainnet-node/src/chain_spec.rs +++ b/nodes/mainnet/src/chain_spec.rs @@ -34,6 +34,7 @@ use sp_runtime::{ traits::{AccountIdConversion, IdentifyAccount, Verify}, Perbill, }; +use rpc as pub use node_polkadex_runtime::GenesisConfig; use node_polkadex_runtime::{ diff --git a/nodes/polkadex-mainnet-node/src/cli.rs b/nodes/mainnet/src/cli.rs similarity index 100% rename from nodes/polkadex-mainnet-node/src/cli.rs rename to nodes/mainnet/src/cli.rs diff --git a/nodes/polkadex-mainnet-node/src/command.rs b/nodes/mainnet/src/command.rs similarity index 100% rename from nodes/polkadex-mainnet-node/src/command.rs rename to nodes/mainnet/src/command.rs diff --git a/nodes/polkadex-mainnet-node/src/lib.rs b/nodes/mainnet/src/lib.rs similarity index 97% rename from nodes/polkadex-mainnet-node/src/lib.rs rename to nodes/mainnet/src/lib.rs index 62924165a..427101bda 100644 --- a/nodes/polkadex-mainnet-node/src/lib.rs +++ b/nodes/mainnet/src/lib.rs @@ -19,5 +19,5 @@ pub mod benchmarking; pub mod chain_spec; pub mod cli; -pub mod rpc; +pub mod node_rpc; pub mod service; diff --git a/nodes/polkadex-mainnet-node/src/main.rs b/nodes/mainnet/src/main.rs similarity index 100% rename from nodes/polkadex-mainnet-node/src/main.rs rename to nodes/mainnet/src/main.rs diff --git a/nodes/polkadex-mainnet-node/src/rpc.rs b/nodes/mainnet/src/node_rpc.rs similarity index 100% rename from nodes/polkadex-mainnet-node/src/rpc.rs rename to nodes/mainnet/src/node_rpc.rs diff --git a/nodes/polkadex-mainnet-node/src/service.rs b/nodes/mainnet/src/service.rs similarity index 70% rename from nodes/polkadex-mainnet-node/src/service.rs rename to nodes/mainnet/src/service.rs index 75bb895cf..48d4b644b 100644 --- a/nodes/polkadex-mainnet-node/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -1,55 +1,66 @@ // This file is part of Substrate. -// -// Copyright (C) 2018-2021 Parity Technologies (UK) Ltd. + +// Copyright (C) Parity Technologies (UK) Ltd. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 -// + // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// + // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// + // You should have received a copy of the GNU General Public License // along with this program. If not, see . #![warn(unused_extern_crates)] //! Service implementation. Specialized wrapper over substrate service. -use crate::rpc as node_rpc; +use crate::cli; +use crate::node_rpc; +use codec::Encode; use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; +use frame_system_rpc_runtime_api::AccountNonceApi; use futures::prelude::*; use node_polkadex_runtime::RuntimeApi; -use polkadex_client::ExecutorDispatch; -use polkadex_primitives::Block; -use sc_client_api::BlockBackend; +use node_executor::ExecutorDispatch; +use node_primitives::Block; +use sc_client_api::{Backend, BlockBackend}; +use sc_consensus_babe::{self, SlotProportion}; use sc_executor::NativeElseWasmExecutor; -use sc_network::{Event, NetworkEventStream, NetworkService}; -use sc_network_sync::SyncingService; +use sc_network::{event::Event, NetworkEventStream, NetworkService}; +use sc_network_sync::{warp::WarpSyncParams, SyncingService}; use sc_service::{config::Configuration, error::Error as ServiceError, RpcHandlers, TaskManager}; -use sp_runtime::traits::Block as BlockT; -use std::sync::Arc; - -use sc_consensus_babe::SlotProportion; -use sc_telemetry::{log, Telemetry, TelemetryWorker}; +use sc_statement_store::Store as StatementStore; +use sc_telemetry::{Telemetry, TelemetryWorker}; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_api::ProvideRuntimeApi; -use sp_core::Pair; -use sp_runtime::{generic, SaturatedConversion}; +use sp_core::crypto::Pair; +use sp_runtime::{generic, traits::Block as BlockT, SaturatedConversion}; +use std::sync::Arc; +use crate::cli::Cli; +/// The full client type definition. pub type FullClient = - sc_service::TFullClient>; +sc_service::TFullClient>; type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; type FullGrandpaBlockImport = - sc_consensus_grandpa::GrandpaBlockImport; +grandpa::GrandpaBlockImport; + +/// The transaction pool type definition. +pub type TransactionPool = sc_transaction_pool::FullPool; + +/// The minimum period of blocks on which justifications will be +/// imported and generated. +const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; /// Fetch the nonce of the given `account` from the chain state. /// /// Note: Should only be used for tests. -use substrate_frame_rpc_system::AccountNonceApi; pub fn fetch_nonce(client: &FullClient, account: sp_core::sr25519::Pair) -> u32 { let best_hash = client.chain_info().best_hash; client @@ -64,7 +75,6 @@ pub fn fetch_nonce(client: &FullClient, account: sp_core::sr25519::Pair) -> u32 /// state of the best block. /// /// Note: Should only be used for tests. -#[allow(dead_code)] pub fn create_extrinsic( client: &FullClient, sender: sp_core::sr25519::Pair, @@ -83,24 +93,26 @@ pub fn create_extrinsic( .unwrap_or(2) as u64; let tip = 0; let extra: node_polkadex_runtime::SignedExtra = ( - // frame_system::CheckNonZeroSender::::new(), + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from(generic::Era::mortal( + frame_system::CheckEra::::from(generic::Era::mortal( period, best_block.saturated_into(), )), frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(tip), + pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::::from( + tip, None, + ), ); let raw_payload = node_polkadex_runtime::SignedPayload::from_raw( function.clone(), extra.clone(), ( - // (), + (), node_polkadex_runtime::VERSION.spec_version, node_polkadex_runtime::VERSION.transaction_version, genesis_hash, @@ -110,7 +122,6 @@ pub fn create_extrinsic( (), ), ); - use codec::Encode; let signature = raw_payload.using_encoded(|e| sender.sign(e)); node_polkadex_runtime::UncheckedExtrinsic::new_signed( @@ -120,10 +131,8 @@ pub fn create_extrinsic( extra, ) } -use crate::cli::Cli; -use sc_network_common::sync::warp::WarpSyncParams; -#[allow(clippy::type_complexity)] +/// Creates a new partial node. pub fn new_partial( config: &Configuration, ) -> Result< @@ -131,7 +140,7 @@ pub fn new_partial( FullClient, FullBackend, FullSelectChain, - sc_consensus::DefaultImportQueue, + sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool, ( impl Fn( @@ -140,11 +149,12 @@ pub fn new_partial( ) -> Result, sc_service::Error>, ( sc_consensus_babe::BabeBlockImport, - sc_consensus_grandpa::LinkHalf, + grandpa::LinkHalf, sc_consensus_babe::BabeLink, ), - sc_consensus_grandpa::SharedVoterState, + grandpa::SharedVoterState, Option, + Arc, ), >, ServiceError, @@ -160,7 +170,7 @@ pub fn new_partial( }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(config); + let executor = sc_service::new_native_or_wasm_executor(&config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( @@ -168,7 +178,6 @@ pub fn new_partial( telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), executor, )?; - let client = Arc::new(client); let telemetry = telemetry.map(|(worker, telemetry)| { @@ -186,10 +195,10 @@ pub fn new_partial( client.clone(), ); - let arc_c = client.clone(); - let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( + let (grandpa_block_import, grandpa_link) = grandpa::block_import( client.clone(), - &(arc_c as Arc<_>), + GRANDPA_JUSTIFICATION_PERIOD, + &(client.clone() as Arc<_>), select_chain.clone(), telemetry.as_ref().map(|x| x.handle()), )?; @@ -202,39 +211,51 @@ pub fn new_partial( )?; let slot_duration = babe_link.config().slot_duration(); - let (import_queue, babe_worker_handle) = sc_consensus_babe::import_queue( - babe_link.clone(), - block_import.clone(), - Some(Box::new(justification_import)), - client.clone(), - select_chain.clone(), - move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + let (import_queue, babe_worker_handle) = + sc_consensus_babe::import_queue(sc_consensus_babe::ImportQueueParams { + link: babe_link.clone(), + block_import: block_import.clone(), + justification_import: Some(Box::new(justification_import)), + client: client.clone(), + select_chain: select_chain.clone(), + create_inherent_data_providers: move |_, ()| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - let slot = - sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); + let slot = + sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); - Ok((slot, timestamp)) - }, - &task_manager.spawn_essential_handle(), - config.prometheus_registry(), - telemetry.as_ref().map(|x| x.handle()), - )?; + Ok((slot, timestamp)) + }, + spawner: &task_manager.spawn_essential_handle(), + registry: config.prometheus_registry(), + telemetry: telemetry.as_ref().map(|x| x.handle()), + offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()), + })?; let import_setup = (block_import, grandpa_link, babe_link); + let statement_store = sc_statement_store::Store::new_shared( + &config.data_path, + Default::default(), + client.clone(), + keystore_container.local_keystore(), + config.prometheus_registry(), + &task_manager.spawn_handle(), + ) + .map_err(|e| ServiceError::Other(format!("Statement store error: {:?}", e)))?; + let (rpc_extensions_builder, rpc_setup) = { - let (_, grandpa_link, _babe_link) = &import_setup; + let (_, grandpa_link, _) = &import_setup; let justification_stream = grandpa_link.justification_stream(); let shared_authority_set = grandpa_link.shared_authority_set().clone(); - let shared_voter_state = sc_consensus_grandpa::SharedVoterState::empty(); - let rpc_setup = shared_voter_state.clone(); + let shared_voter_state = grandpa::SharedVoterState::empty(); + let shared_voter_state2 = shared_voter_state.clone(); - let finality_proof_provider = sc_consensus_grandpa::FinalityProofProvider::new_for_service( + let finality_proof_provider = grandpa::FinalityProofProvider::new_for_service( backend.clone(), Some(shared_authority_set.clone()), ); @@ -244,7 +265,9 @@ pub fn new_partial( let select_chain = select_chain.clone(); let keystore = keystore_container.keystore(); let chain_spec = config.chain_spec.cloned_box(); + let rpc_backend = backend.clone(); + let rpc_statement_store = statement_store.clone(); let rpc_extensions_builder = move |deny_unsafe, subscription_executor| { let deps = node_rpc::FullDeps { client: client.clone(), @@ -253,8 +276,8 @@ pub fn new_partial( chain_spec: chain_spec.cloned_box(), deny_unsafe, babe: node_rpc::BabeDeps { - babe_worker_handle: babe_worker_handle.clone(), keystore: keystore.clone(), + babe_worker_handle: babe_worker_handle.clone(), }, grandpa: node_rpc::GrandpaDeps { shared_voter_state: shared_voter_state.clone(), @@ -263,16 +286,16 @@ pub fn new_partial( subscription_executor, finality_provider: finality_proof_provider.clone(), }, + statement_store: rpc_statement_store.clone(), backend: rpc_backend.clone(), }; node_rpc::create_full(deps).map_err(Into::into) }; - (rpc_extensions_builder, rpc_setup) + (rpc_extensions_builder, shared_voter_state2) }; - // here the struct should be passed back Ok(sc_service::PartialComponents { client, backend, @@ -281,46 +304,42 @@ pub fn new_partial( select_chain, import_queue, transaction_pool, - other: (Box::new(rpc_extensions_builder), import_setup, rpc_setup, telemetry), + other: (rpc_extensions_builder, import_setup, rpc_setup, telemetry, statement_store), }) } -/// The transaction pool type defintion. -pub type TransactionPool = sc_transaction_pool::FullPool; - +/// Result of [`new_full_base`]. pub struct NewFullBase { - /// The task manager of the polkadex-mainnet-polkadex-parachain-node. + /// The task manager of the node. pub task_manager: TaskManager, - /// The client instance of the polkadex-mainnet-polkadex-parachain-node. + /// The client instance of the node. pub client: Arc, - /// The networking service of the polkadex-mainnet-polkadex-parachain-node. + /// The networking service of the node. pub network: Arc::Hash>>, - /// The syncing service of the polkadex-mainnet-polkadex-parachain-node. + /// The syncing service of the node. pub sync: Arc>, - /// The transaction pool of the polkadex-mainnet-polkadex-parachain-node. + /// The transaction pool of the node. pub transaction_pool: Arc, - /// The rpc handlers of the polkadex-mainnet-polkadex-parachain-node. + /// The rpc handlers of the node. pub rpc_handlers: RpcHandlers, } /// Creates a full service from the configuration. pub fn new_full_base( - mut config: Configuration, + config: Configuration, disable_hardware_benchmarks: bool, with_startup_data: impl FnOnce( &sc_consensus_babe::BabeBlockImport, &sc_consensus_babe::BabeLink, ), ) -> Result { - // Ensure all nodes implement offchain indexing and workers - config.offchain_worker.enabled = true; - config.offchain_worker.indexing_enabled = true; let hwbench = (!disable_hardware_benchmarks) .then_some(config.database.path().map(|database_path| { - let _ = std::fs::create_dir_all(database_path); + let _ = std::fs::create_dir_all(&database_path); sc_sysinfo::gather_hwbench(Some(database_path)) })) .flatten(); + let sc_service::PartialComponents { client, backend, @@ -329,34 +348,32 @@ pub fn new_full_base( keystore_container, select_chain, transaction_pool, - // need to add all the parameters required here - other: (rpc_builder, import_setup, rpc_setup, mut telemetry), + other: (rpc_builder, import_setup, rpc_setup, mut telemetry, statement_store), } = new_partial(&config)?; let shared_voter_state = rpc_setup; let auth_disc_publish_non_global_ips = config.network.allow_non_globals_in_dht; let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); - let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( + let grandpa_protocol_name = grandpa::protocol_standard_name( &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), &config.chain_spec, ); - - net_config.add_notification_protocol(sc_consensus_grandpa::grandpa_peers_set_config( + net_config.add_notification_protocol(grandpa::grandpa_peers_set_config( grandpa_protocol_name.clone(), )); - #[cfg(feature = "cli")] - config.network.request_response_protocols.push( - sc_consensus_grandpa_warp_sync::request_response_config_for_chain( - &config, - task_manager.spawn_handle(), - backend.clone(), - import_setup.1.shared_authority_set().clone(), - ), + let statement_handler_proto = sc_network_statement::StatementHandlerPrototype::new( + client + .block_hash(0u32.into()) + .ok() + .flatten() + .expect("Genesis block exists; qed"), + config.chain_spec.fork_id(), ); + net_config.add_notification_protocol(statement_handler_proto.set_config()); - let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( + let warp_sync = Arc::new(grandpa::warp_proof::NetworkProvider::new( backend.clone(), import_setup.1.shared_authority_set().clone(), Vec::default(), @@ -373,13 +390,6 @@ pub fn new_full_base( block_announce_validator_builder: None, warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)), })?; - // Enable offchain indexing - sc_service::build_offchain_workers( - &config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), - ); let role = config.role.clone(); let force_authoring = config.force_authoring; @@ -388,19 +398,21 @@ pub fn new_full_base( let name = config.network.node_name.clone(); let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); + let enable_offchain_worker = config.offchain_worker.enabled; + let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { config, - backend, + backend: backend.clone(), client: client.clone(), keystore: keystore_container.keystore(), network: network.clone(), + rpc_builder: Box::new(rpc_builder), transaction_pool: transaction_pool.clone(), task_manager: &mut task_manager, system_rpc_tx, tx_handler_controller, sync_service: sync_service.clone(), telemetry: telemetry.as_mut(), - rpc_builder: Box::new(rpc_builder), })?; if let Some(hwbench) = hwbench { @@ -450,10 +462,10 @@ pub fn new_full_base( let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); let slot = - sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); + sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); let storage_proof = sp_transaction_storage_proof::registration::new_data_provider( @@ -511,19 +523,19 @@ pub fn new_full_base( ); } - // if the polkadex-mainnet-polkadex-parachain-node isn't actively participating in consensus - // then it doesn't need a keystore, regardless of which protocol we use below. + // if the node isn't actively participating in consensus then it doesn't + // need a keystore, regardless of which protocol we use below. let keystore = if role.is_authority() { Some(keystore_container.keystore()) } else { None }; - let grandpa_config = sc_consensus_grandpa::Config { + let grandpa_config = grandpa::Config { // FIXME #1578 make this available through chainspec gossip_duration: std::time::Duration::from_millis(333), - justification_period: 512, + justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD, name: Some(name), observer_enabled: false, keystore, + local_role: role.clone(), telemetry: telemetry.as_ref().map(|x| x.handle()), - local_role: role, protocol_name: grandpa_protocol_name, }; @@ -534,15 +546,16 @@ pub fn new_full_base( // and vote data availability than the observer. The observer has not // been tested extensively yet and having most nodes in a network run it // could lead to finality stalls. - let grandpa_config = sc_consensus_grandpa::GrandpaParams { + let grandpa_config = grandpa::GrandpaParams { config: grandpa_config, link: grandpa_link, network: network.clone(), + sync: Arc::new(sync_service.clone()), telemetry: telemetry.as_ref().map(|x| x.handle()), - voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(), - prometheus_registry, + voting_rule: grandpa::VotingRulesBuilder::default().build(), + prometheus_registry: prometheus_registry.clone(), shared_voter_state, - sync: sync_service.clone(), + offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()), }; // the GRANDPA voter task is considered infallible, i.e. @@ -550,7 +563,50 @@ pub fn new_full_base( task_manager.spawn_essential_handle().spawn_blocking( "grandpa-voter", None, - sc_consensus_grandpa::run_grandpa_voter(grandpa_config)?, + grandpa::run_grandpa_voter(grandpa_config)?, + ); + } + + // Spawn statement protocol worker + let statement_protocol_executor = { + let spawn_handle = task_manager.spawn_handle(); + Box::new(move |fut| { + spawn_handle.spawn("network-statement-validator", Some("networking"), fut); + }) + }; + let statement_handler = statement_handler_proto.build( + network.clone(), + sync_service.clone(), + statement_store.clone(), + prometheus_registry.as_ref(), + statement_protocol_executor, + )?; + task_manager.spawn_handle().spawn( + "network-statement-handler", + Some("networking"), + statement_handler.run(), + ); + + if enable_offchain_worker { + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: Some(keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + )), + network_provider: network.clone(), + is_validator: role.is_authority(), + enable_http_requests: true, + custom_extensions: move |_| { + vec![Box::new(statement_store.clone().as_statement_store_ext()) as Box<_>] + }, + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); } @@ -559,9 +615,9 @@ pub fn new_full_base( task_manager, client, network, + sync: sync_service, transaction_pool, rpc_handlers, - sync: sync_service, }) } @@ -570,12 +626,14 @@ pub fn new_full(config: Configuration, cli: Cli) -> Result::Signer; #[test] - // It is "ignored", but the polkadex-mainnet-polkadex-parachain-node-cli ignored tests are - // running on the CI. This can be run locally with `cargo test --release -p - // polkadex-mainnet-polkadex-parachain-node-cli test_sync -- --ignored`. + // It is "ignored", but the node-cli ignored tests are running on the CI. + // This can be run locally with `cargo test --release -p node-cli test_sync -- --ignored`. #[ignore] fn test_sync() { sp_tracing::try_init_simple(); let keystore_path = tempfile::tempdir().expect("Creates keystore path"); - let keystore: KeystorePtr = - Arc::new(LocalKeystore::open(keystore_path.path(), None).expect("Creates keystore")); - let alice: sp_consensus_babe::AuthorityId = - <(dyn sp_keystore::Keystore + 'static)>::sr25519_generate_new( - &*keystore, - BABE, - Some("//Alice"), - ) + let keystore: KeystorePtr = LocalKeystore::open(keystore_path.path(), None) + .expect("Creates keystore") + .into(); + let alice: sp_consensus_babe::AuthorityId = keystore + .sr25519_generate_new(BABE, Some("//Alice")) .expect("Creates authority pair") .into(); @@ -649,7 +702,7 @@ mod tests { let NewFullBase { task_manager, client, network, sync, transaction_pool, .. } = new_full_base( config, - true, + false, |block_import: &sc_consensus_babe::BabeBlockImport, babe_link: &sc_consensus_babe::BabeLink| { setup_handles = Some((block_import.clone(), babe_link.clone())); @@ -668,7 +721,6 @@ mod tests { |service, &mut (ref mut block_import, ref babe_link)| { let parent_hash = service.client().chain_info().best_hash; let parent_header = service.client().header(parent_hash).unwrap().unwrap(); - let parent_hash = parent_header.hash(); let parent_number = *parent_header.number(); futures::executor::block_on(service.transaction_pool().maintain( @@ -709,8 +761,8 @@ mod tests { .unwrap(); if let Some(babe_pre_digest) = - sc_consensus_babe::authorship::claim_slot(slot.into(), &epoch, &keystore) - .map(|(digest, _)| digest) + sc_consensus_babe::authorship::claim_slot(slot.into(), &epoch, &keystore) + .map(|(digest, _)| digest) { break (babe_pre_digest, epoch_descriptor) } @@ -727,7 +779,7 @@ mod tests { ) .create_inherent_data(), ) - .expect("Creates inherent data"); + .expect("Creates inherent data"); digest.push(::babe_pre_digest(babe_pre_digest)); @@ -738,8 +790,8 @@ mod tests { .propose(inherent_data, digest, std::time::Duration::from_secs(1), None) .await }) - .expect("Error making test block") - .block; + .expect("Error making test block") + .block; let (new_header, new_body) = new_block.deconstruct(); let pre_hash = new_header.hash(); @@ -756,9 +808,9 @@ mod tests { let mut params = BlockImportParams::new(BlockOrigin::File, new_header); params.post_digests.push(item); params.body = Some(new_body); - params.intermediates.insert( - Cow::from(INTERMEDIATE_KEY), - Box::new(BabeIntermediate:: { epoch_descriptor }) as Box<_>, + params.insert_intermediate( + INTERMEDIATE_KEY, + BabeIntermediate:: { epoch_descriptor }, ); params.fork_choice = Some(ForkChoiceStrategy::LongestChain); @@ -770,42 +822,47 @@ mod tests { let to: Address = AccountPublic::from(bob.public()).into_account().into(); let from: Address = AccountPublic::from(charlie.public()).into_account().into(); let genesis_hash = service.client().block_hash(0).unwrap().unwrap(); + let best_hash = service.client().chain_info().best_hash; let (spec_version, transaction_version) = { - let version = service - .client() - .runtime_version_at(service.client().chain_info().best_hash) - .unwrap(); + let version = service.client().runtime_version_at(best_hash).unwrap(); (version.spec_version, version.transaction_version) }; let signer = charlie.clone(); - let function = - RuntimeCall::Balances(BalancesCall::transfer { dest: to, value: amount }); - - let tip = 0; - let extra: node_polkadex_runtime::SignedExtra = ( - // frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from( - generic::Era::Immortal, - ), - frame_system::CheckNonce::::from(index), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::< - node_polkadex_runtime::Runtime, - >::from(tip), + let function = RuntimeCall::Balances(BalancesCall::transfer_allow_death { + dest: to.into(), + value: amount, + }); + + let check_non_zero_sender = frame_system::CheckNonZeroSender::new(); + let check_spec_version = frame_system::CheckSpecVersion::new(); + let check_tx_version = frame_system::CheckTxVersion::new(); + let check_genesis = frame_system::CheckGenesis::new(); + let check_era = frame_system::CheckEra::from(Era::Immortal); + let check_nonce = frame_system::CheckNonce::from(index); + let check_weight = frame_system::CheckWeight::new(); + let tx_payment = + pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::from(0, None); + let extra = ( + check_non_zero_sender, + check_spec_version, + check_tx_version, + check_genesis, + check_era, + check_nonce, + check_weight, + tx_payment, ); let raw_payload = SignedPayload::from_raw( function, extra, - (spec_version, transaction_version, genesis_hash, genesis_hash, (), (), ()), + ((), spec_version, transaction_version, genesis_hash, genesis_hash, (), (), ()), ); let signature = raw_payload.using_encoded(|payload| signer.sign(payload)); let (function, extra, _) = raw_payload.deconstruct(); index += 1; - UncheckedExtrinsic::new_signed(function, from, signature.into(), extra).into() + UncheckedExtrinsic::new_signed(function, from.into(), signature.into(), extra) + .into() }, ); } @@ -818,8 +875,8 @@ mod tests { sc_service_test::consensus( crate::chain_spec::tests::integration_test_config_with_two_authorities(), |config| { - let NewFullBase { task_manager, client, network, transaction_pool, sync, .. } = - new_full_base(config, true, |_, _| ())?; + let NewFullBase { task_manager, client, network, sync, transaction_pool, .. } = + new_full_base(config, false, |_, _| ())?; Ok(sc_service_test::TestNetComponents::new( task_manager, client, @@ -831,4 +888,4 @@ mod tests { vec!["//Alice".into(), "//Bob".into()], ) } -} +} \ No newline at end of file diff --git a/nodes/polkadex-parachain-node/Cargo.toml b/nodes/parachain/Cargo.toml similarity index 98% rename from nodes/polkadex-parachain-node/Cargo.toml rename to nodes/parachain/Cargo.toml index 6ce6838c0..2aa383d5a 100644 --- a/nodes/polkadex-parachain-node/Cargo.toml +++ b/nodes/parachain/Cargo.toml @@ -18,7 +18,7 @@ jsonrpsee = { version = "0.16.2", features = ["server"] } futures = "0.3.28" # Local -parachain-polkadex-runtime = { path = "../../runtimes/polkadex-parachain" } +parachain-polkadex-runtime = { path = "../../runtimes/parachain" } hex-literal = { workspace = true, optional = false } # Substrate diff --git a/nodes/polkadex-parachain-node/build.rs b/nodes/parachain/build.rs similarity index 100% rename from nodes/polkadex-parachain-node/build.rs rename to nodes/parachain/build.rs diff --git a/nodes/polkadex-parachain-node/src/chain_spec.rs b/nodes/parachain/src/chain_spec.rs similarity index 100% rename from nodes/polkadex-parachain-node/src/chain_spec.rs rename to nodes/parachain/src/chain_spec.rs diff --git a/nodes/polkadex-parachain-node/src/cli.rs b/nodes/parachain/src/cli.rs similarity index 100% rename from nodes/polkadex-parachain-node/src/cli.rs rename to nodes/parachain/src/cli.rs diff --git a/nodes/polkadex-parachain-node/src/command.rs b/nodes/parachain/src/command.rs similarity index 100% rename from nodes/polkadex-parachain-node/src/command.rs rename to nodes/parachain/src/command.rs diff --git a/nodes/polkadex-parachain-node/src/main.rs b/nodes/parachain/src/main.rs similarity index 100% rename from nodes/polkadex-parachain-node/src/main.rs rename to nodes/parachain/src/main.rs diff --git a/nodes/polkadex-parachain-node/src/rpc.rs b/nodes/parachain/src/rpc.rs similarity index 100% rename from nodes/polkadex-parachain-node/src/rpc.rs rename to nodes/parachain/src/rpc.rs diff --git a/nodes/polkadex-parachain-node/src/service.rs b/nodes/parachain/src/service.rs similarity index 100% rename from nodes/polkadex-parachain-node/src/service.rs rename to nodes/parachain/src/service.rs diff --git a/runtimes/polkadex-mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml similarity index 100% rename from runtimes/polkadex-mainnet/Cargo.toml rename to runtimes/mainnet/Cargo.toml diff --git a/runtimes/polkadex-mainnet/build.rs b/runtimes/mainnet/build.rs similarity index 100% rename from runtimes/polkadex-mainnet/build.rs rename to runtimes/mainnet/build.rs diff --git a/runtimes/polkadex-mainnet/src/constants.rs b/runtimes/mainnet/src/constants.rs similarity index 100% rename from runtimes/polkadex-mainnet/src/constants.rs rename to runtimes/mainnet/src/constants.rs diff --git a/runtimes/polkadex-mainnet/src/impls.rs b/runtimes/mainnet/src/impls.rs similarity index 100% rename from runtimes/polkadex-mainnet/src/impls.rs rename to runtimes/mainnet/src/impls.rs diff --git a/runtimes/polkadex-mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs similarity index 99% rename from runtimes/polkadex-mainnet/src/lib.rs rename to runtimes/mainnet/src/lib.rs index 281d7066f..e223bca69 100644 --- a/runtimes/polkadex-mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -111,7 +111,10 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { ) } + + /// Runtime version. +#[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadex-mainnet-polkadex-parachain-node"), impl_name: create_runtime_str!("polkadex-official"), diff --git a/runtimes/polkadex-parachain/Cargo.toml b/runtimes/parachain/Cargo.toml similarity index 100% rename from runtimes/polkadex-parachain/Cargo.toml rename to runtimes/parachain/Cargo.toml diff --git a/runtimes/polkadex-parachain/build.rs b/runtimes/parachain/build.rs similarity index 100% rename from runtimes/polkadex-parachain/build.rs rename to runtimes/parachain/build.rs diff --git a/runtimes/polkadex-parachain/src/constants.rs b/runtimes/parachain/src/constants.rs similarity index 100% rename from runtimes/polkadex-parachain/src/constants.rs rename to runtimes/parachain/src/constants.rs diff --git a/runtimes/polkadex-parachain/src/lib.rs b/runtimes/parachain/src/lib.rs similarity index 100% rename from runtimes/polkadex-parachain/src/lib.rs rename to runtimes/parachain/src/lib.rs diff --git a/runtimes/polkadex-parachain/src/weights/block_weights.rs b/runtimes/parachain/src/weights/block_weights.rs similarity index 100% rename from runtimes/polkadex-parachain/src/weights/block_weights.rs rename to runtimes/parachain/src/weights/block_weights.rs diff --git a/runtimes/polkadex-parachain/src/weights/extrinsic_weights.rs b/runtimes/parachain/src/weights/extrinsic_weights.rs similarity index 100% rename from runtimes/polkadex-parachain/src/weights/extrinsic_weights.rs rename to runtimes/parachain/src/weights/extrinsic_weights.rs diff --git a/runtimes/polkadex-parachain/src/weights/mod.rs b/runtimes/parachain/src/weights/mod.rs similarity index 100% rename from runtimes/polkadex-parachain/src/weights/mod.rs rename to runtimes/parachain/src/weights/mod.rs diff --git a/runtimes/polkadex-parachain/src/weights/paritydb_weights.rs b/runtimes/parachain/src/weights/paritydb_weights.rs similarity index 100% rename from runtimes/polkadex-parachain/src/weights/paritydb_weights.rs rename to runtimes/parachain/src/weights/paritydb_weights.rs diff --git a/runtimes/polkadex-parachain/src/weights/rocksdb_weights.rs b/runtimes/parachain/src/weights/rocksdb_weights.rs similarity index 100% rename from runtimes/polkadex-parachain/src/weights/rocksdb_weights.rs rename to runtimes/parachain/src/weights/rocksdb_weights.rs diff --git a/runtimes/polkadex-parachain/src/xcm_config.rs b/runtimes/parachain/src/xcm_config.rs similarity index 100% rename from runtimes/polkadex-parachain/src/xcm_config.rs rename to runtimes/parachain/src/xcm_config.rs From 92c1a3c72ef04ecebbf71a8289415e2ddac931e0 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Sun, 24 Sep 2023 14:41:15 -0700 Subject: [PATCH 07/51] fix(cs): Toml files code style fix --- Cargo.toml | 8 ++++---- pallets/thea-council/Cargo.toml | 2 +- runtimes/polkadex-mainnet/Cargo.toml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 15ba20f72..d569856f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -207,9 +207,9 @@ trie-db = { version = "0.27.1", default-features = false } #Parachain Dependencies cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } -orml-xtokens = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev -orml-traits = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev -pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } #FIXME: Remove rev +orml-xtokens = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev +orml-traits = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } #FIXME: Remove rev xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } @@ -222,7 +222,7 @@ cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk" cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } #Here Oeml -orml-xcm-support = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev +orml-xcm-support = { git = "https://github.com/Polkadex-Substrate/orml-1.1.0.git", branch = "master", default-features = false } #FIXME: Remove rev pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } diff --git a/pallets/thea-council/Cargo.toml b/pallets/thea-council/Cargo.toml index 6d5cc8878..81435922f 100644 --- a/pallets/thea-council/Cargo.toml +++ b/pallets/thea-council/Cargo.toml @@ -54,7 +54,7 @@ std = [ "pallet-balances/std", "pallet-assets/std", "thea/std", - "parachain-info/std" + "parachain-info/std", ] runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "xcm-builder/runtime-benchmarks"] try-runtime = ["frame-support/try-runtime"] diff --git a/runtimes/polkadex-mainnet/Cargo.toml b/runtimes/polkadex-mainnet/Cargo.toml index 9494d3997..c93738c5a 100644 --- a/runtimes/polkadex-mainnet/Cargo.toml +++ b/runtimes/polkadex-mainnet/Cargo.toml @@ -193,7 +193,7 @@ std = [ "thea-message-handler?/std", "orderbook-primitives/std", "pallet-asset-conversion/std", - "pallet-asset-conversion-tx-payment/std" + "pallet-asset-conversion-tx-payment/std", ] runtime-benchmarks = [ #theirs @@ -260,5 +260,5 @@ try-runtime = [ "liquidity/try-runtime", "thea-executor/try-runtime", "pallet-asset-conversion/try-runtime", - "pallet-asset-conversion-tx-payment/try-runtime" + "pallet-asset-conversion-tx-payment/try-runtime", ] From 41c168510c113f4b8082b8b02d04c79a319fab1e Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Sun, 24 Sep 2023 23:10:14 -0700 Subject: [PATCH 08/51] feat(containerization): Fixed dockerfiles --- .docker/ci/release/Dockerfile | 8 ++++---- dockerfile | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.docker/ci/release/Dockerfile b/.docker/ci/release/Dockerfile index 4dd4f8cf7..581bb9d2a 100644 --- a/.docker/ci/release/Dockerfile +++ b/.docker/ci/release/Dockerfile @@ -22,11 +22,11 @@ RUN apt-get update && apt-get install --assume-yes ca-certificates COPY ./polkadex-node /usr/local/bin -RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-polkadex-mainnet-polkadex-parachain-node polkadex-polkadex-mainnet-polkadex-parachain-node && \ - mkdir -p /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share && \ +RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-node polkadex-node && \ + mkdir -p /polkadex-node/.local/share && \ mkdir /data && \ - chown -R polkadex-polkadex-mainnet-polkadex-parachain-node:polkadex-polkadex-mainnet-polkadex-parachain-node /data && \ - ln -s /data /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share/polkadex-polkadex-mainnet-polkadex-parachain-node && \ + chown -R polkadex-node:polkadex-node /data && \ + ln -s /data /polkadex-node/.local/share/polkadex-node && \ rm -rf /usr/bin /usr/sbin COPY ./extras/customSpecRaw.json /data diff --git a/dockerfile b/dockerfile index 77d3c0f4e..b8d62e8cf 100644 --- a/dockerfile +++ b/dockerfile @@ -35,11 +35,11 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ FROM docker.io/library/ubuntu:20.04 COPY --from=builder /Polkadex/target/release/polkadex-node /usr/local/bin -RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-polkadex-mainnet-polkadex-parachain-node polkadex-polkadex-mainnet-polkadex-parachain-node && \ - mkdir -p /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share && \ +RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-node polkadex-node && \ + mkdir -p /polkadex-node/.local/share && \ mkdir /data && \ - chown -R polkadex-polkadex-mainnet-polkadex-parachain-node:polkadex-polkadex-mainnet-polkadex-parachain-node /data && \ - ln -s /data /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share/polkadex-polkadex-mainnet-polkadex-parachain-node && \ + chown -R polkadex-node:polkadex-node /data && \ + ln -s /data /polkadex-node/.local/share/polkadex-node && \ rm -rf /usr/bin /usr/sbin COPY --from=builder /Polkadex/extras/customSpecRaw.json /data From 43e9a12506d58df7a8d2faa59b727cee3c2b8348 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Sun, 24 Sep 2023 23:10:59 -0700 Subject: [PATCH 09/51] feat(ci): Integrated parachain node build and check --- .github/workflows/ci.yml | 57 +++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f46901cf5..5959a4748 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,29 +79,39 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Check versions info run: | - rustup -V cargo fmt -- --version cargo clippy -V - name: Lint .toml files run: | taplo lint taplo fmt --check - - name: Build Project with try-polkadex-mainnet - run: cargo build --features try-polkadex-mainnet - - name: Runtime build - run: cargo build -p polkadex-mainnet-polkadex-parachain-node-polkadex-polkadex-mainnet - - name: Build Project with polkadex-mainnet benchmarks - run: cargo build --features polkadex-mainnet-benchmarks - - name: Test weights generation - run: ./target/debug/polkadex-polkadex-mainnet-polkadex-parachain-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1 - - name: Normal Build in release mode + + - name: Build project with "try-runtime" feature + run: RUSTFLAGS="-D warnings" cargo build --features try-runtime + + - name: Build mainnet node runtime + run: RUSTFLAGS="-D warnings" cargo build -p node-polkadex-runtime + - name: Build mainnet node with "runtime-benchmarks" feature + run: RUSTFLAGS="-D warnings" cargo build -p polkadex-node --features runtime-benchmarks + - name: Test mainnet node pallets weights generation + run: ./target/debug/polkadex-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1 + + - name: Build parachain node runtime + run: RUSTFLAGS="-D warnings" cargo build -p parachain-polkadex-runtime + - name: Build parachain node with "runtime-benchmarks" feature + run: RUSTFLAGS="-D warnings" cargo build -p parachain-polkadex-node --features runtime-benchmarks + - name: Test parachain node pallets weights generation + run: ./target/debug/parachain-polkadex-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1 + + - name: Build in release mode if: contains(github.ref, 'Develop') run: RUSTFLAGS="-D warnings" cargo build --release - - name: Normal Build + - name: Build in dev mode if: "!(contains(github.ref, 'Develop'))" run: RUSTFLAGS="-D warnings" cargo build + - name: Check Formatting - run: cargo fmt --check + run: cargo fmt --all -- --check - name: Check Clippy run: cargo clippy -- -D warnings - name: Test Project @@ -110,7 +120,7 @@ jobs: uses: actions-rs/tarpaulin@v0.1 with: version: '0.22.0' - args: '--avoid-cfg-tarpaulin --exclude polkadex-polkadex-mainnet-polkadex-parachain-node polkadex-mainnet-polkadex-parachain-node-polkadex-polkadex-mainnet --workspace --timeout 180' + args: '--avoid-cfg-tarpaulin --exclude polkadex-node node-polkadex-runtime parachain-polkadex-node parachain-polkadex-runtime --workspace --timeout 180' - name: Upload to codecov.io uses: codecov/codecov-action@v3 with: @@ -122,16 +132,27 @@ jobs: with: name: code-coverage-report path: cobertura.xml - - name: Zip compiled binaries + - name: Zip compiled mainnet node binary + if: contains(github.ref, 'Develop') + # Zipping is required since billing is based on the raw uploaded size. + run: zip -r -j polkadex-node.zip ./target/release/polkadex-node + - name: Upload zipped mainnet binary as an artifact + if: contains(github.ref, 'Develop') + uses: actions/upload-artifact@v3 + with: + name: polkadex-node + path: ./polkadex-node.zip + if-no-files-found: error + - name: Zip compiled parachain node binary if: contains(github.ref, 'Develop') # Zipping is required since billing is based on the raw uploaded size. - run: zip -r -j polkadex-polkadex-mainnet-polkadex-parachain-node.zip ./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node - - name: Upload zipped binaries as an artifact + run: zip -r -j parachain-polkadex-node.zip ./target/release/parachain-polkadex-node + - name: Upload zipped parachain binary as an artifact if: contains(github.ref, 'Develop') uses: actions/upload-artifact@v3 with: - name: polkadex-polkadex-mainnet-polkadex-parachain-node - path: ./polkadex-polkadex-mainnet-polkadex-parachain-node.zip + name: parachain-polkadex-node + path: ./parachain-polkadex-node.zip if-no-files-found: error stop-runner: name: Stop self-hosted EC2 runner From 192acd577495cda22ce19d0e13791fd9e83d3d9b Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Sun, 24 Sep 2023 23:11:54 -0700 Subject: [PATCH 10/51] feat(cd): Integrated parachain node build and artifact upload to the release --- .github/workflows/release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 676ace209..6d402f33b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: - name: Prepare artifact run: | zip PolkadexNodeUbuntu.zip --junk-paths target/release/polkadex-node extras/customSpecRaw.json extras/polkadex.service + zip PolkadexParachainNode.zip --junk-paths target/release/parachain-polkadex-node - name: Release uses: softprops/action-gh-release@v1 @@ -38,17 +39,25 @@ jobs: files: | PolkadexNodeUbuntu.zip customSpecRaw.json + PolkadexParachainNode.zip name: Release ${{ github.ref_name }} prerelease: false draft: false - - name: Upload artifact + - name: Upload mainnet node artifact uses: actions/upload-artifact@v3 with: name: PolkadexNodeUbuntu path: ./PolkadexNodeUbuntu.zip if-no-files-found: error + - name: Upload parachain node artifact + uses: actions/upload-artifact@v3 + with: + name: PolkadexParachainNode + path: ./PolkadexParachainNode.zip + if-no-files-found: error + push-to-docker-registry: name: Push Docker Image To Docker Hub runs-on: ubuntu-latest From ed98feed3e4cfaa39a111a76cab5879a24b9bd40 Mon Sep 17 00:00:00 2001 From: zktony Date: Tue, 26 Sep 2023 16:46:17 +0530 Subject: [PATCH 11/51] Fixed polkadoex node errors --- Cargo.lock | 386 +++++++++++++++++++------------- nodes/mainnet/Cargo.toml | 6 +- nodes/mainnet/src/chain_spec.rs | 12 +- nodes/mainnet/src/node_rpc.rs | 13 +- nodes/mainnet/src/service.rs | 16 +- 5 files changed, 260 insertions(+), 173 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6bfa77fe4..f57d8f9b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,9 +115,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead 0.5.2", "aes 0.8.3", @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -408,6 +408,20 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "ark-scale" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bd73bb6ddb72630987d37fa963e99196896c0d0ea81b7c894567e74a2f83af" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "ark-secret-scalar" version = "0.0.2" @@ -582,20 +596,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-executor" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "78f2db9467baa66a700abce2a18c5ad793f6f83310aca1284796fc3921d113fd" dependencies = [ "async-lock", "async-task", "concurrent-queue", - "fastrand 1.9.0", + "fastrand 2.0.1", "futures-lite", "slab", ] @@ -638,36 +652,34 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", ] [[package]] name = "async-net" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4051e67316bc7eff608fe723df5d32ed639946adcd69e07df41fd42a7b411f1f" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" dependencies = [ "async-io", - "autocfg", "blocking", "futures-lite", ] [[package]] name = "async-process" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +checksum = "bf012553ce51eb7aa6dc2143804cc8252bd1cb681a1c5cb7fa94ca88682dee1d" dependencies = [ "async-io", "async-lock", - "autocfg", + "async-signal", "blocking", "cfg-if", - "event-listener", + "event-listener 3.0.0", "futures-lite", - "rustix 0.37.23", - "signal-hook", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -682,11 +694,30 @@ dependencies = [ "syn 2.0.37", ] +[[package]] +name = "async-signal" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4af361a844928cb7d36590d406709473a1b574f443094422ef166daa3b493208" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "concurrent-queue", + "futures-core", + "futures-io", + "libc", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + [[package]] name = "async-task" -version = "4.4.0" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921" [[package]] name = "async-trait" @@ -720,9 +751,9 @@ checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atty" @@ -765,7 +796,7 @@ dependencies = [ "ark-ec", "ark-ed-on-bls12-381-bandersnatch", "ark-ff", - "ark-scale", + "ark-scale 0.0.11", "ark-serialize", "ark-std", "dleq_vrf", @@ -944,16 +975,15 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", "cfg-if", "constant_time_eq 0.3.0", - "digest 0.10.7", ] [[package]] @@ -1013,17 +1043,18 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "94c4ef1f913d78636d78d538eec1f18de81e481f44b1be0a81060090530846e1" dependencies = [ "async-channel", "async-lock", "async-task", - "atomic-waker", - "fastrand 1.9.0", + "fastrand 2.0.1", + "futures-io", "futures-lite", - "log", + "piper", + "tracing", ] [[package]] @@ -1221,7 +1252,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.18", + "semver 1.0.19", "serde", "serde_json", "thiserror", @@ -1407,9 +1438,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.3" +version = "4.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +checksum = "824956d0dca8334758a5b7f7e50518d66ea319330cbceedcf76905c2f6ab30e3" dependencies = [ "clap_builder", "clap_derive", @@ -1417,9 +1448,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "122ec64120a49b4563ccaedcbea7818d069ed8e9aa6d829b82d8a4128936b2ab" dependencies = [ "anstream", "anstyle", @@ -1447,9 +1478,9 @@ checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "coarsetime" -version = "0.1.23" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90d114103adbc625300f346d4d09dfb4ab1c4a8df6868435dd903392ecf4354" +checksum = "99280f81a35511dda7d44f7c943491b41d3ac6fd0b54aea92498bec8612a2423" dependencies = [ "libc", "once_cell", @@ -1506,9 +1537,9 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -1747,16 +1778,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.3" @@ -1804,7 +1825,7 @@ dependencies = [ name = "crowdloan-verifier" version = "0.1.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.5", "csv", "pallet-rewards", "polkadex-primitives", @@ -1917,7 +1938,7 @@ name = "cumulus-client-cli" version = "0.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.3", + "clap 4.4.5", "parity-scale-codec", "sc-chain-spec", "sc-cli", @@ -2488,9 +2509,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622178105f911d937a42cdb140730ba4a3ed2becd8ae6ce39c7d28b5d75d4588" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", @@ -2892,7 +2913,7 @@ source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb06 dependencies = [ "ark-ec", "ark-ff", - "ark-scale", + "ark-scale 0.0.10", "ark-secret-scalar", "ark-serialize", "ark-std", @@ -2904,18 +2925,18 @@ dependencies = [ [[package]] name = "docify" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff509d6aa8e7ca86b36eb3d593132e64204597de3ccb763ffd8bfd2264d54cf3" +checksum = "76ee528c501ddd15d5181997e9518e59024844eac44fd1e40cb20ddb2a8562fa" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b135598b950330937f3a0ddfbe908106ee2ecd5fa95d8ae7952a3c3863efe8da" +checksum = "0ca01728ab2679c464242eca99f94e2ce0514b52ac9ad950e2ed03fca991231c" dependencies = [ "common-path", "derive-syn-parse", @@ -2970,9 +2991,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ecdsa" @@ -3016,7 +3037,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "curve25519-dalek 4.1.0", + "curve25519-dalek 4.1.1", "ed25519", "rand_core 0.6.4", "serde", @@ -3044,7 +3065,7 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.0", + "curve25519-dalek 4.1.1", "ed25519", "hashbrown 0.14.0", "hex", @@ -3214,6 +3235,17 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -3283,9 +3315,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fatality" @@ -3498,7 +3530,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.4.3", + "clap 4.4.5", "comfy-table", "frame-benchmarking", "frame-support", @@ -3790,7 +3822,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.13", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -4171,9 +4203,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -4516,9 +4548,9 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -4585,7 +4617,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] @@ -4620,8 +4652,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.13", + "hermit-abi 0.3.3", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -5780,9 +5812,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "rawpointer", @@ -5790,10 +5822,11 @@ dependencies = [ [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest 0.10.7", ] @@ -5805,11 +5838,11 @@ checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.23", + "rustix 0.38.14", ] [[package]] @@ -6392,7 +6425,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", ] @@ -8205,7 +8238,7 @@ dependencies = [ name = "parachain-polkadex-node" version = "1.0.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.5", "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-aura", @@ -8395,9 +8428,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" [[package]] name = "parking_lot" @@ -8534,9 +8567,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" +checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" dependencies = [ "memchr", "thiserror", @@ -8545,9 +8578,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" +checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8" dependencies = [ "pest", "pest_generator", @@ -8555,9 +8588,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" +checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a" dependencies = [ "pest", "pest_meta", @@ -8568,9 +8601,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" +checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d" dependencies = [ "once_cell", "pest", @@ -8625,6 +8658,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkcs8" version = "0.9.0" @@ -8676,10 +8720,11 @@ dependencies = [ name = "polkadex-node" version = "5.3.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.5", "frame-benchmarking-cli", "frame-support", "frame-system", + "frame-system-rpc-runtime-api", "frame-try-runtime", "futures 0.3.28", "hex-literal 0.4.1", @@ -8687,6 +8732,7 @@ dependencies = [ "jsonrpsee", "node-executor", "node-polkadex-runtime", + "pallet-asset-conversion-tx-payment", "pallet-im-online", "pallet-ocex-lmp", "pallet-ocex-rpc", @@ -8713,12 +8759,14 @@ dependencies = [ "sc-keystore", "sc-network", "sc-network-common", + "sc-network-statement", "sc-network-sync", "sc-offchain", "sc-rpc", "sc-rpc-api", "sc-service", "sc-service-test", + "sc-statement-store", "sc-storage-monitor", "sc-sync-state-rpc", "sc-sysinfo", @@ -8738,6 +8786,7 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-runtime", + "sp-statement-store", "sp-timestamp", "sp-tracing", "sp-transaction-storage-proof", @@ -8852,7 +8901,7 @@ name = "polkadot-cli" version = "1.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.3", + "clap 4.4.5", "frame-benchmarking-cli", "futures 0.3.28", "log", @@ -10351,9 +10400,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", "rand 0.8.5", @@ -10470,9 +10519,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -10480,14 +10529,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -10635,9 +10682,9 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "rend" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" +checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" dependencies = [ "bytecheck", ] @@ -10984,7 +11031,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.18", + "semver 1.0.19", ] [[package]] @@ -11026,9 +11073,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ "bitflags 2.4.0", "errno", @@ -11070,7 +11117,7 @@ checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring 0.16.20", - "rustls-webpki 0.101.5", + "rustls-webpki 0.101.6", "sct 0.7.0", ] @@ -11107,9 +11154,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.5" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring 0.16.20", "untrusted", @@ -11290,7 +11337,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "array-bytes", "chrono", - "clap 4.4.3", + "clap 4.4.5", "fdlimit", "futures 0.3.28", "libp2p-identity", @@ -11834,6 +11881,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-network-statement" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "array-bytes", + "async-channel", + "futures 0.3.28", + "libp2p", + "log", + "parity-scale-codec", + "sc-network", + "sc-network-common", + "sp-consensus", + "sp-statement-store", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-network-sync" version = "0.10.0-dev" @@ -12134,12 +12199,31 @@ dependencies = [ "sp-core", ] +[[package]] +name = "sc-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "log", + "parity-db", + "parking_lot 0.12.1", + "sc-client-api", + "sc-keystore", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-statement-store", + "substrate-prometheus-endpoint", + "tokio", +] + [[package]] name = "sc-storage-monitor" version = "0.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.3", + "clap 4.4.5", "fs4", "log", "sc-client-db", @@ -12530,9 +12614,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" dependencies = [ "serde", ] @@ -12626,9 +12710,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -12696,16 +12780,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -12798,9 +12872,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "smol" @@ -12837,7 +12911,7 @@ dependencies = [ "derive_more", "ed25519-zebra 4.0.3", "either", - "event-listener", + "event-listener 2.5.3", "fnv", "futures-lite", "futures-util", @@ -12885,7 +12959,7 @@ dependencies = [ "blake2-rfc", "derive_more", "either", - "event-listener", + "event-listener 2.5.3", "fnv", "futures-channel", "futures-lite", @@ -12924,7 +12998,7 @@ dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.1.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "ring 0.16.20", "rustc_version 0.4.0", @@ -13534,8 +13608,8 @@ name = "sp-statement-store" version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "aes-gcm 0.10.2", - "curve25519-dalek 4.1.0", + "aes-gcm 0.10.3", + "curve25519-dalek 4.1.1", "ed25519-dalek", "hkdf", "parity-scale-codec", @@ -14327,17 +14401,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.13", + "rustix 0.38.14", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -14586,9 +14660,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", "itoa", @@ -14599,15 +14673,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -14730,9 +14804,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -15019,7 +15093,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "clap 4.4.3", + "clap 4.4.5", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -15139,9 +15213,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -15254,9 +15328,9 @@ dependencies = [ [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" @@ -15790,7 +15864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" dependencies = [ "aes 0.6.0", - "aes-gcm 0.10.2", + "aes-gcm 0.10.3", "async-trait", "bincode", "block-modes", @@ -16057,7 +16131,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.13", + "rustix 0.38.14", ] [[package]] @@ -16094,9 +16168,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -16336,7 +16410,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.1.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "serde", "zeroize", diff --git a/nodes/mainnet/Cargo.toml b/nodes/mainnet/Cargo.toml index ebca51781..2bd13e570 100644 --- a/nodes/mainnet/Cargo.toml +++ b/nodes/mainnet/Cargo.toml @@ -78,7 +78,11 @@ frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "r pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } - +sc-statement-store = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-statement-store = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-statement = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-asset-conversion-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } #Primitives polkadex-primitives = { path = "../../primitives/polkadex" } sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } diff --git a/nodes/mainnet/src/chain_spec.rs b/nodes/mainnet/src/chain_spec.rs index c3ad765c7..22e0cf4c1 100644 --- a/nodes/mainnet/src/chain_spec.rs +++ b/nodes/mainnet/src/chain_spec.rs @@ -23,6 +23,7 @@ use itertools::Itertools; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use polkadex_primitives::Block; pub use polkadex_primitives::{AccountId, Balance, Signature}; +use node_polkadex_runtime::RuntimeGenesisConfig; use sc_chain_spec::ChainSpecExtension; use sc_service::ChainType; use sc_telemetry::TelemetryEndpoints; @@ -34,7 +35,6 @@ use sp_runtime::{ traits::{AccountIdConversion, IdentifyAccount, Verify}, Perbill, }; -use rpc as pub use node_polkadex_runtime::GenesisConfig; use node_polkadex_runtime::{ @@ -444,8 +444,8 @@ pub fn testnet_genesis( } let vesting = get_vesting_terms(); - GenesisConfig { - system: SystemConfig { code: wasm_binary_unwrap().to_vec() }, + RuntimeGenesisConfig { + system: SystemConfig { code: wasm_binary_unwrap().to_vec(), ..Default::default() }, balances: BalancesConfig { balances: endowed_accounts }, indices: IndicesConfig { indices: vec![] }, @@ -490,14 +490,18 @@ pub fn testnet_genesis( babe: BabeConfig { authorities: Default::default(), epoch_config: Some(node_polkadex_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() }, im_online: Default::default(), - authority_discovery: AuthorityDiscoveryConfig { keys: vec![] }, + authority_discovery: Default::default(), grandpa: Default::default(), technical_membership: Default::default(), treasury: Default::default(), orml_vesting: OrmlVestingConfig { vesting }, pdex_migration: PDEXMigrationConfig { max_tokens: ERC20_PDEX_SUPPLY, operational: false }, + assets: Default::default(), + orderbook_committee: Default::default(), + transaction_payment: Default::default() } } diff --git a/nodes/mainnet/src/node_rpc.rs b/nodes/mainnet/src/node_rpc.rs index 1a07e043f..4341a7def 100644 --- a/nodes/mainnet/src/node_rpc.rs +++ b/nodes/mainnet/src/node_rpc.rs @@ -38,7 +38,7 @@ use polkadex_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index}; use rpc_assets::{PolkadexAssetHandlerRpc, PolkadexAssetHandlerRpcApiServer}; use sc_client_api::{AuxStore, BlockchainEvents}; use sc_consensus_babe::BabeWorkerHandle; -use sc_consensus_grandpa::{ +use grandpa::{ FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, }; use sc_rpc::SubscriptionTaskExecutor; @@ -51,7 +51,7 @@ use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; - +use sc_rpc::statement::StatementApiServer; use sp_keystore::KeystorePtr; use std::sync::Arc; @@ -93,6 +93,8 @@ pub struct FullDeps { pub babe: BabeDeps, /// GRANDPA specific dependencies. pub grandpa: GrandpaDeps, + /// Shared statement store reference. + pub statement_store: Arc, /// The backend used by the polkadex-mainnet-polkadex-parachain-node. pub backend: Arc, } @@ -117,7 +119,7 @@ where P: TransactionPool + 'static, SC: SelectChain + 'static, B: sc_client_api::Backend + Send + Sync + 'static, - B::State: sc_client_api::backend::StateBackend>, + B::State: sc_client_api::backend::StateBackend>, C::Api: rpc_assets::PolkadexAssetHandlerRuntimeApi, C::Api: pallet_rewards_rpc::PolkadexRewardsRuntimeApi, C::Api: pallet_ocex_rpc::PolkadexOcexRuntimeApi, @@ -134,7 +136,7 @@ where // use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer}; let mut io = RpcModule::new(()); - let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa, backend } = + let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa, statement_store, backend } = deps; let BabeDeps { keystore, babe_worker_handle } = babe; @@ -182,5 +184,8 @@ where .into_rpc(), )?; io.merge(Dev::new(client.clone(), deny_unsafe).into_rpc())?; + let statement_store = + sc_rpc::statement::StatementStore::new(statement_store, deny_unsafe).into_rpc(); + io.merge(statement_store)?; Ok(io) } diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index 48d4b644b..52ca8ba09 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -19,21 +19,22 @@ #![warn(unused_extern_crates)] //! Service implementation. Specialized wrapper over substrate service. -use crate::cli; -use crate::node_rpc; + +use crate::cli::Cli; use codec::Encode; use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; -use frame_system_rpc_runtime_api::AccountNonceApi; use futures::prelude::*; use node_polkadex_runtime::RuntimeApi; use node_executor::ExecutorDispatch; -use node_primitives::Block; +use polkadex_primitives::Block; use sc_client_api::{Backend, BlockBackend}; use sc_consensus_babe::{self, SlotProportion}; use sc_executor::NativeElseWasmExecutor; use sc_network::{event::Event, NetworkEventStream, NetworkService}; use sc_network_sync::{warp::WarpSyncParams, SyncingService}; use sc_service::{config::Configuration, error::Error as ServiceError, RpcHandlers, TaskManager}; +use substrate_frame_rpc_system::AccountNonceApi; +use crate::node_rpc; use sc_statement_store::Store as StatementStore; use sc_telemetry::{Telemetry, TelemetryWorker}; use sc_transaction_pool_api::OffchainTransactionPoolFactory; @@ -41,7 +42,7 @@ use sp_api::ProvideRuntimeApi; use sp_core::crypto::Pair; use sp_runtime::{generic, traits::Block as BlockT, SaturatedConversion}; use std::sync::Arc; -use crate::cli::Cli; +use frame_support::__private::log; /// The full client type definition. pub type FullClient = @@ -93,7 +94,7 @@ pub fn create_extrinsic( .unwrap_or(2) as u64; let tip = 0; let extra: node_polkadex_runtime::SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), + //frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -105,14 +106,13 @@ pub fn create_extrinsic( frame_system::CheckWeight::::new(), pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::::from( tip, None, - ), + ), //TODO: @Gautham check this ); let raw_payload = node_polkadex_runtime::SignedPayload::from_raw( function.clone(), extra.clone(), ( - (), node_polkadex_runtime::VERSION.spec_version, node_polkadex_runtime::VERSION.transaction_version, genesis_hash, From 90a6a8c27f1fd6a9ce4bd1c16a0a88016474b130 Mon Sep 17 00:00:00 2001 From: zktony Date: Wed, 27 Sep 2023 15:34:13 +0530 Subject: [PATCH 12/51] Fixed rutime issue --- Cargo.lock | 2 ++ Cargo.toml | 3 ++- nodes/mainnet/src/chain_spec.rs | 16 +++++++--------- nodes/mainnet/src/command.rs | 2 +- nodes/mainnet/src/main.rs | 2 +- runtimes/mainnet/Cargo.toml | 6 +++++- runtimes/mainnet/src/lib.rs | 31 +++++++++++++++++++++++++++++++ 7 files changed, 49 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f57d8f9b1..6a11db3ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6287,6 +6287,7 @@ dependencies = [ "pallet-session", "pallet-staking", "pallet-staking-reward-curve", + "pallet-statement", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", @@ -6311,6 +6312,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", + "sp-statement-store", "sp-std", "sp-transaction-pool", "sp-version", diff --git a/Cargo.toml b/Cargo.toml index 39309ae98..4ebf6488f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -133,7 +133,8 @@ pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot #pallet-randomness-collective-flip = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } - +pallet-statement = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-statement-store = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-asset-conversion = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } pallet-asset-conversion-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } diff --git a/nodes/mainnet/src/chain_spec.rs b/nodes/mainnet/src/chain_spec.rs index 22e0cf4c1..6442feb69 100644 --- a/nodes/mainnet/src/chain_spec.rs +++ b/nodes/mainnet/src/chain_spec.rs @@ -35,8 +35,6 @@ use sp_runtime::{ traits::{AccountIdConversion, IdentifyAccount, Verify}, Perbill, }; - -pub use node_polkadex_runtime::GenesisConfig; use node_polkadex_runtime::{ constants::currency::PDEX, wasm_binary_unwrap, AuthorityDiscoveryConfig, BabeConfig, BalancesConfig, CouncilConfig, IndicesConfig, OrmlVestingConfig, PDEXMigrationConfig, @@ -64,7 +62,7 @@ pub struct Extensions { } /// Specialized `ChainSpec`. -pub type ChainSpec = sc_service::GenericChainSpec; +pub type ChainSpec = sc_service::GenericChainSpec; pub(crate) fn session_keys( grandpa: GrandpaId, @@ -77,7 +75,7 @@ pub(crate) fn session_keys( SessionKeys { grandpa, babe, im_online, authority_discovery, orderbook, thea } } -fn udon_testnet_config_genesis() -> GenesisConfig { +fn udon_testnet_config_genesis() -> RuntimeGenesisConfig { let seed = "owner word vocal dose decline sunset battle example forget excite gentle waste//"; let mut initial_authorities: Vec<( AccountId, @@ -215,7 +213,7 @@ pub fn authority_keys_from_seed( ) } -fn development_config_genesis() -> GenesisConfig { +fn development_config_genesis() -> RuntimeGenesisConfig { let enclave_developement_account: AccountId = hex!["90ea3ff124ecd5732b9e95a85f6bf17258e735be5dd950351f4269956de0b976"].into(); @@ -245,7 +243,7 @@ pub fn development_config() -> ChainSpec { ) } -fn soba_testnet_genesis() -> GenesisConfig { +fn soba_testnet_genesis() -> RuntimeGenesisConfig { let enclave_developement_account: AccountId = hex!["90ea3ff124ecd5732b9e95a85f6bf17258e735be5dd950351f4269956de0b976"].into(); let orderbook_test_main_account: AccountId = @@ -274,7 +272,7 @@ pub fn soba_testnet_config() -> ChainSpec { ) } -fn mainnet_genesis_constuctor() -> GenesisConfig { +fn mainnet_genesis_constuctor() -> RuntimeGenesisConfig { let initial_authorities: Vec<( AccountId, AccountId, @@ -381,7 +379,7 @@ pub fn testnet_genesis( _initial_nominators: Vec, development_accounts: Option>, root_key: AccountId, -) -> GenesisConfig { +) -> RuntimeGenesisConfig { const ENDOWMENT: u128 = 100 * PDEX; const STASH: u128 = 2 * PDEX; // Total Supply in ERC20 @@ -1233,7 +1231,7 @@ pub(crate) mod tests { use super::*; - fn local_testnet_genesis_instant_single() -> GenesisConfig { + fn local_testnet_genesis_instant_single() -> RuntimeGenesisConfig { testnet_genesis( vec![authority_keys_from_seed("Alice")], vec![], diff --git a/nodes/mainnet/src/command.rs b/nodes/mainnet/src/command.rs index 654945464..446e89188 100644 --- a/nodes/mainnet/src/command.rs +++ b/nodes/mainnet/src/command.rs @@ -218,7 +218,7 @@ pub fn run() -> Result<()> { let PartialComponents { client, task_manager, backend, .. } = new_partial(&config)?; let aux_revert = Box::new(move |client: Arc, backend, blocks| { sc_consensus_babe::revert(client.clone(), backend, blocks)?; - sc_consensus_grandpa::revert(client, blocks)?; + grandpa::revert(client, blocks)?; Ok(()) }); Ok((cmd.run(client, backend, Some(aux_revert)), task_manager)) diff --git a/nodes/mainnet/src/main.rs b/nodes/mainnet/src/main.rs index 79c595f9c..492f99bde 100644 --- a/nodes/mainnet/src/main.rs +++ b/nodes/mainnet/src/main.rs @@ -25,7 +25,7 @@ mod service; mod benchmarking; mod cli; mod command; -mod rpc; +mod node_rpc; fn main() -> sc_cli::Result<()> { command::run() diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index 9494d3997..aa56463ea 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -49,6 +49,7 @@ pallet-recovery = { default-features = false, workspace = true } pallet-election-provider-multi-phase = { default-features = false, workspace = true } pallet-authority-discovery = { default-features = false, workspace = true } pallet-child-bounties = { default-features = false, workspace = true } +pallet-statement = { default-features = false, workspace = true } # Assets pallet pallet-asset-conversion = { default-features = false, workspace = true } @@ -68,6 +69,7 @@ sp-std = { default-features = false, workspace = true } sp-transaction-pool = { default-features = false, workspace = true } sp-version = { default-features = false, workspace = true } sp-io = { workspace = true, default-features = false } +sp-statement-store = { workspace = true, default-features = false } #added sp-authority-discovery = { default-features = false, workspace = true } @@ -193,7 +195,9 @@ std = [ "thea-message-handler?/std", "orderbook-primitives/std", "pallet-asset-conversion/std", - "pallet-asset-conversion-tx-payment/std" + "pallet-asset-conversion-tx-payment/std", + "pallet-statement/std", + "sp-statement-store/std" ] runtime-benchmarks = [ #theirs diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index e223bca69..1f3047873 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -1411,6 +1411,26 @@ impl pallet_asset_conversion::Config for Runtime { type BenchmarkHelper = (); } +parameter_types! { + pub StatementCost: Balance = 1 * DOLLARS; + pub StatementByteCost: Balance = 100 * MILLICENTS; + pub const MinAllowedStatements: u32 = 4; + pub const MaxAllowedStatements: u32 = 10; + pub const MinAllowedBytes: u32 = 1024; + pub const MaxAllowedBytes: u32 = 4096; +} + +impl pallet_statement::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type StatementCost = StatementCost; + type ByteCost = StatementByteCost; + type MinAllowedStatements = MinAllowedStatements; + type MaxAllowedStatements = MaxAllowedStatements; + type MinAllowedBytes = MinAllowedBytes; + type MaxAllowedBytes = MaxAllowedBytes; +} + #[cfg(feature = "runtime-benchmarks")] construct_runtime!( pub struct Runtime @@ -1459,6 +1479,7 @@ construct_runtime!( TheaMH: thea_message_handler::pallet = 45, AssetConversion: pallet_asset_conversion = 46, AssetConversionTxPayment: pallet_asset_conversion_tx_payment = 47, + Statement: pallet_statement = 48 } ); @@ -1508,6 +1529,7 @@ construct_runtime!( TheaExecutor: thea_executor::pallet = 44, AssetConversion: pallet_asset_conversion = 46, AssetConversionTxPayment: pallet_asset_conversion_tx_payment = 47, + Statement: pallet_statement = 48 } ); /// Digest item type. @@ -1654,6 +1676,15 @@ impl_runtime_apis! { } } + impl sp_statement_store::runtime_api::ValidateStatement for Runtime { + fn validate_statement( + source: sp_statement_store::runtime_api::StatementSource, + statement: sp_statement_store::Statement, + ) -> Result { + Statement::validate_statement(source, statement) + } + } + impl sp_transaction_pool::runtime_api::TaggedTransactionQueue for Runtime { fn validate_transaction( source: TransactionSource, From ad28b97ede7c9708a7012c5e14a0dea9c6e551b2 Mon Sep 17 00:00:00 2001 From: gautham Date: Thu, 28 Sep 2023 10:19:16 +0530 Subject: [PATCH 13/51] Fixed polkadex-node --- Cargo.lock | 570 +------------------------------- nodes/mainnet/Cargo.toml | 4 - nodes/mainnet/src/chain_spec.rs | 14 +- nodes/mainnet/src/command.rs | 9 +- nodes/mainnet/src/lib.rs | 1 + nodes/mainnet/src/main.rs | 1 - nodes/mainnet/src/node_rpc.rs | 22 +- nodes/mainnet/src/service.rs | 64 ++-- runtimes/mainnet/src/lib.rs | 2 - 9 files changed, 62 insertions(+), 625 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a11db3ca..519d1e73d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -355,7 +355,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version 0.4.0", + "rustc_version", "zeroize", ] @@ -2519,7 +2519,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms 3.1.2", - "rustc_version 0.4.0", + "rustc_version", "subtle", "zeroize", ] @@ -2808,7 +2808,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -3570,21 +3570,6 @@ dependencies = [ "thousands", ] -[[package]] -name = "frame-benchmarking-pallet-pov" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" @@ -4469,17 +4454,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-num-traits" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951641f13f873bff03d4bf19ae8bec531935ac0ac2cc775f84d7edfdcfed3f17" -dependencies = [ - "integer-sqrt", - "num-traits", - "uint", -] - [[package]] name = "impl-serde" version = "0.4.0" @@ -4874,120 +4848,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kitchensink-runtime" -version = "3.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-benchmarking-pallet-pov", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "log", - "node-primitives", - "pallet-alliance", - "pallet-asset-conversion", - "pallet-asset-conversion-tx-payment", - "pallet-asset-rate", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-broker", - "pallet-child-bounties", - "pallet-collective", - "pallet-contracts", - "pallet-contracts-primitives", - "pallet-conviction-voting", - "pallet-core-fellowship", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-glutton", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-insecure-randomness-collective-flip", - "pallet-lottery", - "pallet-membership", - "pallet-message-queue", - "pallet-mmr", - "pallet-multisig", - "pallet-nft-fractionalization", - "pallet-nfts", - "pallet-nfts-runtime-api", - "pallet-nis", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-remark", - "pallet-root-testing", - "pallet-safe-mode", - "pallet-salary", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-society", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-staking-runtime-api", - "pallet-state-trie-migration", - "pallet-statement", - "pallet-sudo", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-transaction-storage", - "pallet-treasury", - "pallet-tx-pause", - "pallet-uniques", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "parity-scale-codec", - "primitive-types", - "scale-info", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-statement-store", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", -] - [[package]] name = "kusama-runtime-constants" version = "1.0.0" @@ -6220,25 +6080,6 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" -[[package]] -name = "node-executor" -version = "3.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "kitchensink-runtime", - "node-primitives", - "parity-scale-codec", - "sc-executor", - "scale-info", - "sp-core", - "sp-keystore", - "sp-state-machine", - "sp-statement-store", - "sp-tracing", - "sp-trie", -] - [[package]] name = "node-polkadex-runtime" version = "5.3.0" @@ -6323,15 +6164,6 @@ dependencies = [ "thea-message-handler", ] -[[package]] -name = "node-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "sp-core", - "sp-runtime", -] - [[package]] name = "nodrop" version = "0.1.14" @@ -6670,26 +6502,6 @@ dependencies = [ "sha2 0.10.7", ] -[[package]] -name = "pallet-alliance" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-collective", - "pallet-identity", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-core-hashing", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-asset-conversion" version = "4.0.0-dev" @@ -6723,39 +6535,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-asset-rate" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-asset-tx-payment" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-transaction-payment", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-assets" version = "4.0.0-dev" @@ -6943,23 +6722,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-broker" -version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "bitvec", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" @@ -7015,58 +6777,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-contracts" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "bitflags 1.3.2", - "environmental", - "frame-benchmarking", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-balances", - "pallet-contracts-primitives", - "pallet-contracts-proc-macro", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "serde", - "smallvec", - "sp-api", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "wasm-instrument 0.4.0", - "wasmi", -] - -[[package]] -name = "pallet-contracts-primitives" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "bitflags 1.3.2", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", - "sp-weights", -] - -[[package]] -name = "pallet-contracts-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.37", -] - [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" @@ -7084,24 +6794,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-core-fellowship" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-democracy" version = "4.0.0-dev" @@ -7195,24 +6887,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-glutton" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "blake2", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-grandpa" version = "4.0.0-dev" @@ -7289,34 +6963,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-insecure-randomness-collective-flip" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "safe-mix", - "scale-info", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-lottery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-membership" version = "4.0.0-dev" @@ -7387,51 +7033,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-nft-fractionalization" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-assets", - "pallet-nfts", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-nfts" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-nfts-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "pallet-nfts", - "parity-scale-codec", - "sp-api", -] - [[package]] name = "pallet-nis" version = "4.0.0-dev" @@ -7693,23 +7294,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-remark" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-rewards" version = "1.1.0" @@ -7757,57 +7341,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-root-testing" -version = "1.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-safe-mode" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-balances", - "pallet-proxy", - "pallet-utility", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-salary" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-scheduler" version = "4.0.0-dev" @@ -8067,26 +7600,6 @@ dependencies = [ "sp-weights", ] -[[package]] -name = "pallet-transaction-storage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "serde", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-transaction-storage-proof", -] - [[package]] name = "pallet-treasury" version = "4.0.0-dev" @@ -8104,38 +7617,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-tx-pause" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-balances", - "pallet-proxy", - "pallet-utility", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-uniques" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-utility" version = "4.0.0-dev" @@ -8726,20 +8207,17 @@ dependencies = [ "frame-benchmarking-cli", "frame-support", "frame-system", - "frame-system-rpc-runtime-api", "frame-try-runtime", "futures 0.3.28", "hex-literal 0.4.1", "itertools 0.10.5", "jsonrpsee", - "node-executor", "node-polkadex-runtime", "pallet-asset-conversion-tx-payment", "pallet-im-online", "pallet-ocex-lmp", "pallet-ocex-rpc", "pallet-rewards-rpc", - "pallet-transaction-payment", "pallet-transaction-payment-rpc", "parity-scale-codec", "polkadex-client", @@ -8760,7 +8238,6 @@ dependencies = [ "sc-executor", "sc-keystore", "sc-network", - "sc-network-common", "sc-network-statement", "sc-network-sync", "sc-offchain", @@ -10150,7 +9627,6 @@ checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash", "impl-codec", - "impl-num-traits", "impl-serde", "scale-info", "uint", @@ -11018,15 +10494,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" @@ -11198,15 +10665,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "safe-mix" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" -dependencies = [ - "rustc_version 0.2.3", -] - [[package]] name = "safe_arch" version = "0.7.1" @@ -11716,7 +11174,7 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-wasm-interface", "thiserror", - "wasm-instrument 0.3.0", + "wasm-instrument", ] [[package]] @@ -12605,15 +12063,6 @@ dependencies = [ "semver-parser", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.19" @@ -13003,7 +12452,7 @@ dependencies = [ "curve25519-dalek 4.1.1", "rand_core 0.6.4", "ring 0.16.20", - "rustc_version 0.4.0", + "rustc_version", "sha2 0.10.7", "subtle", ] @@ -15440,15 +14889,6 @@ 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.114.1" diff --git a/nodes/mainnet/Cargo.toml b/nodes/mainnet/Cargo.toml index 2bd13e570..e6d038b36 100644 --- a/nodes/mainnet/Cargo.toml +++ b/nodes/mainnet/Cargo.toml @@ -55,7 +55,6 @@ sc-storage-monitor = { git = "https://github.com/paritytech/polkadot-sdk", branc sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -node-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } @@ -75,18 +74,15 @@ substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } #sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-statement-store = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-statement-store = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-network-statement = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } pallet-asset-conversion-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } #Primitives polkadex-primitives = { path = "../../primitives/polkadex" } sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } -sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } diff --git a/nodes/mainnet/src/chain_spec.rs b/nodes/mainnet/src/chain_spec.rs index 6442feb69..5c3e553ba 100644 --- a/nodes/mainnet/src/chain_spec.rs +++ b/nodes/mainnet/src/chain_spec.rs @@ -20,10 +20,14 @@ use frame_support::PalletId; use grandpa_primitives::AuthorityId as GrandpaId; use hex_literal::hex; use itertools::Itertools; +use node_polkadex_runtime::{ + constants::currency::PDEX, wasm_binary_unwrap, BabeConfig, BalancesConfig, CouncilConfig, + IndicesConfig, OrmlVestingConfig, PDEXMigrationConfig, RuntimeGenesisConfig, SessionConfig, + SessionKeys, StakerStatus, StakingConfig, SudoConfig, SystemConfig, TechnicalCommitteeConfig, +}; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use polkadex_primitives::Block; pub use polkadex_primitives::{AccountId, Balance, Signature}; -use node_polkadex_runtime::RuntimeGenesisConfig; use sc_chain_spec::ChainSpecExtension; use sc_service::ChainType; use sc_telemetry::TelemetryEndpoints; @@ -35,12 +39,6 @@ use sp_runtime::{ traits::{AccountIdConversion, IdentifyAccount, Verify}, Perbill, }; -use node_polkadex_runtime::{ - constants::currency::PDEX, wasm_binary_unwrap, AuthorityDiscoveryConfig, BabeConfig, - BalancesConfig, CouncilConfig, IndicesConfig, OrmlVestingConfig, PDEXMigrationConfig, - SessionConfig, SessionKeys, StakerStatus, StakingConfig, SudoConfig, SystemConfig, - TechnicalCommitteeConfig, -}; type AccountPublic = ::Signer; @@ -499,7 +497,7 @@ pub fn testnet_genesis( pdex_migration: PDEXMigrationConfig { max_tokens: ERC20_PDEX_SUPPLY, operational: false }, assets: Default::default(), orderbook_committee: Default::default(), - transaction_payment: Default::default() + transaction_payment: Default::default(), } } diff --git a/nodes/mainnet/src/command.rs b/nodes/mainnet/src/command.rs index 446e89188..2b7a67832 100644 --- a/nodes/mainnet/src/command.rs +++ b/nodes/mainnet/src/command.rs @@ -25,11 +25,12 @@ use crate::{ }; use node_polkadex_runtime::{Block, ExistentialDeposit}; +#[cfg(feature = "try-runtime")] use polkadex_client::ExecutorDispatch; use polkadex_node::benchmarking::{ inherent_benchmark_data, RemarkBuilder, TransferKeepAliveBuilder, }; -use sc_cli::{ChainSpec, Result, RuntimeVersion, SubstrateCli}; +use sc_cli::{Result, SubstrateCli}; use sc_service::PartialComponents; use sp_keyring::Sr25519Keyring; @@ -74,10 +75,6 @@ impl SubstrateCli for Cli { }; Ok(spec) } - - fn native_runtime_version(_: &Box) -> &'static RuntimeVersion { - &node_polkadex_runtime::VERSION - } } // Parse command line arguments into service configuration. @@ -112,7 +109,7 @@ pub fn run() -> Result<()> { ) } - cmd.run::(config) + cmd.run::(config) }, BenchmarkCmd::Block(cmd) => { let PartialComponents { client, .. } = new_partial(&config)?; diff --git a/nodes/mainnet/src/lib.rs b/nodes/mainnet/src/lib.rs index 427101bda..009de6628 100644 --- a/nodes/mainnet/src/lib.rs +++ b/nodes/mainnet/src/lib.rs @@ -15,6 +15,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#![deny(unused_crate_dependencies)] pub mod benchmarking; pub mod chain_spec; diff --git a/nodes/mainnet/src/main.rs b/nodes/mainnet/src/main.rs index 492f99bde..da7276a7e 100644 --- a/nodes/mainnet/src/main.rs +++ b/nodes/mainnet/src/main.rs @@ -26,7 +26,6 @@ mod benchmarking; mod cli; mod command; mod node_rpc; - fn main() -> sc_cli::Result<()> { command::run() } diff --git a/nodes/mainnet/src/node_rpc.rs b/nodes/mainnet/src/node_rpc.rs index 4341a7def..d25829f2c 100644 --- a/nodes/mainnet/src/node_rpc.rs +++ b/nodes/mainnet/src/node_rpc.rs @@ -34,14 +34,14 @@ use jsonrpsee::RpcModule; use pallet_ocex_rpc::PolkadexOcexRpc; use pallet_rewards_rpc::PolkadexRewardsRpc; +use grandpa::{ + FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, +}; use polkadex_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index}; use rpc_assets::{PolkadexAssetHandlerRpc, PolkadexAssetHandlerRpcApiServer}; use sc_client_api::{AuxStore, BlockchainEvents}; use sc_consensus_babe::BabeWorkerHandle; -use grandpa::{ - FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, -}; -use sc_rpc::SubscriptionTaskExecutor; +use sc_rpc::{statement::StatementApiServer, SubscriptionTaskExecutor}; /// Re-export the API for backward compatibility. pub use sc_rpc_api::offchain::*; pub use sc_rpc_api::DenyUnsafe; @@ -51,7 +51,6 @@ use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; -use sc_rpc::statement::StatementApiServer; use sp_keystore::KeystorePtr; use std::sync::Arc; @@ -136,8 +135,17 @@ where // use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer}; let mut io = RpcModule::new(()); - let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa, statement_store, backend } = - deps; + let FullDeps { + client, + pool, + select_chain, + chain_spec, + deny_unsafe, + babe, + grandpa, + statement_store, + backend, + } = deps; let BabeDeps { keystore, babe_worker_handle } = babe; let GrandpaDeps { diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index 52ca8ba09..8e6574a1a 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -20,12 +20,13 @@ //! Service implementation. Specialized wrapper over substrate service. -use crate::cli::Cli; +use crate::{cli::Cli, node_rpc}; use codec::Encode; use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; +use frame_support::__private::log; use futures::prelude::*; use node_polkadex_runtime::RuntimeApi; -use node_executor::ExecutorDispatch; +use polkadex_client::ExecutorDispatch; use polkadex_primitives::Block; use sc_client_api::{Backend, BlockBackend}; use sc_consensus_babe::{self, SlotProportion}; @@ -33,8 +34,6 @@ use sc_executor::NativeElseWasmExecutor; use sc_network::{event::Event, NetworkEventStream, NetworkService}; use sc_network_sync::{warp::WarpSyncParams, SyncingService}; use sc_service::{config::Configuration, error::Error as ServiceError, RpcHandlers, TaskManager}; -use substrate_frame_rpc_system::AccountNonceApi; -use crate::node_rpc; use sc_statement_store::Store as StatementStore; use sc_telemetry::{Telemetry, TelemetryWorker}; use sc_transaction_pool_api::OffchainTransactionPoolFactory; @@ -42,15 +41,15 @@ use sp_api::ProvideRuntimeApi; use sp_core::crypto::Pair; use sp_runtime::{generic, traits::Block as BlockT, SaturatedConversion}; use std::sync::Arc; -use frame_support::__private::log; +use substrate_frame_rpc_system::AccountNonceApi; /// The full client type definition. pub type FullClient = -sc_service::TFullClient>; + sc_service::TFullClient>; type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; type FullGrandpaBlockImport = -grandpa::GrandpaBlockImport; + grandpa::GrandpaBlockImport; /// The transaction pool type definition. pub type TransactionPool = sc_transaction_pool::FullPool; @@ -93,21 +92,22 @@ pub fn create_extrinsic( .map(|c| c / 2) .unwrap_or(2) as u64; let tip = 0; - let extra: node_polkadex_runtime::SignedExtra = ( - //frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckEra::::from(generic::Era::mortal( - period, - best_block.saturated_into(), - )), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::::from( - tip, None, - ), //TODO: @Gautham check this - ); + let extra: node_polkadex_runtime::SignedExtra = + ( + //frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(generic::Era::mortal( + period, + best_block.saturated_into(), + )), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::< + node_polkadex_runtime::Runtime, + >::from(tip, None), //TODO: @Gautham check this + ); let raw_payload = node_polkadex_runtime::SignedPayload::from_raw( function.clone(), @@ -245,7 +245,7 @@ pub fn new_partial( config.prometheus_registry(), &task_manager.spawn_handle(), ) - .map_err(|e| ServiceError::Other(format!("Statement store error: {:?}", e)))?; + .map_err(|e| ServiceError::Other(format!("Statement store error: {:?}", e)))?; let (rpc_extensions_builder, rpc_setup) = { let (_, grandpa_link, _) = &import_setup; @@ -605,8 +605,8 @@ pub fn new_full_base( vec![Box::new(statement_store.clone().as_statement_store_ext()) as Box<_>] }, }) - .run(client.clone(), task_manager.spawn_handle()) - .boxed(), + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); } @@ -632,7 +632,7 @@ pub fn new_full(config: Configuration, cli: Cli) -> Result::babe_pre_digest(babe_pre_digest)); @@ -790,8 +790,8 @@ mod tests { .propose(inherent_data, digest, std::time::Duration::from_secs(1), None) .await }) - .expect("Error making test block") - .block; + .expect("Error making test block") + .block; let (new_header, new_body) = new_block.deconstruct(); let pre_hash = new_header.hash(); @@ -888,4 +888,4 @@ mod tests { vec!["//Alice".into(), "//Bob".into()], ) } -} \ No newline at end of file +} diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index 1f3047873..87d56085a 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -111,8 +111,6 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { ) } - - /// Runtime version. #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { From cfdf2236ed2ac7437d8a3df8e39543ce27e331fb Mon Sep 17 00:00:00 2001 From: gautham Date: Thu, 28 Sep 2023 10:24:37 +0530 Subject: [PATCH 14/51] Remove TODO --- nodes/mainnet/src/service.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index 8e6574a1a..c1c0387f2 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -106,7 +106,7 @@ pub fn create_extrinsic( frame_system::CheckWeight::::new(), pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::< node_polkadex_runtime::Runtime, - >::from(tip, None), //TODO: @Gautham check this + >::from(tip, None), ); let raw_payload = node_polkadex_runtime::SignedPayload::from_raw( From fb76243c8691a4d3ff604a619fafff18d083dbd4 Mon Sep 17 00:00:00 2001 From: zktony Date: Fri, 29 Sep 2023 14:37:43 +0530 Subject: [PATCH 15/51] Reverted name-change --- README.md | 34 ++++++++++----------- dockerfile | 8 ++--- nodes/mainnet/src/cli.rs | 11 +++---- nodes/mainnet/src/command.rs | 16 +++++----- nodes/mainnet/src/node_rpc.rs | 14 ++++----- nodes/mainnet/src/service.rs | 14 ++++----- nodes/parachain/build.rs | 18 +++++++++++ nodes/parachain/src/chain_spec.rs | 18 +++++++++++ nodes/parachain/src/cli.rs | 18 +++++++++++ nodes/parachain/src/command.rs | 18 +++++++++++ nodes/parachain/src/main.rs | 20 ++++++++++-- nodes/parachain/src/rpc.rs | 18 +++++++++++ nodes/parachain/src/service.rs | 18 +++++++++++ pallets/liquidity/src/lib.rs | 2 +- pallets/liquidity/src/mock.rs | 2 +- pallets/liquidity/src/weights.rs | 4 +-- pallets/ocex/rpc/src/lib.rs | 12 ++++---- pallets/ocex/src/lib.rs | 2 +- pallets/ocex/src/mock.rs | 2 +- pallets/ocex/src/storage.rs | 4 +-- pallets/ocex/src/weights.rs | 2 +- pallets/pdex-migration/src/lib.rs | 2 +- pallets/pdex-migration/src/mock.rs | 4 +-- pallets/pdex-migration/src/weights.rs | 2 +- pallets/rewards/rpc/src/lib.rs | 8 ++--- pallets/rewards/src/lib.rs | 2 +- pallets/rewards/src/mock.rs | 2 +- pallets/rewards/src/weights.rs | 2 +- pallets/thea-council/src/lib.rs | 4 +-- pallets/thea-council/src/mock.rs | 4 +-- pallets/thea-council/src/weights.rs | 2 +- pallets/thea-executor/src/lib.rs | 2 +- pallets/thea-executor/src/mock.rs | 4 +-- pallets/thea-executor/src/weights.rs | 2 +- pallets/thea-message-handler/src/mock.rs | 4 +-- pallets/thea-message-handler/src/weights.rs | 2 +- pallets/thea/src/lib.rs | 4 +-- pallets/thea/src/mock.rs | 4 +-- pallets/thea/src/session.rs | 6 ++-- pallets/thea/src/weights.rs | 2 +- pallets/xcm-helper/src/benchmarking.rs | 2 +- pallets/xcm-helper/src/lib.rs | 4 +-- pallets/xcm-helper/src/mock.rs | 4 +-- pallets/xcm-helper/src/weights.rs | 2 +- rpc/assets/src/lib.rs | 6 ++-- runtimes/mainnet/Cargo.toml | 6 ++-- runtimes/mainnet/src/constants.rs | 2 +- runtimes/mainnet/src/impls.rs | 6 ++-- runtimes/mainnet/src/lib.rs | 26 ++++++++-------- runtimes/parachain/src/lib.rs | 3 +- scripts/start_chain.sh | 16 +++++----- 51 files changed, 257 insertions(+), 137 deletions(-) diff --git a/README.md b/README.md index f86eddeee..c56e239dc 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Note that cloning master might result in an unstable build. If you want a stable git clone https://github.com/Polkadex-Substrate/Polkadex.git cd Polkadex -# Build the polkadex-mainnet-polkadex-parachain-node (The first build will be long (~30min)) +# Build the node (The first build will be long (~30min)) cargo build --release ``` @@ -54,7 +54,7 @@ source $HOME/.cargo/env Then, you will want to run the node in dev mode using the following command: ```bash -./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node --dev +./target/release/polkadex-node --dev ``` > For people not familiar with Substrate, the --dev flag is a way to run a Substrate-based node in a single node developer configuration for testing purposes. You can learn more about `--dev` in [this Substrate tutorial](https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/interact). @@ -62,7 +62,7 @@ Then, you will want to run the node in dev mode using the following command: When running a node via the binary file, data is stored in a local directory typically located in ~/.local/shared/polkadex-node/chains/development/db. If you want to start a fresh instance of the node, you can either delete the content of the folder, or run the following command inside the polkadex folder: ```bash -./target/release/polkadex-mainnet-polkadex-parachain-node-polkadex purge-chain --dev +./target/release/node-polkadex purge-chain --dev ``` This will remove the data folder, note that all chain data is now lost. @@ -84,16 +84,16 @@ Alice_Node_Key=$(subkey generate --scheme Ed25519 --output-type Json | jq -r '.s ```bash # Purge any chain data from previous runs -./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node purge-chain --base-path /tmp/alice --chain local +./target/release/polkadex-node purge-chain --base-path /tmp/alice --chain local -# Start Alice's polkadex-mainnet-polkadex-parachain-node -./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node --base-path /tmp/alice \ +# Start Alice's node +./target/release/polkadex-node --base-path /tmp/alice \ --chain local \ --alice \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ - --polkadex-mainnet-polkadex-parachain-node-key $Alice_Node_Key \ + --node-key $Alice_Node_Key \ --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \ --validator ``` @@ -106,13 +106,13 @@ Alice_Node_Key=$(subkey generate --scheme Ed25519 --output-type Json | jq -r '.s 2021-06-30 08:12:38 🏷 Node name: Alice 2021-06-30 08:12:38 👤 Role: AUTHORITY 2021-06-30 08:12:38 💾 Database: RocksDb at /tmp/alice/chains/local_testnet/db -2021-06-30 08:12:38 ⛓ Native polkadex-mainnet: polkadex-mainnet-polkadex-parachain-node-polkadex-265 (polkadex-mainnet-polkadex-parachain-node-polkadex-1.tx2.au10) +2021-06-30 08:12:38 ⛓ Native runtime: node-polkadex-265 (node-polkadex-1.tx2.au10) 2021-06-30 08:12:39 🔨 Initializing Genesis block/state (state: 0xbe0a…5ef3, header-hash: 0xa55f…7888) 2021-06-30 08:12:39 👴 Loading GRANDPA authority set from genesis on what appears to be first startup. 2021-06-30 08:12:39 ⏱ Loaded block-time = 3s from genesis on first-launch 2021-06-30 08:12:39 👶 Creating empty BABE epoch changes on what appears to be first startup. 2021-06-30 08:12:39 Using default protocol ID "sup" because none is configured in the chain specs -2021-06-30 08:12:39 🏷 Local polkadex-mainnet-polkadex-parachain-node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp +2021-06-30 08:12:39 🏷 Local node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp 2021-06-30 08:12:39 📦 Highest known block at #0 2021-06-30 08:12:39 〽️ Prometheus server started at 127.0.0.1:9615 2021-06-30 08:12:39 Listening for new connections on 127.0.0.1:9945. @@ -126,8 +126,8 @@ Local node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp sho Now that Alice's node is up and running, Bob can join the network by bootstrapping from her node. ```bash -./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node purge-chain --base-path /tmp/bob --chain local -./target/release/polkadex-polkadex-mainnet-polkadex-parachain-node \ +./target/release/polkadex-node purge-chain --base-path /tmp/bob --chain local +./target/release/polkadex-node \ --base-path /tmp/bob \ --chain local \ --bob \ @@ -149,18 +149,18 @@ If all is going well, after a few seconds, the nodes should peer together and st 2021-06-30 08:16:52 🏷 Node name: Bob 2021-06-30 08:16:52 👤 Role: AUTHORITY 2021-06-30 08:16:52 💾 Database: RocksDb at /tmp/bob/chains/local_testnet/db -2021-06-30 08:16:52 ⛓ Native polkadex-mainnet: polkadex-mainnet-polkadex-parachain-node-polkadex-265 (polkadex-mainnet-polkadex-parachain-node-polkadex-1.tx2.au10) +2021-06-30 08:16:52 ⛓ Native runtime: node-polkadex-265 (node-polkadex-1.tx2.au10) 2021-06-30 08:16:52 🔨 Initializing Genesis block/state (state: 0xbe0a…5ef3, header-hash: 0xa55f…7888) 2021-06-30 08:16:52 👴 Loading GRANDPA authority set from genesis on what appears to be first startup. 2021-06-30 08:16:52 ⏱ Loaded block-time = 3s from genesis on first-launch 2021-06-30 08:16:52 👶 Creating empty BABE epoch changes on what appears to be first startup. 2021-06-30 08:16:52 Using default protocol ID "sup" because none is configured in the chain specs -2021-06-30 08:16:52 🏷 Local polkadex-mainnet-polkadex-parachain-node identity is: 12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 +2021-06-30 08:16:52 🏷 Local node identity is: 12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 2021-06-30 08:16:53 📦 Highest known block at #0 2021-06-30 08:16:53 Listening for new connections on 127.0.0.1:9946. 2021-06-30 08:16:53 👶 Starting BABE Authorship worker -2021-06-30 08:16:53 🔍 Discovered new external address for our polkadex-mainnet-polkadex-parachain-node: /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 -2021-06-30 08:16:53 🔍 Discovered new external address for our polkadex-mainnet-polkadex-parachain-node: /ip4/192.168.1.37/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 +2021-06-30 08:16:53 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 +2021-06-30 08:16:53 🔍 Discovered new external address for our node: /ip4/192.168.1.37/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7 2021-06-30 08:16:53 Creating inherent data providers took more time than we had left for the slot. 2021-06-30 08:16:54 🙌 Starting consensus session on top of parent 0xa55fa19cc37ca1f8d93bc06ca1f6fee767f18200516d9e349938601a3fe97888 2021-06-30 08:16:54 🎁 Prepared block for proposing at 1 [hash: 0x2959db5e42a7192434d3699d335e5d920da73409963e3081ad43afd93a8cdb4b; parent_hash: 0xa55f…7888; extrinsics (1): [0x4431…4eff]] @@ -180,7 +180,7 @@ If all is going well, after a few seconds, the nodes should peer together and st The following commands will setup a local polkadex network made of 2 nodes. It's using the node key (0000000000000000000000000000000000000000000000000000000000000001). But you should generate your own node key using the subkey as the above. ```bash -docker build . -t polkadex-polkadex-mainnet-polkadex-parachain-node +docker build . -t polkadex-node docker-compose -f 2nodes.yml up --force-recreate ``` @@ -199,4 +199,4 @@ Here is a guide [Run a validator (Polkadex)](./docs/run-a-validator.md) ## Contribute :heart_eyes: We would love to work with anyone who can contribute their work and improve this project. The details will be shared soon. ## License :scroll: -Licensed Under [GPLv3](https://github.com/Polkadex-Substrate/Polkadex/blob/master/LICENSE) +Licensed Under [GPLv3](https://github.com/Polkadex-Substrate/Polkadex/blob/master/LICENSE) \ No newline at end of file diff --git a/dockerfile b/dockerfile index 77d3c0f4e..cbacf74c8 100644 --- a/dockerfile +++ b/dockerfile @@ -35,11 +35,11 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ FROM docker.io/library/ubuntu:20.04 COPY --from=builder /Polkadex/target/release/polkadex-node /usr/local/bin -RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-polkadex-mainnet-polkadex-parachain-node polkadex-polkadex-mainnet-polkadex-parachain-node && \ - mkdir -p /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share && \ +RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-parachain-node polkadex-parachain-node && \ + mkdir -p /polkadex-parachain-node/.local/share && \ mkdir /data && \ - chown -R polkadex-polkadex-mainnet-polkadex-parachain-node:polkadex-polkadex-mainnet-polkadex-parachain-node /data && \ - ln -s /data /polkadex-polkadex-mainnet-polkadex-parachain-node/.local/share/polkadex-polkadex-mainnet-polkadex-parachain-node && \ + chown -R polkadex-parachain-node:polkadex-polkadex-mainnet-polkadex-parachain-node /data && \ + ln -s /data /polkadex-parachain-node/.local/share/polkadex-polkadex-mainnet-polkadex-parachain-node && \ rm -rf /usr/bin /usr/sbin COPY --from=builder /Polkadex/extras/customSpecRaw.json /data diff --git a/nodes/mainnet/src/cli.rs b/nodes/mainnet/src/cli.rs index 91f957705..fe3aff903 100644 --- a/nodes/mainnet/src/cli.rs +++ b/nodes/mainnet/src/cli.rs @@ -54,19 +54,18 @@ pub enum Subcommand { // /// The custom inspect subcommmand for decoding blocks and extrinsics. // #[clap( // name = "inspect", - // about = "Decode given block or extrinsic using current native polkadex-mainnet." + // about = "Decode given block or extrinsic using current native runtime." // )] // Inspect(node_inspect::cli::InspectCmd), - /// The custom benchmark subcommmand benchmarking polkadex-mainnet pallets. + /// The custom benchmark subcommmand benchmarking runtime pallets. #[clap(subcommand)] Benchmark(Box), - /// Try some command against polkadex-mainnet state. + /// Try some command against runtime state. #[cfg(feature = "try-runtime")] TryRuntime(try_runtime_cli::TryRuntimeCmd), - /// Try some command against polkadex-mainnet state. Note: `try-polkadex-mainnet` feature must - /// be enabled. + /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. #[cfg(not(feature = "try-runtime"))] TryRuntime, @@ -103,4 +102,4 @@ pub enum Subcommand { /// Revert the chain to a previous state. Revert(sc_cli::RevertCmd), -} +} \ No newline at end of file diff --git a/nodes/mainnet/src/command.rs b/nodes/mainnet/src/command.rs index 2b7a67832..80bc88830 100644 --- a/nodes/mainnet/src/command.rs +++ b/nodes/mainnet/src/command.rs @@ -101,15 +101,15 @@ pub fn run() -> Result<()> { // which sub-commands it wants to support. match cmd.as_ref() { BenchmarkCmd::Pallet(cmd) => { - if !cfg!(feature = "polkadex-mainnet-benchmarks") { + if !cfg!(feature = "runtime-benchmarks") { return Err( - "Runtime benchmarking wasn't enabled when building the polkadex-mainnet-polkadex-parachain-node. \ - You can enable it with `--features polkadex-mainnet-benchmarks`." + "Runtime benchmarking wasn't enabled when building the node. \ + You can enable it with `--features runtime-benchmarks`." .into(), ) } - cmd.run::(config) + cmd.run::(config) //TODO: @Gautham - Check this }, BenchmarkCmd::Block(cmd) => { let PartialComponents { client, .. } = new_partial(&config)?; @@ -117,7 +117,7 @@ pub fn run() -> Result<()> { }, #[cfg(not(feature = "runtime-benchmarks"))] BenchmarkCmd::Storage(_) => Err( - "Storage benchmarking can be enabled with `--features polkadex-mainnet-benchmarks`." + "Storage benchmarking can be enabled with `--features runtime-benchmarks`." .into(), ), #[cfg(feature = "runtime-benchmarks")] @@ -226,7 +226,7 @@ pub fn run() -> Result<()> { Some(Subcommand::TryRuntime(cmd)) => { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { - // we don't need any of the components of new_partial, just a polkadex-mainnet, or a task + // we don't need any of the components of new_partial, just a runtime, or a task // manager to do `async_run`. let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); let task_manager = @@ -247,8 +247,8 @@ pub fn run() -> Result<()> { }, #[cfg(not(feature = "try-runtime"))] - Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the polkadex-mainnet-polkadex-parachain-node. \ - You can enable it with `--features try-polkadex-mainnet`." + Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ + You can enable it with `--features try-runtime`." .into()), } } diff --git a/nodes/mainnet/src/node_rpc.rs b/nodes/mainnet/src/node_rpc.rs index d25829f2c..fc5086a10 100644 --- a/nodes/mainnet/src/node_rpc.rs +++ b/nodes/mainnet/src/node_rpc.rs @@ -15,17 +15,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! A collection of polkadex-mainnet-polkadex-parachain-node-specific RPC methods. +//! A collection of runtime-node-specific RPC methods. //! //! Since `substrate` core functionality makes no assumptions -//! about the modules used inside the polkadex-mainnet, so do +//! about the modules used inside the runtime, so do //! RPC methods defined in `sc-rpc` crate. //! It means that `client/rpc` can't have any methods that -//! need some strong assumptions about the particular polkadex-mainnet. +//! need some strong assumptions about the particular runtime. //! //! The RPCs available in this crate however can make some assumptions -//! about how the polkadex-mainnet is constructed and what FRAME pallets -//! are part of it. Therefore all polkadex-mainnet-polkadex-parachain-node-polkadex-mainnet-specific +//! about how the runtime is constructed and what FRAME pallets +//! are part of it. Therefore all runtime-specific //! RPCs can be placed here or imported from corresponding FRAME RPC definitions. #![warn(missing_docs)] @@ -58,7 +58,7 @@ use std::sync::Arc; pub struct BabeDeps { /// A handle to the BABE worker for issuing requests. pub babe_worker_handle: BabeWorkerHandle, - /// The keystore that manages the keys of the polkadex-mainnet-polkadex-parachain-node. + /// The keystore that manages the keys of the runtime-node. pub keystore: KeystorePtr, } @@ -94,7 +94,7 @@ pub struct FullDeps { pub grandpa: GrandpaDeps, /// Shared statement store reference. pub statement_store: Arc, - /// The backend used by the polkadex-mainnet-polkadex-parachain-node. + /// The backend used by the runtime-node. pub backend: Arc, } diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index c1c0387f2..bcd3190e7 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -1,18 +1,18 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadex. +// +// Copyright (c) 2021-2023 Polkadex oü. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - +// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. - +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. - +// // You should have received a copy of the GNU General Public License // along with this program. If not, see . @@ -94,7 +94,7 @@ pub fn create_extrinsic( let tip = 0; let extra: node_polkadex_runtime::SignedExtra = ( - //frame_system::CheckNonZeroSender::::new(), + //frame_system::CheckNonZeroSender::::new(), //TODO: Why it is commented? frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), diff --git a/nodes/parachain/build.rs b/nodes/parachain/build.rs index e3bfe3116..1111816b6 100644 --- a/nodes/parachain/build.rs +++ b/nodes/parachain/build.rs @@ -1,3 +1,21 @@ +// This file is part of Polkadex. +// +// Copyright (c) 2021-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; fn main() { diff --git a/nodes/parachain/src/chain_spec.rs b/nodes/parachain/src/chain_spec.rs index 8f688b287..841707f2f 100644 --- a/nodes/parachain/src/chain_spec.rs +++ b/nodes/parachain/src/chain_spec.rs @@ -1,3 +1,21 @@ +// This file is part of Polkadex. +// +// Copyright (c) 2021-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + use cumulus_primitives_core::ParaId; use hex_literal::hex; use parachain_polkadex_runtime::{ diff --git a/nodes/parachain/src/cli.rs b/nodes/parachain/src/cli.rs index e6cc3b1dc..129dc48d8 100644 --- a/nodes/parachain/src/cli.rs +++ b/nodes/parachain/src/cli.rs @@ -1,3 +1,21 @@ +// This file is part of Polkadex. +// +// Copyright (c) 2021-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + use std::path::PathBuf; /// Sub-commands supported by the collator. diff --git a/nodes/parachain/src/command.rs b/nodes/parachain/src/command.rs index 00bfa3279..0692ac497 100644 --- a/nodes/parachain/src/command.rs +++ b/nodes/parachain/src/command.rs @@ -1,3 +1,21 @@ +// This file is part of Polkadex. +// +// Copyright (c) 2021-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + use std::net::SocketAddr; use cumulus_primitives_core::ParaId; diff --git a/nodes/parachain/src/main.rs b/nodes/parachain/src/main.rs index ba9f28b35..e7e076035 100644 --- a/nodes/parachain/src/main.rs +++ b/nodes/parachain/src/main.rs @@ -1,6 +1,20 @@ -//! Substrate Parachain Node Template CLI - -#![warn(missing_docs)] +// This file is part of Polkadex. +// +// Copyright (c) 2021-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . mod chain_spec; #[macro_use] diff --git a/nodes/parachain/src/rpc.rs b/nodes/parachain/src/rpc.rs index 992ba60b5..16bdcba2d 100644 --- a/nodes/parachain/src/rpc.rs +++ b/nodes/parachain/src/rpc.rs @@ -1,3 +1,21 @@ +// This file is part of Polkadex. +// +// Copyright (c) 2021-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + //! A collection of polkadex-parachain-node-specific RPC methods. //! Substrate provides the `sc-rpc` crate, which defines the core RPC layer //! used by Substrate nodes. This file extends those RPC definitions with diff --git a/nodes/parachain/src/service.rs b/nodes/parachain/src/service.rs index 43ec0845e..4e187ee00 100644 --- a/nodes/parachain/src/service.rs +++ b/nodes/parachain/src/service.rs @@ -1,3 +1,21 @@ +// This file is part of Polkadex. +// +// Copyright (c) 2021-2023 Polkadex oü. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + //! Service and ServiceFactory implementation. Specialized wrapper over substrate service. // std diff --git a/pallets/liquidity/src/lib.rs b/pallets/liquidity/src/lib.rs index 7a1cec9b7..348d5dbd7 100644 --- a/pallets/liquidity/src/lib.rs +++ b/pallets/liquidity/src/lib.rs @@ -48,7 +48,7 @@ type BalanceOf = const LENGTH_OF_HALF_BYTES: usize = 16; -// Definition of the pallet logic, to be aggregated at polkadex-mainnet definition through +// Definition of the pallet logic, to be aggregated at runtime definition through // `construct_runtime`. // Trait to add liquidity in OCEX pallet diff --git a/pallets/liquidity/src/mock.rs b/pallets/liquidity/src/mock.rs index 46d5e65bf..c66c69b6f 100644 --- a/pallets/liquidity/src/mock.rs +++ b/pallets/liquidity/src/mock.rs @@ -37,7 +37,7 @@ use sp_std::cell::RefCell; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; -// For testing the pallet, we construct a mock polkadex-mainnet. +// For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( pub enum Test where Block = Block, diff --git a/pallets/liquidity/src/weights.rs b/pallets/liquidity/src/weights.rs index 448231d1e..1cc16308f 100644 --- a/pallets/liquidity/src/weights.rs +++ b/pallets/liquidity/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet @@ -103,4 +103,4 @@ impl crate::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } -} +} \ No newline at end of file diff --git a/pallets/ocex/rpc/src/lib.rs b/pallets/ocex/rpc/src/lib.rs index 5a22c389b..50d2b216a 100644 --- a/pallets/ocex/rpc/src/lib.rs +++ b/pallets/ocex/rpc/src/lib.rs @@ -67,10 +67,10 @@ pub trait PolkadexOcexRpcApi { /// /// # Type Parameters /// -/// * `Client`: The client API used to interact with the Substrate polkadex-mainnet. -/// * `Block`: The block type of the Substrate polkadex-mainnet. +/// * `Client`: The client API used to interact with the Substrate runtime. +/// * `Block`: The block type of the Substrate. pub struct PolkadexOcexRpc { - /// An `Arc` reference to the client API for accessing polkadex-mainnet functionality. + /// An `Arc` reference to the client API for accessing runtime functionality. client: Arc, /// Offchain storage @@ -114,8 +114,8 @@ where Some(at) => at, None => self.client.info().best_hash, }; - // WARN: this is a hack on beating the boundry of polkadex-mainnet -> - // polkadex-mainnet-polkadex-parachain-node with decoding tuple of underlying data into + // WARN: this is a hack on beating the boundry of runtime -> + // polkadex-node with decoding tuple of underlying data into // solid std type Decode::decode( &mut api @@ -198,7 +198,7 @@ where } } -/// Converts a polkadex-mainnet trap into an RPC error. +/// Converts a runtime trap into an RPC error. fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -> JsonRpseeError { log::error!(target:"ocex","runtime rpc error: {:?} ",err); CallError::Custom(ErrorObject::owned(RUNTIME_ERROR, "Runtime error", Some(format!("{err:?}")))) diff --git a/pallets/ocex/src/lib.rs b/pallets/ocex/src/lib.rs index 333cdd092..19912fbad 100644 --- a/pallets/ocex/src/lib.rs +++ b/pallets/ocex/src/lib.rs @@ -127,7 +127,7 @@ pub trait OcexWeightInfo { fn whitelist_orderbook_operator() -> Weight; } -// Definition of the pallet logic, to be aggregated at polkadex-mainnet definition through +// Definition of the pallet logic, to be aggregated at runtime definition through // `construct_runtime`. #[allow(clippy::too_many_arguments)] #[frame_support::pallet] diff --git a/pallets/ocex/src/mock.rs b/pallets/ocex/src/mock.rs index 81573c2dd..a1791f863 100644 --- a/pallets/ocex/src/mock.rs +++ b/pallets/ocex/src/mock.rs @@ -39,7 +39,7 @@ use sp_runtime::{ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; -// For testing the pallet, we construct a mock polkadex-mainnet. +// For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( pub enum Test where Block = Block, diff --git a/pallets/ocex/src/storage.rs b/pallets/ocex/src/storage.rs index dc1703b20..a69d3089e 100644 --- a/pallets/ocex/src/storage.rs +++ b/pallets/ocex/src/storage.rs @@ -220,8 +220,8 @@ impl HashDB for State { } } -/// Derive a database key from hash value of the polkadex-mainnet-polkadex-parachain-node (key) and -/// the polkadex-mainnet-polkadex-parachain-node prefix. +/// Derive a database key from hash value of the polkadex-node (key) and +/// the polkadex-node prefix. pub fn prefixed_key(key: &::Out, prefix: Prefix) -> Vec { let mut prefixed_key = Vec::with_capacity(key.as_ref().len() + prefix.0.len() + 1); prefixed_key.extend_from_slice(prefix.0); diff --git a/pallets/ocex/src/weights.rs b/pallets/ocex/src/weights.rs index 45e83ea0f..8f6f9e3ae 100644 --- a/pallets/ocex/src/weights.rs +++ b/pallets/ocex/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet diff --git a/pallets/pdex-migration/src/lib.rs b/pallets/pdex-migration/src/lib.rs index 7dba54fbe..c4e0b0904 100644 --- a/pallets/pdex-migration/src/lib.rs +++ b/pallets/pdex-migration/src/lib.rs @@ -71,7 +71,7 @@ pub mod pallet { #[pallet::config] /// Configure the pallet by specifying the parameters and types on which it depends. pub trait Config: frame_system::Config + pallet_balances::Config + pallet_sudo::Config { - /// Because this pallet emits events, it depends on the polkadex-mainnet's definition of an + /// Because this pallet emits events, it depends on the runtime's definition of an /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Max Number of relayers diff --git a/pallets/pdex-migration/src/mock.rs b/pallets/pdex-migration/src/mock.rs index 4aa173163..753820e0d 100644 --- a/pallets/pdex-migration/src/mock.rs +++ b/pallets/pdex-migration/src/mock.rs @@ -30,7 +30,7 @@ use sp_runtime::BuildStorage; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// Configure a mock polkadex-mainnet to test the pallet. +// Configure a mock Runtime to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -110,7 +110,7 @@ impl pallet_sudo::Config for Test { type WeightInfo = (); } -// Build genesis storage according to the mock polkadex-mainnet. +// Build genesis storage according to the mock Runtime. pub fn new_test_ext() -> sp_io::TestExternalities { let alice = 1u64; let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); diff --git a/pallets/pdex-migration/src/weights.rs b/pallets/pdex-migration/src/weights.rs index 02494aa02..f907706c3 100644 --- a/pallets/pdex-migration/src/weights.rs +++ b/pallets/pdex-migration/src/weights.rs @@ -8,7 +8,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet diff --git a/pallets/rewards/rpc/src/lib.rs b/pallets/rewards/rpc/src/lib.rs index 47d17d419..080731125 100644 --- a/pallets/rewards/rpc/src/lib.rs +++ b/pallets/rewards/rpc/src/lib.rs @@ -49,10 +49,10 @@ pub trait PolkadexRewardsRpcApi { /// /// # Type Parameters /// -/// * `Client`: The client API used to interact with the Substrate polkadex-mainnet. -/// * `Block`: The block type of the Substrate polkadex-mainnet. +/// * `Client`: The client API used to interact with the Substrate Runtime. +/// * `Block`: The block type of the Substrate Runtime. pub struct PolkadexRewardsRpc { - /// An `Arc` reference to the client API for accessing polkadex-mainnet functionality. + /// An `Arc` reference to the client API for accessing Runtime functionality. client: Arc, /// A marker for the `Block` type parameter, used to ensure the struct @@ -97,7 +97,7 @@ where } } -/// Converts a polkadex-mainnet trap into an RPC error. +/// Converts a runtime trap into an RPC error. fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -> JsonRpseeError { CallError::Custom(ErrorObject::owned(RUNTIME_ERROR, "Runtime error", Some(format!("{err:?}")))) .into() diff --git a/pallets/rewards/src/lib.rs b/pallets/rewards/src/lib.rs index 2579f9f30..adf629bd0 100644 --- a/pallets/rewards/src/lib.rs +++ b/pallets/rewards/src/lib.rs @@ -66,7 +66,7 @@ pub mod weights; const MIN_REWARDS_CLAIMABLE_AMOUNT: u128 = polkadex_primitives::UNIT_BALANCE; pub const REWARDS_LOCK_ID: LockIdentifier = *b"REWARDID"; -// Definition of the pallet logic, to be aggregated at polkadex-mainnet definition through +// Definition of the pallet logic, to be aggregated at runtime definition through // `construct_runtime`. #[frame_support::pallet] pub mod pallet { diff --git a/pallets/rewards/src/mock.rs b/pallets/rewards/src/mock.rs index 9919c762f..80013ee0d 100644 --- a/pallets/rewards/src/mock.rs +++ b/pallets/rewards/src/mock.rs @@ -35,7 +35,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// For testing the pallet, we construct a mock polkadex-mainnet. +// For testing the pallet, we construct a mock Runtime. frame_support::construct_runtime!( pub enum Test where Block = Block, diff --git a/pallets/rewards/src/weights.rs b/pallets/rewards/src/weights.rs index 8f410fd61..e305e8ce5 100644 --- a/pallets/rewards/src/weights.rs +++ b/pallets/rewards/src/weights.rs @@ -8,7 +8,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet diff --git a/pallets/thea-council/src/lib.rs b/pallets/thea-council/src/lib.rs index b5a19046a..ff0ae603e 100644 --- a/pallets/thea-council/src/lib.rs +++ b/pallets/thea-council/src/lib.rs @@ -60,7 +60,7 @@ mod mock; #[cfg(test)] mod tests; -#[cfg(feature = "polkadex-mainnet-benchmarks")] +#[cfg(feature = "runtime-benchmarks")] mod benchmarking; pub mod weights; @@ -95,7 +95,7 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config + xcm_helper::Config { - /// Because this pallet emits events, it depends on the polkadex-mainnet's definition of an + /// Because this pallet emits events, it depends on the Runtime's definition of an /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Minimum Active Council Size below witch Removal is not possible diff --git a/pallets/thea-council/src/mock.rs b/pallets/thea-council/src/mock.rs index 55085ceed..5ae0a5c6a 100644 --- a/pallets/thea-council/src/mock.rs +++ b/pallets/thea-council/src/mock.rs @@ -36,7 +36,7 @@ use xcm::lts::{ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; -// Configure a mock polkadex-mainnet to test the pallet. +// Configure a mock Runtime to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -217,7 +217,7 @@ impl orml_xtokens::Config for Test { type UniversalLocation = UniversalLocation; } -// Build genesis storage according to the mock polkadex-mainnet. +// Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { frame_system::GenesisConfig::::default().build_storage().unwrap().into() } diff --git a/pallets/thea-council/src/weights.rs b/pallets/thea-council/src/weights.rs index b577654e1..9f8b804fa 100644 --- a/pallets/thea-council/src/weights.rs +++ b/pallets/thea-council/src/weights.rs @@ -22,7 +22,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./parachain-polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet diff --git a/pallets/thea-executor/src/lib.rs b/pallets/thea-executor/src/lib.rs index 27bb312b8..3795804cc 100644 --- a/pallets/thea-executor/src/lib.rs +++ b/pallets/thea-executor/src/lib.rs @@ -70,7 +70,7 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config { - /// Because this pallet emits events, it depends on the polkadex-mainnet's definition of an + /// Because this pallet emits events, it depends on the Runtime's definition of an /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Balances Pallet diff --git a/pallets/thea-executor/src/mock.rs b/pallets/thea-executor/src/mock.rs index 549613073..c6de4d797 100644 --- a/pallets/thea-executor/src/mock.rs +++ b/pallets/thea-executor/src/mock.rs @@ -30,7 +30,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// Configure a mock polkadex-mainnet to test the pallet. +// Configure a mock runtime to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -174,7 +174,7 @@ where type OverarchingCall = RuntimeCall; } -// Build genesis storage according to the mock polkadex-mainnet. +// Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); t.into() diff --git a/pallets/thea-executor/src/weights.rs b/pallets/thea-executor/src/weights.rs index 353728512..bf8bff8f8 100644 --- a/pallets/thea-executor/src/weights.rs +++ b/pallets/thea-executor/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet diff --git a/pallets/thea-message-handler/src/mock.rs b/pallets/thea-message-handler/src/mock.rs index d37446e0f..d98f9ec2b 100644 --- a/pallets/thea-message-handler/src/mock.rs +++ b/pallets/thea-message-handler/src/mock.rs @@ -30,7 +30,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// Configure a mock polkadex-mainnet to test the pallet. +// Configure a mock runtime to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -184,7 +184,7 @@ where type OverarchingCall = RuntimeCall; } -// Build genesis storage according to the mock polkadex-mainnet. +// Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); t.into() diff --git a/pallets/thea-message-handler/src/weights.rs b/pallets/thea-message-handler/src/weights.rs index 0bdb65e39..1b8eb5ead 100644 --- a/pallets/thea-message-handler/src/weights.rs +++ b/pallets/thea-message-handler/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet diff --git a/pallets/thea/src/lib.rs b/pallets/thea/src/lib.rs index 2fdc4f79f..6145a0a19 100644 --- a/pallets/thea/src/lib.rs +++ b/pallets/thea/src/lib.rs @@ -21,9 +21,9 @@ //! # Thea pallet. //! -//! The core logic for polkadex-mainnet is handled by the Thea pallet. The most important +//! The core logic for runtime is handled by the Thea pallet. The most important //! responsibilities of the Thea pallet are to: -//! * process ingress messages to the polkadex-mainnet; +//! * process ingress messages to the runtime; //! * keep track of egress messages; //! * handle validator session changes; diff --git a/pallets/thea/src/mock.rs b/pallets/thea/src/mock.rs index f15ed0cec..ba4630022 100644 --- a/pallets/thea/src/mock.rs +++ b/pallets/thea/src/mock.rs @@ -29,7 +29,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; -// Configure a mock polkadex-mainnet to test the pallet. +// Configure a mock runtime to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -173,7 +173,7 @@ where type OverarchingCall = RuntimeCall; } -// Build genesis storage according to the mock polkadex-mainnet. +// Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { let t = frame_system::GenesisConfig::::default().build_storage().unwrap(); t.into() diff --git a/pallets/thea/src/session.rs b/pallets/thea/src/session.rs index 1280d810b..a1dc54044 100644 --- a/pallets/thea/src/session.rs +++ b/pallets/thea/src/session.rs @@ -33,7 +33,7 @@ impl OneSessionHandler for Pallet { I: Iterator, { let authorities = validators.map(|(_, k)| k).collect::>(); - // we panic here as polkadex-mainnet maintainers can simply reconfigure genesis and restart + // we panic here as runtime maintainers can simply reconfigure genesis and restart // the chain easily Self::initialize_authorities(&authorities).expect("Authorities vec too big"); } @@ -46,7 +46,7 @@ impl OneSessionHandler for Pallet { let next_authorities = validators.map(|(_, k)| k).collect::>(); if next_authorities.len() as u32 > T::MaxAuthorities::get() { log::error!( - target: "polkadex-mainnet::thea", + target: "runtime::thea", "authorities list {:?} truncated to length {}", next_authorities, T::MaxAuthorities::get(), ); @@ -57,7 +57,7 @@ impl OneSessionHandler for Pallet { let next_queued_authorities = queued_validators.map(|(_, k)| k).collect::>(); if next_queued_authorities.len() as u32 > T::MaxAuthorities::get() { log::error!( - target: "polkadex-mainnet::thea", + target: "runtime::thea", "queued authorities list {:?} truncated to length {}", next_queued_authorities, T::MaxAuthorities::get(), ); diff --git a/pallets/thea/src/weights.rs b/pallets/thea/src/weights.rs index 37e2494e7..7c097c3d1 100644 --- a/pallets/thea/src/weights.rs +++ b/pallets/thea/src/weights.rs @@ -7,7 +7,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet diff --git a/pallets/xcm-helper/src/benchmarking.rs b/pallets/xcm-helper/src/benchmarking.rs index 3b2a2292f..7960aa457 100644 --- a/pallets/xcm-helper/src/benchmarking.rs +++ b/pallets/xcm-helper/src/benchmarking.rs @@ -67,7 +67,7 @@ benchmarks! { verify { assert_eq!(T::Currency::balance(&recipeint), 1999000000000000u128.saturated_into()); } - // TODO: We need to adapt this benchmark to work in polkadex-mainnet context + // TODO: We need to adapt this benchmark to work in runtime context // on_initialize { // let x: T::BlockNumber = 1u64.saturated_into(); // let pallet_account: T::AccountId = T::AssetHandlerPalletId::get().into_account_truncating(); diff --git a/pallets/xcm-helper/src/lib.rs b/pallets/xcm-helper/src/lib.rs index 2d7a26cbf..7f1455630 100644 --- a/pallets/xcm-helper/src/lib.rs +++ b/pallets/xcm-helper/src/lib.rs @@ -98,7 +98,7 @@ use frame_support::weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}; pub use pallet::*; -#[cfg(feature = "polkadex-mainnet-benchmarks")] +#[cfg(feature = "runtime-benchmarks")] mod benchmarking; /// We allow for 0.5 of a second of compute with a 12 second average block time. @@ -176,7 +176,7 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config + orml_xtokens::Config { - /// Because this pallet emits events, it depends on the polkadex-mainnet's definition of an + /// Because this pallet emits events, it depends on the runtime's definition of an /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Multilocation to AccountId Convert diff --git a/pallets/xcm-helper/src/mock.rs b/pallets/xcm-helper/src/mock.rs index 1f3f719b0..ba4c43715 100644 --- a/pallets/xcm-helper/src/mock.rs +++ b/pallets/xcm-helper/src/mock.rs @@ -31,7 +31,7 @@ use thea::ecdsa::{AuthorityId, AuthoritySignature}; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; -// Configure a mock polkadex-mainnet to test the pallet. +// Configure a mock runtime to test the pallet. frame_support::construct_runtime!( pub enum Test where Block = Block, @@ -204,7 +204,7 @@ impl orml_xtokens::Config for Test { type UniversalLocation = UniversalLocation; } -// Build genesis storage according to the mock polkadex-mainnet. +// Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { frame_system::GenesisConfig::::default().build_storage().unwrap().into() } diff --git a/pallets/xcm-helper/src/weights.rs b/pallets/xcm-helper/src/weights.rs index 47fdebfc7..9c08dc11c 100644 --- a/pallets/xcm-helper/src/weights.rs +++ b/pallets/xcm-helper/src/weights.rs @@ -22,7 +22,7 @@ //! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: -// ./parachain-polkadex-polkadex-mainnet-polkadex-parachain-node +// ./polkadex-node // benchmark // pallet // --pallet diff --git a/rpc/assets/src/lib.rs b/rpc/assets/src/lib.rs index 311acd5ef..660ddb776 100644 --- a/rpc/assets/src/lib.rs +++ b/rpc/assets/src/lib.rs @@ -58,8 +58,8 @@ pub trait PolkadexAssetHandlerRpcApi { /// /// # Type Parameters /// -/// * `Client`: The client API used to interact with the Substrate polkadex-mainnet. -/// * `Block`: The block type of the Substrate polkadex-mainnet. +/// * `Client`: The client API used to interact with the Substrate Runtime. +/// * `Block`: The block type of the Substrate runtime. pub struct PolkadexAssetHandlerRpc { client: Arc, _marker: std::marker::PhantomData, @@ -103,7 +103,7 @@ where } } -/// Converts a polkadex-mainnet trap into an RPC error. +/// Converts a runtime trap into an RPC error. fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -> JsonRpseeError { CallError::Custom(ErrorObject::owned(RUNTIME_ERROR, "Runtime error", Some(format!("{err:?}")))) .into() diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index aa56463ea..24119156e 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -84,10 +84,10 @@ frame-election-provider-support = { default-features = false, workspace = true } pallet-assets = { default-features = false, workspace = true } #end added -# Used for the polkadex-mainnet-polkadex-parachain-node template"s RPCs +# Used for the polkadex-node RPCs frame-system-rpc-runtime-api = { default-features = false, workspace = true } -# Used for polkadex-mainnet benchmarking +# Used for runtime benchmarking frame-benchmarking = { default-features = false, workspace = true, optional = true } frame-system-benchmarking = { default-features = false, workspace = true, optional = true } @@ -254,7 +254,7 @@ try-runtime = [ "pdex-migration/try-runtime", "pallet-democracy/try-runtime", "pallet-preimage/try-runtime", - #"pallet-randomness-collective-flip/try-polkadex-mainnet", + #"pallet-randomness-collective-flip/try-runtime", "pallet-child-bounties/try-runtime", "pallet-assets/try-runtime", "pallet-ocex-lmp/try-runtime", diff --git a/runtimes/mainnet/src/constants.rs b/runtimes/mainnet/src/constants.rs index 35abc924d..e51f59a93 100644 --- a/runtimes/mainnet/src/constants.rs +++ b/runtimes/mainnet/src/constants.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! A set of constant values used in substrate polkadex-mainnet. +//! A set of constant values used in substrate runtime. /// Money matters. pub mod currency { diff --git a/runtimes/mainnet/src/impls.rs b/runtimes/mainnet/src/impls.rs index 505e7e8f6..aa0edd3af 100644 --- a/runtimes/mainnet/src/impls.rs +++ b/runtimes/mainnet/src/impls.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Some configurable implementations as associated type for the substrate polkadex-mainnet. +//! Some configurable implementations as associated type for the substrate runtime. use frame_support::traits::{Currency, OnUnbalanced}; @@ -65,7 +65,7 @@ mod multiplier_tests { TargetBlockFullness::get() * max_normal() } - // update based on polkadex-mainnet impl. + // update based on Runtime impl. fn runtime_multiplier_update(fm: Multiplier) -> Multiplier { TargetedFeeAdjustment::< Runtime, @@ -158,7 +158,7 @@ mod multiplier_tests { #[test] fn time_to_reach_zero() { - // blocks per 24h in substrate-polkadex-mainnet-polkadex-parachain-node: 28,800 (k) + // blocks per 24h in substrate-node: 28,800 (k) // s* = 0.1875 // The bound from the research in an empty chain is: // v <~ (p / k(0 - s*)) diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index 87d56085a..99502a744 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! The Substrate polkadex-mainnet. This can be compiled with `#[no_std]`, ready for Wasm. +//! The Substrate runtime. This can be compiled with `#[no_std]`, ready for Wasm. #![cfg_attr(not(feature = "std"), no_std)] // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] @@ -91,10 +91,10 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; -/// Implementations of some helper traits passed into polkadex-mainnet modules as associated types. +/// Implementations of some helper traits passed into runtime modules as associated types. pub mod impls; -/// Constant values used within the polkadex-mainnet. +/// Constant values used within the runtime. pub mod constants; // Make the WASM binary available. @@ -114,11 +114,11 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { /// Runtime version. #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("polkadex-mainnet-polkadex-parachain-node"), + spec_name: create_runtime_str!("polkadex-parachain-node"), impl_name: create_runtime_str!("polkadex-official"), authoring_version: 10, - // Per convention: if the polkadex-mainnet behavior changes, increment spec_version - // and set impl_version to 0. If only polkadex-mainnet + // Per convention: if the runtime behavior changes, increment spec_version + // 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: 310, @@ -1534,18 +1534,18 @@ construct_runtime!( pub type DigestItem = generic::DigestItem; /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; -/// Block header type as expected by this polkadex-mainnet. +/// Block header type as expected by this runtime. pub type Header = generic::Header; -/// Block type as expected by this polkadex-mainnet. +/// Block type as expected by this runtime. pub type Block = generic::Block; /// A Block signed with a Justification pub type SignedBlock = generic::SignedBlock; -/// BlockId type as expected by this polkadex-mainnet. +/// BlockId type as expected by this runtime. pub type BlockId = generic::BlockId; /// The SignedExtension to the basic transaction logic. /// /// When you change this, you **MUST** modify [`sign`] in -/// `bin/polkadex-mainnet-polkadex-parachain-node/testing/src/keyring.rs`! +/// `bin/polkadex-node/testing/src/keyring.rs`! /// /// [`sign`]: <../../testing/src/keyring.rs.html> pub type SignedExtra = ( @@ -1557,7 +1557,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, ); -/// Unchecked extrinsic type as expected by this polkadex-mainnet. +/// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// The payload being signed in transactions. @@ -1825,7 +1825,7 @@ impl_runtime_apis! { } - #[cfg(feature = "try-polkadex-mainnet")] + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to @@ -1847,7 +1847,7 @@ impl_runtime_apis! { } } - #[cfg(feature = "polkadex-mainnet-benchmarks")] + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( Vec, diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index 11cc44751..655b9c9f4 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -126,7 +126,7 @@ pub type Executive = frame_executive::Executive< >; /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the -/// polkadex-mainnet-polkadex-parachain-node's balance type. +/// polkadex-parachain-node's balance type. /// /// This should typically create a mapping between the following ranges: /// - `[0, MAXIMUM_BLOCK_WEIGHT]` @@ -234,7 +234,6 @@ pub fn native_version() -> NativeVersion { parameter_types! { pub const Version: RuntimeVersion = VERSION; - // This part is copied from Substrate's `bin/polkadex-mainnet-polkadex-parachain-node/polkadex-parachain/src/lib.rs`. // The `RuntimeBlockLength` and `RuntimeBlockWeights` exist here because the // `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize // the lazy contract deletion. diff --git a/scripts/start_chain.sh b/scripts/start_chain.sh index 16ae5f5cc..da1a06207 100755 --- a/scripts/start_chain.sh +++ b/scripts/start_chain.sh @@ -24,7 +24,7 @@ start_boot_node() { echo "Starting boot node..." install -d ../ind_validators/validator1 cd ../ind_validators/validator1 - ../../target/$TARGET/polkadex-polkadex-mainnet-polkadex-parachain-node --validator --base-path ./bootnode -lthea=trace -lorderbook=trace --rpc-port=9943 --thea-dummy-mode --chain=../../scripts/customSpecRaw.json --polkadex-mainnet-polkadex-parachain-node-key=1f64f01767da8258fcb986bd68d6dff93dfcd49d0fc753cea27cf37ce91c3684 >out_boot_node 2>&1 & + ../../target/$TARGET/polkadex-node --validator --base-path ./bootnode -lthea=trace -lorderbook=trace --rpc-port=9943 --thea-dummy-mode --chain=../../scripts/customSpecRaw.json --node-key=1f64f01767da8258fcb986bd68d6dff93dfcd49d0fc753cea27cf37ce91c3684 >out_boot_node 2>&1 & BOOT_NODE_PID=$(echo $!) cd ../../scripts } @@ -33,11 +33,11 @@ start_validator_1() { echo "Starting validator 1..." install -d ../ind_validators/validator2 cd ../ind_validators/validator2 - ../../target/$TARGET/polkadex-polkadex-mainnet-polkadex-parachain-node --validator --port 30334 --base-path ./validator01 --thea-dummy-mode \ + ../../target/$TARGET/polkadex-node --validator --port 30334 --base-path ./validator01 --thea-dummy-mode \ -lthea=trace -lorderbook=trace --rpc-port=9944 --chain=../../scripts/customSpecRaw.json \ --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRozCnsH7zCYiNVpCRqgaoxukPdYxqaPQNs9rdDMDeN4t \ --bootnodes /ip4/127.0.0.1/tcp/30335/p2p/12D3KooWCMKvu1tJKQBjDZ4hN1saTP6D58e4WkwLZwks5cPpxqY7 \ - --polkadex-mainnet-polkadex-parachain-node-key=d353c4b01db05aa66ddeab9d85c2fa2252368dd4961606e5985ed1e8f40dbc50 >out_validator_1 2>&1 & + --node-key=d353c4b01db05aa66ddeab9d85c2fa2252368dd4961606e5985ed1e8f40dbc50 >out_validator_1 2>&1 & VALIDATOR_1_PID=$(echo $!) cd ../../scripts } @@ -46,11 +46,11 @@ start_validator_2() { echo "Starting validator 2..." install -d ../ind_validators/validator3 cd ../ind_validators/validator3 - ../../target/$TARGET/polkadex-polkadex-mainnet-polkadex-parachain-node --validator --port 30335 --base-path ./validator02 -lthea=trace --thea-dummy-mode \ + ../../target/$TARGET/polkadex-node --validator --port 30335 --base-path ./validator02 -lthea=trace --thea-dummy-mode \ --rpc-port=9945 --chain=../../scripts/customSpecRaw.json \ --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRozCnsH7zCYiNVpCRqgaoxukPdYxqaPQNs9rdDMDeN4t \ --bootnodes /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWEVBdwVmV1BeAdtqzhjANK31ibYmLQXxEoeai4fx7KhNh \ - --polkadex-mainnet-polkadex-parachain-node-key=24f121a84149f784f9fe3f1e2fb04e8873191a510bc4b073a3a815d78a29cf2d >out_validator_2 2>&1 & + --node-key=24f121a84149f784f9fe3f1e2fb04e8873191a510bc4b073a3a815d78a29cf2d >out_validator_2 2>&1 & VALIDATOR_2_PID=$(echo $!) cd ../../scripts } @@ -59,7 +59,7 @@ start_full_node() { echo "Starting fullnode..." install -d ../ind_validators/full_node cd ../ind_validators/full_node - ../../target/$TARGET/polkadex-polkadex-mainnet-polkadex-parachain-node --chain=../../scripts/customSpecRaw.json --pruning=archive \ + ../../target/$TARGET/polkadex-node --chain=../../scripts/customSpecRaw.json --pruning=archive \ --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRozCnsH7zCYiNVpCRqgaoxukPdYxqaPQNs9rdDMDeN4t \ --bootnodes /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWEVBdwVmV1BeAdtqzhjANK31ibYmLQXxEoeai4fx7KhNh >out_full_node 2>&1 & FULLNODE_PID=$(echo $!) @@ -68,7 +68,7 @@ start_full_node() { kill_nodes() { echo "Killing nodes..." - killall -2 polkadex-polkadex-mainnet-polkadex-parachain-node + killall -2 polkadex-node } start_chain() { @@ -149,4 +149,4 @@ parse_args $@ trap kill_nodes EXIT -start_chain +start_chain \ No newline at end of file From 44550a69494b5c0ccc81cc0b73a73d7579fddd2a Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Sun, 1 Oct 2023 22:43:42 -0700 Subject: [PATCH 16/51] feat(no-ref): Code style fix --- runtimes/mainnet/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index d5ec75e4a..a342b2a3b 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -197,7 +197,7 @@ std = [ "pallet-asset-conversion/std", "pallet-asset-conversion-tx-payment/std", "pallet-statement/std", - "sp-statement-store/std" + "sp-statement-store/std", ] runtime-benchmarks = [ #theirs From b50e6c7ecc8f3b4e9554bfbb7cbdd89b7883ba3a Mon Sep 17 00:00:00 2001 From: zktony Date: Wed, 4 Oct 2023 15:06:33 +0530 Subject: [PATCH 17/51] Fixed runtime --- .github/workflows/ci.yml | 2 +- Cargo.lock | 22 ++++++++++++++++++++++ nodes/mainnet/Cargo.toml | 1 + nodes/mainnet/src/cli.rs | 7 ++++--- nodes/mainnet/src/command.rs | 23 +---------------------- nodes/mainnet/src/lib.rs | 1 + nodes/parachain/Cargo.toml | 1 + nodes/parachain/src/cli.rs | 31 ++++++++++++++++++++----------- runtimes/mainnet/Cargo.toml | 3 ++- 9 files changed, 53 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f46901cf5..9749e500d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,7 @@ jobs: taplo lint taplo fmt --check - name: Build Project with try-polkadex-mainnet - run: cargo build --features try-polkadex-mainnet + run: cargo build --features try-runtime - name: Runtime build run: cargo build -p polkadex-mainnet-polkadex-parachain-node-polkadex-polkadex-mainnet - name: Build Project with polkadex-mainnet benchmarks diff --git a/Cargo.lock b/Cargo.lock index 519d1e73d..6f2637f03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1498,6 +1498,27 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "color-print" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a858372ff14bab9b1b30ea504f2a4bc534582aee3e42ba2d41d2a7baba63d5d" +dependencies = [ + "color-print-proc-macro", +] + +[[package]] +name = "color-print-proc-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e37866456a721d0a404439a1adae37a31be4e0055590d053dfe6981e05003f" +dependencies = [ + "nom", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "colorchoice" version = "1.0.0" @@ -7722,6 +7743,7 @@ name = "parachain-polkadex-node" version = "1.0.0" dependencies = [ "clap 4.4.5", + "color-print", "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-aura", diff --git a/nodes/mainnet/Cargo.toml b/nodes/mainnet/Cargo.toml index e6d038b36..7f535d30f 100644 --- a/nodes/mainnet/Cargo.toml +++ b/nodes/mainnet/Cargo.toml @@ -15,6 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] substrate-build-script-utils = { version = "5.0.0" } structopt = { version = "0.3.8", optional = true } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", optional = true } [dependencies] # third-party dependencies diff --git a/nodes/mainnet/src/cli.rs b/nodes/mainnet/src/cli.rs index fe3aff903..0cd5eadfc 100644 --- a/nodes/mainnet/src/cli.rs +++ b/nodes/mainnet/src/cli.rs @@ -61,9 +61,10 @@ pub enum Subcommand { #[clap(subcommand)] Benchmark(Box), - /// Try some command against runtime state. - #[cfg(feature = "try-runtime")] - TryRuntime(try_runtime_cli::TryRuntimeCmd), + /// Try-runtime has migrated to a standalone + /// [CLI](). The subcommand exists as a stub and + /// deprecation notice. It will be removed entirely some time after Janurary 2024. + TryRuntime, /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. #[cfg(not(feature = "try-runtime"))] diff --git a/nodes/mainnet/src/command.rs b/nodes/mainnet/src/command.rs index 80bc88830..8e086f30e 100644 --- a/nodes/mainnet/src/command.rs +++ b/nodes/mainnet/src/command.rs @@ -223,28 +223,7 @@ pub fn run() -> Result<()> { }, #[cfg(feature = "try-runtime")] - Some(Subcommand::TryRuntime(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - // we don't need any of the components of new_partial, just a runtime, or a task - // manager to do `async_run`. - let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); - let task_manager = - sc_service::TaskManager::new(config.tokio_handle.clone(), registry) - .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - - let info_provider = try_runtime_cli::block_building_info::substrate_info( - node_polkadex_runtime::constants::time::SLOT_DURATION, - ); - Ok(( - cmd.run::::ExtendHostFunctions, - >,_>(Some(info_provider)), - task_manager, - )) - }) - }, + Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.into()), #[cfg(not(feature = "try-runtime"))] Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ diff --git a/nodes/mainnet/src/lib.rs b/nodes/mainnet/src/lib.rs index 009de6628..facae29b9 100644 --- a/nodes/mainnet/src/lib.rs +++ b/nodes/mainnet/src/lib.rs @@ -22,3 +22,4 @@ pub mod chain_spec; pub mod cli; pub mod node_rpc; pub mod service; +use try_runtime_cli as _; diff --git a/nodes/parachain/Cargo.toml b/nodes/parachain/Cargo.toml index 2aa383d5a..0766d36fb 100644 --- a/nodes/parachain/Cargo.toml +++ b/nodes/parachain/Cargo.toml @@ -16,6 +16,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0" } serde = { version = "1.0.152", features = ["derive"] } jsonrpsee = { version = "0.16.2", features = ["server"] } futures = "0.3.28" +color-print = "0.3.4" # Local parachain-polkadex-runtime = { path = "../../runtimes/parachain" } diff --git a/nodes/parachain/src/cli.rs b/nodes/parachain/src/cli.rs index 129dc48d8..05720a058 100644 --- a/nodes/parachain/src/cli.rs +++ b/nodes/parachain/src/cli.rs @@ -20,7 +20,6 @@ use std::path::PathBuf; /// Sub-commands supported by the collator. #[derive(Debug, clap::Subcommand)] -#[allow(clippy::large_enum_variant)] pub enum Subcommand { /// Build a chain specification. BuildSpec(sc_cli::BuildSpecCmd), @@ -54,21 +53,31 @@ pub enum Subcommand { #[command(subcommand)] Benchmark(frame_benchmarking_cli::BenchmarkCmd), - /// Try some testing command against a specified runtime state. - #[cfg(feature = "try-runtime")] - TryRuntime(try_runtime_cli::TryRuntimeCmd), - - /// Errors since the binary was not build with `--features try-runtime`. - #[cfg(not(feature = "try-runtime"))] + /// Try-runtime has migrated to a standalone + /// [CLI](). The subcommand exists as a stub and + /// deprecation notice. It will be removed entirely some time after Janurary 2024. TryRuntime, } +const AFTER_HELP_EXAMPLE: &str = color_print::cstr!( + r#"Examples: + parachain-template-node build-spec --disable-default-bootnode > plain-parachain-chainspec.json + Export a chainspec for a local testnet in json format. + parachain-template-node --chain plain-parachain-chainspec.json --tmp -- --chain rococo-local + Launch a full node with chain specification loaded from plain-parachain-chainspec.json. + parachain-template-node + Launch a full node with default parachain local-testnet and relay chain rococo-local. + parachain-template-node --collator + Launch a collator with default parachain local-testnet and relay chain rococo-local. + "# +); #[derive(Debug, clap::Parser)] #[command( - propagate_version = true, - args_conflicts_with_subcommands = true, - subcommand_negates_reqs = true +propagate_version = true, +args_conflicts_with_subcommands = true, +subcommand_negates_reqs = true )] +#[clap(after_help = AFTER_HELP_EXAMPLE)] pub struct Cli { #[command(subcommand)] pub subcommand: Option, @@ -118,4 +127,4 @@ impl RelayChainCli { base: clap::Parser::parse_from(relay_chain_args), } } -} +} \ No newline at end of file diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index 24119156e..8a75a353d 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -264,5 +264,6 @@ try-runtime = [ "liquidity/try-runtime", "thea-executor/try-runtime", "pallet-asset-conversion/try-runtime", - "pallet-asset-conversion-tx-payment/try-runtime" + "pallet-asset-conversion-tx-payment/try-runtime", + "pallet-statement/try-runtime", ] From 851e5c2bab3c49408265786d0045858592e80d9c Mon Sep 17 00:00:00 2001 From: zktony Date: Mon, 9 Oct 2023 13:00:43 +0530 Subject: [PATCH 18/51] Fixed benchmarks --- Cargo.lock | 21 ++++ Cargo.toml | 1 + nodes/mainnet/src/cli.rs | 5 - nodes/mainnet/src/lib.rs | 1 + pallets/liquidity/Cargo.toml | 1 + pallets/liquidity/src/benchmarking.rs | 5 +- pallets/ocex/src/benchmarking.rs | 4 +- pallets/pdex-migration/src/benchmarking.rs | 4 +- pallets/rewards/Cargo.toml | 1 + pallets/rewards/src/benchmarking.rs | 4 +- pallets/thea-council/src/benchmarking.rs | 7 +- runtimes/mainnet/Cargo.toml | 11 +- runtimes/mainnet/src/impls.rs | 113 ++++++++++++++------- runtimes/mainnet/src/lib.rs | 40 ++++++-- runtimes/parachain/Cargo.toml | 3 + runtimes/parachain/src/lib.rs | 15 +++ runtimes/parachain/src/xcm_config.rs | 2 +- 17 files changed, 177 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f2637f03..1a32ec08e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6120,6 +6120,7 @@ dependencies = [ "orml-vesting", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", + "pallet-asset-tx-payment", "pallet-assets", "pallet-authority-discovery", "pallet-authorship", @@ -6176,6 +6177,7 @@ dependencies = [ "sp-staking", "sp-statement-store", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "static_assertions", @@ -6556,6 +6558,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-assets" version = "4.0.0-dev" @@ -7858,6 +7878,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", + "sp-staking", "sp-std", "sp-transaction-pool", "sp-version", diff --git a/Cargo.toml b/Cargo.toml index 4ebf6488f..33be2ad3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -198,6 +198,7 @@ grandpa-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branc polkadex-primitives = { path = "primitives/polkadex", default-features = false } frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } env_logger = { version = "0.10.0" } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } diff --git a/nodes/mainnet/src/cli.rs b/nodes/mainnet/src/cli.rs index 0cd5eadfc..4b5263cb1 100644 --- a/nodes/mainnet/src/cli.rs +++ b/nodes/mainnet/src/cli.rs @@ -65,11 +65,6 @@ pub enum Subcommand { /// [CLI](). The subcommand exists as a stub and /// deprecation notice. It will be removed entirely some time after Janurary 2024. TryRuntime, - - /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. - #[cfg(not(feature = "try-runtime"))] - TryRuntime, - /// Key management cli utilities #[clap(subcommand)] Key(Box), diff --git a/nodes/mainnet/src/lib.rs b/nodes/mainnet/src/lib.rs index facae29b9..dc7c3d65e 100644 --- a/nodes/mainnet/src/lib.rs +++ b/nodes/mainnet/src/lib.rs @@ -22,4 +22,5 @@ pub mod chain_spec; pub mod cli; pub mod node_rpc; pub mod service; +#[cfg(try_runtime)] use try_runtime_cli as _; diff --git a/pallets/liquidity/Cargo.toml b/pallets/liquidity/Cargo.toml index df6e32e50..cfe7e7341 100644 --- a/pallets/liquidity/Cargo.toml +++ b/pallets/liquidity/Cargo.toml @@ -35,6 +35,7 @@ std = [ "pallet-assets/std", "pallet-balances/std", "pallet-ocex-lmp/std", + "frame-benchmarking?/std", "parity-scale-codec/std", "scale-info/std", "frame-support/std", diff --git a/pallets/liquidity/src/benchmarking.rs b/pallets/liquidity/src/benchmarking.rs index 5eadfda4a..8db3bec13 100644 --- a/pallets/liquidity/src/benchmarking.rs +++ b/pallets/liquidity/src/benchmarking.rs @@ -20,12 +20,13 @@ #![cfg(feature = "runtime-benchmarks")] use super::*; use crate::{pallet::Call, LiquidityModifier, Pallet as liquidity}; -use frame_benchmarking::benchmarks; -use frame_support::{dispatch::UnfilteredDispatchable, traits::EnsureOrigin}; +use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller, BenchmarkError}; +use frame_support::traits::EnsureOrigin; use frame_system::RawOrigin; use parity_scale_codec::Decode; use polkadex_primitives::{AssetId, UNIT_BALANCE}; use sp_runtime::SaturatedConversion; +use frame_support::traits::UnfilteredDispatchable; // Check if last event generated by pallet is the one we're expecting fn assert_last_event(generic_event: ::RuntimeEvent) { diff --git a/pallets/ocex/src/benchmarking.rs b/pallets/ocex/src/benchmarking.rs index eaae7ece7..2b89c8686 100644 --- a/pallets/ocex/src/benchmarking.rs +++ b/pallets/ocex/src/benchmarking.rs @@ -21,8 +21,8 @@ use super::*; use crate::Pallet as Ocex; -use frame_benchmarking::{account, benchmarks}; -use frame_support::{dispatch::UnfilteredDispatchable, traits::EnsureOrigin, BoundedVec}; +use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller, BenchmarkError}; +use frame_support::{traits::UnfilteredDispatchable, traits::EnsureOrigin, BoundedVec}; use frame_system::RawOrigin; use orderbook_primitives::Fees; use parity_scale_codec::Decode; diff --git a/pallets/pdex-migration/src/benchmarking.rs b/pallets/pdex-migration/src/benchmarking.rs index def97ffaf..15cf1d54d 100644 --- a/pallets/pdex-migration/src/benchmarking.rs +++ b/pallets/pdex-migration/src/benchmarking.rs @@ -18,8 +18,8 @@ //! Benchmarking setup for pallet-pdex-migration use crate::pallet::{Call, Config, Pallet as PDEXMigration, Pallet, *}; -use frame_benchmarking::{account, benchmarks, whitelisted_caller}; -use frame_support::{assert_ok, dispatch::UnfilteredDispatchable, traits::Get}; +use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller, BenchmarkError}; +use frame_support::{assert_ok, traits::UnfilteredDispatchable, traits::Get}; use frame_system::RawOrigin; use parity_scale_codec::Decode; use sp_runtime::{traits::BlockNumberProvider, SaturatedConversion}; diff --git a/pallets/rewards/Cargo.toml b/pallets/rewards/Cargo.toml index 64150d2ad..be69c7566 100644 --- a/pallets/rewards/Cargo.toml +++ b/pallets/rewards/Cargo.toml @@ -34,6 +34,7 @@ std = [ "scale-info/std", "frame-support/std", "frame-system/std", + "frame-benchmarking?/std", "sp-runtime/std", "sp-std/std", "polkadex-primitives/std", diff --git a/pallets/rewards/src/benchmarking.rs b/pallets/rewards/src/benchmarking.rs index aa3b589f1..02d12ad19 100644 --- a/pallets/rewards/src/benchmarking.rs +++ b/pallets/rewards/src/benchmarking.rs @@ -20,8 +20,8 @@ use super::*; use crate::{pallet::Call, Pallet as pallet_rewards}; -use frame_benchmarking::{account, benchmarks}; -use frame_support::{dispatch::UnfilteredDispatchable, traits::EnsureOrigin}; +use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller, BenchmarkError}; +use frame_support::{traits::UnfilteredDispatchable, traits::EnsureOrigin}; use frame_system::RawOrigin; use parity_scale_codec::Decode; use polkadex_primitives::UNIT_BALANCE; diff --git a/pallets/thea-council/src/benchmarking.rs b/pallets/thea-council/src/benchmarking.rs index fa4a2f8de..193a089ad 100644 --- a/pallets/thea-council/src/benchmarking.rs +++ b/pallets/thea-council/src/benchmarking.rs @@ -17,11 +17,12 @@ use super::*; #[allow(unused)] use crate::Pallet as TheaCouncil; -use frame_benchmarking::{account, benchmarks}; +use frame_benchmarking::v1::{account, benchmarks}; use frame_support::{sp_runtime::SaturatedConversion, BoundedVec}; use frame_system::RawOrigin; use sp_std::{vec, vec::Vec}; use thea_primitives::types::Withdraw; +use frame_system::pallet_prelude::BlockNumberFor; const SEED: u32 = 0; benchmarks! { @@ -77,7 +78,7 @@ benchmarks! { active_council_member.try_push(council_member.clone()).unwrap(); >::put(active_council_member); // Add Pending Withdrawal - let block_no: T::BlockNumber = 100u64.saturated_into(); + let block_no: BlockNumberFor = 100u64.saturated_into(); let pending_withdrawal = Withdraw { id: Vec::new(), asset_id: 0, @@ -95,7 +96,7 @@ benchmarks! { } #[cfg(test)] -use frame_benchmarking::impl_benchmark_test_suite; +use frame_benchmarking::v1::impl_benchmark_test_suite; #[cfg(test)] impl_benchmark_test_suite!(TheaCouncil, crate::mock::new_test_ext(), crate::mock::Test); diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index 8a75a353d..351b74a60 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -50,6 +50,7 @@ pallet-election-provider-multi-phase = { default-features = false, workspace = t pallet-authority-discovery = { default-features = false, workspace = true } pallet-child-bounties = { default-features = false, workspace = true } pallet-statement = { default-features = false, workspace = true } +pallet-asset-tx-payment = { default-features = false, workspace = true } # Assets pallet pallet-asset-conversion = { default-features = false, workspace = true } @@ -82,6 +83,7 @@ sp-npos-elections = { default-features = false, workspace = true } frame-election-provider-support = { default-features = false, workspace = true } #pallet-randomness-collective-flip = { default-features = false, workspace = true } pallet-assets = { default-features = false, workspace = true } +sp-storage = { default-features = false, workspace = true } #end added # Used for the polkadex-node RPCs @@ -196,15 +198,18 @@ std = [ "orderbook-primitives/std", "pallet-asset-conversion/std", "pallet-asset-conversion-tx-payment/std", + "frame-system-benchmarking?/std", + "pallet-asset-tx-payment/std", "pallet-statement/std", - "sp-statement-store/std" + "sp-statement-store/std", + "sp-storage/std" ] runtime-benchmarks = [ #theirs "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", - "frame-system-benchmarking", + "frame-system-benchmarking/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "hex-literal", "pallet-assets/runtime-benchmarks", @@ -218,6 +223,7 @@ runtime-benchmarks = [ "thea-executor/runtime-benchmarks", "thea-message-handler/runtime-benchmarks", "pallet-asset-conversion/runtime-benchmarks", + "pallet-asset-tx-payment/runtime-benchmarks", ] try-runtime = [ @@ -266,4 +272,5 @@ try-runtime = [ "pallet-asset-conversion/try-runtime", "pallet-asset-conversion-tx-payment/try-runtime", "pallet-statement/try-runtime", + "pallet-asset-tx-payment/try-runtime", ] diff --git a/runtimes/mainnet/src/impls.rs b/runtimes/mainnet/src/impls.rs index aa0edd3af..b599d29bc 100644 --- a/runtimes/mainnet/src/impls.rs +++ b/runtimes/mainnet/src/impls.rs @@ -1,6 +1,6 @@ // This file is part of Substrate. -// Copyright (C) 2019-2021 Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies (UK) Ltd. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,12 +17,22 @@ //! Some configurable implementations as associated type for the substrate runtime. -use frame_support::traits::{Currency, OnUnbalanced}; - -use crate::{Authorship, Balances, NegativeImbalance}; +use frame_support::{ + pallet_prelude::*, + traits::{ + fungibles::{Balanced, Credit}, + Currency, OnUnbalanced, + }, +}; +use pallet_asset_tx_payment::HandleCredit; +use sp_std::prelude::*; + +use crate::{ + AccountId, Assets, Authorship, Balances, Hash, NegativeImbalance, Runtime, + RuntimeCall, +}; pub struct Author; - impl OnUnbalanced for Author { fn on_nonzero_unbalanced(amount: NegativeImbalance) { if let Some(author) = Authorship::author() { @@ -31,13 +41,29 @@ impl OnUnbalanced for Author { } } +/// A `HandleCredit` implementation that naively transfers the fees to the block author. +/// Will drop and burn the assets in case the transfer fails. +pub struct CreditToBlockAuthor; +impl HandleCredit for CreditToBlockAuthor { + fn handle_credit(credit: Credit) { + if let Some(author) = pallet_authorship::Pallet::::author() { + // Drop the result which will trigger the `OnDrop` of the imbalance in case of error. + let _ = Assets::resolve(&author, credit); + } + } +} + #[cfg(test)] mod multiplier_tests { + use frame_support::{ + dispatch::DispatchClass, + weights::{Weight, WeightToFee}, + }; use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; use sp_runtime::{ assert_eq_error_rate, traits::{Convert, One, Zero}, - FixedPointNumber, + BuildStorage, FixedPointNumber, }; use crate::{ @@ -45,10 +71,6 @@ mod multiplier_tests { AdjustmentVariable, MaximumMultiplier, MinimumMultiplier, Runtime, RuntimeBlockWeights as BlockWeights, System, TargetBlockFullness, TransactionPayment, }; - use frame_support::{ - dispatch::DispatchClass, - weights::{Weight, WeightToFee}, - }; fn max_normal() -> Weight { BlockWeights::get() @@ -65,7 +87,7 @@ mod multiplier_tests { TargetBlockFullness::get() * max_normal() } - // update based on Runtime impl. + // update based on runtime impl. fn runtime_multiplier_update(fm: Multiplier) -> Multiplier { TargetedFeeAdjustment::< Runtime, @@ -83,14 +105,28 @@ mod multiplier_tests { // bump if it is zero. let previous_float = previous_float.max(min_multiplier().into_inner() as f64 / accuracy); + let max_normal = max_normal(); + let target_weight = target(); + let normalized_weight_dimensions = ( + block_weight.ref_time() as f64 / max_normal.ref_time() as f64, + block_weight.proof_size() as f64 / max_normal.proof_size() as f64, + ); + + let (normal, max, target) = + if normalized_weight_dimensions.0 < normalized_weight_dimensions.1 { + (block_weight.proof_size(), max_normal.proof_size(), target_weight.proof_size()) + } else { + (block_weight.ref_time(), max_normal.ref_time(), target_weight.ref_time()) + }; + // maximum tx weight - let m = max_normal().ref_time() as f64; + let m = max as f64; // block weight always truncated to max weight - let block_weight = (block_weight.ref_time() as f64).min(m); + let block_weight = (normal as f64).min(m); let v: f64 = AdjustmentVariable::get().to_float(); // Ideal saturation in terms of weight - let ss = target().ref_time() as f64; + let ss = target as f64; // Current saturation in terms of weight let s = block_weight; @@ -101,11 +137,11 @@ mod multiplier_tests { } fn run_with_system_weight(w: Weight, assertions: F) - where - F: Fn(), + where + F: Fn() -> (), { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() + let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() + .build_storage() .unwrap() .into(); t.execute_with(|| { @@ -140,10 +176,16 @@ mod multiplier_tests { #[test] fn multiplier_can_grow_from_zero() { // if the min is too small, then this will not change, and we are doomed forever. - // the weight is 1/100th bigger than target. + // the block ref time is 1/100th bigger than target. run_with_system_weight(target().set_ref_time(target().ref_time() * 101 / 100), || { let next = runtime_multiplier_update(min_multiplier()); - assert!(next > min_multiplier(), "{:?} !>= {:?}", next, min_multiplier()); + assert!(next > min_multiplier(), "{:?} !> {:?}", next, min_multiplier()); + }); + + // the block proof size is 1/100th bigger than target. + run_with_system_weight(target().set_proof_size((target().proof_size() / 100) * 101), || { + let next = runtime_multiplier_update(min_multiplier()); + assert!(next > min_multiplier(), "{:?} !> {:?}", next, min_multiplier()); }) } @@ -185,7 +227,6 @@ mod multiplier_tests { } #[test] - #[ignore] // TODO: Fix it later. fn min_change_per_day() { run_with_system_weight(max_normal(), || { let mut fm = Multiplier::one(); @@ -362,14 +403,14 @@ mod multiplier_tests { Weight::MAX / 2, Weight::MAX, ] - .into_iter() - .for_each(|i| { - run_with_system_weight(i, || { - let next = runtime_multiplier_update(Multiplier::one()); - let truth = truth_value_update(i, Multiplier::one()); - assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000)); + .into_iter() + .for_each(|i| { + run_with_system_weight(i, || { + let next = runtime_multiplier_update(Multiplier::one()); + let truth = truth_value_update(i, Multiplier::one()); + assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000)); + }); }); - }); // Some values that are all above the target and will cause an increase. let t = target(); @@ -379,13 +420,13 @@ mod multiplier_tests { t * 2, t * 4, ] - .into_iter() - .for_each(|i| { - run_with_system_weight(i, || { - let fm = runtime_multiplier_update(max_fm); - // won't grow. The convert saturates everything. - assert_eq!(fm, max_fm); - }) - }); + .into_iter() + .for_each(|i| { + run_with_system_weight(i, || { + let fm = runtime_multiplier_update(max_fm); + // won't grow. The convert saturates everything. + assert_eq!(fm, max_fm); + }) + }); } } diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index 99502a744..a9d9228db 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -44,6 +44,7 @@ use frame_support::{ }, PalletId, }; +use frame_support::instances::Instance1; #[cfg(any(feature = "std", test))] pub use frame_system::Call as SystemCall; use frame_system::{ @@ -428,7 +429,7 @@ impl pallet_balances::Config for Runtime { type MaxHolds = (); type MaxFreezes = (); } -use sp_runtime::traits::Bounded; +use sp_runtime::traits::{Bounded, ConvertInto}; parameter_types! { pub const TransactionByteFee: Balance = 10 * MILLICENTS; pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25); @@ -1165,6 +1166,17 @@ impl BenchmarkHelper> for AssetU128 { } } +#[cfg(feature = "runtime-benchmarks")] +impl pallet_asset_conversion::BenchmarkHelper> for AssetU128 { + fn asset_id(id: u32) -> u128 { + id as u128 + } + + fn multiasset_id(id: u32) -> pallet_asset_conversion::NativeOrAssetId { + pallet_asset_conversion::NativeOrAssetId::Asset(id as u128) + } +} + parameter_types! { pub const BasicDeposit: Balance = deposit(1,258); // 258 bytes on-chain pub const FieldDeposit: Balance = deposit(0,66); // 66 bytes on-chain @@ -1376,6 +1388,15 @@ impl pallet_asset_conversion_tx_payment::Config for Runtime { pallet_asset_conversion_tx_payment::AssetConversionAdapter; } +impl pallet_asset_tx_payment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Fungibles = Assets; + type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter< + pallet_assets::BalanceToAssetBalance, + CreditToBlockAuthor, + >; +} + parameter_types! { pub const AssetConversionPalletId: PalletId = PalletId(*b"py/ascon"); pub AllowMultiAssetPools: bool = true; @@ -1406,7 +1427,7 @@ impl pallet_asset_conversion::Config for Runtime { type MintMinLiquidity = MintMinLiquidity; type MultiAssetIdConverter = NativeOrAssetIdConverter; #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); + type BenchmarkHelper = AssetU128; } parameter_types! { @@ -1444,7 +1465,7 @@ construct_runtime!( ElectionProviderMultiPhase: pallet_election_provider_multi_phase = 8, Staking: pallet_staking = 9, Session: pallet_session = 10, - Council: pallet_collective = 11, + Council: pallet_collective:: = 11, TechnicalCommittee: pallet_collective:: = 12, Elections: pallet_elections_phragmen = 13, TechnicalMembership: pallet_membership:: = 14, @@ -1477,7 +1498,8 @@ construct_runtime!( TheaMH: thea_message_handler::pallet = 45, AssetConversion: pallet_asset_conversion = 46, AssetConversionTxPayment: pallet_asset_conversion_tx_payment = 47, - Statement: pallet_statement = 48 + Statement: pallet_statement = 48, + AssetTxPayment: pallet_asset_tx_payment = 49, } ); @@ -1527,7 +1549,8 @@ construct_runtime!( TheaExecutor: thea_executor::pallet = 44, AssetConversion: pallet_asset_conversion = 46, AssetConversionTxPayment: pallet_asset_conversion_tx_payment = 47, - Statement: pallet_statement = 48 + Statement: pallet_statement = 48, + AssetTxPayment: pallet_asset_tx_payment = 49, } ); /// Digest item type. @@ -1557,6 +1580,9 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, ); +//TODO: two things are missing? +// frame_system::CheckNonZeroSender, +// frame_system::CheckEra, /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1575,6 +1601,7 @@ pub type Executive = frame_executive::Executive< use crate::sp_api_hidden_includes_construct_runtime::hidden_include::traits::fungible::Inspect; use orderbook_primitives::ObCheckpointRaw; +use crate::impls::CreditToBlockAuthor; impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { @@ -1871,7 +1898,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; + use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark}; + use sp_storage::TrackedStorageKey; impl frame_system_benchmarking::Config for Runtime {} let allowlist: Vec = vec![ diff --git a/runtimes/parachain/Cargo.toml b/runtimes/parachain/Cargo.toml index 0dc51ae32..e6975cf84 100644 --- a/runtimes/parachain/Cargo.toml +++ b/runtimes/parachain/Cargo.toml @@ -50,6 +50,7 @@ sp-session = { workspace = true, default-features = false } sp-std = { workspace = true, default-features = false } sp-transaction-pool = { workspace = true, default-features = false } sp-version = { workspace = true, default-features = false } +sp-staking = { workspace = true, default-features = false } # Polkadot pallet-xcm = { workspace = true, default-features = false } @@ -139,6 +140,7 @@ std = [ "orml-xcm-support/std", "thea-message-handler/std", "thea-primitives/std", + "sp-staking/std" ] runtime-benchmarks = [ @@ -157,6 +159,7 @@ runtime-benchmarks = [ "cumulus-pallet-xcmp-queue/runtime-benchmarks", "xcm-helper/runtime-benchmarks", "thea-council/runtime-benchmarks", + "pallet-assets/runtime-benchmarks" ] try-runtime = [ diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index 655b9c9f4..dfc8ab039 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -530,6 +530,21 @@ impl pallet_assets::Config for Runtime { type Extra = (); type CallbackHandle = (); type WeightInfo = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = AssetU128; +} + +#[cfg(feature = "runtime-benchmarks")] +pub struct AssetU128; +#[cfg(feature = "runtime-benchmarks")] +use pallet_assets::BenchmarkHelper; +use sp_staking::currency_to_vote::U128CurrencyToVote; + +#[cfg(feature = "runtime-benchmarks")] +impl BenchmarkHelper> for AssetU128 { + fn create_asset_id_parameter(id: u32) -> parity_scale_codec::Compact { + parity_scale_codec::Compact::from(id as u128) + } } parameter_types! { diff --git a/runtimes/parachain/src/xcm_config.rs b/runtimes/parachain/src/xcm_config.rs index 72bc20e4b..ead17ce6b 100644 --- a/runtimes/parachain/src/xcm_config.rs +++ b/runtimes/parachain/src/xcm_config.rs @@ -241,7 +241,7 @@ impl pallet_xcm::Config for Runtime { type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "polkadex-parachain-benchmarks")] + #[cfg(feature = "runtime-benchmarks")] type ReachableDest = (); } From e764e702fc2c80ae4c30205bf82a77b2fd812c5b Mon Sep 17 00:00:00 2001 From: zktony Date: Mon, 9 Oct 2023 13:25:35 +0530 Subject: [PATCH 19/51] Added host function --- Cargo.lock | 1 + client/Cargo.toml | 1 + client/src/lib.rs | 7 ++++++- runtimes/mainnet/src/lib.rs | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 1a32ec08e..140978ada 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8240,6 +8240,7 @@ dependencies = [ "frame-benchmarking", "node-polkadex-runtime", "sc-executor", + "sp-statement-store", ] [[package]] diff --git a/client/Cargo.toml b/client/Cargo.toml index a8e15f8dc..5ae053329 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -7,3 +7,4 @@ edition = "2021" sc-executor = { workspace = true } node-polkadex-runtime = { path = "../runtimes/mainnet" } frame-benchmarking = { workspace = true } +sp-statement-store = { workspace = true } diff --git a/client/src/lib.rs b/client/src/lib.rs index 69fa1969c..b5a8a571c 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -22,7 +22,10 @@ pub struct ExecutorDispatch; impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { - type ExtendHostFunctions = (frame_benchmarking::benchmarking::HostFunctions,); + type ExtendHostFunctions = ( + frame_benchmarking::benchmarking::HostFunctions, + sp_statement_store::runtime_api::HostFunctions, + ); fn dispatch(method: &str, data: &[u8]) -> Option> { node_polkadex_runtime::api::dispatch(method, data) @@ -31,4 +34,6 @@ impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { fn native_version() -> sc_executor::NativeVersion { node_polkadex_runtime::native_version() } + + } diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index a9d9228db..61bc89dae 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -89,6 +89,7 @@ use sp_runtime::{ use sp_std::{prelude::*, vec}; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; +use sp_storage as _; use sp_version::RuntimeVersion; use static_assertions::const_assert; From f4d8e4daae025baf3855240e3c1c752d0b5923cc Mon Sep 17 00:00:00 2001 From: zktony Date: Wed, 18 Oct 2023 11:55:52 +0530 Subject: [PATCH 20/51] Updated conf --- runtimes/mainnet/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index 61bc89dae..c47699561 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -116,7 +116,7 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { /// Runtime version. #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("polkadex-parachain-node"), + spec_name: create_runtime_str!("polkadex-node"), impl_name: create_runtime_str!("polkadex-official"), authoring_version: 10, // Per convention: if the runtime behavior changes, increment spec_version From df8b05745c71815131e8fba24230cdff251e3fcd Mon Sep 17 00:00:00 2001 From: zktony Date: Wed, 18 Oct 2023 12:03:49 +0530 Subject: [PATCH 21/51] Added tabulation --- nodes/parachain/src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodes/parachain/src/cli.rs b/nodes/parachain/src/cli.rs index 05720a058..3e0001601 100644 --- a/nodes/parachain/src/cli.rs +++ b/nodes/parachain/src/cli.rs @@ -73,9 +73,9 @@ const AFTER_HELP_EXAMPLE: &str = color_print::cstr!( ); #[derive(Debug, clap::Parser)] #[command( -propagate_version = true, -args_conflicts_with_subcommands = true, -subcommand_negates_reqs = true + propagate_version = true, + args_conflicts_with_subcommands = true, + subcommand_negates_reqs = true )] #[clap(after_help = AFTER_HELP_EXAMPLE)] pub struct Cli { From caaa620c497e29f3c265e4a008e9e017b7a20c91 Mon Sep 17 00:00:00 2001 From: zktony Date: Wed, 18 Oct 2023 17:15:03 +0530 Subject: [PATCH 22/51] Added line --- nodes/parachain/src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/parachain/src/cli.rs b/nodes/parachain/src/cli.rs index 3e0001601..6dc30489d 100644 --- a/nodes/parachain/src/cli.rs +++ b/nodes/parachain/src/cli.rs @@ -127,4 +127,4 @@ impl RelayChainCli { base: clap::Parser::parse_from(relay_chain_args), } } -} \ No newline at end of file +} From 42a1744f057910896b4b26baf5e0827614c253bb Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 19 Oct 2023 12:23:46 -0700 Subject: [PATCH 23/51] Code style fixes --- nodes/mainnet/src/command.rs | 5 ++-- nodes/mainnet/src/lib.rs | 2 +- runtimes/mainnet/src/impls.rs | 49 +++++++++++++++-------------------- runtimes/mainnet/src/lib.rs | 13 ++++++---- runtimes/parachain/src/lib.rs | 1 - 5 files changed, 32 insertions(+), 38 deletions(-) diff --git a/nodes/mainnet/src/command.rs b/nodes/mainnet/src/command.rs index 8e086f30e..91a94f6ff 100644 --- a/nodes/mainnet/src/command.rs +++ b/nodes/mainnet/src/command.rs @@ -25,8 +25,6 @@ use crate::{ }; use node_polkadex_runtime::{Block, ExistentialDeposit}; -#[cfg(feature = "try-runtime")] -use polkadex_client::ExecutorDispatch; use polkadex_node::benchmarking::{ inherent_benchmark_data, RemarkBuilder, TransferKeepAliveBuilder, }; @@ -109,7 +107,8 @@ pub fn run() -> Result<()> { ) } - cmd.run::(config) //TODO: @Gautham - Check this + //TODO: @Gautham - Check this + cmd.run::(config) }, BenchmarkCmd::Block(cmd) => { let PartialComponents { client, .. } = new_partial(&config)?; diff --git a/nodes/mainnet/src/lib.rs b/nodes/mainnet/src/lib.rs index dc7c3d65e..79bad7754 100644 --- a/nodes/mainnet/src/lib.rs +++ b/nodes/mainnet/src/lib.rs @@ -22,5 +22,5 @@ pub mod chain_spec; pub mod cli; pub mod node_rpc; pub mod service; -#[cfg(try_runtime)] +#[cfg(feature = "try-runtime")] use try_runtime_cli as _; diff --git a/runtimes/mainnet/src/impls.rs b/runtimes/mainnet/src/impls.rs index b599d29bc..2dd7fe164 100644 --- a/runtimes/mainnet/src/impls.rs +++ b/runtimes/mainnet/src/impls.rs @@ -17,20 +17,13 @@ //! Some configurable implementations as associated type for the substrate runtime. -use frame_support::{ - pallet_prelude::*, - traits::{ - fungibles::{Balanced, Credit}, - Currency, OnUnbalanced, - }, +use frame_support::traits::{ + fungibles::{Balanced, Credit}, + Currency, OnUnbalanced, }; use pallet_asset_tx_payment::HandleCredit; -use sp_std::prelude::*; -use crate::{ - AccountId, Assets, Authorship, Balances, Hash, NegativeImbalance, Runtime, - RuntimeCall, -}; +use crate::{AccountId, Assets, Authorship, Balances, NegativeImbalance, Runtime}; pub struct Author; impl OnUnbalanced for Author { @@ -137,8 +130,8 @@ mod multiplier_tests { } fn run_with_system_weight(w: Weight, assertions: F) - where - F: Fn() -> (), + where + F: Fn() -> (), { let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() .build_storage() @@ -403,14 +396,14 @@ mod multiplier_tests { Weight::MAX / 2, Weight::MAX, ] - .into_iter() - .for_each(|i| { - run_with_system_weight(i, || { - let next = runtime_multiplier_update(Multiplier::one()); - let truth = truth_value_update(i, Multiplier::one()); - assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000)); - }); + .into_iter() + .for_each(|i| { + run_with_system_weight(i, || { + let next = runtime_multiplier_update(Multiplier::one()); + let truth = truth_value_update(i, Multiplier::one()); + assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000)); }); + }); // Some values that are all above the target and will cause an increase. let t = target(); @@ -420,13 +413,13 @@ mod multiplier_tests { t * 2, t * 4, ] - .into_iter() - .for_each(|i| { - run_with_system_weight(i, || { - let fm = runtime_multiplier_update(max_fm); - // won't grow. The convert saturates everything. - assert_eq!(fm, max_fm); - }) - }); + .into_iter() + .for_each(|i| { + run_with_system_weight(i, || { + let fm = runtime_multiplier_update(max_fm); + // won't grow. The convert saturates everything. + assert_eq!(fm, max_fm); + }) + }); } } diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index c47699561..718a26ac5 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -44,7 +44,6 @@ use frame_support::{ }, PalletId, }; -use frame_support::instances::Instance1; #[cfg(any(feature = "std", test))] pub use frame_system::Call as SystemCall; use frame_system::{ @@ -87,9 +86,9 @@ use sp_runtime::{ ApplyExtrinsicResult, DispatchError, FixedPointNumber, Perbill, Percent, Permill, Perquintill, }; use sp_std::{prelude::*, vec}; +use sp_storage as _; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; -use sp_storage as _; use sp_version::RuntimeVersion; use static_assertions::const_assert; @@ -1168,7 +1167,9 @@ impl BenchmarkHelper> for AssetU128 { } #[cfg(feature = "runtime-benchmarks")] -impl pallet_asset_conversion::BenchmarkHelper> for AssetU128 { +impl pallet_asset_conversion::BenchmarkHelper> + for AssetU128 +{ fn asset_id(id: u32) -> u128 { id as u128 } @@ -1600,9 +1601,11 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; -use crate::sp_api_hidden_includes_construct_runtime::hidden_include::traits::fungible::Inspect; +use crate::{ + impls::CreditToBlockAuthor, + sp_api_hidden_includes_construct_runtime::hidden_include::traits::fungible::Inspect, +}; use orderbook_primitives::ObCheckpointRaw; -use crate::impls::CreditToBlockAuthor; impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index dfc8ab039..b44c71f71 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -538,7 +538,6 @@ impl pallet_assets::Config for Runtime { pub struct AssetU128; #[cfg(feature = "runtime-benchmarks")] use pallet_assets::BenchmarkHelper; -use sp_staking::currency_to_vote::U128CurrencyToVote; #[cfg(feature = "runtime-benchmarks")] impl BenchmarkHelper> for AssetU128 { From 4468239eca942bb3f1dc0e883d38356046812b61 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 19 Oct 2023 18:28:46 -0700 Subject: [PATCH 24/51] chore(build): Fixed containerization for local test network --- .../docker-compose.yml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.maintain/local-docker-test-network/docker-compose.yml b/.maintain/local-docker-test-network/docker-compose.yml index cdcfc6f64..66d2f5436 100644 --- a/.maintain/local-docker-test-network/docker-compose.yml +++ b/.maintain/local-docker-test-network/docker-compose.yml @@ -16,24 +16,24 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Docker compose file to start a multi polkadex-mainnet-polkadex-parachain-node local test network. +# Docker compose file to start a multi node local test network. # # # Nodes # -# - Validator polkadex-mainnet-polkadex-parachain-node A -# - Validator polkadex-mainnet-polkadex-parachain-node B -# - Full polkadex-mainnet-polkadex-parachain-node C +# - Validator node A +# - Validator node B +# - Full node C # # # Auxiliary nodes # -# - Prometheus monitoring each polkadex-mainnet-polkadex-parachain-node. -# - Grafana pointed at the Prometheus polkadex-mainnet-polkadex-parachain-node, configured with all dashboards. +# - Prometheus monitoring each node. +# - Grafana pointed at the Prometheus node, configured with all dashboards. # # # Usage # # 1. Build `target/release/substrate` binary: `cargo build --release` # 2. Start networks and containers: -# `sudo docker-compose -f .maintain/sentry-polkadex-mainnet-polkadex-parachain-node/docker-compose.yml up` +# `sudo docker-compose -f .maintain/docker-compose.yml up` # 3. Connect to nodes: # - validator-a: localhost:9944 # - validator-b: localhost:9945 @@ -50,12 +50,12 @@ services: - "9944:9944" - "9615:9615" volumes: - - ../../target/release/polkadex-polkadex-mainnet-polkadex-parachain-node:/usr/local/bin/polkadex-polkadex-mainnet-polkadex-parachain-node + - ../../target/release/polkadex-node:/usr/local/bin/polkadex-node image: parity/substrate networks: - internet command: - - "--polkadex-mainnet-polkadex-parachain-node-key" + - "--node-key" - "0000000000000000000000000000000000000000000000000000000000000001" - "--base-path" - "/tmp/alice" @@ -81,11 +81,11 @@ services: ports: - "9945:9944" volumes: - - ../../target/release/polkadex-polkadex-mainnet-polkadex-parachain-node:/usr/local/bin/polkadex-polkadex-mainnet-polkadex-parachain-node + - ../../target/release/polkadex-node:/usr/local/bin/polkadex-node networks: - internet command: - - "--polkadex-mainnet-polkadex-parachain-node-key" + - "--node-key" - "0000000000000000000000000000000000000000000000000000000000000002" - "--base-path" - "/tmp/bob" @@ -111,11 +111,11 @@ services: ports: - "9946:9944" volumes: - - ../../target/release/polkadex-polkadex-mainnet-polkadex-parachain-node:/usr/local/bin/polkadex-polkadex-mainnet-polkadex-parachain-node + - ../../target/release/polkadex-node:/usr/local/bin/polkadex-node networks: - internet command: - - "--polkadex-mainnet-polkadex-parachain-node-key" + - "--node-key" - "0000000000000000000000000000000000000000000000000000000000000003" - "--base-path" - "/tmp/light" From 310bdde2031d3e6991ee1ebcfe0b55f30e4ce5e8 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 19 Oct 2023 18:30:21 -0700 Subject: [PATCH 25/51] chore(cs): Fixed code style and removed unused imports and members --- pallets/liquidity/src/benchmarking.rs | 5 ++--- pallets/ocex/src/benchmarking.rs | 7 +++++-- pallets/pdex-migration/src/benchmarking.rs | 7 +++++-- pallets/rewards/src/benchmarking.rs | 4 ++-- pallets/thea-message-handler/src/benchmarking.rs | 6 ------ pallets/thea/src/benchmarking.rs | 5 ----- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/pallets/liquidity/src/benchmarking.rs b/pallets/liquidity/src/benchmarking.rs index 8db3bec13..00f1d08b8 100644 --- a/pallets/liquidity/src/benchmarking.rs +++ b/pallets/liquidity/src/benchmarking.rs @@ -20,13 +20,12 @@ #![cfg(feature = "runtime-benchmarks")] use super::*; use crate::{pallet::Call, LiquidityModifier, Pallet as liquidity}; -use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller, BenchmarkError}; -use frame_support::traits::EnsureOrigin; +use frame_benchmarking::v1::benchmarks; +use frame_support::traits::{EnsureOrigin, UnfilteredDispatchable}; use frame_system::RawOrigin; use parity_scale_codec::Decode; use polkadex_primitives::{AssetId, UNIT_BALANCE}; use sp_runtime::SaturatedConversion; -use frame_support::traits::UnfilteredDispatchable; // Check if last event generated by pallet is the one we're expecting fn assert_last_event(generic_event: ::RuntimeEvent) { diff --git a/pallets/ocex/src/benchmarking.rs b/pallets/ocex/src/benchmarking.rs index 2b89c8686..13e743b95 100644 --- a/pallets/ocex/src/benchmarking.rs +++ b/pallets/ocex/src/benchmarking.rs @@ -21,8 +21,11 @@ use super::*; use crate::Pallet as Ocex; -use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller, BenchmarkError}; -use frame_support::{traits::UnfilteredDispatchable, traits::EnsureOrigin, BoundedVec}; +use frame_benchmarking::v1::{account, benchmarks}; +use frame_support::{ + traits::{EnsureOrigin, UnfilteredDispatchable}, + BoundedVec, +}; use frame_system::RawOrigin; use orderbook_primitives::Fees; use parity_scale_codec::Decode; diff --git a/pallets/pdex-migration/src/benchmarking.rs b/pallets/pdex-migration/src/benchmarking.rs index 15cf1d54d..0435fb006 100644 --- a/pallets/pdex-migration/src/benchmarking.rs +++ b/pallets/pdex-migration/src/benchmarking.rs @@ -18,8 +18,11 @@ //! Benchmarking setup for pallet-pdex-migration use crate::pallet::{Call, Config, Pallet as PDEXMigration, Pallet, *}; -use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller, BenchmarkError}; -use frame_support::{assert_ok, traits::UnfilteredDispatchable, traits::Get}; +use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller}; +use frame_support::{ + assert_ok, + traits::{Get, UnfilteredDispatchable}, +}; use frame_system::RawOrigin; use parity_scale_codec::Decode; use sp_runtime::{traits::BlockNumberProvider, SaturatedConversion}; diff --git a/pallets/rewards/src/benchmarking.rs b/pallets/rewards/src/benchmarking.rs index 02d12ad19..e2db5c658 100644 --- a/pallets/rewards/src/benchmarking.rs +++ b/pallets/rewards/src/benchmarking.rs @@ -20,8 +20,8 @@ use super::*; use crate::{pallet::Call, Pallet as pallet_rewards}; -use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller, BenchmarkError}; -use frame_support::{traits::UnfilteredDispatchable, traits::EnsureOrigin}; +use frame_benchmarking::v1::{account, benchmarks}; +use frame_support::traits::{EnsureOrigin, UnfilteredDispatchable}; use frame_system::RawOrigin; use parity_scale_codec::Decode; use polkadex_primitives::UNIT_BALANCE; diff --git a/pallets/thea-message-handler/src/benchmarking.rs b/pallets/thea-message-handler/src/benchmarking.rs index 61b2c1f27..dadc9a8b1 100644 --- a/pallets/thea-message-handler/src/benchmarking.rs +++ b/pallets/thea-message-handler/src/benchmarking.rs @@ -23,7 +23,6 @@ use super::*; use frame_benchmarking::benchmarks; use frame_system::RawOrigin; use parity_scale_codec::Decode; -use sp_core::crypto::ByteArray; const KEY: [u8; 33] = [ 2, 10, 16, 145, 52, 31, 229, 102, 75, 250, 23, 130, 213, 224, 71, 121, 104, 144, 104, 201, 22, @@ -37,11 +36,6 @@ const SIG: [u8; 65] = [ 186, 113, 211, 53, 0, ]; -// Check if last event generated by pallet is the one we're expecting -fn assert_last_event(generic_event: ::RuntimeEvent) { - frame_system::Pallet::::assert_last_event(generic_event.into()); -} - fn generate_deposit_payload() -> Vec> { sp_std::vec![Deposit { id: H256::zero().0.to_vec(), diff --git a/pallets/thea/src/benchmarking.rs b/pallets/thea/src/benchmarking.rs index a9701b95e..fb813faa0 100644 --- a/pallets/thea/src/benchmarking.rs +++ b/pallets/thea/src/benchmarking.rs @@ -26,11 +26,6 @@ use frame_system::RawOrigin; use parity_scale_codec::Decode; use sp_std::collections::btree_set::BTreeSet; -// Check if last event generated by pallet is the one we're expecting -fn assert_last_event(generic_event: ::RuntimeEvent) { - frame_system::Pallet::::assert_last_event(generic_event.into()); -} - fn generate_deposit_payload() -> Vec> { sp_std::vec![Deposit { id: H256::zero().0.to_vec(), From 075c4ae7c6e3dcd8232d582fcb4e3eb9a6ea67dd Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 19 Oct 2023 19:46:31 -0700 Subject: [PATCH 26/51] chore(build): Fixed node container running issue by adding required dependency --- dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dockerfile b/dockerfile index b8d62e8cf..20ba38b4a 100644 --- a/dockerfile +++ b/dockerfile @@ -35,6 +35,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ FROM docker.io/library/ubuntu:20.04 COPY --from=builder /Polkadex/target/release/polkadex-node /usr/local/bin +RUN apt-get update && apt-get install --assume-yes curl ca-certificates + RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadex-node polkadex-node && \ mkdir -p /polkadex-node/.local/share && \ mkdir /data && \ From d07c569335aa6960eb0bff6d75bc86b161adab2c Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Tue, 24 Oct 2023 13:51:47 -0700 Subject: [PATCH 27/51] feat(it-241): Updated pallets weight after substrate version bump --- pallets/liquidity/src/weights.rs | 88 +++--- pallets/ocex/src/weights.rs | 282 ++++++++++---------- pallets/pdex-migration/src/weights.rs | 109 ++++---- pallets/rewards/src/weights.rs | 67 ++--- pallets/thea-executor/src/weights.rs | 134 +++++----- pallets/thea-message-handler/src/weights.rs | 54 ++-- pallets/thea/src/weights.rs | 78 +++--- 7 files changed, 413 insertions(+), 399 deletions(-) diff --git a/pallets/liquidity/src/weights.rs b/pallets/liquidity/src/weights.rs index 1cc16308f..7a15c7507 100644 --- a/pallets/liquidity/src/weights.rs +++ b/pallets/liquidity/src/weights.rs @@ -1,10 +1,10 @@ //! Autogenerated weights for `liquidity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-22, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-5-61`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // ./polkadex-node @@ -32,41 +32,41 @@ use core::marker::PhantomData; /// Weight functions for `liquidity`. pub struct WeightInfo(PhantomData); impl crate::WeightInfo for WeightInfo { - /// Storage: Liquidity RegisterGovernanceAccounts (r:1 w:1) - /// Proof Skipped: Liquidity RegisterGovernanceAccounts (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX Accounts (r:1 w:1) - /// Proof Skipped: OCEX Accounts (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `Liquidity::RegisterGovernanceAccounts` (r:1 w:1) + /// Proof: `Liquidity::RegisterGovernanceAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Accounts` (r:1 w:1) + /// Proof: `OCEX::Accounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `a` is `[0, 4294967295]`. fn register_account(_a: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3708` - // Minimum execution time: 16_636_000 picoseconds. - Weight::from_parts(17_535_398, 0) + // Minimum execution time: 85_153_000 picoseconds. + Weight::from_parts(87_170_413, 0) .saturating_add(Weight::from_parts(0, 3708)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Liquidity RegisterGovernanceAccounts (r:1 w:0) - /// Proof Skipped: Liquidity RegisterGovernanceAccounts (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX AllowlistedToken (r:1 w:0) - /// Proof Skipped: OCEX AllowlistedToken (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX Accounts (r:1 w:0) - /// Proof Skipped: OCEX Accounts (max_values: None, max_size: None, mode: Measured) - /// Storage: Assets Asset (r:1 w:1) - /// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: Assets Account (r:2 w:1) - /// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen) - /// Storage: OCEX TotalAssets (r:1 w:1) - /// Proof Skipped: OCEX TotalAssets (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `Liquidity::RegisterGovernanceAccounts` (r:1 w:0) + /// Proof: `Liquidity::RegisterGovernanceAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::AllowlistedToken` (r:1 w:0) + /// Proof: `OCEX::AllowlistedToken` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Accounts` (r:1 w:0) + /// Proof: `OCEX::Accounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(146), added: 2621, mode: `MaxEncodedLen`) + /// Storage: `OCEX::TotalAssets` (r:1 w:1) + /// Proof: `OCEX::TotalAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `a` is `[1, 4294967295]`. /// The range of component `i` is `[0, 4294967295]`. /// The range of component `z` is `[10, 4294967295]`. @@ -74,22 +74,22 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `928` // Estimated: `6232` - // Minimum execution time: 44_202_000 picoseconds. - Weight::from_parts(46_998_278, 0) + // Minimum execution time: 201_478_000 picoseconds. + Weight::from_parts(206_511_440, 0) .saturating_add(Weight::from_parts(0, 6232)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Liquidity RegisterGovernanceAccounts (r:1 w:0) - /// Proof Skipped: Liquidity RegisterGovernanceAccounts (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX AllowlistedToken (r:1 w:0) - /// Proof Skipped: OCEX AllowlistedToken (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX Accounts (r:1 w:0) - /// Proof Skipped: OCEX Accounts (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `Liquidity::RegisterGovernanceAccounts` (r:1 w:0) + /// Proof: `Liquidity::RegisterGovernanceAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::AllowlistedToken` (r:1 w:0) + /// Proof: `OCEX::AllowlistedToken` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Accounts` (r:1 w:0) + /// Proof: `OCEX::Accounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `a` is `[1, 4294967295]`. /// The range of component `i` is `[0, 4294967295]`. /// The range of component `z` is `[10, 4294967295]`. @@ -97,10 +97,10 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `553` // Estimated: `4018` - // Minimum execution time: 21_093_000 picoseconds. - Weight::from_parts(22_677_425, 0) + // Minimum execution time: 90_983_000 picoseconds. + Weight::from_parts(93_871_114, 0) .saturating_add(Weight::from_parts(0, 4018)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } -} \ No newline at end of file +} diff --git a/pallets/ocex/src/weights.rs b/pallets/ocex/src/weights.rs index 8f6f9e3ae..c02aca2fa 100644 --- a/pallets/ocex/src/weights.rs +++ b/pallets/ocex/src/weights.rs @@ -1,10 +1,10 @@ //! Autogenerated weights for `pallet_ocex_lmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-22, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-5-61`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // ./polkadex-node @@ -32,279 +32,289 @@ use core::marker::PhantomData; /// Weight functions for `pallet_ocex_lmp`. pub struct WeightInfo(PhantomData); impl crate::OcexWeightInfo for WeightInfo { - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX Accounts (r:1 w:1) - /// Proof Skipped: OCEX Accounts (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Accounts` (r:1 w:1) + /// Proof: `OCEX::Accounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[0, 50000]`. fn register_main_account(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` - // Minimum execution time: 10_791_000 picoseconds. - Weight::from_parts(11_552_442, 0) + // Minimum execution time: 56_052_000 picoseconds. + Weight::from_parts(57_789_709, 0) .saturating_add(Weight::from_parts(0, 3632)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX Accounts (r:1 w:1) - /// Proof Skipped: OCEX Accounts (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Accounts` (r:1 w:1) + /// Proof: `OCEX::Accounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 255]`. fn add_proxy_account(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `397` // Estimated: `3862` - // Minimum execution time: 14_872_000 picoseconds. - Weight::from_parts(15_853_604, 0) + // Minimum execution time: 69_812_000 picoseconds. + Weight::from_parts(71_979_380, 0) .saturating_add(Weight::from_parts(0, 3862)) - // Standard Error: 19 - .saturating_add(Weight::from_parts(57, 0).saturating_mul(x.into())) + // Standard Error: 45 + .saturating_add(Weight::from_parts(1_619, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX TradingPairs (r:1 w:1) - /// Proof Skipped: OCEX TradingPairs (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::TradingPairs` (r:1 w:1) + /// Proof: `OCEX::TradingPairs` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[1, 50000]`. fn close_trading_pair(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `391` // Estimated: `3856` - // Minimum execution time: 13_973_000 picoseconds. - Weight::from_parts(14_949_673, 0) + // Minimum execution time: 65_553_000 picoseconds. + Weight::from_parts(67_539_432, 0) .saturating_add(Weight::from_parts(0, 3856)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX TradingPairs (r:1 w:1) - /// Proof Skipped: OCEX TradingPairs (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::TradingPairs` (r:1 w:1) + /// Proof: `OCEX::TradingPairs` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 100000]`. fn open_trading_pair(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `391` // Estimated: `3856` - // Minimum execution time: 14_037_000 picoseconds. - Weight::from_parts(14_954_997, 0) + // Minimum execution time: 65_593_000 picoseconds. + Weight::from_parts(67_481_003, 0) .saturating_add(Weight::from_parts(0, 3856)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX TradingPairs (r:2 w:1) - /// Proof Skipped: OCEX TradingPairs (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::TradingPairs` (r:2 w:1) + /// Proof: `OCEX::TradingPairs` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 100000]`. - fn register_trading_pair(_x: u32, ) -> Weight { + fn register_trading_pair(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `6107` - // Minimum execution time: 12_453_000 picoseconds. - Weight::from_parts(13_251_073, 0) + // Minimum execution time: 66_913_000 picoseconds. + Weight::from_parts(68_752_355, 0) .saturating_add(Weight::from_parts(0, 6107)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX TradingPairs (r:1 w:1) - /// Proof Skipped: OCEX TradingPairs (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::TradingPairs` (r:1 w:1) + /// Proof: `OCEX::TradingPairs` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 100000]`. - fn update_trading_pair(_x: u32, ) -> Weight { + fn update_trading_pair(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `420` // Estimated: `3885` - // Minimum execution time: 16_170_000 picoseconds. - Weight::from_parts(17_078_724, 0) + // Minimum execution time: 75_603_000 picoseconds. + Weight::from_parts(77_960_257, 0) .saturating_add(Weight::from_parts(0, 3885)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX AllowlistedToken (r:1 w:0) - /// Proof Skipped: OCEX AllowlistedToken (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX Accounts (r:1 w:0) - /// Proof Skipped: OCEX Accounts (max_values: None, max_size: None, mode: Measured) - /// Storage: Assets Asset (r:1 w:1) - /// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: Assets Account (r:2 w:1) - /// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen) - /// Storage: OCEX TotalAssets (r:1 w:1) - /// Proof Skipped: OCEX TotalAssets (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::AllowlistedToken` (r:1 w:0) + /// Proof: `OCEX::AllowlistedToken` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Accounts` (r:1 w:0) + /// Proof: `OCEX::Accounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(146), added: 2621, mode: `MaxEncodedLen`) + /// Storage: `OCEX::TotalAssets` (r:1 w:1) + /// Proof: `OCEX::TotalAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[1, 255]`. - fn deposit(_x: u32, ) -> Weight { + fn deposit(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `740` // Estimated: `6232` - // Minimum execution time: 35_709_000 picoseconds. - Weight::from_parts(37_777_159, 0) + // Minimum execution time: 173_106_000 picoseconds. + Weight::from_parts(176_634_210, 0) .saturating_add(Weight::from_parts(0, 6232)) + // Standard Error: 79 + .saturating_add(Weight::from_parts(119, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX Accounts (r:1 w:1) - /// Proof Skipped: OCEX Accounts (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Accounts` (r:1 w:1) + /// Proof: `OCEX::Accounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[1, 255]`. fn remove_proxy_account(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `429` // Estimated: `3894` - // Minimum execution time: 14_446_000 picoseconds. - Weight::from_parts(15_341_097, 0) + // Minimum execution time: 66_652_000 picoseconds. + Weight::from_parts(68_834_613, 0) .saturating_add(Weight::from_parts(0, 3894)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OCEX OnChainEvents (r:1 w:1) - /// Proof Skipped: OCEX OnChainEvents (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX Withdrawals (r:0 w:1) - /// Proof Skipped: OCEX Withdrawals (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX Snapshots (r:0 w:1) - /// Proof Skipped: OCEX Snapshots (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX FeesCollected (r:0 w:1) - /// Proof Skipped: OCEX FeesCollected (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX SnapshotNonce (r:0 w:1) - /// Proof Skipped: OCEX SnapshotNonce (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `OCEX::OnChainEvents` (r:1 w:1) + /// Proof: `OCEX::OnChainEvents` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Withdrawals` (r:0 w:1) + /// Proof: `OCEX::Withdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::Snapshots` (r:0 w:1) + /// Proof: `OCEX::Snapshots` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::FeesCollected` (r:0 w:1) + /// Proof: `OCEX::FeesCollected` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::SnapshotNonce` (r:0 w:1) + /// Proof: `OCEX::SnapshotNonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn submit_snapshot() -> Weight { // Proof Size summary in bytes: // Measured: `193` // Estimated: `1678` - // Minimum execution time: 15_998_000 picoseconds. - Weight::from_parts(16_773_000, 0) + // Minimum execution time: 79_233_000 picoseconds. + Weight::from_parts(80_253_000, 0) .saturating_add(Weight::from_parts(0, 1678)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: OCEX FeesCollected (r:1 w:1) - /// Proof Skipped: OCEX FeesCollected (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::FeesCollected` (r:1 w:1) + /// Proof: `OCEX::FeesCollected` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 255]`. - fn collect_fees(_x: u32, ) -> Weight { + fn collect_fees(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `200` // Estimated: `3665` - // Minimum execution time: 7_719_000 picoseconds. - Weight::from_parts(8_274_459, 0) + // Minimum execution time: 38_141_000 picoseconds. + Weight::from_parts(39_738_014, 0) .saturating_add(Weight::from_parts(0, 3665)) + // Standard Error: 30 + .saturating_add(Weight::from_parts(170, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) - /// Storage: OCEX ExchangeState (r:0 w:1) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::ExchangeState` (r:0 w:1) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 100000]`. fn set_exchange_state(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` - // Minimum execution time: 8_110_000 picoseconds. - Weight::from_parts(8_656_845, 0) + // Minimum execution time: 41_942_000 picoseconds. + Weight::from_parts(43_427_631, 0) .saturating_add(Weight::from_parts(0, 3632)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OCEX ExchangeState (r:1 w:0) - /// Proof Skipped: OCEX ExchangeState (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: OCEX IngressMessages (r:1 w:1) - /// Proof Skipped: OCEX IngressMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `OCEX::ExchangeState` (r:1 w:0) + /// Proof: `OCEX::ExchangeState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OCEX::IngressMessages` (r:1 w:1) + /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 255]`. - fn set_balances(_x: u32, ) -> Weight { + fn set_balances(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `147` // Estimated: `3612` - // Minimum execution time: 5_050_000 picoseconds. - Weight::from_parts(5_489_572, 0) + // Minimum execution time: 26_691_000 picoseconds. + Weight::from_parts(27_785_788, 0) .saturating_add(Weight::from_parts(0, 3612)) + // Standard Error: 24 + .saturating_add(Weight::from_parts(111, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OCEX Withdrawals (r:1 w:1) - /// Proof Skipped: OCEX Withdrawals (max_values: None, max_size: None, mode: Measured) - /// Storage: Assets Asset (r:1 w:1) - /// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: Assets Account (r:2 w:1) - /// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen) - /// Storage: OCEX OnChainEvents (r:1 w:1) - /// Proof Skipped: OCEX OnChainEvents (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `OCEX::Withdrawals` (r:1 w:1) + /// Proof: `OCEX::Withdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(146), added: 2621, mode: `MaxEncodedLen`) + /// Storage: `OCEX::OnChainEvents` (r:1 w:1) + /// Proof: `OCEX::OnChainEvents` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `x` is `[1, 255]`. fn claim_withdraw(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `763` // Estimated: `6232` - // Minimum execution time: 30_631_000 picoseconds. - Weight::from_parts(32_400_744, 0) + // Minimum execution time: 157_716_000 picoseconds. + Weight::from_parts(161_210_673, 0) .saturating_add(Weight::from_parts(0, 6232)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: OCEX AllowlistedToken (r:1 w:1) - /// Proof Skipped: OCEX AllowlistedToken (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `OCEX::AllowlistedToken` (r:1 w:1) + /// Proof: `OCEX::AllowlistedToken` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 65000]`. fn allowlist_token(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `1652` - // Minimum execution time: 7_787_000 picoseconds. - Weight::from_parts(8_239_272, 0) + // Minimum execution time: 37_022_000 picoseconds. + Weight::from_parts(38_478_293, 0) .saturating_add(Weight::from_parts(0, 1652)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OCEX AllowlistedToken (r:1 w:1) - /// Proof Skipped: OCEX AllowlistedToken (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `OCEX::AllowlistedToken` (r:1 w:1) + /// Proof: `OCEX::AllowlistedToken` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 65000]`. fn remove_allowlisted_token(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 8_555_000 picoseconds. - Weight::from_parts(9_088_476, 0) + // Minimum execution time: 40_312_000 picoseconds. + Weight::from_parts(41_852_655, 0) .saturating_add(Weight::from_parts(0, 1690)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OCEX SnapshotNonce (r:0 w:1) - /// Proof Skipped: OCEX SnapshotNonce (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `OCEX::SnapshotNonce` (r:0 w:1) + /// Proof: `OCEX::SnapshotNonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_snapshot() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_705_000 picoseconds. - Weight::from_parts(1_861_000, 0) + // Minimum execution time: 12_280_000 picoseconds. + Weight::from_parts(12_800_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OCEX OrderbookOperatorPublicKey (r:0 w:1) - /// Proof Skipped: OCEX OrderbookOperatorPublicKey (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `OCEX::OrderbookOperatorPublicKey` (r:0 w:1) + /// Proof: `OCEX::OrderbookOperatorPublicKey` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn whitelist_orderbook_operator() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_292_000 picoseconds. - Weight::from_parts(4_579_000, 0) + // Minimum execution time: 27_741_000 picoseconds. + Weight::from_parts(28_661_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/pallets/pdex-migration/src/weights.rs b/pallets/pdex-migration/src/weights.rs index f907706c3..cabaeb3c6 100644 --- a/pallets/pdex-migration/src/weights.rs +++ b/pallets/pdex-migration/src/weights.rs @@ -1,11 +1,10 @@ - //! Autogenerated weights for `pdex_migration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Ubuntu-2204-jammy-amd64-base`, CPU: `Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // ./polkadex-node @@ -20,7 +19,7 @@ // --extrinsic // * // --output -// migration_weights.rs +// pdex_migration_weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -33,92 +32,92 @@ use core::marker::PhantomData; /// Weight functions for `pdex_migration`. pub struct WeightInfo(PhantomData); impl crate::WeightInfo for WeightInfo { - /// Storage: PDEXMigration Operational (r:0 w:1) - /// Proof: PDEXMigration Operational (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: `PDEXMigration::Operational` (r:0 w:1) + /// Proof: `PDEXMigration::Operational` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn set_migration_operational_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_224_000 picoseconds. - Weight::from_parts(2_335_000, 0) + // Minimum execution time: 11_961_000 picoseconds. + Weight::from_parts(12_441_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PDEXMigration Relayers (r:0 w:1) - /// Proof: PDEXMigration Relayers (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `PDEXMigration::Relayers` (r:0 w:1) + /// Proof: `PDEXMigration::Relayers` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn set_relayer_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_098_000 picoseconds. - Weight::from_parts(6_386_000, 0) + // Minimum execution time: 30_992_000 picoseconds. + Weight::from_parts(31_861_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: PDEXMigration Operational (r:1 w:0) - /// Proof: PDEXMigration Operational (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: PDEXMigration EthTxns (r:1 w:1) - /// Proof: PDEXMigration EthTxns (max_values: None, max_size: Some(147), added: 2622, mode: MaxEncodedLen) - /// Storage: PDEXMigration Relayers (r:1 w:0) - /// Proof: PDEXMigration Relayers (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: PDEXMigration MintableTokens (r:1 w:1) - /// Proof: PDEXMigration MintableTokens (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: PDEXMigration LockedTokenHolders (r:0 w:1) - /// Proof: PDEXMigration LockedTokenHolders (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: `PDEXMigration::Operational` (r:1 w:0) + /// Proof: `PDEXMigration::Operational` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `PDEXMigration::EthTxns` (r:1 w:1) + /// Proof: `PDEXMigration::EthTxns` (`max_values`: None, `max_size`: Some(147), added: 2622, mode: `MaxEncodedLen`) + /// Storage: `PDEXMigration::Relayers` (r:1 w:0) + /// Proof: `PDEXMigration::Relayers` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `PDEXMigration::MintableTokens` (r:1 w:1) + /// Proof: `PDEXMigration::MintableTokens` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `PDEXMigration::LockedTokenHolders` (r:0 w:1) + /// Proof: `PDEXMigration::LockedTokenHolders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 254]`. - fn mint(b: u32, ) -> Weight { + fn mint(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `985` // Estimated: `4764` - // Minimum execution time: 43_854_000 picoseconds. - Weight::from_parts(45_674_961, 0) + // Minimum execution time: 229_248_000 picoseconds. + Weight::from_parts(233_806_873, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 33 - .saturating_add(Weight::from_parts(238, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: PDEXMigration Operational (r:1 w:0) - /// Proof: PDEXMigration Operational (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: PDEXMigration LockedTokenHolders (r:1 w:1) - /// Proof: PDEXMigration LockedTokenHolders (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `PDEXMigration::Operational` (r:1 w:0) + /// Proof: `PDEXMigration::Operational` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `PDEXMigration::LockedTokenHolders` (r:1 w:1) + /// Proof: `PDEXMigration::LockedTokenHolders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 254]`. fn unlock(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `882` // Estimated: `4764` - // Minimum execution time: 25_964_000 picoseconds. - Weight::from_parts(26_818_426, 0) + // Minimum execution time: 115_794_000 picoseconds. + Weight::from_parts(118_435_948, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 19 - .saturating_add(Weight::from_parts(11, 0).saturating_mul(b.into())) + // Standard Error: 80 + .saturating_add(Weight::from_parts(43, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: PDEXMigration LockedTokenHolders (r:1 w:1) - /// Proof: PDEXMigration LockedTokenHolders (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: PDEXMigration MintableTokens (r:1 w:1) - /// Proof: PDEXMigration MintableTokens (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + /// Storage: `PDEXMigration::LockedTokenHolders` (r:1 w:1) + /// Proof: `PDEXMigration::LockedTokenHolders` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `PDEXMigration::MintableTokens` (r:1 w:1) + /// Proof: `PDEXMigration::MintableTokens` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 254]`. - fn remove_minted_tokens(_b: u32, ) -> Weight { + fn remove_minted_tokens(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `885` // Estimated: `4764` - // Minimum execution time: 40_018_000 picoseconds. - Weight::from_parts(41_526_464, 0) + // Minimum execution time: 236_049_000 picoseconds. + Weight::from_parts(240_247_753, 0) .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 171 + .saturating_add(Weight::from_parts(715, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/pallets/rewards/src/weights.rs b/pallets/rewards/src/weights.rs index e305e8ce5..27f21e07f 100644 --- a/pallets/rewards/src/weights.rs +++ b/pallets/rewards/src/weights.rs @@ -1,11 +1,10 @@ - //! Autogenerated weights for `pallet_rewards` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Ubuntu-2204-jammy-amd64-base`, CPU: `Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // ./polkadex-node @@ -33,57 +32,59 @@ use core::marker::PhantomData; /// Weight functions for `pallet_rewards`. pub struct WeightInfo(PhantomData); impl crate::WeightInfo for WeightInfo { - /// Storage: Rewards InitializeRewards (r:1 w:1) - /// Proof Skipped: Rewards InitializeRewards (max_values: None, max_size: None, mode: Measured) + /// Storage: `Rewards::InitializeRewards` (r:1 w:1) + /// Proof: `Rewards::InitializeRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[0, 4838400]`. /// The range of component `i` is `[1, 100]`. /// The range of component `r` is `[0, 10]`. - fn create_reward_cycle(_b: u32, _i: u32, _r: u32, ) -> Weight { + fn create_reward_cycle(_b: u32, i: u32, _r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3541` - // Minimum execution time: 8_301_000 picoseconds. - Weight::from_parts(8_987_679, 0) + // Minimum execution time: 37_842_000 picoseconds. + Weight::from_parts(39_914_352, 0) .saturating_add(Weight::from_parts(0, 3541)) + // Standard Error: 52 + .saturating_add(Weight::from_parts(56, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Rewards InitializeRewards (r:1 w:0) - /// Proof Skipped: Rewards InitializeRewards (max_values: None, max_size: None, mode: Measured) - /// Storage: Rewards Distributor (r:1 w:1) - /// Proof Skipped: Rewards Distributor (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) + /// Storage: `Rewards::InitializeRewards` (r:1 w:0) + /// Proof: `Rewards::InitializeRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Rewards::Distributor` (r:1 w:1) + /// Proof: `Rewards::Distributor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) fn initialize_claim_rewards() -> Weight { // Proof Size summary in bytes: // Measured: `1010` // Estimated: `6196` - // Minimum execution time: 55_534_000 picoseconds. - Weight::from_parts(56_476_000, 0) + // Minimum execution time: 303_912_000 picoseconds. + Weight::from_parts(306_471_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Rewards Distributor (r:1 w:1) - /// Proof Skipped: Rewards Distributor (max_values: None, max_size: None, mode: Measured) - /// Storage: Rewards InitializeRewards (r:1 w:0) - /// Proof Skipped: Rewards InitializeRewards (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `Rewards::Distributor` (r:1 w:1) + /// Proof: `Rewards::Distributor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Rewards::InitializeRewards` (r:1 w:0) + /// Proof: `Rewards::InitializeRewards` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn claim() -> Weight { // Proof Size summary in bytes: // Measured: `1016` // Estimated: `4764` - // Minimum execution time: 32_010_000 picoseconds. - Weight::from_parts(32_581_000, 0) + // Minimum execution time: 157_046_000 picoseconds. + Weight::from_parts(159_146_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/pallets/thea-executor/src/weights.rs b/pallets/thea-executor/src/weights.rs index bf8bff8f8..d061ee528 100644 --- a/pallets/thea-executor/src/weights.rs +++ b/pallets/thea-executor/src/weights.rs @@ -1,10 +1,10 @@ //! Autogenerated weights for `thea_executor` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-22, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-5-61`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // ./polkadex-node @@ -32,108 +32,108 @@ use core::marker::PhantomData; /// Weight functions for `thea_executor`. pub struct WeightInfo(PhantomData); impl crate::WeightInfo for WeightInfo { - /// Storage: TheaExecutor WithdrawalFees (r:0 w:1) - /// Proof Skipped: TheaExecutor WithdrawalFees (max_values: None, max_size: None, mode: Measured) + /// Storage: `TheaExecutor::WithdrawalFees` (r:0 w:1) + /// Proof: `TheaExecutor::WithdrawalFees` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[1, 1000]`. - fn set_withdrawal_fee(_r: u32, ) -> Weight { + fn set_withdrawal_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_618_000 picoseconds. - Weight::from_parts(5_080_667, 0) + // Minimum execution time: 30_001_000 picoseconds. + Weight::from_parts(31_454_608, 0) .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 11 + .saturating_add(Weight::from_parts(14, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TheaExecutor Metadata (r:0 w:1) - /// Proof Skipped: TheaExecutor Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `TheaExecutor::Metadata` (r:0 w:1) + /// Proof: `TheaExecutor::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[1, 1000]`. fn update_asset_metadata(_r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_186_000 picoseconds. - Weight::from_parts(4_591_264, 0) + // Minimum execution time: 28_131_000 picoseconds. + Weight::from_parts(29_515_975, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TheaExecutor ApprovedDeposits (r:1 w:1) - /// Proof Skipped: TheaExecutor ApprovedDeposits (max_values: None, max_size: None, mode: Measured) - /// Storage: TheaExecutor Metadata (r:1 w:0) - /// Proof Skipped: TheaExecutor Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: Assets Asset (r:1 w:1) - /// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: Assets Account (r:1 w:1) - /// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `TheaExecutor::ApprovedDeposits` (r:1 w:1) + /// Proof: `TheaExecutor::ApprovedDeposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TheaExecutor::Metadata` (r:1 w:0) + /// Proof: `TheaExecutor::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(146), added: 2621, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 1000]`. fn claim_deposit(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1555` // Estimated: `5011` - // Minimum execution time: 109_549_000 picoseconds. - Weight::from_parts(113_213_386, 0) + // Minimum execution time: 784_920_000 picoseconds. + Weight::from_parts(804_475_835, 0) .saturating_add(Weight::from_parts(0, 5011)) - // Standard Error: 25 - .saturating_add(Weight::from_parts(124, 0).saturating_mul(r.into())) + // Standard Error: 227 + .saturating_add(Weight::from_parts(171, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: TheaExecutor RandomnessNonce (r:1 w:1) - /// Proof Skipped: TheaExecutor RandomnessNonce (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TheaExecutor PendingWithdrawals (r:1 w:1) - /// Proof Skipped: TheaExecutor PendingWithdrawals (max_values: None, max_size: None, mode: Measured) - /// Storage: TheaExecutor Metadata (r:1 w:0) - /// Proof Skipped: TheaExecutor Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: TheaExecutor WithdrawalFees (r:1 w:0) - /// Proof Skipped: TheaExecutor WithdrawalFees (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Assets Asset (r:1 w:1) - /// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: Assets Account (r:1 w:1) - /// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen) - /// Storage: TheaExecutor ReadyWithdrawals (r:0 w:1) - /// Proof Skipped: TheaExecutor ReadyWithdrawals (max_values: None, max_size: None, mode: Measured) + /// Storage: `TheaExecutor::RandomnessNonce` (r:1 w:1) + /// Proof: `TheaExecutor::RandomnessNonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TheaExecutor::PendingWithdrawals` (r:1 w:1) + /// Proof: `TheaExecutor::PendingWithdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TheaExecutor::Metadata` (r:1 w:0) + /// Proof: `TheaExecutor::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TheaExecutor::WithdrawalFees` (r:1 w:0) + /// Proof: `TheaExecutor::WithdrawalFees` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(146), added: 2621, mode: `MaxEncodedLen`) + /// Storage: `TheaExecutor::ReadyWithdrawals` (r:0 w:1) + /// Proof: `TheaExecutor::ReadyWithdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[1, 1000]`. - fn withdraw(r: u32, ) -> Weight { + fn withdraw(_r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `826` // Estimated: `6196` - // Minimum execution time: 57_587_000 picoseconds. - Weight::from_parts(60_714_993, 0) + // Minimum execution time: 318_462_000 picoseconds. + Weight::from_parts(326_628_553, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 25 - .saturating_add(Weight::from_parts(103, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } - /// Storage: TheaExecutor RandomnessNonce (r:1 w:1) - /// Proof Skipped: TheaExecutor RandomnessNonce (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TheaExecutor PendingWithdrawals (r:1 w:1) - /// Proof Skipped: TheaExecutor PendingWithdrawals (max_values: None, max_size: None, mode: Measured) - /// Storage: TheaExecutor Metadata (r:1 w:0) - /// Proof Skipped: TheaExecutor Metadata (max_values: None, max_size: None, mode: Measured) - /// Storage: TheaExecutor WithdrawalFees (r:1 w:0) - /// Proof Skipped: TheaExecutor WithdrawalFees (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Assets Asset (r:1 w:1) - /// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: Assets Account (r:1 w:1) - /// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen) - /// Storage: TheaExecutor ReadyWithdrawals (r:0 w:1) - /// Proof Skipped: TheaExecutor ReadyWithdrawals (max_values: None, max_size: None, mode: Measured) + /// Storage: `TheaExecutor::RandomnessNonce` (r:1 w:1) + /// Proof: `TheaExecutor::RandomnessNonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TheaExecutor::PendingWithdrawals` (r:1 w:1) + /// Proof: `TheaExecutor::PendingWithdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TheaExecutor::Metadata` (r:1 w:0) + /// Proof: `TheaExecutor::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TheaExecutor::WithdrawalFees` (r:1 w:0) + /// Proof: `TheaExecutor::WithdrawalFees` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:1 w:1) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(146), added: 2621, mode: `MaxEncodedLen`) + /// Storage: `TheaExecutor::ReadyWithdrawals` (r:0 w:1) + /// Proof: `TheaExecutor::ReadyWithdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[1, 1000]`. fn parachain_withdraw(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `793` // Estimated: `6196` - // Minimum execution time: 57_883_000 picoseconds. - Weight::from_parts(60_934_323, 0) + // Minimum execution time: 319_612_000 picoseconds. + Weight::from_parts(327_370_682, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 23 - .saturating_add(Weight::from_parts(51, 0).saturating_mul(r.into())) + // Standard Error: 59 + .saturating_add(Weight::from_parts(343, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } diff --git a/pallets/thea-message-handler/src/weights.rs b/pallets/thea-message-handler/src/weights.rs index 1b8eb5ead..638b1a123 100644 --- a/pallets/thea-message-handler/src/weights.rs +++ b/pallets/thea-message-handler/src/weights.rs @@ -1,10 +1,10 @@ //! Autogenerated weights for `thea_message_handler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-22, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-5-61`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // ./polkadex-node @@ -32,59 +32,59 @@ use core::marker::PhantomData; /// Weight functions for `thea_message_handler`. pub struct WeightInfo(PhantomData); impl crate::WeightInfo for WeightInfo { - /// Storage: TheaMH Authorities (r:0 w:1) - /// Proof Skipped: TheaMH Authorities (max_values: None, max_size: None, mode: Measured) - /// Storage: TheaMH ValidatorSetId (r:0 w:1) - /// Proof Skipped: TheaMH ValidatorSetId (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TheaMH::Authorities` (r:0 w:1) + /// Proof: `TheaMH::Authorities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TheaMH::ValidatorSetId` (r:0 w:1) + /// Proof: `TheaMH::ValidatorSetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[0, 4294967295]`. fn insert_authorities(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_142_000 picoseconds. - Weight::from_parts(3_526_821, 0) + // Minimum execution time: 21_551_000 picoseconds. + Weight::from_parts(22_623_815, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: TheaMH ValidatorSetId (r:1 w:0) - /// Proof Skipped: TheaMH ValidatorSetId (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TheaExecutor ApprovedDeposits (r:1 w:1) - /// Proof Skipped: TheaExecutor ApprovedDeposits (max_values: None, max_size: None, mode: Measured) - /// Storage: TheaMH IncomingNonce (r:0 w:1) - /// Proof Skipped: TheaMH IncomingNonce (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TheaMH IncomingMessages (r:0 w:1) - /// Proof Skipped: TheaMH IncomingMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `TheaMH::ValidatorSetId` (r:1 w:0) + /// Proof: `TheaMH::ValidatorSetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TheaExecutor::ApprovedDeposits` (r:1 w:1) + /// Proof: `TheaExecutor::ApprovedDeposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TheaMH::IncomingNonce` (r:0 w:1) + /// Proof: `TheaMH::IncomingNonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TheaMH::IncomingMessages` (r:0 w:1) + /// Proof: `TheaMH::IncomingMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) fn incoming_message() -> Weight { // Proof Size summary in bytes: // Measured: `147` // Estimated: `3612` - // Minimum execution time: 15_416_000 picoseconds. - Weight::from_parts(16_133_000, 0) + // Minimum execution time: 78_662_000 picoseconds. + Weight::from_parts(80_103_000, 0) .saturating_add(Weight::from_parts(0, 3612)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: TheaMH IncomingNonce (r:0 w:1) - /// Proof Skipped: TheaMH IncomingNonce (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TheaMH::IncomingNonce` (r:0 w:1) + /// Proof: `TheaMH::IncomingNonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[1, 4294967295]`. fn update_incoming_nonce(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_379_000 picoseconds. - Weight::from_parts(2_649_419, 0) + // Minimum execution time: 16_351_000 picoseconds. + Weight::from_parts(17_317_871, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: TheaMH OutgoingNonce (r:0 w:1) - /// Proof Skipped: TheaMH OutgoingNonce (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TheaMH::OutgoingNonce` (r:0 w:1) + /// Proof: `TheaMH::OutgoingNonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[1, 4294967295]`. fn update_outgoing_nonce(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_407_000 picoseconds. - Weight::from_parts(2_705_047, 0) + // Minimum execution time: 16_281_000 picoseconds. + Weight::from_parts(17_369_250, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/pallets/thea/src/weights.rs b/pallets/thea/src/weights.rs index 7c097c3d1..7208aa5ec 100644 --- a/pallets/thea/src/weights.rs +++ b/pallets/thea/src/weights.rs @@ -1,10 +1,10 @@ //! Autogenerated weights for `thea` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-22, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-5-61`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: // ./polkadex-node @@ -32,84 +32,88 @@ use core::marker::PhantomData; /// Weight functions for `thea`. pub struct WeightInfo(PhantomData); impl crate::TheaWeightInfo for WeightInfo { - /// Storage: TheaExecutor ApprovedDeposits (r:1 w:1) - /// Proof Skipped: TheaExecutor ApprovedDeposits (max_values: None, max_size: None, mode: Measured) - /// Storage: Thea IncomingNonce (r:0 w:1) - /// Proof Skipped: Thea IncomingNonce (max_values: None, max_size: None, mode: Measured) - /// Storage: Thea IncomingMessages (r:0 w:1) - /// Proof Skipped: Thea IncomingMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `TheaExecutor::ApprovedDeposits` (r:1 w:1) + /// Proof: `TheaExecutor::ApprovedDeposits` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Thea::IncomingNonce` (r:0 w:1) + /// Proof: `Thea::IncomingNonce` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Thea::IncomingMessages` (r:0 w:1) + /// Proof: `Thea::IncomingMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[0, 256]`. - fn incoming_message(_b: u32, ) -> Weight { + fn incoming_message(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `6` // Estimated: `3471` - // Minimum execution time: 13_024_000 picoseconds. - Weight::from_parts(14_512_856, 0) + // Minimum execution time: 69_062_000 picoseconds. + Weight::from_parts(71_009_077, 0) .saturating_add(Weight::from_parts(0, 3471)) + // Standard Error: 42 + .saturating_add(Weight::from_parts(602, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Thea OutgoingNonce (r:1 w:1) - /// Proof Skipped: Thea OutgoingNonce (max_values: None, max_size: None, mode: Measured) - /// Storage: Thea ValidatorSetId (r:1 w:0) - /// Proof Skipped: Thea ValidatorSetId (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Thea OutgoingMessages (r:0 w:1) - /// Proof Skipped: Thea OutgoingMessages (max_values: None, max_size: None, mode: Measured) + /// Storage: `Thea::OutgoingNonce` (r:1 w:1) + /// Proof: `Thea::OutgoingNonce` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Thea::ValidatorSetId` (r:1 w:0) + /// Proof: `Thea::ValidatorSetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Thea::OutgoingMessages` (r:0 w:1) + /// Proof: `Thea::OutgoingMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[0, 256]`. - fn send_thea_message(_b: u32, ) -> Weight { + fn send_thea_message(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `145` // Estimated: `3610` - // Minimum execution time: 298_663_000 picoseconds. - Weight::from_parts(307_818_738, 0) + // Minimum execution time: 1_000_159_000 picoseconds. + Weight::from_parts(1_035_528_571, 0) .saturating_add(Weight::from_parts(0, 3610)) + // Standard Error: 1_485 + .saturating_add(Weight::from_parts(10_999, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Thea IncomingNonce (r:0 w:1) - /// Proof Skipped: Thea IncomingNonce (max_values: None, max_size: None, mode: Measured) + /// Storage: `Thea::IncomingNonce` (r:0 w:1) + /// Proof: `Thea::IncomingNonce` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[1, 4294967295]`. fn update_incoming_nonce(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_501_000 picoseconds. - Weight::from_parts(2_836_182, 0) + // Minimum execution time: 16_610_000 picoseconds. + Weight::from_parts(17_629_285, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Thea OutgoingNonce (r:0 w:1) - /// Proof Skipped: Thea OutgoingNonce (max_values: None, max_size: None, mode: Measured) + /// Storage: `Thea::OutgoingNonce` (r:0 w:1) + /// Proof: `Thea::OutgoingNonce` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[1, 4294967295]`. fn update_outgoing_nonce(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_512_000 picoseconds. - Weight::from_parts(2_869_356, 0) + // Minimum execution time: 16_730_000 picoseconds. + Weight::from_parts(17_726_482, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Thea ActiveNetworks (r:1 w:1) - /// Proof Skipped: Thea ActiveNetworks (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Thea::ActiveNetworks` (r:1 w:1) + /// Proof: `Thea::ActiveNetworks` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn add_thea_network() -> Weight { // Proof Size summary in bytes: // Measured: `145` // Estimated: `1630` - // Minimum execution time: 5_443_000 picoseconds. - Weight::from_parts(5_636_000, 0) + // Minimum execution time: 23_531_000 picoseconds. + Weight::from_parts(24_211_000, 0) .saturating_add(Weight::from_parts(0, 1630)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Thea ActiveNetworks (r:1 w:1) - /// Proof Skipped: Thea ActiveNetworks (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Thea::ActiveNetworks` (r:1 w:1) + /// Proof: `Thea::ActiveNetworks` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_thea_network() -> Weight { // Proof Size summary in bytes: // Measured: `166` // Estimated: `1651` - // Minimum execution time: 6_194_000 picoseconds. - Weight::from_parts(6_413_000, 0) + // Minimum execution time: 25_991_000 picoseconds. + Weight::from_parts(26_790_000, 0) .saturating_add(Weight::from_parts(0, 1651)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) From 7c12864df245d9281b88af4fb95dba8718eb5e03 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Wed, 25 Oct 2023 00:33:36 -0700 Subject: [PATCH 28/51] chore(cs): Removed unused imports --- nodes/parachain/src/rpc.rs | 2 +- runtimes/parachain/src/weights/mod.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nodes/parachain/src/rpc.rs b/nodes/parachain/src/rpc.rs index 16bdcba2d..24db2fbfb 100644 --- a/nodes/parachain/src/rpc.rs +++ b/nodes/parachain/src/rpc.rs @@ -28,7 +28,7 @@ use std::sync::Arc; use parachain_polkadex_runtime::{opaque::Block, AccountId, Balance, Index as Nonce}; use sc_client_api::AuxStore; -pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; +pub use sc_rpc::DenyUnsafe; use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; diff --git a/runtimes/parachain/src/weights/mod.rs b/runtimes/parachain/src/weights/mod.rs index ed0b4dbcd..ef1ab0d1a 100644 --- a/runtimes/parachain/src/weights/mod.rs +++ b/runtimes/parachain/src/weights/mod.rs @@ -24,5 +24,4 @@ pub mod rocksdb_weights; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; -pub use paritydb_weights::constants::ParityDbWeight; pub use rocksdb_weights::constants::RocksDbWeight; From c91285d1ea2d253eccff0239f12944ebd1c591b6 Mon Sep 17 00:00:00 2001 From: zktony Date: Fri, 27 Oct 2023 09:47:35 +0530 Subject: [PATCH 29/51] Fixed benchmarks --- Cargo.lock | 1 + runtimes/parachain/Cargo.toml | 4 +- runtimes/parachain/src/lib.rs | 10 ++-- xcm_helper_weights.rs | 88 +++++++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 xcm_helper_weights.rs diff --git a/Cargo.lock b/Cargo.lock index 140978ada..fb23811f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7880,6 +7880,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-xcm", diff --git a/runtimes/parachain/Cargo.toml b/runtimes/parachain/Cargo.toml index e6975cf84..052296d82 100644 --- a/runtimes/parachain/Cargo.toml +++ b/runtimes/parachain/Cargo.toml @@ -51,6 +51,7 @@ sp-std = { workspace = true, default-features = false } sp-transaction-pool = { workspace = true, default-features = false } sp-version = { workspace = true, default-features = false } sp-staking = { workspace = true, default-features = false } +sp-storage = { default-features = false, workspace = true } # Polkadot pallet-xcm = { workspace = true, default-features = false } @@ -140,7 +141,8 @@ std = [ "orml-xcm-support/std", "thea-message-handler/std", "thea-primitives/std", - "sp-staking/std" + "sp-staking/std", + "sp-storage/std" ] runtime-benchmarks = [ diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index dfc8ab039..ab9df2d3c 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -598,11 +598,11 @@ construct_runtime!( } ); -#[cfg(feature = "polkadex-parachain-benchmarks")] +#[cfg(feature = "runtime-benchmarks")] #[macro_use] extern crate frame_benchmarking; -#[cfg(feature = "polkadex-parachain-benchmarks")] +#[cfg(feature = "runtime-benchmarks")] mod benches { define_benchmarks!( [frame_system, SystemBench::] @@ -773,7 +773,7 @@ impl_runtime_apis! { } } - #[cfg(feature = "polkadex-parachain-benchmarks")] + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( Vec, @@ -796,8 +796,8 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey}; - + use frame_benchmarking::{Benchmarking, BenchmarkBatch}; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime {} diff --git a/xcm_helper_weights.rs b/xcm_helper_weights.rs new file mode 100644 index 000000000..c827fb054 --- /dev/null +++ b/xcm_helper_weights.rs @@ -0,0 +1,88 @@ + +//! Autogenerated weights for `xcm_helper` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-27, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Krishnas-MacBook-Pro.local`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/parachain-polkadex-node +// benchmark +// pallet +// --pallet +// xcm-helper +// --steps +// 2 +// --repeat +// 2 +// --extrinsic +// * +// --output +// xcm_helper_weights.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `xcm_helper`. +pub struct WeightInfo(PhantomData); +impl xcm_helper::WeightInfo for WeightInfo { + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XcmHelper::ParachainAssets` (r:1 w:1) + /// Proof: `XcmHelper::ParachainAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmHelper::WhitelistedTokens` (r:1 w:1) + /// Proof: `XcmHelper::WhitelistedTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn whitelist_token(_b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `147` + // Estimated: `3687` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_250, 0) + .saturating_add(Weight::from_parts(0, 3687)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XcmHelper::ParachainAssets` (r:1 w:0) + /// Proof: `XcmHelper::ParachainAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmHelper::WhitelistedTokens` (r:1 w:1) + /// Proof: `XcmHelper::WhitelistedTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn remove_whitelisted_token(_b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `223` + // Estimated: `3689` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(18_500_500, 0) + .saturating_add(Weight::from_parts(0, 3689)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn transfer_fee(_b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `212` + // Estimated: `6196` + // Minimum execution time: 57_000_000 picoseconds. + Weight::from_parts(58_000_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} From 55d50daa679addc254e2b8ad4b1b1f412b6f7ab1 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 26 Oct 2023 23:03:31 -0700 Subject: [PATCH 30/51] chore(cleanup): Removed file added by mistake --- xcm_helper_weights.rs | 88 ------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 xcm_helper_weights.rs diff --git a/xcm_helper_weights.rs b/xcm_helper_weights.rs deleted file mode 100644 index c827fb054..000000000 --- a/xcm_helper_weights.rs +++ /dev/null @@ -1,88 +0,0 @@ - -//! Autogenerated weights for `xcm_helper` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-27, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Krishnas-MacBook-Pro.local`, CPU: `` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 - -// Executed Command: -// ./target/release/parachain-polkadex-node -// benchmark -// pallet -// --pallet -// xcm-helper -// --steps -// 2 -// --repeat -// 2 -// --extrinsic -// * -// --output -// xcm_helper_weights.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `xcm_helper`. -pub struct WeightInfo(PhantomData); -impl xcm_helper::WeightInfo for WeightInfo { - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `XcmHelper::ParachainAssets` (r:1 w:1) - /// Proof: `XcmHelper::ParachainAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmHelper::WhitelistedTokens` (r:1 w:1) - /// Proof: `XcmHelper::WhitelistedTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn whitelist_token(_b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `147` - // Estimated: `3687` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(27_000_250, 0) - .saturating_add(Weight::from_parts(0, 3687)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `XcmHelper::ParachainAssets` (r:1 w:0) - /// Proof: `XcmHelper::ParachainAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmHelper::WhitelistedTokens` (r:1 w:1) - /// Proof: `XcmHelper::WhitelistedTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn remove_whitelisted_token(_b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `223` - // Estimated: `3689` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(18_500_500, 0) - .saturating_add(Weight::from_parts(0, 3689)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn transfer_fee(_b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `6196` - // Minimum execution time: 57_000_000 picoseconds. - Weight::from_parts(58_000_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} From 1a5e29b4b3cf65c3b13ba08f86a4df224589f581 Mon Sep 17 00:00:00 2001 From: gautham Date: Fri, 27 Oct 2023 11:46:34 +0530 Subject: [PATCH 31/51] Fix Comments --- Cargo.lock | 2 +- nodes/mainnet/src/service.rs | 40 +++++++++++++++----------------- pallets/thea-executor/Cargo.toml | 2 ++ pallets/thea-executor/src/lib.rs | 1 - runtimes/mainnet/Cargo.toml | 2 -- runtimes/mainnet/src/impls.rs | 37 ++++++++++++++--------------- runtimes/mainnet/src/lib.rs | 13 +++++++---- 7 files changed, 48 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb23811f2..5c5337949 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6177,7 +6177,6 @@ dependencies = [ "sp-staking", "sp-statement-store", "sp-std", - "sp-storage", "sp-transaction-pool", "sp-version", "static_assertions", @@ -13990,6 +13989,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-assets", "pallet-balances", "pallet-timestamp", diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index bcd3190e7..3d39fd863 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -398,7 +398,6 @@ pub fn new_full_base( let name = config.network.node_name.clone(); let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); - let enable_offchain_worker = config.offchain_worker.enabled; let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { config, @@ -587,28 +586,27 @@ pub fn new_full_base( statement_handler.run(), ); - if enable_offchain_worker { - task_manager.spawn_handle().spawn( - "offchain-workers-runner", - "offchain-work", - sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { - runtime_api_provider: client.clone(), - keystore: Some(keystore_container.keystore()), - offchain_db: backend.offchain_storage(), - transaction_pool: Some(OffchainTransactionPoolFactory::new( - transaction_pool.clone(), - )), - network_provider: network.clone(), - is_validator: role.is_authority(), - enable_http_requests: true, - custom_extensions: move |_| { - vec![Box::new(statement_store.clone().as_statement_store_ext()) as Box<_>] - }, - }) + // Offchain workers are always enabled + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: Some(keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + )), + network_provider: network.clone(), + is_validator: role.is_authority(), + enable_http_requests: true, + custom_extensions: move |_| { + vec![Box::new(statement_store.clone().as_statement_store_ext()) as Box<_>] + }, + }) .run(client.clone(), task_manager.spawn_handle()) .boxed(), - ); - } + ); network_starter.start_network(); Ok(NewFullBase { diff --git a/pallets/thea-executor/Cargo.toml b/pallets/thea-executor/Cargo.toml index 856b667f0..549896831 100644 --- a/pallets/thea-executor/Cargo.toml +++ b/pallets/thea-executor/Cargo.toml @@ -4,6 +4,7 @@ version = "5.3.0" edition = "2021" [dependencies] +log = {workspace = true, default-features = false} parity-scale-codec = { workspace = true, default-features = false } scale-info = { workspace = true, default-features = false, features = ["derive"] } frame-support = { default-features = false, workspace = true } @@ -29,6 +30,7 @@ thea = { path = "../thea" } [features] default = ["std"] std = [ + "log/std", "sp-application-crypto/std", "thea-primitives/std", "parity-scale-codec/std", diff --git a/pallets/thea-executor/src/lib.rs b/pallets/thea-executor/src/lib.rs index 3795804cc..a8b7971d6 100644 --- a/pallets/thea-executor/src/lib.rs +++ b/pallets/thea-executor/src/lib.rs @@ -48,7 +48,6 @@ pub trait WeightInfo { pub mod pallet { use super::*; use frame_support::{ - __private::log, pallet_prelude::*, sp_runtime::SaturatedConversion, traits::{fungible::Mutate, fungibles::Inspect, tokens::Preservation}, diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index 351b74a60..a9a4539ae 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -83,7 +83,6 @@ sp-npos-elections = { default-features = false, workspace = true } frame-election-provider-support = { default-features = false, workspace = true } #pallet-randomness-collective-flip = { default-features = false, workspace = true } pallet-assets = { default-features = false, workspace = true } -sp-storage = { default-features = false, workspace = true } #end added # Used for the polkadex-node RPCs @@ -202,7 +201,6 @@ std = [ "pallet-asset-tx-payment/std", "pallet-statement/std", "sp-statement-store/std", - "sp-storage/std" ] runtime-benchmarks = [ #theirs diff --git a/runtimes/mainnet/src/impls.rs b/runtimes/mainnet/src/impls.rs index b599d29bc..5eb35e8fd 100644 --- a/runtimes/mainnet/src/impls.rs +++ b/runtimes/mainnet/src/impls.rs @@ -28,8 +28,7 @@ use pallet_asset_tx_payment::HandleCredit; use sp_std::prelude::*; use crate::{ - AccountId, Assets, Authorship, Balances, Hash, NegativeImbalance, Runtime, - RuntimeCall, + AccountId, Assets, Authorship, Balances, Hash, NegativeImbalance, Runtime, RuntimeCall, }; pub struct Author; @@ -137,8 +136,8 @@ mod multiplier_tests { } fn run_with_system_weight(w: Weight, assertions: F) - where - F: Fn() -> (), + where + F: Fn() -> (), { let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() .build_storage() @@ -403,14 +402,14 @@ mod multiplier_tests { Weight::MAX / 2, Weight::MAX, ] - .into_iter() - .for_each(|i| { - run_with_system_weight(i, || { - let next = runtime_multiplier_update(Multiplier::one()); - let truth = truth_value_update(i, Multiplier::one()); - assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000)); - }); + .into_iter() + .for_each(|i| { + run_with_system_weight(i, || { + let next = runtime_multiplier_update(Multiplier::one()); + let truth = truth_value_update(i, Multiplier::one()); + assert_eq_error_rate!(truth, next, Multiplier::from_inner(50_000_000)); }); + }); // Some values that are all above the target and will cause an increase. let t = target(); @@ -420,13 +419,13 @@ mod multiplier_tests { t * 2, t * 4, ] - .into_iter() - .for_each(|i| { - run_with_system_weight(i, || { - let fm = runtime_multiplier_update(max_fm); - // won't grow. The convert saturates everything. - assert_eq!(fm, max_fm); - }) - }); + .into_iter() + .for_each(|i| { + run_with_system_weight(i, || { + let fm = runtime_multiplier_update(max_fm); + // won't grow. The convert saturates everything. + assert_eq!(fm, max_fm); + }) + }); } } diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index c47699561..e0b53bb63 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -29,6 +29,7 @@ use frame_election_provider_support::{ use frame_support::{ construct_runtime, dispatch::DispatchClass, + instances::Instance1, pallet_prelude::{ConstU32, RuntimeDebug}, parameter_types, traits::{ @@ -44,7 +45,6 @@ use frame_support::{ }, PalletId, }; -use frame_support::instances::Instance1; #[cfg(any(feature = "std", test))] pub use frame_system::Call as SystemCall; use frame_system::{ @@ -89,7 +89,6 @@ use sp_runtime::{ use sp_std::{prelude::*, vec}; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; -use sp_storage as _; use sp_version::RuntimeVersion; use static_assertions::const_assert; @@ -1168,7 +1167,9 @@ impl BenchmarkHelper> for AssetU128 { } #[cfg(feature = "runtime-benchmarks")] -impl pallet_asset_conversion::BenchmarkHelper> for AssetU128 { +impl pallet_asset_conversion::BenchmarkHelper> + for AssetU128 +{ fn asset_id(id: u32) -> u128 { id as u128 } @@ -1600,9 +1601,11 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; -use crate::sp_api_hidden_includes_construct_runtime::hidden_include::traits::fungible::Inspect; +use crate::{ + impls::CreditToBlockAuthor, + sp_api_hidden_includes_construct_runtime::hidden_include::traits::fungible::Inspect, +}; use orderbook_primitives::ObCheckpointRaw; -use crate::impls::CreditToBlockAuthor; impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { From 5c870dfb8408236e7a4e26dcfad8e4d4d42b7820 Mon Sep 17 00:00:00 2001 From: zktony Date: Fri, 27 Oct 2023 13:58:39 +0530 Subject: [PATCH 32/51] Added missing impl --- runtimes/parachain/Cargo.toml | 3 ++- runtimes/parachain/src/lib.rs | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/runtimes/parachain/Cargo.toml b/runtimes/parachain/Cargo.toml index 052296d82..9e53bc50e 100644 --- a/runtimes/parachain/Cargo.toml +++ b/runtimes/parachain/Cargo.toml @@ -161,7 +161,8 @@ runtime-benchmarks = [ "cumulus-pallet-xcmp-queue/runtime-benchmarks", "xcm-helper/runtime-benchmarks", "thea-council/runtime-benchmarks", - "pallet-assets/runtime-benchmarks" + "pallet-assets/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks" ] try-runtime = [ diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index ab9df2d3c..77b57745b 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -796,10 +796,19 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch}; + use frame_benchmarking::{BenchmarkError, Benchmarking, BenchmarkBatch}; use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; - impl frame_system_benchmarking::Config for Runtime {} + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } + + fn verify_set_code() { + System::assert_last_event(cumulus_pallet_parachain_system::Event::::ValidationFunctionStored.into()); + } + } use cumulus_pallet_session_benchmarking::Pallet as SessionBench; impl cumulus_pallet_session_benchmarking::Config for Runtime {} From 61ebd5fb874b55d00a173ca79126734ba6c64f8b Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Fri, 27 Oct 2023 03:12:43 -0700 Subject: [PATCH 33/51] chore(cs): Code style fixes --- Cargo.toml | 4 +--- client/src/lib.rs | 2 -- nodes/mainnet/src/cli.rs | 2 +- nodes/mainnet/src/service.rs | 23 ++++++++++------------- nodes/parachain/src/cli.rs | 3 ++- nodes/parachain/src/command.rs | 4 ++-- pallets/ocex/src/validator.rs | 2 +- pallets/thea-council/src/benchmarking.rs | 3 +-- pallets/thea-executor/Cargo.toml | 2 +- pallets/thea/src/resolver.rs | 2 +- pallets/xcm-helper/src/lib.rs | 2 +- runtimes/mainnet/src/impls.rs | 2 +- runtimes/mainnet/src/lib.rs | 6 ++---- runtimes/parachain/src/lib.rs | 2 +- scripts/check-off-on-deviation/Cargo.toml | 2 +- 15 files changed, 26 insertions(+), 35 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5721e365c..7d65144ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,9 +48,7 @@ members = [ "misc/load-testing", "misc/crowdloan-verifier", ] -exclude = [ - "scripts/check-off-on-deviation", -] +exclude = ["scripts/check-off-on-deviation"] default-members = [ "client", "nodes/mainnet", diff --git a/client/src/lib.rs b/client/src/lib.rs index b5a8a571c..81e786735 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -34,6 +34,4 @@ impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { fn native_version() -> sc_executor::NativeVersion { node_polkadex_runtime::native_version() } - - } diff --git a/nodes/mainnet/src/cli.rs b/nodes/mainnet/src/cli.rs index 4b5263cb1..a441ca8db 100644 --- a/nodes/mainnet/src/cli.rs +++ b/nodes/mainnet/src/cli.rs @@ -98,4 +98,4 @@ pub enum Subcommand { /// Revert the chain to a previous state. Revert(sc_cli::RevertCmd), -} \ No newline at end of file +} diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index 3d39fd863..5ac798d90 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -94,7 +94,8 @@ pub fn create_extrinsic( let tip = 0; let extra: node_polkadex_runtime::SignedExtra = ( - //frame_system::CheckNonZeroSender::::new(), //TODO: Why it is commented? + //TODO: Why it is commented? + //frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -133,6 +134,8 @@ pub fn create_extrinsic( } /// Creates a new partial node. +// Note! Allowed because extracting type as an alias currently is experimental and unstable feature. +#[allow(clippy::type_complexity)] pub fn new_partial( config: &Configuration, ) -> Result< @@ -170,7 +173,7 @@ pub fn new_partial( }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(&config); + let executor = sc_service::new_native_or_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( @@ -335,7 +338,7 @@ pub fn new_full_base( ) -> Result { let hwbench = (!disable_hardware_benchmarks) .then_some(config.database.path().map(|database_path| { - let _ = std::fs::create_dir_all(&database_path); + let _ = std::fs::create_dir_all(database_path); sc_sysinfo::gather_hwbench(Some(database_path)) })) .flatten(); @@ -364,11 +367,7 @@ pub fn new_full_base( )); let statement_handler_proto = sc_network_statement::StatementHandlerPrototype::new( - client - .block_hash(0u32.into()) - .ok() - .flatten() - .expect("Genesis block exists; qed"), + client.block_hash(0u32).ok().flatten().expect("Genesis block exists; qed"), config.chain_spec.fork_id(), ); net_config.add_notification_protocol(statement_handler_proto.set_config()); @@ -594,9 +593,7 @@ pub fn new_full_base( runtime_api_provider: client.clone(), keystore: Some(keystore_container.keystore()), offchain_db: backend.offchain_storage(), - transaction_pool: Some(OffchainTransactionPoolFactory::new( - transaction_pool.clone(), - )), + transaction_pool: Some(OffchainTransactionPoolFactory::new(transaction_pool.clone())), network_provider: network.clone(), is_validator: role.is_authority(), enable_http_requests: true, @@ -604,8 +601,8 @@ pub fn new_full_base( vec![Box::new(statement_store.clone().as_statement_store_ext()) as Box<_>] }, }) - .run(client.clone(), task_manager.spawn_handle()) - .boxed(), + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); network_starter.start_network(); diff --git a/nodes/parachain/src/cli.rs b/nodes/parachain/src/cli.rs index 6dc30489d..b2e1761d3 100644 --- a/nodes/parachain/src/cli.rs +++ b/nodes/parachain/src/cli.rs @@ -50,8 +50,9 @@ pub enum Subcommand { /// Sub-commands concerned with benchmarking. /// The pallet benchmarking moved to the `pallet` sub-command. + // Allowed because of rely on 3rd party lib which can't be redefined atm. #[command(subcommand)] - Benchmark(frame_benchmarking_cli::BenchmarkCmd), + Benchmark(Box), /// Try-runtime has migrated to a standalone /// [CLI](). The subcommand exists as a stub and diff --git a/nodes/parachain/src/command.rs b/nodes/parachain/src/command.rs index 0692ac497..f82d6709a 100644 --- a/nodes/parachain/src/command.rs +++ b/nodes/parachain/src/command.rs @@ -197,9 +197,9 @@ pub fn run() -> Result<()> { }) }, Some(Subcommand::Benchmark(cmd)) => { - let runner = cli.create_runner(cmd)?; + let runner = cli.create_runner(cmd.as_ref())?; // Switch on the concrete benchmark sub-command- - match cmd { + match cmd.as_ref() { BenchmarkCmd::Pallet(cmd) => if cfg!(feature = "runtime-benchmarks") { runner.sync_run(|config| cmd.run::(config)) diff --git a/pallets/ocex/src/validator.rs b/pallets/ocex/src/validator.rs index b3d721e3f..07c41795c 100644 --- a/pallets/ocex/src/validator.rs +++ b/pallets/ocex/src/validator.rs @@ -205,7 +205,7 @@ impl Pallet { log::info!(target:"ocex","updated trie root: {:?}", state_hash); if sp_io::offchain::is_validator() { - match available_keys.get(0) { + match available_keys.first() { None => return Err("No active keys found"), Some(key) => { // Unwrap is okay here, we verified the data before. diff --git a/pallets/thea-council/src/benchmarking.rs b/pallets/thea-council/src/benchmarking.rs index 193a089ad..252b627d4 100644 --- a/pallets/thea-council/src/benchmarking.rs +++ b/pallets/thea-council/src/benchmarking.rs @@ -19,10 +19,9 @@ use super::*; use crate::Pallet as TheaCouncil; use frame_benchmarking::v1::{account, benchmarks}; use frame_support::{sp_runtime::SaturatedConversion, BoundedVec}; -use frame_system::RawOrigin; +use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; use sp_std::{vec, vec::Vec}; use thea_primitives::types::Withdraw; -use frame_system::pallet_prelude::BlockNumberFor; const SEED: u32 = 0; benchmarks! { diff --git a/pallets/thea-executor/Cargo.toml b/pallets/thea-executor/Cargo.toml index 549896831..14034c755 100644 --- a/pallets/thea-executor/Cargo.toml +++ b/pallets/thea-executor/Cargo.toml @@ -4,7 +4,7 @@ version = "5.3.0" edition = "2021" [dependencies] -log = {workspace = true, default-features = false} +log = { workspace = true, default-features = false } parity-scale-codec = { workspace = true, default-features = false } scale-info = { workspace = true, default-features = false, features = ["derive"] } frame-support = { default-features = false, workspace = true } diff --git a/pallets/thea/src/resolver.rs b/pallets/thea/src/resolver.rs index 4f3f04f49..f51ccb5a0 100644 --- a/pallets/thea/src/resolver.rs +++ b/pallets/thea/src/resolver.rs @@ -93,7 +93,7 @@ impl Resolver { return Err("No active keys available") } - let signer = available_keys.get(0).ok_or("Key not avaialble")?; + let signer = available_keys.first().ok_or("Key not avaialble")?; let mut auth_index = -1; for (index, auth) in authorities.iter().enumerate() { if auth == signer { diff --git a/pallets/xcm-helper/src/lib.rs b/pallets/xcm-helper/src/lib.rs index 7f1455630..edaa15c39 100644 --- a/pallets/xcm-helper/src/lib.rs +++ b/pallets/xcm-helper/src/lib.rs @@ -554,7 +554,7 @@ pub mod pallet { /// Converts Multi-Location to AccountId pub fn get_destination_account(location: MultiLocation) -> Option { match location { - MultiLocation { parents, interior } if parents == 0 => { + MultiLocation { parents: 0, interior } => { if let Junctions::X1(Junction::AccountId32 { network: _, id }) = interior { if let Ok(account) = T::AccountId::decode(&mut &id[..]) { Some(account) diff --git a/runtimes/mainnet/src/impls.rs b/runtimes/mainnet/src/impls.rs index 73dd23516..2dd7fe164 100644 --- a/runtimes/mainnet/src/impls.rs +++ b/runtimes/mainnet/src/impls.rs @@ -23,7 +23,7 @@ use frame_support::traits::{ }; use pallet_asset_tx_payment::HandleCredit; -use crate::{AccountId, Assets, Authorship, Balances, NegativeImbalance, Runtime, RuntimeCall}; +use crate::{AccountId, Assets, Authorship, Balances, NegativeImbalance, Runtime}; pub struct Author; impl OnUnbalanced for Author { diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index b44ea063f..e36342829 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -29,7 +29,6 @@ use frame_election_provider_support::{ use frame_support::{ construct_runtime, dispatch::DispatchClass, - instances::Instance1, pallet_prelude::{ConstU32, RuntimeDebug}, parameter_types, traits::{ @@ -87,7 +86,6 @@ use sp_runtime::{ ApplyExtrinsicResult, DispatchError, FixedPointNumber, Perbill, Percent, Permill, Perquintill, }; use sp_std::{prelude::*, vec}; -use sp_storage as _; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; use sp_version::RuntimeVersion; @@ -1403,7 +1401,7 @@ impl pallet_asset_tx_payment::Config for Runtime { parameter_types! { pub const AssetConversionPalletId: PalletId = PalletId(*b"py/ascon"); pub AllowMultiAssetPools: bool = true; - pub const PoolSetupFee: Balance = 1 * DOLLARS; // should be more or equal to the existential deposit + pub const PoolSetupFee: Balance = DOLLARS; // should be more or equal to the existential deposit pub const MintMinLiquidity: Balance = 100; // 100 is good enough when the main currency has 10-12 decimals. pub const LiquidityWithdrawalFee: Permill = Permill::from_percent(0); // should be non-zero if AllowMultiAssetPools is true, otherwise can be zero. } @@ -1434,7 +1432,7 @@ impl pallet_asset_conversion::Config for Runtime { } parameter_types! { - pub StatementCost: Balance = 1 * DOLLARS; + pub StatementCost: Balance = DOLLARS; pub StatementByteCost: Balance = 100 * MILLICENTS; pub const MinAllowedStatements: u32 = 4; pub const MaxAllowedStatements: u32 = 10; diff --git a/runtimes/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs index 1ad137b53..712fb9b0b 100644 --- a/runtimes/parachain/src/lib.rs +++ b/runtimes/parachain/src/lib.rs @@ -796,7 +796,7 @@ impl_runtime_apis! { config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{BenchmarkError, Benchmarking, BenchmarkBatch}; - use sp_storage::TrackedStorageKey; + use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { diff --git a/scripts/check-off-on-deviation/Cargo.toml b/scripts/check-off-on-deviation/Cargo.toml index 987021abf..a206475bf 100644 --- a/scripts/check-off-on-deviation/Cargo.toml +++ b/scripts/check-off-on-deviation/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" [dependencies] anyhow = "1.0.75" -jsonrpsee = {version = "0.20.1", features = ["client","macros"]} +jsonrpsee = { version = "0.20.1", features = ["client", "macros"] } orderbook-primitives = { version = "1.1.0", path = "../../primitives/orderbook" } tokio = { version = "1.27", features = ["rt-multi-thread", "macros", "time"] } From ea041901f40dbca3fcc96da6e3ddb2701bcafb08 Mon Sep 17 00:00:00 2001 From: zktony Date: Fri, 27 Oct 2023 17:22:32 +0530 Subject: [PATCH 34/51] Fixed benchmarks --- Cargo.lock | 1 + runtimes/mainnet/Cargo.toml | 2 ++ runtimes/mainnet/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 5c5337949..e3d5568c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6177,6 +6177,7 @@ dependencies = [ "sp-staking", "sp-statement-store", "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "static_assertions", diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index a9a4539ae..a0ac982d7 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -71,6 +71,7 @@ sp-transaction-pool = { default-features = false, workspace = true } sp-version = { default-features = false, workspace = true } sp-io = { workspace = true, default-features = false } sp-statement-store = { workspace = true, default-features = false } +sp-storage = { workspace = true, default-features = false } #added sp-authority-discovery = { default-features = false, workspace = true } @@ -201,6 +202,7 @@ std = [ "pallet-asset-tx-payment/std", "pallet-statement/std", "sp-statement-store/std", + "sp-storage/std" ] runtime-benchmarks = [ #theirs diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index e36342829..2c79f3608 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -1927,7 +1927,7 @@ impl_runtime_apis! { add_benchmark!(params, batches, pdex_migration, PDEXMigration); add_benchmark!(params, batches, pallet_rewards, Rewards); add_benchmark!(params, batches, liquidity, Liquidity); - add_benchmark!(params, batches, thea_executor, TheaExecutor); //TheaExecutor: thea_executor + add_benchmark!(params, batches, thea_executor, TheaExecutor); //TheaExecutor: thea_executor add_benchmark!(params, batches, thea, Thea); add_benchmark!(params, batches, thea_message_handler, TheaMH); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } From f45cb6ec9c1171bc816e194c370f45ce0dffe952 Mon Sep 17 00:00:00 2001 From: zktony Date: Fri, 27 Oct 2023 17:30:40 +0530 Subject: [PATCH 35/51] fixed linter error --- runtimes/mainnet/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index a0ac982d7..cfbb43d45 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -202,7 +202,7 @@ std = [ "pallet-asset-tx-payment/std", "pallet-statement/std", "sp-statement-store/std", - "sp-storage/std" + "sp-storage/std", ] runtime-benchmarks = [ #theirs From 75c6694cd9b677ff0a141cff8d41901cee13942d Mon Sep 17 00:00:00 2001 From: zktony Date: Fri, 27 Oct 2023 18:22:59 +0530 Subject: [PATCH 36/51] Fixed warning --- runtimes/mainnet/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index 2c79f3608..1a2925bb0 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -26,6 +26,7 @@ use constants::{currency::*, time::*}; use frame_election_provider_support::{ bounds::ElectionBoundsBuilder, onchain, ElectionDataProvider, SequentialPhragmen, }; +use sp_storage as _; use frame_support::{ construct_runtime, dispatch::DispatchClass, From 63f33ef1afc8d6bb21059c119103cb5b86de86df Mon Sep 17 00:00:00 2001 From: zktony Date: Fri, 27 Oct 2023 19:07:58 +0530 Subject: [PATCH 37/51] Fixed formatting --- runtimes/mainnet/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index 1a2925bb0..d816f0fec 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -26,7 +26,6 @@ use constants::{currency::*, time::*}; use frame_election_provider_support::{ bounds::ElectionBoundsBuilder, onchain, ElectionDataProvider, SequentialPhragmen, }; -use sp_storage as _; use frame_support::{ construct_runtime, dispatch::DispatchClass, @@ -87,6 +86,7 @@ use sp_runtime::{ ApplyExtrinsicResult, DispatchError, FixedPointNumber, Perbill, Percent, Permill, Perquintill, }; use sp_std::{prelude::*, vec}; +use sp_storage as _; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; use sp_version::RuntimeVersion; From e68e91ea96b7e21fdc29fb09aa0ae0fd9e824517 Mon Sep 17 00:00:00 2001 From: zktony Date: Sat, 28 Oct 2023 00:07:58 +0530 Subject: [PATCH 38/51] Updated test case --- nodes/mainnet/src/service.rs | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index 5ac798d90..4f4bebbd4 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -640,7 +640,7 @@ mod tests { constants::{currency::CENTS, time::SLOT_DURATION}, Address, BalancesCall, RuntimeCall, UncheckedExtrinsic, }; - use node_primitives::{Block, DigestItem, Signature}; + use polkadex_primitives::{Block, DigestItem, Signature}; use sc_client_api::BlockBackend; use sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy}; use sc_consensus_babe::{BabeIntermediate, CompatibleDigestItem, INTERMEDIATE_KEY}; @@ -774,7 +774,7 @@ mod tests { ) .create_inherent_data(), ) - .expect("Creates inherent data"); + .expect("Creates inherent data"); digest.push(::babe_pre_digest(babe_pre_digest)); @@ -785,8 +785,8 @@ mod tests { .propose(inherent_data, digest, std::time::Duration::from_secs(1), None) .await }) - .expect("Error making test block") - .block; + .expect("Error making test block") + .block; let (new_header, new_body) = new_block.deconstruct(); let pre_hash = new_header.hash(); @@ -829,7 +829,7 @@ mod tests { value: amount, }); - let check_non_zero_sender = frame_system::CheckNonZeroSender::new(); + //let check_non_zero_sender = frame_system::CheckNonZeroSender::new(); let check_spec_version = frame_system::CheckSpecVersion::new(); let check_tx_version = frame_system::CheckTxVersion::new(); let check_genesis = frame_system::CheckGenesis::new(); @@ -839,7 +839,7 @@ mod tests { let tx_payment = pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::from(0, None); let extra = ( - check_non_zero_sender, + //check_non_zero_sender, check_spec_version, check_tx_version, check_genesis, @@ -848,10 +848,18 @@ mod tests { check_weight, tx_payment, ); - let raw_payload = SignedPayload::from_raw( - function, - extra, - ((), spec_version, transaction_version, genesis_hash, genesis_hash, (), (), ()), + let raw_payload = node_polkadex_runtime::SignedPayload::from_raw( + function.clone(), + extra.clone(), + ( + node_polkadex_runtime::VERSION.spec_version, + node_polkadex_runtime::VERSION.transaction_version, + genesis_hash, + best_hash, + (), + (), + (), + ), ); let signature = raw_payload.using_encoded(|payload| signer.sign(payload)); let (function, extra, _) = raw_payload.deconstruct(); @@ -883,4 +891,4 @@ mod tests { vec!["//Alice".into(), "//Bob".into()], ) } -} +} \ No newline at end of file From 7dc336b7669e2ce90be0a6697cc049772c80429c Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Fri, 27 Oct 2023 17:24:42 -0700 Subject: [PATCH 39/51] chore(cs): Code style fixes --- .github/workflows/ci.yml | 2 +- nodes/mainnet/src/service.rs | 19 ++++++++++--------- pallets/liquidity/src/mock.rs | 6 +----- pallets/ocex/src/mock.rs | 7 +------ pallets/pdex-migration/src/mock.rs | 10 +--------- pallets/rewards/src/mock.rs | 7 +------ pallets/thea-council/src/mock.rs | 8 +------- pallets/thea-executor/src/mock.rs | 6 +----- pallets/thea-message-handler/src/mock.rs | 7 +------ pallets/thea/src/mock.rs | 6 +----- pallets/xcm-helper/src/mock.rs | 8 +------- pallets/xcm-helper/src/tests.rs | 2 +- 12 files changed, 21 insertions(+), 67 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5959a4748..f675d0157 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,7 +115,7 @@ jobs: - name: Check Clippy run: cargo clippy -- -D warnings - name: Test Project - run: cargo test --workspace + run: RUSTFLAGS="-D warnings" cargo test --workspace - name: Run Cargo Tarpaulin uses: actions-rs/tarpaulin@v0.1 with: diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index 4f4bebbd4..46dd9a53d 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -648,15 +648,16 @@ mod tests { use sc_keystore::LocalKeystore; use sc_service_test::TestNetNode; use sc_transaction_pool_api::{ChainEvent, MaintainedTransactionPool}; + use sp_api::BlockT; use sp_consensus::{BlockOrigin, Environment, Proposer}; use sp_core::crypto::Pair; use sp_inherents::InherentDataProvider; use sp_keyring::AccountKeyring; use sp_keystore::KeystorePtr; use sp_runtime::{ - generic::{Digest, Era, SignedPayload}, + generic::{Digest, Era}, key_types::BABE, - traits::{Block as BlockT, Header as HeaderT, IdentifyAccount, Verify}, + traits::{IdentifyAccount, Verify}, RuntimeAppPublic, }; use sp_timestamp; @@ -713,10 +714,10 @@ mod tests { ); Ok((node, setup_handles.unwrap())) }, - |service, &mut (ref mut block_import, ref babe_link)| { + |service, &mut (ref mut block_import, ref babe_link): &mut (_, _)| { let parent_hash = service.client().chain_info().best_hash; let parent_header = service.client().header(parent_hash).unwrap().unwrap(); - let parent_number = *parent_header.number(); + let parent_number = parent_header.number; futures::executor::block_on(service.transaction_pool().maintain( ChainEvent::NewBestBlock { hash: parent_header.hash(), tree_route: None }, @@ -774,7 +775,7 @@ mod tests { ) .create_inherent_data(), ) - .expect("Creates inherent data"); + .expect("Creates inherent data"); digest.push(::babe_pre_digest(babe_pre_digest)); @@ -785,8 +786,8 @@ mod tests { .propose(inherent_data, digest, std::time::Duration::from_secs(1), None) .await }) - .expect("Error making test block") - .block; + .expect("Error making test block") + .block; let (new_header, new_body) = new_block.deconstruct(); let pre_hash = new_header.hash(); @@ -818,7 +819,7 @@ mod tests { let from: Address = AccountPublic::from(charlie.public()).into_account().into(); let genesis_hash = service.client().block_hash(0).unwrap().unwrap(); let best_hash = service.client().chain_info().best_hash; - let (spec_version, transaction_version) = { + let (_, _) = { let version = service.client().runtime_version_at(best_hash).unwrap(); (version.spec_version, version.transaction_version) }; @@ -891,4 +892,4 @@ mod tests { vec!["//Alice".into(), "//Bob".into()], ) } -} \ No newline at end of file +} diff --git a/pallets/liquidity/src/mock.rs b/pallets/liquidity/src/mock.rs index c66c69b6f..f38afe00c 100644 --- a/pallets/liquidity/src/mock.rs +++ b/pallets/liquidity/src/mock.rs @@ -39,11 +39,7 @@ type Block = frame_system::mocking::MockBlock; // For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallets/ocex/src/mock.rs b/pallets/ocex/src/mock.rs index a1791f863..ac996a833 100644 --- a/pallets/ocex/src/mock.rs +++ b/pallets/ocex/src/mock.rs @@ -36,16 +36,11 @@ use sp_runtime::{ }; // Reexport crate as its pallet name for construct_runtime. -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallets/pdex-migration/src/mock.rs b/pallets/pdex-migration/src/mock.rs index 753820e0d..504acc089 100644 --- a/pallets/pdex-migration/src/mock.rs +++ b/pallets/pdex-migration/src/mock.rs @@ -19,24 +19,16 @@ use frame_support::parameter_types; use frame_system as system; use sp_core::H256; -// use sp_runtime::testing::H256; -// use crate::benchmarking::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use crate::pallet as pdex_migration; -use frame_support::traits::GenesisBuild; use sp_runtime::BuildStorage; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; // Configure a mock Runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Sudo: pallet_sudo, Balances: pallet_balances, diff --git a/pallets/rewards/src/mock.rs b/pallets/rewards/src/mock.rs index 80013ee0d..5c5428623 100644 --- a/pallets/rewards/src/mock.rs +++ b/pallets/rewards/src/mock.rs @@ -31,17 +31,12 @@ use frame_support::{traits::AsEnsureOriginWithArg, PalletId}; use frame_system::{EnsureRoot, EnsureSigned}; use sp_runtime::BuildStorage; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; type Balance = u128; // For testing the pallet, we construct a mock Runtime. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallets/thea-council/src/mock.rs b/pallets/thea-council/src/mock.rs index 5ae0a5c6a..5eceef617 100644 --- a/pallets/thea-council/src/mock.rs +++ b/pallets/thea-council/src/mock.rs @@ -22,7 +22,6 @@ use frame_system as system; use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; use sp_core::{ConstU32, H256}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, }; @@ -33,16 +32,11 @@ use xcm::lts::{ Junctions::X2, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock Runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallets/thea-executor/src/mock.rs b/pallets/thea-executor/src/mock.rs index c6de4d797..d423ba14f 100644 --- a/pallets/thea-executor/src/mock.rs +++ b/pallets/thea-executor/src/mock.rs @@ -32,11 +32,7 @@ type Balance = u128; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallets/thea-message-handler/src/mock.rs b/pallets/thea-message-handler/src/mock.rs index d98f9ec2b..81e1b15a0 100644 --- a/pallets/thea-message-handler/src/mock.rs +++ b/pallets/thea-message-handler/src/mock.rs @@ -21,7 +21,6 @@ use frame_system as system; use frame_system::{EnsureRoot, EnsureSigned}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, }; @@ -32,11 +31,7 @@ type Balance = u128; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallets/thea/src/mock.rs b/pallets/thea/src/mock.rs index ba4630022..ae1e70145 100644 --- a/pallets/thea/src/mock.rs +++ b/pallets/thea/src/mock.rs @@ -31,11 +31,7 @@ type Balance = u128; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallets/xcm-helper/src/mock.rs b/pallets/xcm-helper/src/mock.rs index ba4c43715..ef34875e3 100644 --- a/pallets/xcm-helper/src/mock.rs +++ b/pallets/xcm-helper/src/mock.rs @@ -22,22 +22,16 @@ use frame_system as system; use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key}; use sp_core::{ConstU32, H256}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, }; use thea::ecdsa::{AuthorityId, AuthoritySignature}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/pallets/xcm-helper/src/tests.rs b/pallets/xcm-helper/src/tests.rs index 6465d1956..08273387f 100644 --- a/pallets/xcm-helper/src/tests.rs +++ b/pallets/xcm-helper/src/tests.rs @@ -17,7 +17,7 @@ use crate::{mock::*, Error, PendingWithdrawals}; use frame_support::{assert_noop, assert_ok, traits::Currency, BoundedVec}; use sp_core::ByteArray; use sp_runtime::{traits::AccountIdConversion, DispatchError, SaturatedConversion}; -use thea_primitives::{types::Withdraw, Message, ValidatorSetId}; +use thea_primitives::{types::Withdraw, Message}; use xcm::latest::{AssetId, MultiLocation}; #[test] From 6a7999f71a41ba8440b821483084fd3fdc93b5be Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Fri, 27 Oct 2023 17:29:27 -0700 Subject: [PATCH 40/51] chore(cs): Cleaned up commented out code --- nodes/mainnet/src/service.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/nodes/mainnet/src/service.rs b/nodes/mainnet/src/service.rs index 46dd9a53d..681de71c6 100644 --- a/nodes/mainnet/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -830,7 +830,6 @@ mod tests { value: amount, }); - //let check_non_zero_sender = frame_system::CheckNonZeroSender::new(); let check_spec_version = frame_system::CheckSpecVersion::new(); let check_tx_version = frame_system::CheckTxVersion::new(); let check_genesis = frame_system::CheckGenesis::new(); @@ -840,7 +839,6 @@ mod tests { let tx_payment = pallet_asset_conversion_tx_payment::ChargeAssetTxPayment::from(0, None); let extra = ( - //check_non_zero_sender, check_spec_version, check_tx_version, check_genesis, From 799ec731da8d7ac846ce9e2f9307e90e57a0360e Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Mon, 30 Oct 2023 09:54:34 -0700 Subject: [PATCH 41/51] fix(ci): Fixed issue with no space on self hosted runner --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f675d0157..bc01f39a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: env: RUNNER_INSTANCE_TYPE: c5d.4xlarge + RUNNER_VOLUME_SIZE: 200 jobs: start-runner: @@ -35,6 +36,7 @@ jobs: github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_REPO }} ec2-image-id: ami-06de69a4185c962ed ec2-instance-type: ${{ env.RUNNER_INSTANCE_TYPE }} + ec2-volume-size: ${{ env.RUNNER_VOLUME_SIZE }} subnet-id: subnet-a4d326e8 security-group-id: sg-078363c0f7b5f0b41 iam-role-name: github-runner-role From fa30991ae9402bf65e334338f608a0dcc796b166 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Mon, 30 Oct 2023 11:45:16 -0700 Subject: [PATCH 42/51] fix(ci): Increased self hosted runner storage size --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc01f39a9..ca19b3f3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: env: RUNNER_INSTANCE_TYPE: c5d.4xlarge - RUNNER_VOLUME_SIZE: 200 + RUNNER_VOLUME_SIZE: 500 jobs: start-runner: From b55bafe5ebdc96f9cf1ebe324d49671e2ba69288 Mon Sep 17 00:00:00 2001 From: Gautham Date: Tue, 31 Oct 2023 10:27:55 +0530 Subject: [PATCH 43/51] Modify storage size --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca19b3f3e..62252cc93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: env: RUNNER_INSTANCE_TYPE: c5d.4xlarge - RUNNER_VOLUME_SIZE: 500 + RUNNER_VOLUME_SIZE: 500GB jobs: start-runner: @@ -36,7 +36,7 @@ jobs: github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_REPO }} ec2-image-id: ami-06de69a4185c962ed ec2-instance-type: ${{ env.RUNNER_INSTANCE_TYPE }} - ec2-volume-size: ${{ env.RUNNER_VOLUME_SIZE }} + storage-size: ${{ env.RUNNER_VOLUME_SIZE }} subnet-id: subnet-a4d326e8 security-group-id: sg-078363c0f7b5f0b41 iam-role-name: github-runner-role From c9344d2c0586a3bc6d059e99a624f228bb689892 Mon Sep 17 00:00:00 2001 From: Gautham Date: Tue, 31 Oct 2023 10:36:15 +0530 Subject: [PATCH 44/51] Modify AMI --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62252cc93..cbbf941ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ on: env: RUNNER_INSTANCE_TYPE: c5d.4xlarge - RUNNER_VOLUME_SIZE: 500GB jobs: start-runner: @@ -34,9 +33,8 @@ jobs: with: mode: start github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_REPO }} - ec2-image-id: ami-06de69a4185c962ed + ec2-image-id: ami-06dd92ecc74fdfb36 ec2-instance-type: ${{ env.RUNNER_INSTANCE_TYPE }} - storage-size: ${{ env.RUNNER_VOLUME_SIZE }} subnet-id: subnet-a4d326e8 security-group-id: sg-078363c0f7b5f0b41 iam-role-name: github-runner-role From 8102d49b388afbbae7e8935c813c94cc9b821497 Mon Sep 17 00:00:00 2001 From: Gautham Date: Tue, 31 Oct 2023 11:00:46 +0530 Subject: [PATCH 45/51] New AMI with 500 GB --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbbf941ff..aad2d9c96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,8 +33,9 @@ jobs: with: mode: start github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_REPO }} - ec2-image-id: ami-06dd92ecc74fdfb36 + ec2-image-id: ami-0ced994bdc615e5db # Ubuntu 22 with 500 GB volume ec2-instance-type: ${{ env.RUNNER_INSTANCE_TYPE }} + storage-size: ${{ env.RUNNER_VOLUME_SIZE }} subnet-id: subnet-a4d326e8 security-group-id: sg-078363c0f7b5f0b41 iam-role-name: github-runner-role From 835b64c42685fd1c3fcb34c0609cfabaf0c0ca45 Mon Sep 17 00:00:00 2001 From: Gautham Date: Tue, 31 Oct 2023 11:14:47 +0530 Subject: [PATCH 46/51] New AMI with 500 GB --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aad2d9c96..ea6fa7872 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,6 @@ jobs: github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_REPO }} ec2-image-id: ami-0ced994bdc615e5db # Ubuntu 22 with 500 GB volume ec2-instance-type: ${{ env.RUNNER_INSTANCE_TYPE }} - storage-size: ${{ env.RUNNER_VOLUME_SIZE }} subnet-id: subnet-a4d326e8 security-group-id: sg-078363c0f7b5f0b41 iam-role-name: github-runner-role From df3e210fce0b4f9f85d1e7f8fe155c32d8950cde Mon Sep 17 00:00:00 2001 From: Gautham Date: Tue, 31 Oct 2023 11:51:15 +0530 Subject: [PATCH 47/51] Update Fee Multiplier --- runtimes/mainnet/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index d816f0fec..91fe664c7 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -433,7 +433,7 @@ use sp_runtime::traits::{Bounded, ConvertInto}; parameter_types! { pub const TransactionByteFee: Balance = 10 * MILLICENTS; pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25); - pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(3, 100_000); + pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(5, 100_000); pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128); pub MaximumMultiplier: Multiplier = Bounded::max_value(); pub const OperationalFeeMultiplier: u8 = 5; From dac7cb9c2550cd7fe3ec8b637719297a5e279d66 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Tue, 31 Oct 2023 09:11:37 -0700 Subject: [PATCH 48/51] feat(it-241): Weights update --- pallets/liquidity/src/weights.rs | 16 +-- pallets/ocex/src/weights.rs | 104 ++++++++++---------- pallets/pdex-migration/src/weights.rs | 32 +++--- pallets/rewards/src/weights.rs | 20 ++-- pallets/thea-executor/src/weights.rs | 36 ++++--- pallets/thea-message-handler/src/weights.rs | 20 ++-- pallets/thea/src/weights.rs | 36 ++++--- 7 files changed, 126 insertions(+), 138 deletions(-) diff --git a/pallets/liquidity/src/weights.rs b/pallets/liquidity/src/weights.rs index 7a15c7507..d495e5fdd 100644 --- a/pallets/liquidity/src/weights.rs +++ b/pallets/liquidity/src/weights.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for `liquidity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// liquidity_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,8 +45,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3708` - // Minimum execution time: 85_153_000 picoseconds. - Weight::from_parts(87_170_413, 0) + // Minimum execution time: 79_460_000 picoseconds. + Weight::from_parts(81_586_241, 0) .saturating_add(Weight::from_parts(0, 3708)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -74,8 +74,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `928` // Estimated: `6232` - // Minimum execution time: 201_478_000 picoseconds. - Weight::from_parts(206_511_440, 0) + // Minimum execution time: 191_351_000 picoseconds. + Weight::from_parts(195_689_155, 0) .saturating_add(Weight::from_parts(0, 6232)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -97,8 +97,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `553` // Estimated: `4018` - // Minimum execution time: 90_983_000 picoseconds. - Weight::from_parts(93_871_114, 0) + // Minimum execution time: 86_490_000 picoseconds. + Weight::from_parts(88_876_305, 0) .saturating_add(Weight::from_parts(0, 4018)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/pallets/ocex/src/weights.rs b/pallets/ocex/src/weights.rs index c02aca2fa..2b0d1f8f5 100644 --- a/pallets/ocex/src/weights.rs +++ b/pallets/ocex/src/weights.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for `pallet_ocex_lmp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// ocex_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -39,13 +39,15 @@ impl crate::OcexWeightInfo for WeightInfo { /// Storage: `OCEX::IngressMessages` (r:1 w:1) /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[0, 50000]`. - fn register_main_account(_b: u32, ) -> Weight { + fn register_main_account(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` - // Minimum execution time: 56_052_000 picoseconds. - Weight::from_parts(57_789_709, 0) + // Minimum execution time: 51_850_000 picoseconds. + Weight::from_parts(53_310_833, 0) .saturating_add(Weight::from_parts(0, 3632)) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -60,11 +62,11 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `397` // Estimated: `3862` - // Minimum execution time: 69_812_000 picoseconds. - Weight::from_parts(71_979_380, 0) + // Minimum execution time: 64_241_000 picoseconds. + Weight::from_parts(66_354_637, 0) .saturating_add(Weight::from_parts(0, 3862)) - // Standard Error: 45 - .saturating_add(Weight::from_parts(1_619, 0).saturating_mul(x.into())) + // Standard Error: 53 + .saturating_add(Weight::from_parts(185, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -79,8 +81,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `391` // Estimated: `3856` - // Minimum execution time: 65_553_000 picoseconds. - Weight::from_parts(67_539_432, 0) + // Minimum execution time: 60_380_000 picoseconds. + Weight::from_parts(62_400_069, 0) .saturating_add(Weight::from_parts(0, 3856)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -96,8 +98,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `391` // Estimated: `3856` - // Minimum execution time: 65_593_000 picoseconds. - Weight::from_parts(67_481_003, 0) + // Minimum execution time: 60_330_000 picoseconds. + Weight::from_parts(62_463_308, 0) .saturating_add(Weight::from_parts(0, 3856)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -109,15 +111,13 @@ impl crate::OcexWeightInfo for WeightInfo { /// Storage: `OCEX::IngressMessages` (r:1 w:1) /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 100000]`. - fn register_trading_pair(x: u32, ) -> Weight { + fn register_trading_pair(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `6107` - // Minimum execution time: 66_913_000 picoseconds. - Weight::from_parts(68_752_355, 0) + // Minimum execution time: 61_451_000 picoseconds. + Weight::from_parts(63_298_163, 0) .saturating_add(Weight::from_parts(0, 6107)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -128,15 +128,13 @@ impl crate::OcexWeightInfo for WeightInfo { /// Storage: `OCEX::IngressMessages` (r:1 w:1) /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 100000]`. - fn update_trading_pair(x: u32, ) -> Weight { + fn update_trading_pair(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `420` // Estimated: `3885` - // Minimum execution time: 75_603_000 picoseconds. - Weight::from_parts(77_960_257, 0) + // Minimum execution time: 69_131_000 picoseconds. + Weight::from_parts(71_264_937, 0) .saturating_add(Weight::from_parts(0, 3885)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -155,15 +153,13 @@ impl crate::OcexWeightInfo for WeightInfo { /// Storage: `OCEX::IngressMessages` (r:1 w:1) /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[1, 255]`. - fn deposit(x: u32, ) -> Weight { + fn deposit(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `740` // Estimated: `6232` - // Minimum execution time: 173_106_000 picoseconds. - Weight::from_parts(176_634_210, 0) + // Minimum execution time: 157_380_000 picoseconds. + Weight::from_parts(161_320_231, 0) .saturating_add(Weight::from_parts(0, 6232)) - // Standard Error: 79 - .saturating_add(Weight::from_parts(119, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -174,13 +170,15 @@ impl crate::OcexWeightInfo for WeightInfo { /// Storage: `OCEX::IngressMessages` (r:1 w:1) /// Proof: `OCEX::IngressMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[1, 255]`. - fn remove_proxy_account(_x: u32, ) -> Weight { + fn remove_proxy_account(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `429` // Estimated: `3894` - // Minimum execution time: 66_652_000 picoseconds. - Weight::from_parts(68_834_613, 0) + // Minimum execution time: 61_141_000 picoseconds. + Weight::from_parts(63_226_268, 0) .saturating_add(Weight::from_parts(0, 3894)) + // Standard Error: 40 + .saturating_add(Weight::from_parts(47, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -198,8 +196,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `193` // Estimated: `1678` - // Minimum execution time: 79_233_000 picoseconds. - Weight::from_parts(80_253_000, 0) + // Minimum execution time: 71_880_000 picoseconds. + Weight::from_parts(73_361_000, 0) .saturating_add(Weight::from_parts(0, 1678)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(5)) @@ -207,15 +205,13 @@ impl crate::OcexWeightInfo for WeightInfo { /// Storage: `OCEX::FeesCollected` (r:1 w:1) /// Proof: `OCEX::FeesCollected` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `x` is `[0, 255]`. - fn collect_fees(x: u32, ) -> Weight { + fn collect_fees(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `200` // Estimated: `3665` - // Minimum execution time: 38_141_000 picoseconds. - Weight::from_parts(39_738_014, 0) + // Minimum execution time: 34_871_000 picoseconds. + Weight::from_parts(36_428_978, 0) .saturating_add(Weight::from_parts(0, 3665)) - // Standard Error: 30 - .saturating_add(Weight::from_parts(170, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -228,8 +224,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` - // Minimum execution time: 41_942_000 picoseconds. - Weight::from_parts(43_427_631, 0) + // Minimum execution time: 38_430_000 picoseconds. + Weight::from_parts(40_019_866, 0) .saturating_add(Weight::from_parts(0, 3632)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -243,11 +239,11 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `147` // Estimated: `3612` - // Minimum execution time: 26_691_000 picoseconds. - Weight::from_parts(27_785_788, 0) + // Minimum execution time: 24_260_000 picoseconds. + Weight::from_parts(25_365_570, 0) .saturating_add(Weight::from_parts(0, 3612)) - // Standard Error: 24 - .saturating_add(Weight::from_parts(111, 0).saturating_mul(x.into())) + // Standard Error: 30 + .saturating_add(Weight::from_parts(329, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -264,8 +260,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `763` // Estimated: `6232` - // Minimum execution time: 157_716_000 picoseconds. - Weight::from_parts(161_210_673, 0) + // Minimum execution time: 143_921_000 picoseconds. + Weight::from_parts(146_859_658, 0) .saturating_add(Weight::from_parts(0, 6232)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -277,8 +273,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `167` // Estimated: `1652` - // Minimum execution time: 37_022_000 picoseconds. - Weight::from_parts(38_478_293, 0) + // Minimum execution time: 33_820_000 picoseconds. + Weight::from_parts(35_244_862, 0) .saturating_add(Weight::from_parts(0, 1652)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -290,8 +286,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `205` // Estimated: `1690` - // Minimum execution time: 40_312_000 picoseconds. - Weight::from_parts(41_852_655, 0) + // Minimum execution time: 36_771_000 picoseconds. + Weight::from_parts(38_446_758, 0) .saturating_add(Weight::from_parts(0, 1690)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -302,8 +298,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_280_000 picoseconds. - Weight::from_parts(12_800_000, 0) + // Minimum execution time: 11_420_000 picoseconds. + Weight::from_parts(11_850_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -313,8 +309,8 @@ impl crate::OcexWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 27_741_000 picoseconds. - Weight::from_parts(28_661_000, 0) + // Minimum execution time: 25_040_000 picoseconds. + Weight::from_parts(25_840_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/pallets/pdex-migration/src/weights.rs b/pallets/pdex-migration/src/weights.rs index cabaeb3c6..1830fbcdd 100644 --- a/pallets/pdex-migration/src/weights.rs +++ b/pallets/pdex-migration/src/weights.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for `pdex_migration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// pdex_migration_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -38,8 +38,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 11_961_000 picoseconds. - Weight::from_parts(12_441_000, 0) + // Minimum execution time: 10_890_000 picoseconds. + Weight::from_parts(11_390_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -49,8 +49,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 30_992_000 picoseconds. - Weight::from_parts(31_861_000, 0) + // Minimum execution time: 28_251_000 picoseconds. + Weight::from_parts(29_040_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -73,8 +73,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `985` // Estimated: `4764` - // Minimum execution time: 229_248_000 picoseconds. - Weight::from_parts(233_806_873, 0) + // Minimum execution time: 213_401_000 picoseconds. + Weight::from_parts(217_399_148, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -88,15 +88,13 @@ impl crate::WeightInfo for WeightInfo { /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 254]`. - fn unlock(b: u32, ) -> Weight { + fn unlock(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `882` // Estimated: `4764` - // Minimum execution time: 115_794_000 picoseconds. - Weight::from_parts(118_435_948, 0) + // Minimum execution time: 107_651_000 picoseconds. + Weight::from_parts(110_365_094, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 80 - .saturating_add(Weight::from_parts(43, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -113,11 +111,11 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `885` // Estimated: `4764` - // Minimum execution time: 236_049_000 picoseconds. - Weight::from_parts(240_247_753, 0) + // Minimum execution time: 217_871_000 picoseconds. + Weight::from_parts(222_659_097, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 171 - .saturating_add(Weight::from_parts(715, 0).saturating_mul(b.into())) + // Standard Error: 130 + .saturating_add(Weight::from_parts(587, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } diff --git a/pallets/rewards/src/weights.rs b/pallets/rewards/src/weights.rs index 27f21e07f..e7b7069af 100644 --- a/pallets/rewards/src/weights.rs +++ b/pallets/rewards/src/weights.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for `pallet_rewards` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// rewards_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -37,15 +37,13 @@ impl crate::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 4838400]`. /// The range of component `i` is `[1, 100]`. /// The range of component `r` is `[0, 10]`. - fn create_reward_cycle(_b: u32, i: u32, _r: u32, ) -> Weight { + fn create_reward_cycle(_b: u32, _i: u32, _r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3541` - // Minimum execution time: 37_842_000 picoseconds. - Weight::from_parts(39_914_352, 0) + // Minimum execution time: 35_260_000 picoseconds. + Weight::from_parts(37_342_619, 0) .saturating_add(Weight::from_parts(0, 3541)) - // Standard Error: 52 - .saturating_add(Weight::from_parts(56, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -63,8 +61,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1010` // Estimated: `6196` - // Minimum execution time: 303_912_000 picoseconds. - Weight::from_parts(306_471_000, 0) + // Minimum execution time: 271_551_000 picoseconds. + Weight::from_parts(273_861_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -83,8 +81,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1016` // Estimated: `4764` - // Minimum execution time: 157_046_000 picoseconds. - Weight::from_parts(159_146_000, 0) + // Minimum execution time: 148_621_000 picoseconds. + Weight::from_parts(150_800_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/pallets/thea-executor/src/weights.rs b/pallets/thea-executor/src/weights.rs index d061ee528..dcba85933 100644 --- a/pallets/thea-executor/src/weights.rs +++ b/pallets/thea-executor/src/weights.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for `thea_executor` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// thea_executor_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -39,11 +39,11 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 30_001_000 picoseconds. - Weight::from_parts(31_454_608, 0) + // Minimum execution time: 27_500_000 picoseconds. + Weight::from_parts(28_833_924, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 11 - .saturating_add(Weight::from_parts(14, 0).saturating_mul(r.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(73, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `TheaExecutor::Metadata` (r:0 w:1) @@ -53,8 +53,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 28_131_000 picoseconds. - Weight::from_parts(29_515_975, 0) + // Minimum execution time: 25_870_000 picoseconds. + Weight::from_parts(27_213_487, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -73,11 +73,11 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1555` // Estimated: `5011` - // Minimum execution time: 784_920_000 picoseconds. - Weight::from_parts(804_475_835, 0) + // Minimum execution time: 715_824_000 picoseconds. + Weight::from_parts(730_233_094, 0) .saturating_add(Weight::from_parts(0, 5011)) - // Standard Error: 227 - .saturating_add(Weight::from_parts(171, 0).saturating_mul(r.into())) + // Standard Error: 322 + .saturating_add(Weight::from_parts(4_304, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -102,8 +102,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `826` // Estimated: `6196` - // Minimum execution time: 318_462_000 picoseconds. - Weight::from_parts(326_628_553, 0) + // Minimum execution time: 291_352_000 picoseconds. + Weight::from_parts(299_646_631, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) @@ -125,15 +125,13 @@ impl crate::WeightInfo for WeightInfo { /// Storage: `TheaExecutor::ReadyWithdrawals` (r:0 w:1) /// Proof: `TheaExecutor::ReadyWithdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[1, 1000]`. - fn parachain_withdraw(r: u32, ) -> Weight { + fn parachain_withdraw(_r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `793` // Estimated: `6196` - // Minimum execution time: 319_612_000 picoseconds. - Weight::from_parts(327_370_682, 0) + // Minimum execution time: 292_152_000 picoseconds. + Weight::from_parts(298_959_519, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 59 - .saturating_add(Weight::from_parts(343, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } diff --git a/pallets/thea-message-handler/src/weights.rs b/pallets/thea-message-handler/src/weights.rs index 638b1a123..5dc4ab132 100644 --- a/pallets/thea-message-handler/src/weights.rs +++ b/pallets/thea-message-handler/src/weights.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for `thea_message_handler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// thea_message_handler_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -41,8 +41,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_551_000 picoseconds. - Weight::from_parts(22_623_815, 0) + // Minimum execution time: 20_270_000 picoseconds. + Weight::from_parts(21_397_765, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -58,8 +58,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `147` // Estimated: `3612` - // Minimum execution time: 78_662_000 picoseconds. - Weight::from_parts(80_103_000, 0) + // Minimum execution time: 72_570_000 picoseconds. + Weight::from_parts(74_210_000, 0) .saturating_add(Weight::from_parts(0, 3612)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -71,8 +71,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_351_000 picoseconds. - Weight::from_parts(17_317_871, 0) + // Minimum execution time: 15_301_000 picoseconds. + Weight::from_parts(16_307_245, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -83,8 +83,8 @@ impl crate::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_281_000 picoseconds. - Weight::from_parts(17_369_250, 0) + // Minimum execution time: 15_320_000 picoseconds. + Weight::from_parts(16_280_185, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/pallets/thea/src/weights.rs b/pallets/thea/src/weights.rs index 7208aa5ec..e65cf69b4 100644 --- a/pallets/thea/src/weights.rs +++ b/pallets/thea/src/weights.rs @@ -1,7 +1,7 @@ //! Autogenerated weights for `thea` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-24, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// thea_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -43,11 +43,11 @@ impl crate::TheaWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `6` // Estimated: `3471` - // Minimum execution time: 69_062_000 picoseconds. - Weight::from_parts(71_009_077, 0) + // Minimum execution time: 65_210_000 picoseconds. + Weight::from_parts(66_932_394, 0) .saturating_add(Weight::from_parts(0, 3471)) - // Standard Error: 42 - .saturating_add(Weight::from_parts(602, 0).saturating_mul(b.into())) + // Standard Error: 63 + .saturating_add(Weight::from_parts(835, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -58,15 +58,13 @@ impl crate::TheaWeightInfo for WeightInfo { /// Storage: `Thea::OutgoingMessages` (r:0 w:1) /// Proof: `Thea::OutgoingMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[0, 256]`. - fn send_thea_message(b: u32, ) -> Weight { + fn send_thea_message(_b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `145` // Estimated: `3610` - // Minimum execution time: 1_000_159_000 picoseconds. - Weight::from_parts(1_035_528_571, 0) + // Minimum execution time: 1_045_735_000 picoseconds. + Weight::from_parts(1_064_265_188, 0) .saturating_add(Weight::from_parts(0, 3610)) - // Standard Error: 1_485 - .saturating_add(Weight::from_parts(10_999, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -77,8 +75,8 @@ impl crate::TheaWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_610_000 picoseconds. - Weight::from_parts(17_629_285, 0) + // Minimum execution time: 15_900_000 picoseconds. + Weight::from_parts(17_020_281, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -89,8 +87,8 @@ impl crate::TheaWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 16_730_000 picoseconds. - Weight::from_parts(17_726_482, 0) + // Minimum execution time: 16_181_000 picoseconds. + Weight::from_parts(17_141_657, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -100,8 +98,8 @@ impl crate::TheaWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `145` // Estimated: `1630` - // Minimum execution time: 23_531_000 picoseconds. - Weight::from_parts(24_211_000, 0) + // Minimum execution time: 22_430_000 picoseconds. + Weight::from_parts(23_111_000, 0) .saturating_add(Weight::from_parts(0, 1630)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -112,8 +110,8 @@ impl crate::TheaWeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `166` // Estimated: `1651` - // Minimum execution time: 25_991_000 picoseconds. - Weight::from_parts(26_790_000, 0) + // Minimum execution time: 24_840_000 picoseconds. + Weight::from_parts(25_420_000, 0) .saturating_add(Weight::from_parts(0, 1651)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) From ace0f65a833a209bfdce91f6f24677584ed00dee Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Tue, 31 Oct 2023 09:24:21 -0700 Subject: [PATCH 49/51] chore(cs): Removed outdated comment --- nodes/parachain/src/cli.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/nodes/parachain/src/cli.rs b/nodes/parachain/src/cli.rs index b2e1761d3..0b412796d 100644 --- a/nodes/parachain/src/cli.rs +++ b/nodes/parachain/src/cli.rs @@ -50,7 +50,6 @@ pub enum Subcommand { /// Sub-commands concerned with benchmarking. /// The pallet benchmarking moved to the `pallet` sub-command. - // Allowed because of rely on 3rd party lib which can't be redefined atm. #[command(subcommand)] Benchmark(Box), From 90de23b50c381a93edc2faff0d4e1761324ac475 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Tue, 31 Oct 2023 11:15:06 -0700 Subject: [PATCH 50/51] feat(it-241): Updated parachain related pallets weights --- pallets/thea-council/src/weights.rs | 173 +++++++++++++--------------- pallets/xcm-helper/src/weights.rs | 139 ++++++++++------------ 2 files changed, 142 insertions(+), 170 deletions(-) diff --git a/pallets/thea-council/src/weights.rs b/pallets/thea-council/src/weights.rs index 9f8b804fa..58c7055ac 100644 --- a/pallets/thea-council/src/weights.rs +++ b/pallets/thea-council/src/weights.rs @@ -1,40 +1,25 @@ -// This file is part of Polkadex. - -// Copyright (C) 2020-2023 Polkadex oü. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - //! Autogenerated weights for `thea_council` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-28, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `150`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Ubuntu-2204-jammy-amd64-base`, CPU: `Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./parachain-polkadex-node // benchmark // pallet // --pallet -// thea_council +// thea-council // --steps // 100 // --repeat -// 200 +// 150 // --extrinsic // * // --output -// thea_council_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,74 +32,78 @@ use core::marker::PhantomData; /// Weight functions for `thea_council`. pub struct WeightInfo(PhantomData); impl crate::TheaCouncilWeightInfo for WeightInfo { - /// Storage: TheaCouncil ActiveCouncilMembers (r:1 w:0) - /// Proof: TheaCouncil ActiveCouncilMembers (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) - /// Storage: TheaCouncil PendingCouncilMembers (r:1 w:1) - /// Proof: TheaCouncil PendingCouncilMembers (max_values: Some(1), max_size: Some(401), added: 896, mode: MaxEncodedLen) - /// Storage: TheaCouncil Proposals (r:1 w:1) - /// Proof: TheaCouncil Proposals (max_values: None, max_size: Some(370), added: 2845, mode: MaxEncodedLen) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn add_member(_b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `168` - // Estimated: `3835` - // Minimum execution time: 13_313_000 picoseconds. - Weight::from_parts(14_011_349, 0) - .saturating_add(Weight::from_parts(0, 3835)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: TheaCouncil ActiveCouncilMembers (r:1 w:1) - /// Proof: TheaCouncil ActiveCouncilMembers (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) - /// Storage: TheaCouncil Proposals (r:1 w:1) - /// Proof: TheaCouncil Proposals (max_values: None, max_size: Some(370), added: 2845, mode: MaxEncodedLen) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn remove_member(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `339` - // Estimated: `3835` - // Minimum execution time: 14_352_000 picoseconds. - Weight::from_parts(14_981_588, 0) - .saturating_add(Weight::from_parts(0, 3835)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(19, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: TheaCouncil PendingCouncilMembers (r:1 w:1) - /// Proof: TheaCouncil PendingCouncilMembers (max_values: Some(1), max_size: Some(401), added: 896, mode: MaxEncodedLen) - /// Storage: TheaCouncil ActiveCouncilMembers (r:1 w:1) - /// Proof: TheaCouncil ActiveCouncilMembers (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn claim_membership(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `176` - // Estimated: `1886` - // Minimum execution time: 10_200_000 picoseconds. - Weight::from_parts(10_787_774, 0) - .saturating_add(Weight::from_parts(0, 1886)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: TheaCouncil ActiveCouncilMembers (r:1 w:0) - /// Proof: TheaCouncil ActiveCouncilMembers (max_values: Some(1), max_size: Some(321), added: 816, mode: MaxEncodedLen) - /// Storage: XcmHelper PendingWithdrawals (r:1 w:1) - /// Proof Skipped: XcmHelper PendingWithdrawals (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn delete_transaction(_b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `3721` - // Minimum execution time: 12_884_000 picoseconds. - Weight::from_parts(13_467_259, 0) - .saturating_add(Weight::from_parts(0, 3721)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } + /// Storage: `TheaCouncil::ActiveCouncilMembers` (r:1 w:0) + /// Proof: `TheaCouncil::ActiveCouncilMembers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TheaCouncil::PendingCouncilMembers` (r:1 w:1) + /// Proof: `TheaCouncil::PendingCouncilMembers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TheaCouncil::Proposals` (r:1 w:1) + /// Proof: `TheaCouncil::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn add_member(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `168` + // Estimated: `3633` + // Minimum execution time: 62_320_000 picoseconds. + Weight::from_parts(64_481_360, 0) + .saturating_add(Weight::from_parts(0, 3633)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(21, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `TheaCouncil::ActiveCouncilMembers` (r:1 w:1) + /// Proof: `TheaCouncil::ActiveCouncilMembers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TheaCouncil::Proposals` (r:1 w:1) + /// Proof: `TheaCouncil::Proposals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn remove_member(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `339` + // Estimated: `3804` + // Minimum execution time: 59_930_000 picoseconds. + Weight::from_parts(61_718_475, 0) + .saturating_add(Weight::from_parts(0, 3804)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(40, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `TheaCouncil::PendingCouncilMembers` (r:1 w:1) + /// Proof: `TheaCouncil::PendingCouncilMembers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TheaCouncil::ActiveCouncilMembers` (r:1 w:1) + /// Proof: `TheaCouncil::ActiveCouncilMembers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn claim_membership(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `176` + // Estimated: `1661` + // Minimum execution time: 43_330_000 picoseconds. + Weight::from_parts(45_181_495, 0) + .saturating_add(Weight::from_parts(0, 1661)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(32, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `TheaCouncil::ActiveCouncilMembers` (r:1 w:0) + /// Proof: `TheaCouncil::ActiveCouncilMembers` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmHelper::PendingWithdrawals` (r:1 w:1) + /// Proof: `XcmHelper::PendingWithdrawals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn delete_transaction(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `3721` + // Minimum execution time: 50_900_000 picoseconds. + Weight::from_parts(52_621_471, 0) + .saturating_add(Weight::from_parts(0, 3721)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(23, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/pallets/xcm-helper/src/weights.rs b/pallets/xcm-helper/src/weights.rs index 9c08dc11c..e1f6cdcdb 100644 --- a/pallets/xcm-helper/src/weights.rs +++ b/pallets/xcm-helper/src/weights.rs @@ -1,40 +1,25 @@ -// This file is part of Polkadex. - -// Copyright (C) 2020-2023 Polkadex oü. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - //! Autogenerated weights for `xcm_helper` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-28, STEPS: `100`, REPEAT: `200`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `150`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Ubuntu-2204-jammy-amd64-base`, CPU: `Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `ip-172-31-41-122`, CPU: `AMD EPYC 7571` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: -// ./polkadex-node +// ./parachain-polkadex-node // benchmark // pallet // --pallet -// xcm_helper +// xcm-helper // --steps // 100 // --repeat -// 200 +// 150 // --extrinsic // * // --output -// xcm_helper_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,60 +32,58 @@ use core::marker::PhantomData; /// Weight functions for `xcm_helper`. pub struct WeightInfo(PhantomData); impl crate::XcmHelperWeightInfo for WeightInfo { - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: XcmHelper ParachainAssets (r:1 w:1) - /// Proof Skipped: XcmHelper ParachainAssets (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmHelper WhitelistedTokens (r:1 w:1) - /// Proof Skipped: XcmHelper WhitelistedTokens (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Assets Asset (r:1 w:1) - /// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn whitelist_token(_b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `147` - // Estimated: `3687` - // Minimum execution time: 17_028_000 picoseconds. - Weight::from_parts(17_753_020, 0) - .saturating_add(Weight::from_parts(0, 3687)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: XcmHelper ParachainAssets (r:1 w:0) - /// Proof Skipped: XcmHelper ParachainAssets (max_values: None, max_size: None, mode: Measured) - /// Storage: XcmHelper WhitelistedTokens (r:1 w:1) - /// Proof Skipped: XcmHelper WhitelistedTokens (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn remove_whitelisted_token(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `225` - // Estimated: `3690` - // Minimum execution time: 13_237_000 picoseconds. - Weight::from_parts(13_862_195, 0) - .saturating_add(Weight::from_parts(0, 3690)) - // Standard Error: 1 - .saturating_add(Weight::from_parts(12, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// The range of component `b` is `[1, 1000]`. - /// The range of component `b` is `[1, 1000]`. - fn transfer_fee(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `226` - // Estimated: `6196` - // Minimum execution time: 25_031_000 picoseconds. - Weight::from_parts(26_785_061, 0) - .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(364, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XcmHelper::ParachainAssets` (r:1 w:1) + /// Proof: `XcmHelper::ParachainAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmHelper::WhitelistedTokens` (r:1 w:1) + /// Proof: `XcmHelper::WhitelistedTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(222), added: 2697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn whitelist_token(_b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `147` + // Estimated: `3687` + // Minimum execution time: 79_121_000 picoseconds. + Weight::from_parts(81_357_770, 0) + .saturating_add(Weight::from_parts(0, 3687)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XcmHelper::ParachainAssets` (r:1 w:0) + /// Proof: `XcmHelper::ParachainAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `XcmHelper::WhitelistedTokens` (r:1 w:1) + /// Proof: `XcmHelper::WhitelistedTokens` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn remove_whitelisted_token(_b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `225` + // Estimated: `3690` + // Minimum execution time: 53_080_000 picoseconds. + Weight::from_parts(54_785_415, 0) + .saturating_add(Weight::from_parts(0, 3690)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 1000]`. + /// The range of component `b` is `[1, 1000]`. + fn transfer_fee(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `226` + // Estimated: `6196` + // Minimum execution time: 162_721_000 picoseconds. + Weight::from_parts(168_625_125, 0) + .saturating_add(Weight::from_parts(0, 6196)) + // Standard Error: 49 + .saturating_add(Weight::from_parts(1_048, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } } From 418098b35d48f992ce8041d70abf0c7ae21847d1 Mon Sep 17 00:00:00 2001 From: Gautham Date: Wed, 1 Nov 2023 11:03:15 +0530 Subject: [PATCH 51/51] Cargo update --- Cargo.lock | 1263 +++++++++++++++++++++++++++------------------------- 1 file changed, 650 insertions(+), 613 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e3d5568c3..d447be3e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -149,9 +149,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom 0.2.10", "once_cell", @@ -160,21 +160,22 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", "getrandom 0.2.10", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -217,9 +218,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -231,15 +232,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -255,9 +256,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -602,9 +603,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f2db9467baa66a700abce2a18c5ad793f6f83310aca1284796fc3921d113fd" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" dependencies = [ "async-lock", "async-task", @@ -639,11 +640,31 @@ dependencies = [ "futures-lite", "log", "parking", - "polling", - "rustix 0.37.23", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10da8f3146014722c89e7859e1d7bb97873125d7346d10ca642ffab794355828" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling 3.3.0", + "rustix 0.38.21", "slab", - "socket2 0.4.9", + "tracing", "waker-fn", + "windows-sys 0.48.0", ] [[package]] @@ -661,25 +682,25 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" dependencies = [ - "async-io", + "async-io 1.13.0", "blocking", "futures-lite", ] [[package]] name = "async-process" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf012553ce51eb7aa6dc2143804cc8252bd1cb681a1c5cb7fa94ca88682dee1d" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ - "async-io", + "async-io 1.13.0", "async-lock", "async-signal", "blocking", "cfg-if", - "event-listener 3.0.0", + "event-listener 3.0.1", "futures-lite", - "rustix 0.38.14", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -691,23 +712,22 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "async-signal" -version = "0.2.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4af361a844928cb7d36590d406709473a1b574f443094422ef166daa3b493208" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io", + "async-io 2.1.0", "async-lock", "atomic-waker", "cfg-if", - "concurrent-queue", "futures-core", "futures-io", - "libc", + "rustix 0.38.21", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -715,19 +735,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.1" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -805,7 +825,7 @@ dependencies = [ "rand_chacha 0.3.1", "rand_core 0.6.4", "ring 0.1.0", - "sha2 0.10.7", + "sha2 0.10.8", "zeroize", ] @@ -835,9 +855,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.4" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -890,7 +910,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -916,9 +936,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -1043,9 +1063,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c4ef1f913d78636d78d538eec1f18de81e481f44b1be0a81060090530846e1" +checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" dependencies = [ "async-channel", "async-lock", @@ -1104,9 +1124,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ "log", "parity-scale-codec", @@ -1140,9 +1160,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.6.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" +checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" dependencies = [ "memchr", "serde", @@ -1205,9 +1225,9 @@ checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -1237,9 +1257,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" dependencies = [ "serde", ] @@ -1252,7 +1272,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.19", + "semver 1.0.20", "serde", "serde_json", "thiserror", @@ -1438,9 +1458,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.5" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824956d0dca8334758a5b7f7e50518d66ea319330cbceedcf76905c2f6ab30e3" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", @@ -1448,9 +1468,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.5" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122ec64120a49b4563ccaedcbea7818d069ed8e9aa6d829b82d8a4128936b2ab" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -1460,27 +1480,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "coarsetime" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99280f81a35511dda7d44f7c943491b41d3ac6fd0b54aea92498bec8612a2423" +checksum = "a73ef0d00d14301df35d0f13f5ea32344de6b00837485c358458f1e7f2d27db4" dependencies = [ "libc", "once_cell", @@ -1527,12 +1547,12 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "7.0.1" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] @@ -1586,23 +1606,21 @@ checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "const-random" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" dependencies = [ "const-random-macro", - "proc-macro-hack", ] [[package]] name = "const-random-macro" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ "getrandom 0.2.10", "once_cell", - "proc-macro-hack", "tiny-keccak", ] @@ -1670,9 +1688,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1786,9 +1804,9 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "4939f9ed1444bd8c896d37f3090012fa6e7834fe84ef8c9daa166109515732f9" [[package]] name = "crc32fast" @@ -1846,7 +1864,7 @@ dependencies = [ name = "crowdloan-verifier" version = "0.1.0" dependencies = [ - "clap 4.4.5", + "clap 4.4.7", "csv", "pallet-rewards", "polkadex-primitives", @@ -1917,9 +1935,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ "csv-core", "itoa", @@ -1929,9 +1947,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" dependencies = [ "memchr", ] @@ -1959,7 +1977,7 @@ name = "cumulus-client-cli" version = "0.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.5", + "clap 4.4.7", "parity-scale-codec", "sc-chain-spec", "sc-cli", @@ -1978,7 +1996,7 @@ dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", @@ -2006,7 +2024,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -2045,7 +2063,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "dyn-clone", - "futures 0.3.28", + "futures 0.3.29", "log", "parity-scale-codec", "polkadot-primitives", @@ -2086,7 +2104,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "async-trait", "cumulus-relay-chain-interface", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "parity-scale-codec", "parking_lot 0.12.1", @@ -2110,7 +2128,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "parity-scale-codec", "polkadot-node-primitives", @@ -2140,7 +2158,7 @@ dependencies = [ "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", - "futures 0.3.28", + "futures 0.3.29", "polkadot-primitives", "sc-client-api", "sc-consensus", @@ -2234,7 +2252,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2348,7 +2366,7 @@ version = "0.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cumulus-primitives-core", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "sp-inherents", "sp-std", @@ -2381,7 +2399,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "polkadot-cli", "polkadot-service", @@ -2404,7 +2422,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "async-trait", "cumulus-primitives-core", - "futures 0.3.28", + "futures 0.3.29", "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", @@ -2425,7 +2443,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", - "futures 0.3.28", + "futures 0.3.29", "polkadot-availability-recovery", "polkadot-collator-protocol", "polkadot-core-primitives", @@ -2459,7 +2477,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "either", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "jsonrpsee", "parity-scale-codec", @@ -2547,13 +2565,13 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2571,9 +2589,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.107" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe98ba1789d56fb3db3bee5e032774d4f421b685de7ba703643584ba24effbe" +checksum = "7129e341034ecb940c9072817cd9007974ea696844fc4dd582dc1653a7fbe2e8" dependencies = [ "cc", "cxxbridge-flags", @@ -2583,9 +2601,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.107" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ce20f6b8433da4841b1dadfb9468709868022d829d5ca1f2ffbda928455ea3" +checksum = "a2a24f3f5f8eed71936f21e570436f024f5c2e25628f7496aa7ccd03b90109d5" dependencies = [ "cc", "codespan-reporting", @@ -2593,24 +2611,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "cxxbridge-flags" -version = "1.0.107" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20888d9e1d2298e2ff473cee30efe7d5036e437857ab68bbfea84c74dba91da2" +checksum = "06fdd177fc61050d63f67f5bd6351fac6ab5526694ea8e359cd9cd3b75857f44" [[package]] name = "cxxbridge-macro" -version = "1.0.107" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" +checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2658,7 +2676,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2680,7 +2698,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2760,10 +2778,11 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ + "powerfmt", "serde", ] @@ -2924,7 +2943,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2946,18 +2965,18 @@ dependencies = [ [[package]] name = "docify" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee528c501ddd15d5181997e9518e59024844eac44fd1e40cb20ddb2a8562fa" +checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca01728ab2679c464242eca99f94e2ce0514b52ac9ad950e2ed03fca991231c" +checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" dependencies = [ "common-path", "derive-syn-parse", @@ -2965,7 +2984,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.37", + "syn 2.0.38", "termcolor", "toml 0.7.8", "walkdir", @@ -3036,7 +3055,7 @@ checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der 0.7.8", "digest 0.10.7", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "rfc6979 0.4.0", "signature 2.1.0", "spki 0.7.2", @@ -3044,9 +3063,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8 0.10.2", "signature 2.1.0", @@ -3062,7 +3081,7 @@ dependencies = [ "ed25519", "rand_core 0.6.4", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "zeroize", ] @@ -3088,10 +3107,10 @@ checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ "curve25519-dalek 4.1.1", "ed25519", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "hex", "rand_core 0.6.4", - "sha2 0.10.7", + "sha2 0.10.8", "zeroize", ] @@ -3125,9 +3144,9 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct 0.2.0", "crypto-bigint 0.5.3", @@ -3177,7 +3196,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3188,7 +3207,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3231,25 +3250,14 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -3258,9 +3266,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" dependencies = [ "concurrent-queue", "parking", @@ -3273,7 +3281,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", ] [[package]] @@ -3310,7 +3318,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3397,7 +3405,7 @@ dependencies = [ [[package]] name = "fflonk" version = "0.1.0" -source = "git+https://github.com/w3f/fflonk#26a5045b24e169cffc1f9328ca83d71061145c40" +source = "git+https://github.com/w3f/fflonk#e141d4b6f42fb481aefe1b479788694945b6940d" dependencies = [ "ark-ec", "ark-ff", @@ -3409,9 +3417,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" +checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" [[package]] name = "file-per-thread-logger" @@ -3442,7 +3450,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ "either", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "log", "num-traits", @@ -3471,9 +3479,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-sys", @@ -3551,7 +3559,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.4.5", + "clap 4.4.7", "comfy-table", "frame-benchmarking", "frame-support", @@ -3599,7 +3607,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3655,7 +3663,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-recursion", - "futures 0.3.28", + "futures 0.3.29", "indicatif", "jsonrpsee", "log", @@ -3726,7 +3734,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3738,7 +3746,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3748,7 +3756,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3828,7 +3836,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.14", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -3846,9 +3854,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -3861,9 +3869,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -3871,15 +3879,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -3889,9 +3897,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" @@ -3910,13 +3918,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3927,20 +3935,20 @@ checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", "rustls 0.20.9", - "webpki 0.22.1", + "webpki 0.22.4", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -3950,9 +3958,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures 0.1.31", "futures-channel", @@ -4160,7 +4168,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -4169,16 +4177,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "allocator-api2", "serde", ] @@ -4363,7 +4371,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -4372,33 +4380,33 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http", "hyper", "log", - "rustls 0.21.7", + "rustls 0.21.8", "rustls-native-certs", "tokio", "tokio-rustls", - "webpki-roots 0.23.1", + "webpki-roots 0.25.2", ] [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -4449,21 +4457,21 @@ dependencies = [ [[package]] name = "if-watch" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" +checksum = "bbb892e5777fe09e16f3d44de7802f4daa7267ecbe8c466f19d94e25bb0c303e" dependencies = [ - "async-io", + "async-io 1.13.0", "core-foundation", "fnv", - "futures 0.3.28", + "futures 0.3.29", "if-addrs", "ipnet", "log", "rtnetlink", "system-configuration", "tokio", - "windows 0.34.0", + "windows", ] [[package]] @@ -4527,12 +4535,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.2", ] [[package]] @@ -4629,7 +4637,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.4", + "socket2 0.5.5", "widestring", "windows-sys 0.48.0", "winreg", @@ -4637,9 +4645,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" @@ -4648,7 +4656,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.14", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -4687,9 +4695,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] @@ -4855,9 +4863,9 @@ checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "elliptic-curve 0.13.6", "once_cell", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -4944,9 +4952,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libloading" @@ -4960,9 +4968,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libp2p" @@ -4971,7 +4979,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "getrandom 0.2.10", "instant", @@ -5030,7 +5038,7 @@ checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ "either", "fnv", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "instant", "libp2p-identity", @@ -5056,7 +5064,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "libp2p-core", "log", "parking_lot 0.12.1", @@ -5072,7 +5080,7 @@ checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", "either", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "libp2p-core", "libp2p-identity", @@ -5099,7 +5107,7 @@ dependencies = [ "multihash", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "zeroize", ] @@ -5115,7 +5123,7 @@ dependencies = [ "bytes", "either", "fnv", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "instant", "libp2p-core", @@ -5124,7 +5132,7 @@ dependencies = [ "log", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "smallvec", "thiserror", "uint", @@ -5139,7 +5147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", - "futures 0.3.28", + "futures 0.3.29", "if-watch", "libp2p-core", "libp2p-identity", @@ -5147,7 +5155,7 @@ dependencies = [ "log", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "trust-dns-proto", "void", @@ -5175,14 +5183,14 @@ checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", - "futures 0.3.28", + "futures 0.3.29", "libp2p-core", "libp2p-identity", "log", "once_cell", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "snow", "static_assertions", "thiserror", @@ -5197,7 +5205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ "either", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "instant", "libp2p-core", @@ -5214,7 +5222,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "if-watch", "libp2p-core", @@ -5236,7 +5244,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "instant", "libp2p-core", "libp2p-identity", @@ -5253,7 +5261,7 @@ checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "instant", "libp2p-core", @@ -5283,13 +5291,13 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "if-watch", "libc", "libp2p-core", "log", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", ] @@ -5299,7 +5307,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "futures-rustls", "libp2p-core", "libp2p-identity", @@ -5307,7 +5315,7 @@ dependencies = [ "ring 0.16.20", "rustls 0.20.9", "thiserror", - "webpki 0.22.1", + "webpki 0.22.4", "x509-parser 0.14.0", "yasna", ] @@ -5318,7 +5326,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -5335,7 +5343,7 @@ dependencies = [ "async-trait", "asynchronous-codec", "bytes", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "hex", "if-watch", @@ -5364,7 +5372,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", - "futures 0.3.28", + "futures 0.3.29", "futures-rustls", "libp2p-core", "log", @@ -5382,7 +5390,7 @@ version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "libp2p-core", "log", "thiserror", @@ -5510,9 +5518,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "liquidity" @@ -5549,9 +5557,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -5625,7 +5633,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -5639,18 +5647,18 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -5661,7 +5669,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -5713,9 +5721,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memfd" @@ -5723,7 +5731,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.14", + "rustix 0.38.21", ] [[package]] @@ -5801,7 +5809,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "rand 0.8.5", "thrift", ] @@ -5823,9 +5831,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5837,7 +5845,7 @@ name = "mmr-gadget" version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "log", "parity-scale-codec", "sc-client-api", @@ -5936,7 +5944,7 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "unsigned-varint", ] @@ -5968,7 +5976,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.29", "log", "pin-project", "smallvec", @@ -6062,7 +6070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.29", "log", "netlink-packet-core", "netlink-sys", @@ -6077,7 +6085,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.29", "libc", "log", "tokio", @@ -6269,9 +6277,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -6363,7 +6371,7 @@ checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" dependencies = [ "async-trait", "dyn-clonable", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "orchestra-proc-macro", "pin-project", @@ -6511,7 +6519,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -6522,7 +6530,7 @@ checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -6873,7 +6881,7 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] @@ -7488,7 +7496,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -7762,7 +7770,7 @@ dependencies = [ name = "parachain-polkadex-node" version = "1.0.0" dependencies = [ - "clap 4.4.5", + "clap 4.4.7", "color-print", "cumulus-client-cli", "cumulus-client-collator", @@ -7779,7 +7787,7 @@ dependencies = [ "cumulus-relay-chain-rpc-interface", "frame-benchmarking", "frame-benchmarking-cli", - "futures 0.3.28", + "futures 0.3.29", "hex-literal 0.3.4", "jsonrpsee", "log", @@ -7896,9 +7904,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab512a34b3c2c5e465731cc7668edf79208bbe520be03484eeb05e63ed221735" +checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" dependencies = [ "blake2", "crc32fast", @@ -7955,9 +7963,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -7977,7 +7985,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -7996,13 +8004,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -8094,9 +8102,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" dependencies = [ "memchr", "thiserror", @@ -8105,9 +8113,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8" +checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" dependencies = [ "pest", "pest_generator", @@ -8115,26 +8123,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a" +checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "pest_meta" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d" +checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" dependencies = [ "once_cell", "pest", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -8144,7 +8152,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.1.0", ] [[package]] @@ -8164,7 +8172,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -8248,12 +8256,12 @@ dependencies = [ name = "polkadex-node" version = "5.3.0" dependencies = [ - "clap 4.4.5", + "clap 4.4.7", "frame-benchmarking-cli", "frame-support", "frame-system", "frame-try-runtime", - "futures 0.3.28", + "futures 0.3.29", "hex-literal 0.4.1", "itertools 0.10.5", "jsonrpsee", @@ -8347,7 +8355,7 @@ name = "polkadot-approval-distribution" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "polkadot-node-jaeger", "polkadot-node-metrics", @@ -8366,7 +8374,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "always-assert", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -8383,7 +8391,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "derive_more", "fatality", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -8405,7 +8413,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fatality", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -8425,9 +8433,9 @@ name = "polkadot-cli" version = "1.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.5", + "clap 4.4.7", "frame-benchmarking-cli", - "futures 0.3.28", + "futures 0.3.29", "log", "polkadot-node-metrics", "polkadot-performance-test", @@ -8454,7 +8462,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -8488,7 +8496,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "derive_more", "fatality", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "indexmap 1.9.3", "parity-scale-codec", @@ -8525,7 +8533,7 @@ name = "polkadot-gossip-support" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -8550,7 +8558,7 @@ dependencies = [ "async-trait", "bytes", "fatality", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-metrics", @@ -8569,7 +8577,7 @@ name = "polkadot-node-collation-generation" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-primitives", @@ -8589,7 +8597,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "bitvec", "derive_more", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "kvdb", "merlin 2.0.1", @@ -8617,7 +8625,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bitvec", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "kvdb", "parity-scale-codec", @@ -8640,7 +8648,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.29", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -8657,7 +8665,7 @@ name = "polkadot-node-core-bitfield-signing" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", @@ -8673,7 +8681,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "parity-scale-codec", "polkadot-node-core-pvf", @@ -8693,7 +8701,7 @@ name = "polkadot-node-core-chain-api" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-primitives", @@ -8708,7 +8716,7 @@ name = "polkadot-node-core-chain-selection" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "kvdb", "parity-scale-codec", @@ -8726,7 +8734,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fatality", - "futures 0.3.28", + "futures 0.3.29", "kvdb", "parity-scale-codec", "polkadot-node-primitives", @@ -8745,7 +8753,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", @@ -8763,7 +8771,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -8780,7 +8788,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -8796,7 +8804,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "always-assert", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "libc", "parity-scale-codec", @@ -8823,7 +8831,7 @@ name = "polkadot-node-core-pvf-checker" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -8840,7 +8848,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "cpu-time", - "futures 0.3.28", + "futures 0.3.29", "landlock", "libc", "parity-scale-codec", @@ -8862,7 +8870,7 @@ name = "polkadot-node-core-pvf-prepare-worker" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "libc", "parity-scale-codec", "polkadot-node-core-pvf-common", @@ -8885,7 +8893,7 @@ name = "polkadot-node-core-runtime-api" version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-node-subsystem-types", @@ -8919,7 +8927,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bs58 0.5.0", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "log", "parity-scale-codec", @@ -8942,7 +8950,7 @@ dependencies = [ "bitvec", "derive_more", "fatality", - "futures 0.3.28", + "futures 0.3.29", "hex", "parity-scale-codec", "polkadot-node-jaeger", @@ -8951,7 +8959,7 @@ dependencies = [ "rand 0.8.5", "sc-authority-discovery", "sc-network", - "strum", + "strum 0.24.1", "thiserror", "tracing-gum", ] @@ -8962,7 +8970,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "bounded-vec", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", @@ -8995,7 +9003,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "async-trait", "derive_more", - "futures 0.3.28", + "futures 0.3.29", "orchestra", "polkadot-node-jaeger", "polkadot-node-network-protocol", @@ -9020,7 +9028,7 @@ dependencies = [ "async-trait", "derive_more", "fatality", - "futures 0.3.28", + "futures 0.3.29", "futures-channel", "itertools 0.10.5", "kvdb", @@ -9051,7 +9059,7 @@ version = "1.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "orchestra", "parking_lot 0.12.1", @@ -9388,7 +9396,7 @@ dependencies = [ "frame-support", "frame-system", "frame-system-rpc-runtime-api", - "futures 0.3.28", + "futures 0.3.29", "hex-literal 0.4.1", "is_executable", "kvdb", @@ -9504,7 +9512,7 @@ dependencies = [ "arrayvec 0.7.4", "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "indexmap 1.9.3", "parity-scale-codec", @@ -9546,6 +9554,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite 0.2.13", + "rustix 0.38.21", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "poly1305" version = "0.7.2" @@ -9594,9 +9616,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.4.3" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" +checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" @@ -9661,14 +9689,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -9686,7 +9714,7 @@ dependencies = [ "coarsetime", "crossbeam-queue", "derive_more", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "nanorand", "thiserror", @@ -9736,12 +9764,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro-warning" version = "0.4.2" @@ -9750,14 +9772,14 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -9796,7 +9818,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -9923,9 +9945,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", "rand 0.8.5", @@ -9936,7 +9958,7 @@ dependencies = [ "thiserror", "tinyvec", "tracing", - "webpki 0.22.1", + "webpki 0.22.4", ] [[package]] @@ -10103,6 +10125,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -10144,7 +10175,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -10161,14 +10192,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.8", - "regex-syntax 0.7.5", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -10182,13 +10213,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", ] [[package]] @@ -10199,9 +10230,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rend" @@ -10268,11 +10299,25 @@ dependencies = [ "libc", "once_cell", "spin 0.5.2", - "untrusted", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +dependencies = [ + "cc", + "getrandom 0.2.10", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rkyv" version = "0.7.42" @@ -10468,7 +10513,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "log", "netlink-packet-route", "netlink-proto", @@ -10545,7 +10590,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.19", + "semver 1.0.20", ] [[package]] @@ -10559,9 +10604,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.15" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", "errno", @@ -10573,9 +10618,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", @@ -10587,14 +10632,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.14" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.7", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] @@ -10619,20 +10664,20 @@ checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring 0.16.20", - "sct 0.7.0", - "webpki 0.22.1", + "sct 0.7.1", + "webpki 0.22.4", ] [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring 0.16.20", - "rustls-webpki 0.101.6", - "sct 0.7.0", + "ring 0.17.5", + "rustls-webpki", + "sct 0.7.1", ] [[package]] @@ -10653,27 +10698,17 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.100.3" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.16.20", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" -dependencies = [ - "ring 0.16.20", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -10699,7 +10734,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "pin-project", "static_assertions", ] @@ -10745,7 +10780,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "ip_network", "libp2p", @@ -10772,7 +10807,7 @@ name = "sc-basic-authorship" version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "log", "parity-scale-codec", @@ -10832,7 +10867,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -10842,9 +10877,9 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "array-bytes", "chrono", - "clap 4.4.5", + "clap 4.4.7", "fdlimit", - "futures 0.3.28", + "futures 0.3.29", "libp2p-identity", "log", "names", @@ -10880,7 +10915,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "fnv", - "futures 0.3.28", + "futures 0.3.29", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -10932,7 +10967,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "libp2p-identity", "log", @@ -10957,7 +10992,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "log", "parity-scale-codec", "sc-block-builder", @@ -10987,7 +11022,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "async-trait", "fork-tree", - "futures 0.3.28", + "futures 0.3.29", "log", "num-bigint", "num-rational", @@ -11021,7 +11056,7 @@ name = "sc-consensus-babe-rpc" version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -11047,7 +11082,7 @@ dependencies = [ "async-channel", "async-trait", "fnv", - "futures 0.3.28", + "futures 0.3.29", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11077,7 +11112,7 @@ name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "jsonrpsee", "log", "parity-scale-codec", @@ -11109,13 +11144,13 @@ name = "sc-consensus-grandpa" version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "log", "parity-scale-codec", @@ -11151,7 +11186,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "finality-grandpa", - "futures 0.3.28", + "futures 0.3.29", "jsonrpsee", "log", "parity-scale-codec", @@ -11171,7 +11206,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "log", "parity-scale-codec", @@ -11231,7 +11266,7 @@ dependencies = [ "cfg-if", "libc", "log", - "rustix 0.36.15", + "rustix 0.36.17", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -11245,7 +11280,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "ansi_term", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "log", "sc-client-api", @@ -11281,7 +11316,7 @@ dependencies = [ "bytes", "either", "fnv", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "ip_network", "libp2p", @@ -11317,7 +11352,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "async-channel", "cid", - "futures 0.3.28", + "futures 0.3.29", "libp2p-identity", "log", "prost", @@ -11337,7 +11372,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "async-trait", "bitflags 1.3.2", - "futures 0.3.28", + "futures 0.3.29", "libp2p-identity", "parity-scale-codec", "prost-build", @@ -11352,8 +11387,8 @@ name = "sc-network-gossip" version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "ahash 0.8.3", - "futures 0.3.28", + "ahash 0.8.6", + "futures 0.3.29", "futures-timer", "libp2p", "log", @@ -11372,7 +11407,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "array-bytes", "async-channel", - "futures 0.3.28", + "futures 0.3.29", "libp2p-identity", "log", "parity-scale-codec", @@ -11393,7 +11428,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "array-bytes", "async-channel", - "futures 0.3.28", + "futures 0.3.29", "libp2p", "log", "parity-scale-codec", @@ -11413,7 +11448,7 @@ dependencies = [ "async-channel", "async-trait", "fork-tree", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "libp2p", "log", @@ -11444,7 +11479,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", - "futures 0.3.28", + "futures 0.3.29", "libp2p", "log", "parity-scale-codec", @@ -11464,7 +11499,7 @@ dependencies = [ "array-bytes", "bytes", "fnv", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "hyper", "hyper-rustls", @@ -11504,7 +11539,7 @@ name = "sc-rpc" version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "jsonrpsee", "log", "parity-scale-codec", @@ -11570,7 +11605,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "array-bytes", - "futures 0.3.28", + "futures 0.3.29", "futures-util", "hex", "jsonrpsee", @@ -11600,7 +11635,7 @@ dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "jsonrpsee", "log", @@ -11664,7 +11699,7 @@ dependencies = [ "array-bytes", "async-channel", "fdlimit", - "futures 0.3.28", + "futures 0.3.29", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11728,7 +11763,7 @@ name = "sc-storage-monitor" version = "0.1.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.5", + "clap 4.4.7", "fs4", "log", "sc-client-db", @@ -11761,7 +11796,7 @@ name = "sc-sysinfo" version = "6.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "libc", "log", "rand 0.8.5", @@ -11781,7 +11816,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "chrono", - "futures 0.3.28", + "futures 0.3.29", "libp2p", "log", "parking_lot 0.12.1", @@ -11831,7 +11866,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -11840,7 +11875,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "linked-hash-map", "log", @@ -11866,7 +11901,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "log", "parity-scale-codec", "serde", @@ -11882,7 +11917,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-channel", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "lazy_static", "log", @@ -11893,9 +11928,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -11907,9 +11942,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -11932,7 +11967,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "cfg-if", "hashbrown 0.13.2", ] @@ -11990,17 +12025,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ "ring 0.16.20", - "untrusted", + "untrusted 0.7.1", ] [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.16.20", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -12110,9 +12145,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -12125,29 +12160,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -12156,9 +12191,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -12188,7 +12223,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12242,9 +12277,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -12263,9 +12298,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -12381,7 +12416,7 @@ dependencies = [ "async-channel", "async-executor", "async-fs", - "async-io", + "async-io 1.13.0", "async-lock", "async-net", "async-process", @@ -12398,7 +12433,7 @@ dependencies = [ "arrayvec 0.7.4", "async-lock", "atomic-take", - "base64 0.21.4", + "base64 0.21.5", "bip39", "blake2-rfc", "bs58 0.5.0", @@ -12411,7 +12446,7 @@ dependencies = [ "fnv", "futures-lite", "futures-util", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "hex", "hmac 0.12.1", "itertools 0.11.0", @@ -12431,7 +12466,7 @@ dependencies = [ "schnorrkel 0.10.2", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "siphasher", "slab", @@ -12451,7 +12486,7 @@ checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" dependencies = [ "async-channel", "async-lock", - "base64 0.21.4", + "base64 0.21.5", "blake2-rfc", "derive_more", "either", @@ -12460,7 +12495,7 @@ dependencies = [ "futures-channel", "futures-lite", "futures-util", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "hex", "itertools 0.11.0", "log", @@ -12498,15 +12533,15 @@ dependencies = [ "rand_core 0.6.4", "ring 0.16.20", "rustc_version", - "sha2 0.10.7", + "sha2 0.10.8", "subtle", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -12514,9 +12549,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys 0.48.0", @@ -12531,7 +12566,7 @@ dependencies = [ "base64 0.13.1", "bytes", "flate2", - "futures 0.3.28", + "futures 0.3.29", "http", "httparse", "log", @@ -12571,7 +12606,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12630,7 +12665,7 @@ name = "sp-blockchain" version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -12649,7 +12684,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.29", "log", "sp-core", "sp-inherents", @@ -12710,7 +12745,7 @@ dependencies = [ "sp-mmr-primitives", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[package]] @@ -12757,7 +12792,7 @@ dependencies = [ "bs58 0.5.0", "dyn-clonable", "ed25519-zebra 3.1.0", - "futures 0.3.28", + "futures 0.3.29", "hash-db", "hash256-std-hasher", "impl-serde", @@ -12798,7 +12833,7 @@ dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "twox-hash", ] @@ -12810,7 +12845,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12829,7 +12864,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -12900,7 +12935,7 @@ dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] @@ -13046,7 +13081,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -13111,7 +13146,7 @@ dependencies = [ "parity-scale-codec", "rand 0.8.5", "scale-info", - "sha2 0.10.7", + "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", @@ -13195,7 +13230,7 @@ name = "sp-trie" version = "22.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -13238,7 +13273,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -13289,7 +13324,7 @@ checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" dependencies = [ "lazy_static", "maplit", - "strum", + "strum 0.24.1", ] [[package]] @@ -13574,9 +13609,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" @@ -13590,6 +13631,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.38", +] + [[package]] name = "stun" version = "0.4.4" @@ -13611,9 +13665,9 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", @@ -13642,7 +13696,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.28", + "futures 0.3.29", "jsonrpsee", "log", "parity-scale-codec", @@ -13704,7 +13758,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "array-bytes", "async-trait", - "futures 0.3.28", + "futures 0.3.29", "parity-scale-codec", "sc-client-api", "sc-client-db", @@ -13771,7 +13825,7 @@ name = "substrate-test-runtime-client" version = "2.0.0" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -13795,7 +13849,7 @@ dependencies = [ "filetime", "parity-wasm", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", "toml 0.7.8", "walkdir", @@ -13836,9 +13890,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -13886,20 +13940,20 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tempfile" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall 0.3.5", - "rustix 0.38.14", + "redox_syscall 0.4.1", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -14058,9 +14112,9 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] @@ -14087,13 +14141,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -14157,12 +14211,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -14195,7 +14250,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -14238,9 +14293,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", @@ -14250,7 +14305,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.5.4", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] @@ -14263,7 +14318,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -14283,7 +14338,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.7", + "rustls 0.21.8", "tokio", ] @@ -14301,9 +14356,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -14337,9 +14392,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -14350,7 +14405,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -14374,7 +14429,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "bytes", "futures-core", "futures-util", @@ -14400,11 +14455,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite 0.2.13", "tracing-attributes", @@ -14413,20 +14467,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -14463,17 +14517,17 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -14550,7 +14604,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tinyvec", "tokio", @@ -14590,7 +14644,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ "async-trait", - "clap 4.4.5", + "clap 4.4.7", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -14634,7 +14688,7 @@ checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" dependencies = [ "async-trait", "base64 0.13.1", - "futures 0.3.28", + "futures 0.3.29", "log", "md-5", "rand 0.8.5", @@ -14758,6 +14812,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.4.1" @@ -14777,9 +14837,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "getrandom 0.2.10", ] @@ -14881,7 +14941,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -14915,7 +14975,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -14937,14 +14997,14 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.114.1" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d005a95f934878a1fb446a816d51c3601a0120ff929005ba3bab3c749cfd1c7" +checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -14953,9 +15013,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.1" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d04e240598162810fad3b2e96fa0dec6dba1eb65a03f3bd99a9248ab8b56caa" +checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" dependencies = [ "anyhow", "cxx", @@ -14965,9 +15025,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.1" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efd2aaca519d64098c4faefc8b7433a97ed511caf4c9e516384eb6aef1ff4f9" +checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" dependencies = [ "anyhow", "cc", @@ -14981,7 +15041,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -15084,14 +15144,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.4", + "base64 0.21.5", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.15", + "rustix 0.36.17", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "toml 0.5.11", "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", @@ -15185,7 +15245,7 @@ checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ "object 0.30.4", "once_cell", - "rustix 0.36.15", + "rustix 0.36.17", ] [[package]] @@ -15216,7 +15276,7 @@ dependencies = [ "memoffset 0.8.0", "paste", "rand 0.8.5", - "rustix 0.36.15", + "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -15252,17 +15312,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ "ring 0.16.20", - "untrusted", + "untrusted 0.7.1", ] [[package]] name = "webpki" -version = "0.22.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.16.20", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -15271,16 +15331,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.1", -] - -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.3", + "webpki 0.22.4", ] [[package]] @@ -15312,7 +15363,7 @@ dependencies = [ "sdp", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "stun", "thiserror", "time", @@ -15374,7 +15425,7 @@ dependencies = [ "sec1 0.3.0", "serde", "sha1", - "sha2 0.10.7", + "sha2 0.10.8", "signature 1.6.4", "subtle", "thiserror", @@ -15416,7 +15467,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" dependencies = [ "log", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tokio", "webrtc-util", @@ -15619,14 +15670,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.14", + "rustix 0.38.21", ] [[package]] name = "wide" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" dependencies = [ "bytemuck", "safe_arch", @@ -15671,22 +15722,19 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.34.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows-core", + "windows-targets 0.48.5", ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets 0.48.5", ] @@ -15751,12 +15799,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -[[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -15769,12 +15811,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -[[package]] -name = "windows_i686_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -15787,12 +15823,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -[[package]] -name = "windows_i686_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -15805,12 +15835,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -[[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -15835,12 +15859,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -[[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -15855,9 +15873,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" dependencies = [ "memchr", ] @@ -15979,7 +15997,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -15988,7 +16006,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.28", + "futures 0.3.29", "log", "nohash-hasher", "parking_lot 0.12.1", @@ -16011,6 +16029,26 @@ dependencies = [ "time", ] +[[package]] +name = "zerocopy" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686b7e407015242119c33dab17b8f61ba6843534de936d94368856528eae4dcc" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020f3dfe25dfc38dfea49ce62d5d45ecdd7f0d8a724fa63eb36b6eba4ec76806" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "zeroize" version = "1.6.0" @@ -16028,7 +16066,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -16071,11 +16109,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ]