diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e2655632..ea6fa7872 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: with: mode: start github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN_REPO }} - ec2-image-id: ami-06de69a4185c962ed + ec2-image-id: ami-0ced994bdc615e5db # Ubuntu 22 with 500 GB volume ec2-instance-type: ${{ env.RUNNER_INSTANCE_TYPE }} subnet-id: subnet-a4d326e8 security-group-id: sg-078363c0f7b5f0b41 @@ -79,38 +79,48 @@ 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-runtime - run: cargo build --features try-runtime - - name: Runtime build - run: cargo build -p node-polkadex-runtime - - name: Build Project with runtime benchmarks - run: cargo build --features runtime-benchmarks - - name: Test weights generation + + - 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: Normal Build in release mode + + - 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 - run: cargo test --workspace + run: RUSTFLAGS="-D warnings" cargo test --workspace - name: Run Cargo Tarpaulin 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-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,17 +132,28 @@ 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 binaries as an artifact + - 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 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: parachain-polkadex-node + path: ./parachain-polkadex-node.zip + if-no-files-found: error stop-runner: name: Stop self-hosted EC2 runner needs: 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 diff --git a/.maintain/local-docker-test-network/docker-compose.yml b/.maintain/local-docker-test-network/docker-compose.yml index 32c9b0a9f..66d2f5436 100644 --- a/.maintain/local-docker-test-network/docker-compose.yml +++ b/.maintain/local-docker-test-network/docker-compose.yml @@ -33,7 +33,7 @@ # # 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/docker-compose.yml up` # 3. Connect to nodes: # - validator-a: localhost:9944 # - validator-b: localhost:9945 diff --git a/Cargo.lock b/Cargo.lock index c92dd1253..295676dc9 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", @@ -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,25 +160,38 @@ 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.0.4" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -205,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", @@ -219,15 +232,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +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", ] @@ -243,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", @@ -266,6 +279,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" @@ -273,10 +300,189 @@ 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-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" +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" @@ -290,6 +496,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" @@ -315,7 +530,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -331,7 +546,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -369,6 +584,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" @@ -376,10 +597,36 @@ 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.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "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" @@ -393,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]] @@ -406,29 +673,81 @@ 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.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" +dependencies = [ + "async-io 1.13.0", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.0.1", + "futures-lite", + "rustix 0.38.21", + "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.38", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.1.0", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.21", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] +[[package]] +name = "async-task" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +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.29", + "syn 2.0.38", ] [[package]] @@ -444,11 +763,17 @@ 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" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atty" @@ -478,10 +803,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 0.0.11", + "ark-serialize", + "ark-std", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring 0.1.0", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "base-x" version = "0.2.11" @@ -508,9 +855,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.3" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -530,7 +877,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", @@ -557,15 +904,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.38", +] + +[[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" @@ -574,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" @@ -600,32 +962,42 @@ dependencies = [ ] [[package]] -name = "blake2b_simd" -version = "1.0.1" +name = "blake2-rfc" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", ] [[package]] -name = "blake2s_simd" -version = "1.0.1" +name = "blake2b_simd" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" +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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", ] [[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", @@ -689,6 +1061,22 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "blocking" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "fastrand 2.0.1", + "futures-io", + "futures-lite", + "piper", + "tracing", +] + [[package]] name = "borsh" version = "0.10.3" @@ -736,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", @@ -746,17 +1134,35 @@ 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" 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.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" dependencies = [ "memchr", "serde", @@ -773,9 +1179,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" @@ -813,21 +1219,21 @@ 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" -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" -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" @@ -851,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", ] @@ -866,7 +1272,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.18", + "semver 1.0.20", "serde", "serde_json", "thiserror", @@ -904,9 +1310,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", ] @@ -935,6 +1341,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" @@ -942,37 +1359,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", ] @@ -1042,20 +1458,19 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d5f1946157a96594eb2d2c10eb7ad9a2b27518cb3000209dec700c35df9197d" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.4.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78116e32a042dd73c2901f0dc30790d20ff3447f3e3472fad359e8c3d282bcd6" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -1065,21 +1480,33 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.29", + "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 = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + +[[package]] +name = "coarsetime" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "a73ef0d00d14301df35d0f13f5ea32344de6b00837485c358458f1e7f2d27db4" +dependencies = [ + "libc", + "once_cell", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] [[package]] name = "codespan-reporting" @@ -1091,6 +1518,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" @@ -1099,20 +1547,40 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "merlin 3.0.0", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +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", ] @@ -1136,11 +1604,31 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +[[package]] +name = "const-random" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "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" @@ -1148,6 +1636,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,11 +1676,21 @@ 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" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1282,7 +1786,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -1300,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" @@ -1313,16 +1817,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" @@ -1347,6 +1841,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" @@ -1360,7 +1864,7 @@ dependencies = [ name = "crowdloan-verifier" version = "0.1.0" dependencies = [ - "clap 4.4.0", + "clap 4.4.7", "csv", "pallet-rewards", "polkadex-primitives", @@ -1388,9 +1892,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", @@ -1431,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", @@ -1443,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", ] @@ -1469,4753 +1973,7569 @@ 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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle", - "zeroize", + "clap 4.4.7", + "parity-scale-codec", + "sc-chain-spec", + "sc-cli", + "sc-client-api", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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.29", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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-aura", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "futures 0.3.29", + "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", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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.29", + "log", + "parity-scale-codec", + "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", ] [[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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.29", + "async-trait", + "cumulus-relay-chain-interface", + "futures 0.3.29", + "futures-timer", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadot-node-primitives", + "polkadot-parachain-primitives", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures 0.3.29", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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.29", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", + "cumulus-pallet-parachain-system", + "frame-support", + "frame-system", + "pallet-aura", + "pallet-timestamp", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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", + "staging-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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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-primitives", + "scale-info", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", + "staging-xcm", + "trie-db", ] [[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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "fnv", - "ident_case", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.29", + "syn 2.0.38", ] [[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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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", + "staging-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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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", + "staging-xcm", + "staging-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-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "data-encoding", - "syn 1.0.109", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-primitives", + "sp-api", + "sp-consensus-aura", + "sp-runtime", + "sp-std", ] [[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +name = "cumulus-primitives-core" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", + "sp-trie", + "staging-xcm", ] [[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +name = "cumulus-primitives-parachain-inherent" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "const-oid", - "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-parser" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +name = "cumulus-primitives-timestamp" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", + "cumulus-primitives-core", + "futures 0.3.29", + "parity-scale-codec", + "sp-inherents", + "sp-std", + "sp-timestamp", ] [[package]] -name = "der-parser" -version = "8.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +name = "cumulus-primitives-utility" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "asn1-rs 0.5.2", - "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", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] -name = "deranged" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +name = "cumulus-relay-chain-inprocess-interface" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "serde", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures 0.3.29", + "futures-timer", + "polkadot-cli", + "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 = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +name = "cumulus-relay-chain-interface" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "async-trait", + "cumulus-primitives-core", + "futures 0.3.29", + "jsonrpsee-core", + "parity-scale-codec", + "polkadot-overseer", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-state-machine", + "thiserror", ] [[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-minimal-node" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "array-bytes", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-rpc-interface", + "futures 0.3.29", + "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-network", + "sc-network-common", + "sc-service", + "sc-tracing", + "sc-utils", + "schnellru", + "sp-api", + "sp-consensus", + "sp-consensus-babe", + "sp-runtime", + "tracing", ] [[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +name = "cumulus-relay-chain-rpc-interface" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "derive_builder_macro", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "either", + "futures 0.3.29", + "futures-timer", + "jsonrpsee", + "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", ] [[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +name = "cumulus-test-relay-sproof-builder" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "darling 0.14.4", - "proc-macro2", - "quote", - "syn 1.0.109", + "cumulus-primitives-core", + "parity-scale-codec", + "polkadot-primitives", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", ] [[package]] -name = "derive_builder_macro" -version = "0.11.2" +name = "curve25519-dalek" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" dependencies = [ - "derive_builder_core", - "syn 1.0.109", + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle", + "zeroize", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "curve25519-dalek" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", ] [[package]] -name = "diff" -version = "0.1.13" +name = "curve25519-dalek" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms 3.1.2", + "rustc_version", + "subtle", + "zeroize", +] [[package]] -name = "difflib" -version = "0.4.0" +name = "curve25519-dalek-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] [[package]] -name = "digest" -version = "0.8.1" +name = "curve25519-dalek-ng" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" dependencies = [ - "generic-array 0.12.4", + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] [[package]] -name = "digest" -version = "0.9.0" +name = "cxx" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "7129e341034ecb940c9072817cd9007974ea696844fc4dd582dc1653a7fbe2e8" dependencies = [ - "generic-array 0.14.7", + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", ] [[package]] -name = "digest" -version = "0.10.7" +name = "cxx-build" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "a2a24f3f5f8eed71936f21e570436f024f5c2e25628f7496aa7ccd03b90109d5" dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn 2.0.38", ] [[package]] -name = "directories" -version = "4.0.1" +name = "cxxbridge-flags" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" -dependencies = [ - "dirs-sys", -] +checksum = "06fdd177fc61050d63f67f5bd6351fac6ab5526694ea8e359cd9cd3b75857f44" [[package]] -name = "directories-next" -version = "2.0.0" +name = "cxxbridge-macro" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ - "cfg-if", - "dirs-sys-next", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "dirs-sys" -version = "0.3.7" +name = "darling" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "libc", - "redox_users", - "winapi", + "darling_core 0.14.4", + "darling_macro 0.14.4", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "darling" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "libc", - "redox_users", - "winapi", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] -name = "displaydoc" -version = "0.2.4" +name = "darling_core" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ + "fnv", + "ident_case", "proc-macro2", "quote", - "syn 2.0.29", + "strsim 0.10.0", + "syn 1.0.109", ] [[package]] -name = "downcast" -version = "0.11.0" +name = "darling_core" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 2.0.38", +] [[package]] -name = "downcast-rs" -version = "1.2.0" +name = "darling_macro" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] [[package]] -name = "dtoa" -version = "1.0.9" +name = "darling_macro" +version = "0.20.3" 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" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "proc-macro2", + "darling_core 0.20.3", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] -name = "dyn-clone" -version = "1.0.13" +name = "data-encoding" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] -name = "ecdsa" -version = "0.14.8" +name = "data-encoding-macro" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", + "data-encoding", + "data-encoding-macro-internal", ] [[package]] -name = "ecdsa" -version = "0.16.8" +name = "data-encoding-macro-internal" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" 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", + "data-encoding", + "syn 1.0.109", ] [[package]] -name = "ed25519" -version = "1.5.3" +name = "der" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ - "signature 1.6.4", + "const-oid", + "pem-rfc7468", + "zeroize", ] [[package]] -name = "ed25519" -version = "2.2.2" +name = "der" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "pkcs8 0.10.2", - "signature 2.1.0", + "const-oid", + "zeroize", ] [[package]] -name = "ed25519-dalek" -version = "1.0.1" +name = "der-parser" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "sha2 0.9.9", - "zeroize", + "asn1-rs 0.3.1", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", ] [[package]] -name = "ed25519-dalek" -version = "2.0.0" +name = "der-parser" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "curve25519-dalek 4.0.0", - "ed25519 2.2.2", - "rand_core 0.6.4", - "serde", - "sha2 0.10.7", - "zeroize", + "asn1-rs 0.5.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", ] [[package]] -name = "ed25519-zebra" -version = "3.1.0" +name = "deranged" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ - "curve25519-dalek 3.2.0", - "hashbrown 0.12.3", - "hex", - "rand_core 0.6.4", - "sha2 0.9.9", - "zeroize", + "powerfmt", + "serde", ] [[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elliptic-curve" -version = "0.12.3" +name = "derivative" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array 0.14.7", - "group 0.12.1", - "hkdf", - "pem-rfc7468", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle", - "zeroize", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "elliptic-curve" -version = "0.13.5" +name = "derive-syn-parse" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", - "digest 0.10.7", - "ff 0.13.0", - "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", - "rand_core 0.6.4", - "sec1 0.7.3", - "subtle", - "zeroize", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "encode_unicode" -version = "0.3.6" +name = "derive_builder" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +dependencies = [ + "derive_builder_macro", +] [[package]] -name = "enum-as-inner" -version = "0.5.1" +name = "derive_builder_core" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" dependencies = [ - "heck 0.4.1", + "darling 0.14.4", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] -name = "enumflags2" -version = "0.7.7" +name = "derive_builder_macro" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" dependencies = [ - "enumflags2_derive", + "derive_builder_core", + "syn 1.0.109", ] [[package]] -name = "enumflags2_derive" -version = "0.7.7" +name = "derive_more" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case", "proc-macro2", "quote", - "syn 2.0.29", -] - -[[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", + "rustc_version", + "syn 1.0.109", ] [[package]] -name = "environmental" -version = "1.1.4" +name = "diff" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] -name = "equivalent" -version = "1.0.1" +name = "difflib" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] -name = "errno" -version = "0.3.2" +name = "digest" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", + "generic-array 0.12.4", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "cc", - "libc", + "generic-array 0.14.7", ] [[package]] -name = "event-listener" -version = "2.5.3" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] [[package]] -name = "exit-future" -version = "0.2.0" +name = "directories" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" +checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" dependencies = [ - "futures 0.3.28", + "dirs-sys", ] [[package]] -name = "expander" -version = "1.0.0" +name = "directories-next" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", - "syn 1.0.109", + "cfg-if", + "dirs-sys-next", ] [[package]] -name = "fake-simd" -version = "0.1.2" +name = "dirs-sys" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] [[package]] -name = "fallible-iterator" -version = "0.2.0" +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] [[package]] -name = "fastrand" -version = "1.9.0" +name = "displaydoc" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "instant", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "fastrand" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale 0.0.10", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "rand_core 0.6.4", + "zeroize", +] [[package]] -name = "fdlimit" -version = "0.2.1" +name = "docify" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" dependencies = [ - "libc", + "docify_macros", ] [[package]] -name = "ff" -version = "0.12.1" +name = "docify_macros" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" dependencies = [ - "rand_core 0.6.4", - "subtle", + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.38", + "termcolor", + "toml 0.7.8", + "walkdir", ] [[package]] -name = "ff" -version = "0.13.0" +name = "downcast" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] -name = "fiat-crypto" -version = "0.1.20" +name = "downcast-rs" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] -name = "file-per-thread-logger" -version = "0.1.6" +name = "dtoa" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" dependencies = [ - "env_logger", - "log", + "dyn-clonable-impl", + "dyn-clone", ] [[package]] -name = "filetime" -version = "0.2.22" +name = "dyn-clonable-impl" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "finality-grandpa" -version = "0.16.2" +name = "dyn-clone" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" + +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "either", - "futures 0.3.28", - "futures-timer", - "log", - "num-traits", - "parity-scale-codec", - "parking_lot 0.12.1", - "scale-info", + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", ] [[package]] -name = "fixed-hash" -version = "0.8.0" +name = "ecdsa" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.6", + "rfc6979 0.4.0", + "signature 2.1.0", + "spki 0.7.2", ] [[package]] -name = "fixedbitset" -version = "0.4.2" +name = "ed25519" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.1.0", +] [[package]] -name = "flate2" -version = "1.0.27" +name = "ed25519-dalek" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "crc32fast", - "libz-sys", - "miniz_oxide", + "curve25519-dalek 4.1.1", + "ed25519", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "zeroize", ] [[package]] -name = "float-cmp" -version = "0.9.0" +name = "ed25519-zebra" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ - "num-traits", + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", ] [[package]] -name = "fnv" -version = "1.0.7" +name = "ed25519-zebra" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519", + "hashbrown 0.14.2", + "hex", + "rand_core 0.6.4", + "sha2 0.10.8", + "zeroize", +] [[package]] -name = "fork-tree" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "parity-scale-codec", + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.7", + "ff 0.12.1", + "generic-array 0.14.7", + "group 0.12.1", + "hkdf", + "pem-rfc7468", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1 0.3.0", + "subtle", + "zeroize", ] [[package]] -name = "form_urlencoded" -version = "1.2.0" +name = "elliptic-curve" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ - "percent-encoding", + "base16ct 0.2.0", + "crypto-bigint 0.5.3", + "digest 0.10.7", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "sec1 0.7.3", + "subtle", + "zeroize", ] [[package]] -name = "fragile" -version = "2.0.0" +name = "encode_unicode" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] -name = "frame-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "enum-as-inner" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ - "frame-support", - "frame-support-procedural", - "frame-system", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", - "static_assertions", + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "frame-benchmarking-cli" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "enumflags2" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ - "Inflector", - "array-bytes 4.2.0", - "chrono", - "clap 4.4.0", - "comfy-table", - "frame-benchmarking", - "frame-support", - "frame-system", - "gethostname", - "handlebars", - "itertools", - "lazy_static", - "linked-hash-map", - "log", - "parity-scale-codec", - "rand 0.8.5", - "rand_pcg", - "sc-block-builder", - "sc-cli", - "sc-client-api", - "sc-client-db", - "sc-executor", - "sc-service", - "sc-sysinfo", - "serde", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-database", - "sp-externalities", - "sp-inherents", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-storage", - "sp-trie", - "thiserror", - "thousands", + "enumflags2_derive", ] [[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" +name = "enumflags2_derive" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ - "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] -name = "frame-election-provider-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "enumn" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ - "frame-election-provider-solution-type", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-npos-elections", - "sp-runtime", - "sp-std", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "frame-executive" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ - "frame-support", - "frame-system", - "frame-try-runtime", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "atty", + "humantime", + "log", + "regex", + "termcolor", ] [[package]] -name = "frame-metadata" -version = "15.1.0" +name = "env_logger" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" dependencies = [ - "cfg-if", - "parity-scale-codec", - "scale-info", - "serde", + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", ] [[package]] -name = "frame-remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "async-recursion", - "futures 0.3.28", - "indicatif", - "jsonrpsee", - "log", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "spinners", - "substrate-rpc-client", - "tokio", - "tokio-retry", + "libc", + "windows-sys 0.48.0", ] [[package]] -name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" dependencies = [ - "bitflags 1.3.2", - "environmental", - "frame-metadata", - "frame-support-procedural", - "impl-trait-for-tuples", - "k256", - "log", - "once_cell", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-weights", - "tt-call", + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", ] [[package]] -name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "exit-future" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "Inflector", - "cfg-expr", - "derive-syn-parse", - "frame-support-procedural-tools", - "itertools", - "proc-macro-warning", - "proc-macro2", - "quote", - "syn 2.0.29", + "futures 0.3.29", ] [[package]] -name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "expander" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a718c0675c555c5f976fff4ea9e2c150fa06cefa201cadef87cfbf9324075881" dependencies = [ - "frame-support-procedural-tools-derive", - "proc-macro-crate 1.1.3", + "blake3", + "fs-err", "proc-macro2", "quote", - "syn 2.0.29", ] [[package]] -name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +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", - "syn 2.0.29", ] [[package]] -name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "expander" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "cfg-if", - "frame-support", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-version", - "sp-weights", + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "frame-system-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", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std", -] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[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" -dependencies = [ - "parity-scale-codec", - "sp-api", -] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] -name = "frame-try-runtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ - "frame-support", - "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-std", + "instant", ] [[package]] -name = "fs-err" -version = "2.9.0" +name = "fastrand" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] -name = "fs2" -version = "0.4.3" +name = "fatality" +version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +checksum = "2ad875162843b0d046276327afe0136e9ed3a23d5a754210fb6f1f33610d39ab" dependencies = [ - "libc", - "winapi", + "fatality-proc-macro", + "thiserror", ] [[package]] -name = "fs4" -version = "0.6.6" +name = "fatality-proc-macro" +version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" dependencies = [ - "rustix 0.38.9", - "windows-sys 0.48.0", + "expander 0.0.4", + "indexmap 1.9.3", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "thiserror", ] [[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - -[[package]] -name = "futures" -version = "0.3.28" +name = "fdlimit" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", + "libc", ] [[package]] -name = "futures-channel" -version = "0.3.28" +name = "ff" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "futures-core", - "futures-sink", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-executor" -version = "0.3.28" +name = "ff" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "futures-core", - "futures-task", - "futures-util", - "num_cpus", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#e141d4b6f42fb481aefe1b479788694945b6940d" dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.13", - "waker-fn", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", ] [[package]] -name = "futures-macro" -version = "0.3.28" +name = "fiat-crypto" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] +checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" [[package]] -name = "futures-rustls" -version = "0.22.2" +name = "file-per-thread-logger" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" +checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "futures-io", - "rustls 0.20.8", - "webpki 0.22.0", + "env_logger 0.10.0", + "log", ] [[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-timer" -version = "3.0.2" +name = "filetime" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "windows-sys 0.48.0", +] [[package]] -name = "futures-util" -version = "0.3.28" +name = "finality-grandpa" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ - "futures 0.1.31", - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite 0.2.13", - "pin-utils", - "slab", + "either", + "futures 0.3.29", + "futures-timer", + "log", + "num-traits", + "parity-scale-codec", + "parking_lot 0.12.1", + "scale-info", ] [[package]] -name = "fxhash" -version = "0.2.1" +name = "fixed-hash" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", ] [[package]] -name = "generic-array" -version = "0.12.4" +name = "fixedbitset" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] -name = "generic-array" -version = "0.14.7" +name = "flate2" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ - "typenum", - "version_check", - "zeroize", + "crc32fast", + "libz-sys", + "miniz_oxide", ] [[package]] -name = "gethostname" -version = "0.2.3" +name = "float-cmp" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" dependencies = [ - "libc", - "winapi", + "num-traits", ] [[package]] -name = "getrandom" -version = "0.1.16" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "getrandom" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +name = "fork-tree" +version = "3.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "parity-scale-codec", ] [[package]] -name = "ghash" -version = "0.4.4" +name = "form_urlencoded" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.5.3", + "percent-encoding", ] [[package]] -name = "ghash" -version = "0.5.0" +name = "fragile" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" -dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.6.1", -] +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] -name = "gimli" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +name = "frame-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "fallible-iterator", - "indexmap 1.9.3", - "stable_deref_trait", + "frame-support", + "frame-support-procedural", + "frame-system", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "static_assertions", ] [[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "globset" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +name = "frame-benchmarking-cli" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "aho-corasick", - "bstr", - "fnv", + "Inflector", + "array-bytes", + "chrono", + "clap 4.4.7", + "comfy-table", + "frame-benchmarking", + "frame-support", + "frame-system", + "gethostname", + "handlebars", + "itertools 0.10.5", + "lazy_static", + "linked-hash-map", "log", - "regex", + "parity-scale-codec", + "rand 0.8.5", + "rand_pcg", + "sc-block-builder", + "sc-cli", + "sc-client-api", + "sc-client-db", + "sc-executor", + "sc-service", + "sc-sysinfo", + "serde", + "serde_json", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-database", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-trie", + "sp-wasm-interface", + "thiserror", + "thousands", ] [[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +name = "frame-election-provider-solution-type" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +name = "frame-election-provider-support" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "ff 0.13.0", - "rand_core 0.6.4", - "subtle", + "frame-election-provider-solution-type", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-npos-elections", + "sp-runtime", + "sp-std", ] [[package]] -name = "h2" -version = "0.3.21" +name = "frame-executive" +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", + "frame-try-runtime", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "frame-metadata" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "slab", + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "frame-remote-externalities" +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.29", + "indicatif", + "jsonrpsee", + "log", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", + "spinners", + "substrate-rpc-client", "tokio", - "tokio-util", - "tracing", + "tokio-retry", ] [[package]] -name = "handlebars" -version = "4.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +name = "frame-support" +version = "4.0.0-dev" +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", - "pest", - "pest_derive", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", "serde", "serde_json", - "thiserror", + "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 = "hash-db" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" +name = "frame-support-procedural" +version = "4.0.0-dev" +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.38", +] [[package]] -name = "hash256-std-hasher" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +name = "frame-support-procedural-tools" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "crunchy", + "frame-support-procedural-tools-derive", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +name = "frame-support-procedural-tools-derive" +version = "3.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "ahash 0.7.6", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +name = "frame-system" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "ahash 0.8.3", + "cfg-if", + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", + "sp-weights", ] [[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +name = "frame-system-benchmarking" +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 = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +name = "frame-system-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "unicode-segmentation", + "parity-scale-codec", + "sp-api", ] [[package]] -name = "heck" -version = "0.4.1" +name = "frame-try-runtime" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-support", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "fs-err" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "fs2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" dependencies = [ "libc", + "winapi", ] [[package]] -name = "hermit-abi" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" - -[[package]] -name = "hex" -version = "0.4.3" +name = "fs4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +dependencies = [ + "rustix 0.38.21", + "windows-sys 0.48.0", +] [[package]] -name = "hex-literal" -version = "0.3.4" +name = "funty" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] -name = "hex-literal" -version = "0.4.1" +name = "futures" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] -name = "hkdf" -version = "0.12.3" +name = "futures" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ - "hmac 0.12.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "hmac" -version = "0.8.1" +name = "futures-channel" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", + "futures-core", + "futures-sink", ] [[package]] -name = "hmac" -version = "0.11.0" +name = "futures-core" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.1", - "digest 0.9.0", -] +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] -name = "hmac" -version = "0.12.1" +name = "futures-executor" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ - "digest 0.10.7", + "futures-core", + "futures-task", + "futures-util", + "num_cpus", ] [[package]] -name = "hmac-drbg" -version = "0.3.0" +name = "futures-io" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array 0.14.7", - "hmac 0.8.1", -] +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] -name = "hostname" -version = "0.3.1" +name = "futures-lite" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "libc", - "match_cfg", - "winapi", + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite 0.2.13", + "waker-fn", ] [[package]] -name = "http" -version = "0.2.9" +name = "futures-macro" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ - "bytes", - "fnv", - "itoa", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "http-body" -version = "0.4.5" +name = "futures-rustls" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ - "bytes", - "http", - "pin-project-lite 0.2.13", + "futures-io", + "rustls 0.20.9", + "webpki 0.22.4", ] [[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - -[[package]] -name = "httparse" -version = "1.8.0" +name = "futures-sink" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] -name = "httpdate" -version = "1.0.3" +name = "futures-task" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] -name = "humantime" -version = "2.1.0" +name = "futures-timer" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] -name = "hyper" -version = "0.14.27" +name = "futures-util" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ - "bytes", + "futures 0.1.31", "futures-channel", "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", "pin-project-lite 0.2.13", - "socket2 0.4.9", - "tokio", - "tower-service", - "tracing", - "want", + "pin-utils", + "slab", ] [[package]] -name = "hyper-rustls" -version = "0.23.2" +name = "fxhash" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" dependencies = [ - "http", - "hyper", - "log", - "rustls 0.20.8", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", + "byteorder", ] [[package]] -name = "hyper-rustls" -version = "0.24.1" +name = "generic-array" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ - "futures-util", - "http", - "hyper", - "log", - "rustls 0.21.6", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.24.1", - "webpki-roots 0.23.1", + "typenum", ] [[package]] -name = "iana-time-zone" -version = "0.1.57" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows 0.48.0", + "typenum", + "version_check", + "zeroize", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "gethostname" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ - "cc", + "libc", + "winapi", ] [[package]] -name = "ident_case" -version = "1.0.1" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] [[package]] -name = "idna" -version = "0.2.3" +name = "getrandom" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "idna" -version = "0.4.0" +name = "ghash" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "opaque-debug 0.3.0", + "polyval 0.5.3", ] [[package]] -name = "if-addrs" -version = "0.7.0" +name = "ghash" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ - "libc", - "winapi", + "opaque-debug 0.3.0", + "polyval 0.6.1", ] [[package]] -name = "if-watch" -version = "3.0.1" +name = "gimli" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ - "async-io", - "core-foundation", - "fnv", - "futures 0.3.28", - "if-addrs", - "ipnet", - "log", - "rtnetlink", - "system-configuration", - "tokio", - "windows 0.34.0", + "fallible-iterator", + "indexmap 1.9.3", + "stable_deref_trait", ] [[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] -name = "impl-serde" -version = "0.4.0" +name = "glob" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "globset" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "serde", + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", ] [[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" +name = "group" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "indexmap" -version = "1.9.3" +name = "group" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", + "ff 0.13.0", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "indexmap" -version = "2.0.0" +name = "h2" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ - "equivalent", - "hashbrown 0.14.0", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] -name = "indicatif" -version = "0.17.6" +name = "handlebars" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", + "log", + "pest", + "pest_derive", + "serde", + "serde_json", + "thiserror", ] [[package]] -name = "inout" -version = "0.1.3" +name = "hash-db" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" dependencies = [ - "generic-array 0.14.7", + "crunchy", ] [[package]] -name = "instant" -version = "0.1.12" +name = "hashbrown" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "cfg-if", + "ahash 0.7.7", ] [[package]] -name = "integer-sqrt" -version = "0.1.5" +name = "hashbrown" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "num-traits", + "ahash 0.8.6", ] [[package]] -name = "interceptor" -version = "0.8.2" +name = "hashbrown" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", + "ahash 0.8.6", + "allocator-api2", + "serde", ] [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "heck" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ - "hermit-abi 0.3.2", - "libc", - "windows-sys 0.48.0", + "unicode-segmentation", ] [[package]] -name = "ip_network" +name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "ipconfig" -version = "0.3.2" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "socket2 0.5.3", - "widestring", - "windows-sys 0.48.0", - "winreg", + "libc", ] [[package]] -name = "ipnet" -version = "2.8.0" +name = "hermit-abi" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] -name = "is-terminal" -version = "0.4.9" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.9", - "windows-sys 0.48.0", -] +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "itertools" -version = "0.10.5" +name = "hex-literal" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" [[package]] -name = "itoa" -version = "1.0.9" +name = "hex-literal" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] -name = "jobserver" -version = "0.1.26" +name = "hkdf" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" dependencies = [ - "libc", + "hmac 0.12.1", ] [[package]] -name = "js-sys" -version = "0.3.64" +name = "hmac" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "wasm-bindgen", + "crypto-mac 0.8.0", + "digest 0.9.0", ] [[package]] -name = "jsonrpsee" -version = "0.16.3" +name = "hmac" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "jsonrpsee-core", - "jsonrpsee-http-client", - "jsonrpsee-proc-macros", - "jsonrpsee-server", - "jsonrpsee-types", - "jsonrpsee-ws-client", - "tracing", + "crypto-mac 0.11.1", + "digest 0.9.0", ] [[package]] -name = "jsonrpsee-client-transport" -version = "0.16.3" +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "futures-util", - "http", - "jsonrpsee-core", - "jsonrpsee-types", - "pin-project", - "rustls-native-certs", - "soketto", - "thiserror", - "tokio", - "tokio-rustls 0.24.1", - "tokio-util", - "tracing", - "webpki-roots 0.25.2", + "digest 0.10.7", ] [[package]] -name = "jsonrpsee-core" -version = "0.16.3" +name = "hmac-drbg" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ - "anyhow", - "arrayvec 0.7.4", - "async-lock", - "async-trait", - "beef", - "futures-channel", - "futures-timer", - "futures-util", - "globset", - "hyper", - "jsonrpsee-types", - "parking_lot 0.12.1", - "rand 0.8.5", - "rustc-hash", - "serde", - "serde_json", - "soketto", - "thiserror", - "tokio", - "tracing", + "digest 0.9.0", + "generic-array 0.14.7", + "hmac 0.8.1", ] [[package]] -name = "jsonrpsee-http-client" -version = "0.16.3" +name = "home" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "async-trait", - "hyper", - "hyper-rustls 0.24.1", - "jsonrpsee-core", - "jsonrpsee-types", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", + "windows-sys 0.48.0", ] [[package]] -name = "jsonrpsee-proc-macros" -version = "0.16.3" +name = "hostname" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ - "heck 0.4.1", - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", + "libc", + "match_cfg", + "winapi", ] [[package]] -name = "jsonrpsee-server" -version = "0.16.3" +name = "http" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "futures-channel", - "futures-util", - "http", - "hyper", - "jsonrpsee-core", - "jsonrpsee-types", - "serde", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tower", - "tracing", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "jsonrpsee-types" -version = "0.16.3" +name = "http-body" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", + "bytes", + "http", + "pin-project-lite 0.2.13", ] [[package]] -name = "jsonrpsee-ws-client" -version = "0.16.3" +name = "http-range-header" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" -dependencies = [ - "http", - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", -] +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] -name = "k256" -version = "0.13.1" +name = "httparse" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" -dependencies = [ - "cfg-if", - "ecdsa 0.16.8", - "elliptic-curve 0.13.5", - "once_cell", - "sha2 0.10.7", -] +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] -name = "keccak" -version = "0.1.4" +name = "httpdate" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "kvdb" -version = "0.13.0" +name = "humantime" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "smallvec", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite 0.2.13", + "socket2 0.4.10", + "tokio", + "tower-service", + "tracing", + "want", ] [[package]] -name = "kvdb-memorydb" -version = "0.13.0" +name = "hyper-rustls" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "kvdb", - "parking_lot 0.12.1", + "futures-util", + "http", + "hyper", + "log", + "rustls 0.21.8", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "webpki-roots 0.25.2", ] [[package]] -name = "kvdb-rocksdb" -version = "0.19.0" +name = "iana-time-zone" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ - "kvdb", - "num_cpus", - "parking_lot 0.12.1", - "regex", - "rocksdb", - "smallvec", + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "iana-time-zone-haiku" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "spin", + "cc", ] [[package]] -name = "lazycell" -version = "1.3.0" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] -name = "libc" -version = "0.2.147" +name = "idna" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] [[package]] -name = "libloading" -version = "0.7.4" +name = "idna" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "cfg-if", - "winapi", + "unicode-bidi", + "unicode-normalization", ] [[package]] -name = "libm" -version = "0.2.7" +name = "if-addrs" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +dependencies = [ + "libc", + "winapi", +] [[package]] -name = "libp2p" -version = "0.51.3" +name = "if-watch" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" +checksum = "bbb892e5777fe09e16f3d44de7802f4daa7267ecbe8c466f19d94e25bb0c303e" dependencies = [ - "bytes", - "futures 0.3.28", - "futures-timer", - "getrandom 0.2.10", - "instant", - "libp2p-allow-block-list", - "libp2p-connection-limits", - "libp2p-core", - "libp2p-dns", - "libp2p-identify", - "libp2p-identity", - "libp2p-kad", - "libp2p-mdns", - "libp2p-metrics", - "libp2p-noise", - "libp2p-ping", - "libp2p-quic", - "libp2p-request-response", - "libp2p-swarm", - "libp2p-tcp", - "libp2p-wasm-ext", - "libp2p-webrtc", - "libp2p-websocket", - "libp2p-yamux", - "multiaddr", - "pin-project", + "async-io 1.13.0", + "core-foundation", + "fnv", + "futures 0.3.29", + "if-addrs", + "ipnet", + "log", + "rtnetlink", + "system-configuration", + "tokio", + "windows", ] [[package]] -name = "libp2p-allow-block-list" -version = "0.1.1" +name = "impl-codec" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "void", + "parity-scale-codec", ] [[package]] -name = "libp2p-connection-limits" -version = "0.1.0" +name = "impl-serde" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "void", + "serde", ] [[package]] -name = "libp2p-core" -version = "0.39.2" +name = "impl-trait-for-tuples" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "either", - "fnv", - "futures 0.3.28", - "futures-timer", - "instant", - "libp2p-identity", - "log", - "multiaddr", - "multihash 0.17.0", - "multistream-select", - "once_cell", - "parking_lot 0.12.1", - "pin-project", - "quick-protobuf", - "rand 0.8.5", - "rw-stream-sink", - "smallvec", - "thiserror", - "unsigned-varint", - "void", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "libp2p-dns" -version = "0.39.0" +name = "include_dir" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" dependencies = [ - "futures 0.3.28", - "libp2p-core", - "log", - "parking_lot 0.12.1", - "smallvec", - "trust-dns-resolver", + "include_dir_macros", ] [[package]] -name = "libp2p-identify" -version = "0.42.2" +name = "include_dir_macros" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" dependencies = [ - "asynchronous-codec", - "either", - "futures 0.3.28", - "futures-timer", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "log", - "lru 0.10.1", - "quick-protobuf", - "quick-protobuf-codec", - "smallvec", - "thiserror", - "void", + "proc-macro2", + "quote", ] [[package]] -name = "libp2p-identity" -version = "0.1.3" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "bs58", - "ed25519-dalek 2.0.0", - "log", - "multiaddr", - "multihash 0.17.0", - "quick-protobuf", - "rand 0.8.5", - "sha2 0.10.7", - "thiserror", - "zeroize", + "autocfg", + "hashbrown 0.12.3", + "serde", ] [[package]] -name = "libp2p-kad" -version = "0.43.3" +name = "indexmap" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ - "arrayvec 0.7.4", - "asynchronous-codec", - "bytes", - "either", - "fnv", - "futures 0.3.28", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "log", - "quick-protobuf", - "rand 0.8.5", - "sha2 0.10.7", - "smallvec", - "thiserror", - "uint", - "unsigned-varint", - "void", + "equivalent", + "hashbrown 0.14.2", ] [[package]] -name = "libp2p-mdns" -version = "0.43.1" +name = "indexmap-nostd" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + +[[package]] +name = "indicatif" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ - "data-encoding", - "futures 0.3.28", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "log", - "rand 0.8.5", - "smallvec", - "socket2 0.4.9", - "tokio", - "trust-dns-proto", - "void", + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", ] [[package]] -name = "libp2p-metrics" -version = "0.12.0" +name = "inout" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "libp2p-core", - "libp2p-identify", - "libp2p-kad", - "libp2p-ping", - "libp2p-swarm", - "prometheus-client", + "generic-array 0.14.7", ] [[package]] -name = "libp2p-noise" -version = "0.42.2" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "bytes", - "curve25519-dalek 3.2.0", - "futures 0.3.28", - "libp2p-core", - "libp2p-identity", - "log", - "once_cell", - "quick-protobuf", - "rand 0.8.5", - "sha2 0.10.7", - "snow", - "static_assertions", - "thiserror", - "x25519-dalek 1.1.1", - "zeroize", + "cfg-if", ] [[package]] -name = "libp2p-ping" -version = "0.42.0" +name = "integer-encoding" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" dependencies = [ - "either", - "futures 0.3.28", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.8.5", - "void", + "num-traits", ] [[package]] -name = "libp2p-quic" -version = "0.7.0-alpha.3" +name = "interceptor" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" +checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" dependencies = [ + "async-trait", "bytes", - "futures 0.3.28", - "futures-timer", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-tls", "log", - "parking_lot 0.12.1", - "quinn-proto", "rand 0.8.5", - "rustls 0.20.8", + "rtcp", + "rtp", "thiserror", "tokio", + "waitgroup", + "webrtc-srtp", + "webrtc-util", ] [[package]] -name = "libp2p-request-response" -version = "0.24.1" +name = "io-lifetimes" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "async-trait", - "futures 0.3.28", - "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm", - "rand 0.8.5", - "smallvec", + "hermit-abi 0.3.3", + "libc", + "windows-sys 0.48.0", ] [[package]] -name = "libp2p-swarm" -version = "0.42.2" +name = "ip_network" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" +checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" + +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "either", - "fnv", - "futures 0.3.28", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-identity", - "libp2p-swarm-derive", - "log", - "rand 0.8.5", - "smallvec", - "tokio", - "void", + "socket2 0.5.5", + "widestring", + "windows-sys 0.48.0", + "winreg", ] [[package]] -name = "libp2p-swarm-derive" -version = "0.32.0" +name = "ipnet" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "heck 0.4.1", - "quote", - "syn 1.0.109", + "hermit-abi 0.3.3", + "rustix 0.38.21", + "windows-sys 0.48.0", ] [[package]] -name = "libp2p-tcp" -version = "0.39.0" +name = "is_executable" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" +checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" dependencies = [ - "futures 0.3.28", - "futures-timer", - "if-watch", - "libc", - "libp2p-core", - "log", - "socket2 0.4.9", - "tokio", + "winapi", ] [[package]] -name = "libp2p-tls" -version = "0.1.0" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "futures 0.3.28", - "futures-rustls", - "libp2p-core", - "libp2p-identity", - "rcgen 0.10.0", - "ring", - "rustls 0.20.8", - "thiserror", - "webpki 0.22.0", - "x509-parser 0.14.0", - "yasna", + "either", ] [[package]] -name = "libp2p-wasm-ext" -version = "0.39.0" +name = "itertools" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ - "futures 0.3.28", - "js-sys", - "libp2p-core", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", + "either", ] [[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha.4" +name = "itoa" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures 0.3.28", - "futures-timer", - "hex", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-noise", - "log", - "multihash 0.17.0", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util", - "webrtc", + "libc", ] [[package]] -name = "libp2p-websocket" -version = "0.41.0" +name = "js-sys" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ - "either", - "futures 0.3.28", - "futures-rustls", - "libp2p-core", - "log", - "parking_lot 0.12.1", - "quicksink", - "rw-stream-sink", - "soketto", - "url", - "webpki-roots 0.22.6", + "wasm-bindgen", ] [[package]] -name = "libp2p-yamux" -version = "0.43.1" +name = "jsonrpsee" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ - "futures 0.3.28", - "libp2p-core", - "log", - "thiserror", - "yamux", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", + "jsonrpsee-ws-client", + "tracing", ] [[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" +name = "jsonrpsee-client-transport" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "tikv-jemalloc-sys", + "futures-util", + "http", + "jsonrpsee-core", + "jsonrpsee-types", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "webpki-roots 0.25.2", ] [[package]] -name = "libsecp256k1" -version = "0.7.1" +name = "jsonrpsee-core" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ - "arrayref", - "base64 0.13.1", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", + "anyhow", + "arrayvec 0.7.4", + "async-lock", + "async-trait", + "beef", + "futures-channel", + "futures-timer", + "futures-util", + "globset", + "hyper", + "jsonrpsee-types", + "parking_lot 0.12.1", "rand 0.8.5", + "rustc-hash", "serde", - "sha2 0.9.9", - "typenum", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "libsecp256k1-core" -version = "0.3.0" +name = "jsonrpsee-http-client" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core", + "jsonrpsee-types", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" +name = "jsonrpsee-proc-macros" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ - "libsecp256k1-core", + "heck 0.4.1", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" +name = "jsonrpsee-server" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" dependencies = [ - "libsecp256k1-core", + "futures-channel", + "futures-util", + "http", + "hyper", + "jsonrpsee-core", + "jsonrpsee-types", + "serde", + "serde_json", + "soketto", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", ] [[package]] -name = "libz-sys" -version = "1.1.12" +name = "jsonrpsee-types" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ - "cc", - "pkg-config", - "vcpkg", + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "link-cplusplus" -version = "1.0.9" +name = "jsonrpsee-ws-client" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ - "cc", + "http", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", ] [[package]] -name = "linked-hash-map" -version = "0.5.6" +name = "k256" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +dependencies = [ + "cfg-if", + "ecdsa 0.16.8", + "elliptic-curve 0.13.6", + "once_cell", + "sha2 0.10.8", +] [[package]] -name = "linked_hash_set" +name = "keccak" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ - "linked-hash-map", + "cpufeatures", ] [[package]] -name = "linregress" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de0b5f52a9f84544d268f5fabb71b38962d6aa3c6600b8bcd27d44ccf9c9c45" +name = "kusama-runtime-constants" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "nalgebra", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", ] [[package]] -name = "linux-raw-sys" -version = "0.1.4" +name = "kvdb" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" - -[[package]] -name = "liquidity" -version = "1.1.0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-assets", - "pallet-balances", - "pallet-ocex-lmp", - "pallet-timestamp", - "parity-scale-codec", - "polkadex-primitives", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "load-testing" -version = "0.1.0" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" dependencies = [ - "jsonrpsee", - "orderbook-primitives", - "polkadex-primitives", - "serde_json", - "sp-core", - "sp-keyring", - "tokio", + "smallvec", ] [[package]] -name = "lock_api" -version = "0.4.10" +name = "kvdb-memorydb" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ - "autocfg", - "scopeguard", + "kvdb", + "parking_lot 0.12.1", ] [[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "lru" -version = "0.8.1" +name = "kvdb-rocksdb" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ - "hashbrown 0.12.3", + "kvdb", + "num_cpus", + "parking_lot 0.12.1", + "regex", + "rocksdb", + "smallvec", ] [[package]] -name = "lru" -version = "0.10.1" +name = "landlock" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +checksum = "520baa32708c4e957d2fc3a186bc5bd8d26637c33137f399ddfc202adb240068" dependencies = [ - "hashbrown 0.13.2", + "enumflags2", + "libc", + "thiserror", ] [[package]] -name = "lru-cache" -version = "0.1.2" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "linked-hash-map", + "spin 0.5.2", ] [[package]] -name = "lz4" -version = "1.24.0" +name = "lazycell" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" -dependencies = [ - "libc", - "lz4-sys", -] +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] -name = "lz4-sys" -version = "1.9.4" +name = "libc" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] -name = "mach" -version = "0.3.2" +name = "libloading" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "libc", + "cfg-if", + "winapi", ] [[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "match_cfg" -version = "0.1.0" +name = "libm" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] -name = "matchers" -version = "0.0.1" +name = "libp2p" +version = "0.51.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" dependencies = [ - "regex-automata 0.1.10", + "bytes", + "futures 0.3.29", + "futures-timer", + "getrandom 0.2.10", + "instant", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", + "libp2p-dns", + "libp2p-identify", + "libp2p-identity", + "libp2p-kad", + "libp2p-mdns", + "libp2p-metrics", + "libp2p-noise", + "libp2p-ping", + "libp2p-quic", + "libp2p-request-response", + "libp2p-swarm", + "libp2p-tcp", + "libp2p-wasm-ext", + "libp2p-webrtc", + "libp2p-websocket", + "libp2p-yamux", + "multiaddr", + "pin-project", ] [[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - -[[package]] -name = "matrixmultiply" -version = "0.3.7" +name = "libp2p-allow-block-list" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "autocfg", - "rawpointer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", ] [[package]] -name = "md-5" -version = "0.10.5" +name = "libp2p-connection-limits" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" dependencies = [ - "digest 0.10.7", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", ] [[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memfd" -version = "0.6.3" +name = "libp2p-core" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ - "rustix 0.37.23", + "either", + "fnv", + "futures 0.3.29", + "futures-timer", + "instant", + "libp2p-identity", + "log", + "multiaddr", + "multihash", + "multistream-select", + "once_cell", + "parking_lot 0.12.1", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink", + "smallvec", + "thiserror", + "unsigned-varint", + "void", ] [[package]] -name = "memmap2" -version = "0.5.10" +name = "libp2p-dns" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ - "libc", + "futures 0.3.29", + "libp2p-core", + "log", + "parking_lot 0.12.1", + "smallvec", + "trust-dns-resolver", ] [[package]] -name = "memoffset" -version = "0.6.5" +name = "libp2p-identify" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ - "autocfg", + "asynchronous-codec", + "either", + "futures 0.3.29", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "log", + "lru 0.10.1", + "quick-protobuf", + "quick-protobuf-codec", + "smallvec", + "thiserror", + "void", ] [[package]] -name = "memoffset" -version = "0.8.0" +name = "libp2p-identity" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "autocfg", + "bs58 0.4.0", + "ed25519-dalek", + "log", + "multiaddr", + "multihash", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", + "zeroize", ] [[package]] -name = "memoffset" -version = "0.9.0" +name = "libp2p-kad" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ - "autocfg", + "arrayvec 0.7.4", + "asynchronous-codec", + "bytes", + "either", + "fnv", + "futures 0.3.29", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "log", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", + "smallvec", + "thiserror", + "uint", + "unsigned-varint", + "void", ] [[package]] -name = "memory-db" -version = "0.32.0" +name = "libp2p-mdns" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ - "hash-db", + "data-encoding", + "futures 0.3.29", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "log", + "rand 0.8.5", + "smallvec", + "socket2 0.4.10", + "tokio", + "trust-dns-proto", + "void", ] [[package]] -name = "memory_units" -version = "0.4.0" +name = "libp2p-metrics" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" +dependencies = [ + "libp2p-core", + "libp2p-identify", + "libp2p-kad", + "libp2p-ping", + "libp2p-swarm", + "prometheus-client", +] [[package]] -name = "merlin" -version = "2.0.1" +name = "libp2p-noise" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", + "bytes", + "curve25519-dalek 3.2.0", + "futures 0.3.29", + "libp2p-core", + "libp2p-identity", + "log", + "once_cell", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", + "snow", + "static_assertions", + "thiserror", + "x25519-dalek 1.1.1", "zeroize", ] [[package]] -name = "minimal-lexical" -version = "0.2.1" +name = "libp2p-ping" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" +dependencies = [ + "either", + "futures 0.3.29", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-swarm", + "log", + "rand 0.8.5", + "void", +] [[package]] -name = "miniz_oxide" -version = "0.7.1" +name = "libp2p-quic" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ - "adler", + "bytes", + "futures 0.3.29", + "futures-timer", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-tls", + "log", + "parking_lot 0.12.1", + "quinn-proto", + "rand 0.8.5", + "rustls 0.20.9", + "thiserror", + "tokio", ] [[package]] -name = "mio" -version = "0.8.8" +name = "libp2p-request-response" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "async-trait", + "futures 0.3.29", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand 0.8.5", + "smallvec", ] [[package]] -name = "mockall" -version = "0.11.4" +name = "libp2p-swarm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ - "cfg-if", - "downcast", - "fragile", - "lazy_static", - "mockall_derive", - "predicates", - "predicates-tree", + "either", + "fnv", + "futures 0.3.29", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm-derive", + "log", + "rand 0.8.5", + "smallvec", + "tokio", + "void", ] [[package]] -name = "mockall_derive" -version = "0.11.4" +name = "libp2p-swarm-derive" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ - "cfg-if", - "proc-macro2", + "heck 0.4.1", "quote", "syn 1.0.109", ] [[package]] -name = "multiaddr" -version = "0.17.1" +name = "libp2p-tcp" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ - "arrayref", - "byteorder", - "data-encoding", + "futures 0.3.29", + "futures-timer", + "if-watch", + "libc", + "libp2p-core", "log", - "multibase", - "multihash 0.17.0", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint", - "url", + "socket2 0.4.10", + "tokio", ] [[package]] -name = "multibase" -version = "0.9.1" +name = "libp2p-tls" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "base-x", - "data-encoding", - "data-encoding-macro", + "futures 0.3.29", + "futures-rustls", + "libp2p-core", + "libp2p-identity", + "rcgen 0.10.0", + "ring 0.16.20", + "rustls 0.20.9", + "thiserror", + "webpki 0.22.4", + "x509-parser 0.14.0", + "yasna", ] [[package]] -name = "multihash" -version = "0.16.3" +name = "libp2p-wasm-ext" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", - "core2", - "digest 0.10.7", - "multihash-derive", - "sha2 0.10.7", - "sha3", - "unsigned-varint", + "futures 0.3.29", + "js-sys", + "libp2p-core", + "parity-send-wrapper", + "wasm-bindgen", + "wasm-bindgen-futures", ] [[package]] -name = "multihash" -version = "0.17.0" +name = "libp2p-webrtc" +version = "0.4.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" +checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" dependencies = [ - "core2", - "digest 0.10.7", - "multihash-derive", - "sha2 0.10.7", - "unsigned-varint", + "async-trait", + "asynchronous-codec", + "bytes", + "futures 0.3.29", + "futures-timer", + "hex", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-noise", + "log", + "multihash", + "quick-protobuf", + "quick-protobuf-codec", + "rand 0.8.5", + "rcgen 0.9.3", + "serde", + "stun", + "thiserror", + "tinytemplate", + "tokio", + "tokio-util", + "webrtc", ] [[package]] -name = "multihash-derive" -version = "0.8.1" +name = "libp2p-websocket" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + "either", + "futures 0.3.29", + "futures-rustls", + "libp2p-core", + "log", + "parking_lot 0.12.1", + "quicksink", + "rw-stream-sink", + "soketto", + "url", + "webpki-roots 0.22.6", +] [[package]] -name = "multistream-select" -version = "0.12.1" +name = "libp2p-yamux" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ - "bytes", - "futures 0.3.28", + "futures 0.3.29", + "libp2p-core", "log", - "pin-project", - "smallvec", - "unsigned-varint", + "thiserror", + "yamux", ] [[package]] -name = "nalgebra" -version = "0.32.3" +name = "librocksdb-sys" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "simba", - "typenum", + "bindgen", + "bzip2-sys", + "cc", + "glob", + "libc", + "libz-sys", + "tikv-jemalloc-sys", ] [[package]] -name = "nalgebra-macros" -version = "0.2.1" +name = "libsecp256k1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "arrayref", + "base64 0.13.1", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", ] [[package]] -name = "names" -version = "0.13.0" +name = "libsecp256k1-core" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ - "rand 0.8.5", + "crunchy", + "digest 0.9.0", + "subtle", ] [[package]] -name = "netlink-packet-core" -version = "0.4.2" +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" dependencies = [ - "anyhow", - "byteorder", - "libc", - "netlink-packet-utils", + "libsecp256k1-core", ] [[package]] -name = "netlink-packet-route" -version = "0.12.0" +name = "libsecp256k1-gen-genmult" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" dependencies = [ - "anyhow", - "bitflags 1.3.2", - "byteorder", - "libc", - "netlink-packet-core", - "netlink-packet-utils", + "libsecp256k1-core", ] [[package]] -name = "netlink-packet-utils" -version = "0.5.2" +name = "libz-sys" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ - "anyhow", - "byteorder", - "paste", - "thiserror", + "cc", + "pkg-config", + "vcpkg", ] [[package]] -name = "netlink-proto" -version = "0.10.0" +name = "link-cplusplus" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" dependencies = [ - "bytes", - "futures 0.3.28", - "log", - "netlink-packet-core", - "netlink-sys", - "thiserror", - "tokio", + "cc", ] [[package]] -name = "netlink-sys" -version = "0.8.5" +name = "linked-hash-map" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linked_hash_set" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" dependencies = [ - "bytes", - "futures 0.3.28", - "libc", - "log", - "tokio", + "linked-hash-map", ] [[package]] -name = "nix" -version = "0.24.3" +name = "linregress" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", + "nalgebra", ] [[package]] -name = "node-polkadex-runtime" -version = "5.3.0" +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" + +[[package]] +name = "liquidity" +version = "1.1.0" dependencies = [ "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.3.4", - "liquidity", - "log", - "orderbook-primitives", - "orml-vesting", "pallet-assets", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-elections-phragmen", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-multisig", "pallet-ocex-lmp", - "pallet-ocex-runtime-api", - "pallet-offences", - "pallet-preimage", - "pallet-proxy", - "pallet-recovery", - "pallet-rewards", - "pallet-rewards-runtime-api", - "pallet-scheduler", - "pallet-session", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", "parity-scale-codec", - "pdex-migration", "polkadex-primitives", - "rpc-assets-runtime-api", - "rust_decimal", "scale-info", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", "sp-core", - "sp-inherents", "sp-io", - "sp-npos-elections", - "sp-offchain", "sp-runtime", - "sp-session", - "sp-staking", "sp-std", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", - "thea", - "thea-executor", - "thea-message-handler", ] [[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +name = "load-testing" +version = "0.1.0" dependencies = [ - "memchr", - "minimal-lexical", + "jsonrpsee", + "orderbook-primitives", + "polkadex-primitives", + "serde_json", + "sp-core", + "sp-keyring", + "tokio", ] [[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - -[[package]] -name = "num-bigint" -version = "0.4.4" +name = "lock_api" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", - "num-integer", - "num-traits", + "scopeguard", ] [[package]] -name = "num-complex" -version = "0.4.4" +name = "log" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" -dependencies = [ - "num-traits", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "num-format" -version = "0.4.4" +name = "lru" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ - "arrayvec 0.7.4", - "itoa", + "hashbrown 0.13.2", ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "lru" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" [[package]] -name = "num-rational" -version = "0.4.1" +name = "lru-cache" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", + "linked-hash-map", ] [[package]] -name = "num-traits" -version = "0.2.16" +name = "lz4" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" dependencies = [ - "autocfg", + "libc", + "lz4-sys", ] [[package]] -name = "num_cpus" -version = "1.16.0" +name = "lz4-sys" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" dependencies = [ - "hermit-abi 0.3.2", + "cc", "libc", ] [[package]] -name = "number_prefix" -version = "0.4.0" +name = "mach" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] [[package]] -name = "object" -version = "0.30.4" +name = "macro_magic" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" dependencies = [ - "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", - "memchr", + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.38", ] [[package]] -name = "object" -version = "0.32.0" +name = "macro_magic_core" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" dependencies = [ - "memchr", + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "oid-registry" -version = "0.4.0" +name = "macro_magic_core_macros" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" +checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ - "asn1-rs 0.3.1", + "proc-macro2", + "quote", + "syn 2.0.38", ] [[package]] -name = "oid-registry" -version = "0.6.1" +name = "macro_magic_macros" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ - "asn1-rs 0.5.2", + "macro_magic_core", + "quote", + "syn 2.0.38", ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "maplit" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] -name = "opaque-debug" -version = "0.2.3" +name = "match_cfg" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] -name = "opaque-debug" -version = "0.3.0" +name = "matchers" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata 0.1.10", +] [[package]] -name = "openssl-probe" -version = "0.1.5" +name = "matches" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] -name = "orderbook-primitives" -version = "1.1.0" +name = "matrixmultiply" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ - "anyhow", - "chrono", - "log", - "parity-scale-codec", - "polkadex-primitives", - "primitive-types", - "rand 0.8.5", - "rust_decimal", - "scale-info", - "serde", - "serde_json", - "serde_with", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "autocfg", + "rawpointer", ] [[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" +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-io", - "sp-runtime", - "sp-std", + "cfg-if", + "digest 0.10.7", ] [[package]] -name = "p256" -version = "0.11.1" +name = "memchr" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", -] +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] -name = "p384" -version = "0.11.2" +name = "memfd" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", + "rustix 0.38.21", ] [[package]] -name = "pallet-assets" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "libc", ] [[package]] -name = "pallet-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "frame-support", - "frame-system", - "pallet-session", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-authority-discovery", - "sp-runtime", - "sp-std", + "autocfg", ] [[package]] -name = "pallet-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", + "autocfg", ] [[package]] -name = "pallet-babe" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "pallet-session", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-consensus-babe", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "autocfg", ] [[package]] -name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "memory-db" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", + "hash-db", ] [[package]] -name = "pallet-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" dependencies = [ - "frame-support", - "frame-system", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "scale-info", - "serde", - "sp-consensus-beefy", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", ] [[package]] -name = "pallet-beefy-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ - "array-bytes 4.2.0", - "binary-merkle-tree", - "frame-support", - "frame-system", - "log", - "pallet-beefy", - "pallet-mmr", - "pallet-session", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-consensus-beefy", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", ] [[package]] -name = "pallet-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "mick-jaeger" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-treasury", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "futures 0.3.29", + "rand 0.8.5", + "thrift", ] [[package]] -name = "pallet-child-bounties" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-bounties", - "pallet-treasury", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "adler", ] [[package]] -name = "pallet-collective" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "mio" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] -name = "pallet-democracy" +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 = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "futures 0.3.29", "log", "parity-scale-codec", - "scale-info", - "serde", + "sc-client-api", + "sc-offchain", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-beefy", "sp-core", - "sp-io", + "sp-mmr-primitives", "sp-runtime", - "sp-std", ] [[package]] -name = "pallet-election-provider-multi-phase" +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 = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log", - "pallet-election-provider-support-benchmarking", + "anyhow", + "jsonrpsee", "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "sp-arithmetic", + "serde", + "sp-api", + "sp-blockchain", "sp-core", - "sp-io", - "sp-npos-elections", + "sp-mmr-primitives", "sp-runtime", - "sp-std", - "strum", ] [[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" +name = "mockall" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-system", - "parity-scale-codec", - "sp-npos-elections", - "sp-runtime", + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", ] [[package]] -name = "pallet-elections-phragmen" -version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "mockall_derive" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-std", + "cfg-if", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "pallet-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "multiaddr" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "arrayref", + "byteorder", + "data-encoding", "log", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", + "multibase", + "multihash", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint", + "url", ] [[package]] -name = "pallet-identity" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" dependencies = [ - "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "base-x", + "data-encoding", + "data-encoding-macro", ] [[package]] -name = "pallet-im-online" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "multihash" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "blake2b_simd", + "blake2s_simd", + "blake3", + "core2", + "digest 0.10.7", + "multihash-derive", + "sha2 0.10.8", + "sha3", + "unsigned-varint", ] [[package]] -name = "pallet-indices" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "multihash-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std", + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", ] [[package]] -name = "pallet-membership" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "multistream-select" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "bytes", + "futures 0.3.29", "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "pin-project", + "smallvec", + "unsigned-varint", ] [[package]] -name = "pallet-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "nalgebra" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-mmr-primitives", - "sp-runtime", - "sp-std", + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", ] [[package]] -name = "pallet-multisig" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "nalgebra-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "pallet-ocex-lmp" -version = "5.3.0" +name = "names" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "hash-db", - "liquidity", - "log", - "orderbook-primitives", - "pallet-assets", - "pallet-balances", - "pallet-timestamp", - "parity-scale-codec", - "polkadex-primitives", - "rust_decimal", - "scale-info", - "serde", - "serde_json", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-std", - "sp-trie", - "trie-db", + "rand 0.8.5", ] [[package]] -name = "pallet-ocex-rpc" -version = "0.1.0" -dependencies = [ - "hash-db", - "jsonrpsee", - "orderbook-primitives", - "pallet-ocex-runtime-api", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadex-primitives", - "sc-rpc", - "sc-rpc-api", - "serde", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-offchain", - "sp-rpc", - "sp-runtime", - "sp-trie", - "tokio", - "trie-db", -] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" [[package]] -name = "pallet-ocex-runtime-api" -version = "0.1.0" +name = "netlink-packet-core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" dependencies = [ - "orderbook-primitives", - "parity-scale-codec", - "polkadex-primitives", - "rust_decimal", - "sp-api", - "sp-core", - "sp-runtime", - "sp-std", + "anyhow", + "byteorder", + "libc", + "netlink-packet-utils", ] [[package]] -name = "pallet-offences" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "netlink-packet-route" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" dependencies = [ - "frame-support", - "frame-system", - "log", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "serde", - "sp-runtime", - "sp-staking", - "sp-std", + "anyhow", + "bitflags 1.3.2", + "byteorder", + "libc", + "netlink-packet-core", + "netlink-packet-utils", ] [[package]] -name = "pallet-preimage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "netlink-packet-utils" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "anyhow", + "byteorder", + "paste", + "thiserror", ] [[package]] -name = "pallet-proxy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "netlink-proto" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "bytes", + "futures 0.3.29", + "log", + "netlink-packet-core", + "netlink-sys", + "thiserror", + "tokio", ] [[package]] -name = "pallet-recovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "netlink-sys" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "bytes", + "futures 0.3.29", + "libc", + "log", + "tokio", ] [[package]] -name = "pallet-rewards" -version = "1.1.0" -dependencies = [ +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "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.4.0" +dependencies = [ "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.3.4", + "liquidity", + "log", + "orderbook-primitives", + "orml-vesting", + "pallet-asset-conversion", + "pallet-asset-conversion-tx-payment", + "pallet-asset-tx-payment", "pallet-assets", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", "pallet-balances", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-elections-phragmen", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-multisig", + "pallet-ocex-lmp", + "pallet-ocex-runtime-api", + "pallet-offences", + "pallet-preimage", + "pallet-proxy", + "pallet-recovery", + "pallet-rewards", + "pallet-rewards-runtime-api", + "pallet-scheduler", + "pallet-session", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-statement", + "pallet-sudo", "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", "parity-scale-codec", + "pdex-migration", "polkadex-primitives", + "rpc-assets-runtime-api", + "rust_decimal", "scale-info", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", "sp-core", + "sp-inherents", "sp-io", + "sp-npos-elections", + "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", + "thea", + "thea-executor", + "thea-message-handler", ] [[package]] -name = "pallet-rewards-rpc" -version = "0.1.0" -dependencies = [ - "jsonrpsee", - "pallet-rewards-runtime-api", - "parity-scale-codec", - "polkadex-primitives", - "serde", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-rpc", - "sp-runtime", -] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] -name = "pallet-rewards-runtime-api" -version = "0.1.0" -dependencies = [ - "parity-scale-codec", - "polkadex-primitives", - "sp-api", - "sp-core", - "sp-runtime", - "sp-std", -] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] -name = "pallet-root-testing" -version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "memchr", + "minimal-lexical", ] [[package]] -name = "pallet-scheduler" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", + "autocfg", + "num-integer", + "num-traits", ] [[package]] -name = "pallet-session" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "num-complex" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-trie", + "num-traits", ] [[package]] -name = "pallet-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "scale-info", - "serde", - "sp-application-crypto", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "arrayvec 0.7.4", + "itoa", ] [[package]] -name = "pallet-staking-reward-curve" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 2.0.29", + "autocfg", + "num-traits", ] [[package]] -name = "pallet-sudo" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "autocfg", + "num-bigint", + "num-integer", + "num-traits", ] [[package]] -name = "pallet-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-timestamp", + "autocfg", ] [[package]] -name = "pallet-transaction-payment" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "hermit-abi 0.3.3", + "libc", ] [[package]] -name = "pallet-transaction-payment-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ - "jsonrpsee", - "pallet-transaction-payment-rpc-runtime-api", + "crc32fast", + "hashbrown 0.13.2", + "indexmap 1.9.3", + "memchr", +] + +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" +dependencies = [ + "asn1-rs 0.3.1", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs 0.5.2", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +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.29", + "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" +dependencies = [ + "anyhow", + "chrono", + "log", "parity-scale-codec", + "polkadex-primitives", + "primitive-types", + "rand 0.8.5", + "rust_decimal", + "scale-info", + "serde", + "serde_json", + "serde_with", "sp-api", - "sp-blockchain", + "sp-application-crypto", "sp-core", - "sp-rpc", + "sp-io", "sp-runtime", - "sp-weights", + "sp-std", ] [[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" +name = "ordered-float" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" dependencies = [ - "pallet-transaction-payment", + "num-traits", +] + +[[package]] +name = "orml-traits" +version = "0.4.1-dev" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" +dependencies = [ + "frame-support", + "impl-trait-for-tuples", + "num-traits", + "orml-utilities", "parity-scale-codec", - "sp-api", + "scale-info", + "serde", + "sp-core", + "sp-io", "sp-runtime", - "sp-weights", + "sp-std", + "staging-xcm", ] [[package]] -name = "pallet-treasury" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "orml-utilities" +version = "0.4.1-dev" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ - "frame-benchmarking", "frame-support", - "frame-system", - "impl-trait-for-tuples", - "pallet-balances", "parity-scale-codec", "scale-info", "serde", + "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-utility" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +name = "orml-vesting" +version = "0.4.1-dev" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core", + "serde", "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "parity-db" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +name = "orml-xcm-support" +version = "0.4.1-dev" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ - "blake2", - "crc32fast", - "fs2", - "hex", - "libc", - "log", - "lz4", - "memmap2", - "parking_lot 0.12.1", - "rand 0.8.5", - "siphasher", - "snap", + "frame-support", + "orml-traits", + "parity-scale-codec", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-executor", ] [[package]] -name = "parity-scale-codec" -version = "3.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" +name = "orml-xtokens" +version = "0.4.1-dev" +source = "git+https://github.com/Polkadex-Substrate/orml-1.1.0.git?branch=master#7efeb66494d8564d802e7e5e2272f933a0600f60" dependencies = [ - "arrayvec 0.7.4", - "bitvec", - "byte-slice-cast", - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec-derive", + "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", + "staging-xcm", + "staging-xcm-executor", ] [[package]] -name = "parity-scale-codec-derive" -version = "3.6.4" +name = "p256" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", ] [[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" +name = "p384" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", ] [[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +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 = [ - "lock_api", - "parking_lot_core 0.9.8", + "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 = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +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 = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "frame-support", + "frame-system", + "pallet-asset-conversion", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", ] [[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +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" +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", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-aura" +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", + "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" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-support", + "frame-system", + "pallet-session", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-authority-discovery", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-authorship" +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", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-babe" +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-authorship", + "pallet-session", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-bags-list" +version = "4.0.0-dev" +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", + "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" +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-beefy" +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", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "scale-info", + "serde", + "sp-consensus-beefy", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-beefy-mmr" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "array-bytes", + "binary-merkle-tree", + "frame-support", + "frame-system", + "log", + "pallet-beefy", + "pallet-mmr", + "pallet-session", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-consensus-beefy", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-child-bounties" +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-bounties", + "pallet-treasury", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-collator-selection" +version = "3.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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" +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", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-democracy" +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", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-election-provider-multi-phase" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-election-provider-support-benchmarking", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-std", + "strum 0.24.1", +] + +[[package]] +name = "pallet-election-provider-support-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-system", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "docify", + "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" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-grandpa", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-identity" +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", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-im-online" +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-authorship", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-indices" +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-io", + "sp-keyring", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-membership" +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-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-message-queue" +version = "7.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", + "sp-weights", +] + +[[package]] +name = "pallet-mmr" +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-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-multisig" +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-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-nis" +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-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-nomination-pools" +version = "1.0.0" +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", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "pallet-nomination-pools-benchmarking" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "pallet-nomination-pools", + "parity-scale-codec", + "sp-api", + "sp-std", +] + +[[package]] +name = "pallet-ocex-lmp" +version = "5.3.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "hash-db", + "liquidity", + "log", + "orderbook-primitives", + "pallet-assets", + "pallet-balances", + "pallet-timestamp", + "parity-scale-codec", + "polkadex-primitives", + "rust_decimal", + "scale-info", + "serde", + "serde_json", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-std", + "sp-trie", + "trie-db", +] + +[[package]] +name = "pallet-ocex-rpc" +version = "0.1.0" +dependencies = [ + "hash-db", + "jsonrpsee", + "orderbook-primitives", + "pallet-ocex-runtime-api", + "parity-scale-codec", + "parking_lot 0.12.1", + "polkadex-primitives", + "sc-rpc", + "sc-rpc-api", + "serde", + "serde_json", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-offchain", + "sp-rpc", + "sp-runtime", + "sp-trie", + "tokio", + "trie-db", +] + +[[package]] +name = "pallet-ocex-runtime-api" +version = "0.1.0" +dependencies = [ + "orderbook-primitives", + "parity-scale-codec", + "polkadex-primitives", + "rust_decimal", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-offences" +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", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-offences-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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" +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", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-proxy" +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 = "pallet-ranked-collective" +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-recovery" +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 = "pallet-referenda" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-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", + "serde_json", + "sp-api", + "sp-blockchain", + "sp-rpc", + "sp-runtime", +] + +[[package]] +name = "pallet-rewards-runtime-api" +version = "0.1.0" +dependencies = [ + "parity-scale-codec", + "polkadex-primitives", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-scheduler" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "pallet-session" +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", + "impl-trait-for-tuples", + "log", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-trie", +] + +[[package]] +name = "pallet-session-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?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", + "sp-std", +] + +[[package]] +name = "pallet-society" +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", + "rand_chacha 0.2.2", + "scale-info", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-staking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "rand_chacha 0.2.2", + "scale-info", + "serde", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-staking-reward-curve" +version = "4.0.0-dev" +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.38", +] + +[[package]] +name = "pallet-staking-reward-fn" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "log", + "sp-arithmetic", +] + +[[package]] +name = "pallet-staking-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "parity-scale-codec", + "sp-api", +] + +[[package]] +name = "pallet-state-trie-migration" +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-core", + "sp-io", + "sp-runtime", + "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" +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 = "pallet-timestamp" +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-inherents", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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" +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", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-transaction-payment-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "jsonrpsee", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "pallet-transaction-payment-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "pallet-transaction-payment", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "pallet-treasury" +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", + "impl-trait-for-tuples", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-utility" +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-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-vesting" +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-whitelist" +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-runtime", + "sp-std", +] + +[[package]] +name = "pallet-xcm" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "bounded-collections", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "pallet-xcm-benchmarks" +version = "1.0.0" +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-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "parachain-info" +version = "0.1.0" +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.7", + "color-print", + "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", + "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", + "futures 0.3.29", + "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-offchain", + "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", + "staging-xcm", + "substrate-build-script-utils 3.0.0", + "substrate-frame-rpc-system", + "substrate-prometheus-endpoint", + "try-runtime-cli", +] + +[[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-primitives", + "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-staking", + "sp-std", + "sp-storage", + "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-helper", +] + +[[package]] +name = "parity-db" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" +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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +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.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + +[[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.9", +] + +[[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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +dependencies = [ + "crypto-mac 0.11.1", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +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" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-sudo", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "pem-rfc7468" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pest" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "pest_meta" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +dependencies = [ + "once_cell", + "pest", + "sha2 0.10.8", +] + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.1.0", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der 0.6.1", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.8", + "spki 0.7.2", +] + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "platforms" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" + +[[package]] +name = "platforms" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" + +[[package]] +name = "polkadex-client" +version = "5.3.0" +dependencies = [ + "frame-benchmarking", + "node-polkadex-runtime", + "sc-executor", + "sp-statement-store", +] + +[[package]] +name = "polkadex-node" +version = "5.4.0" +dependencies = [ + "clap 4.4.7", + "frame-benchmarking-cli", + "frame-support", + "frame-system", + "frame-try-runtime", + "futures 0.3.29", + "hex-literal 0.4.1", + "itertools 0.10.5", + "jsonrpsee", + "node-polkadex-runtime", + "pallet-asset-conversion-tx-payment", + "pallet-im-online", + "pallet-ocex-lmp", + "pallet-ocex-rpc", + "pallet-rewards-rpc", + "pallet-transaction-payment-rpc", + "parity-scale-codec", + "polkadex-client", + "polkadex-primitives", + "rpc-assets", + "sc-authority-discovery", + "sc-basic-authorship", + "sc-chain-spec", + "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-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", + "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-statement-store", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "futures 0.3.29", + "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", +] + +[[package]] +name = "polkadot-availability-bitfield-distribution" +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.29", + "futures-timer", + "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 = "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.29", + "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", + "schnellru", + "sp-core", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-availability-recovery" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "fatality", + "futures 0.3.29", + "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", + "schnellru", + "thiserror", + "tracing-gum", +] + +[[package]] +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.7", + "frame-benchmarking-cli", + "futures 0.3.29", + "log", + "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-collator-protocol" +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.29", + "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", + "tokio-util", + "tracing-gum", +] + +[[package]] +name = "polkadot-core-primitives" +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", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "polkadot-dispute-distribution" +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.29", + "futures-timer", + "indexmap 1.9.3", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sc-network", + "schnellru", + "sp-application-crypto", + "sp-keystore", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-erasure-coding" +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", + "polkadot-primitives", + "reed-solomon-novelpoly", + "sp-core", + "sp-trie", + "thiserror", +] + +[[package]] +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.29", + "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", + "sc-network-common", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "tracing-gum", +] + +[[package]] +name = "polkadot-network-bridge" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "always-assert", + "async-trait", + "bytes", + "fatality", + "futures 0.3.29", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "futures 0.3.29", + "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 = "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.29", + "futures-timer", + "kvdb", + "merlin 2.0.1", + "parity-scale-codec", + "polkadot-node-jaeger", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "sc-keystore", + "schnellru", + "schnorrkel 0.9.1", + "sp-application-crypto", + "sp-consensus", + "sp-consensus-slots", + "sp-runtime", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-av-store" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "bitvec", + "futures 0.3.29", + "futures-timer", + "kvdb", + "parity-scale-codec", + "polkadot-erasure-coding", + "polkadot-node-jaeger", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "bitvec", + "fatality", + "futures 0.3.29", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "futures 0.3.29", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-keystore", + "thiserror", + "tracing-gum", + "wasm-timer", +] + +[[package]] +name = "polkadot-node-core-candidate-validation" +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.29", + "futures-timer", + "parity-scale-codec", + "polkadot-node-core-pvf", + "polkadot-node-metrics", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-parachain-primitives", + "polkadot-primitives", + "sp-maybe-compressed-blob", + "tracing-gum", +] + +[[package]] +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.29", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "futures 0.3.29", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "fatality", + "futures 0.3.29", + "kvdb", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "async-trait", + "futures 0.3.29", + "futures-timer", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "sp-blockchain", + "sp-inherents", + "thiserror", + "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.29", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "bitvec", + "fatality", + "futures 0.3.29", + "futures-timer", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf" +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.29", + "futures-timer", + "libc", + "parity-scale-codec", + "pin-project", + "polkadot-core-primitives", + "polkadot-node-core-pvf-common", + "polkadot-node-metrics", + "polkadot-node-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "rand 0.8.5", + "slotmap", + "sp-core", + "sp-maybe-compressed-blob", + "sp-wasm-interface", + "substrate-build-script-utils 3.0.0", + "tempfile", + "tokio", + "tracing-gum", +] + +[[package]] +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.29", + "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-common" +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.29", + "landlock", + "libc", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "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.29", + "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", + "tikv-jemalloc-ctl", + "tokio", + "tracing-gum", +] + +[[package]] +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.29", + "polkadot-node-metrics", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types", + "polkadot-primitives", + "schnellru", + "sp-consensus-babe", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-jaeger" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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 = "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.29", + "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 = "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.29", + "hex", + "parity-scale-codec", + "polkadot-node-jaeger", + "polkadot-node-primitives", + "polkadot-primitives", + "rand 0.8.5", + "sc-authority-discovery", + "sc-network", + "strum 0.24.1", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-primitives" +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.29", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "schnorrkel 0.9.1", + "serde", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-keystore", + "sp-maybe-compressed-blob", + "sp-runtime", + "thiserror", + "zstd 0.12.4", +] + +[[package]] +name = "polkadot-node-subsystem" +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", + "polkadot-overseer", +] + +[[package]] +name = "polkadot-node-subsystem-types" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "async-trait", + "derive_more", + "futures 0.3.29", + "orchestra", + "polkadot-node-jaeger", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-primitives", + "polkadot-statement-table", + "sc-network", + "sc-transaction-pool-api", "smallvec", - "windows-targets 0.48.5", + "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", + "substrate-prometheus-endpoint", + "thiserror", ] [[package]] -name = "partial_sort" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" +name = "polkadot-node-subsystem-util" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "async-trait", + "derive_more", + "fatality", + "futures 0.3.29", + "futures-channel", + "itertools 0.10.5", + "kvdb", + "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", + "schnellru", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "thiserror", + "tracing-gum", +] [[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +name = "polkadot-overseer" +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.29", + "futures-timer", + "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", + "schnellru", + "sp-api", + "sp-core", + "tikv-jemalloc-ctl", + "tracing-gum", +] [[package]] -name = "pbkdf2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +name = "polkadot-parachain-primitives" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "crypto-mac 0.11.1", + "bounded-collections", + "derive_more", + "frame-support", + "parity-scale-codec", + "polkadot-core-primitives", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +name = "polkadot-performance-test" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "digest 0.10.7", + "env_logger 0.9.3", + "log", + "polkadot-erasure-coding", + "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 = "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-primitives", + "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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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 = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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", + "pallet-xcm-benchmarks", + "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-storage", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", + "substrate-wasm-builder", ] [[package]] -name = "pdex-migration" -version = "1.1.0" +name = "polkadot-runtime-common" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" 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-sudo", + "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", + "staging-xcm", + "static_assertions", ] [[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pest" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[package]] -name = "pest_meta" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" -dependencies = [ - "once_cell", - "pest", - "sha2 0.10.7", -] - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.0.0", -] - -[[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +name = "polkadot-runtime-constants" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "der 0.6.1", - "spki 0.6.0", + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", ] [[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +name = "polkadot-runtime-metrics" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "der 0.7.8", - "spki 0.7.2", + "bs58 0.5.0", + "frame-benchmarking", + "parity-scale-codec", + "polkadot-primitives", + "sp-std", + "sp-tracing", ] [[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "platforms" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" - -[[package]] -name = "platforms" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" - -[[package]] -name = "polkadex-client" -version = "5.3.0" +name = "polkadot-runtime-parachains" +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", + "derive_more", "frame-benchmarking", - "node-polkadex-runtime", - "sc-executor", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "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-primitives", + "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", + "staging-xcm", + "staging-xcm-executor", + "static_assertions", ] [[package]] -name = "polkadex-node" -version = "5.3.0" +name = "polkadot-service" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" dependencies = [ - "clap 4.4.0", + "async-trait", + "frame-benchmarking", "frame-benchmarking-cli", "frame-support", "frame-system", - "frame-try-runtime", - "futures 0.3.28", + "frame-system-rpc-runtime-api", + "futures 0.3.29", "hex-literal 0.4.1", - "itertools", - "jsonrpsee", - "node-polkadex-runtime", + "is_executable", + "kvdb", + "kvdb-rocksdb", + "log", + "mmr-gadget", + "pallet-babe", "pallet-im-online", - "pallet-ocex-lmp", - "pallet-ocex-rpc", - "pallet-rewards-rpc", + "pallet-staking", "pallet-transaction-payment", - "pallet-transaction-payment-rpc", + "pallet-transaction-payment-rpc-runtime-api", + "parity-db", "parity-scale-codec", - "polkadex-client", - "polkadex-primitives", - "rpc-assets", + "polkadot-approval-distribution", + "polkadot-availability-bitfield-distribution", + "polkadot-availability-distribution", + "polkadot-availability-recovery", + "polkadot-collator-protocol", + "polkadot-core-primitives", + "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-prospective-parachains", + "polkadot-node-core-provisioner", + "polkadot-node-core-pvf", + "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-primitives", + "polkadot-primitives", + "polkadot-rpc", + "polkadot-runtime", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "polkadot-statement-distribution", + "rococo-runtime", "sc-authority-discovery", "sc-basic-authorship", + "sc-block-builder", "sc-chain-spec", - "sc-cli", "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", + "schnellru", "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-io", "sp-keyring", "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-version", + "sp-weights", + "staging-kusama-runtime", + "substrate-prometheus-endpoint", + "thiserror", + "tracing-gum", + "westend-runtime", ] [[package]] -name = "polkadex-primitives" -version = "1.1.0" +name = "polkadot-statement-distribution" +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", + "arrayvec 0.7.4", + "bitvec", + "fatality", + "futures 0.3.29", + "futures-timer", + "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-types", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-keystore", + "sp-staking", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-statement-table" +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", "sp-core", - "sp-runtime", - "sp-std", ] [[package]] @@ -6234,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" @@ -6245,6 +9579,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" @@ -6271,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 = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" + +[[package]] +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" @@ -6289,7 +9640,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -6333,19 +9684,19 @@ 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.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", @@ -6354,6 +9705,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.29", + "futures-timer", + "nanorand", + "thiserror", + "tracing", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -6365,12 +9732,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]] @@ -6399,20 +9766,20 @@ dependencies = [ [[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.38", ] [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -6451,7 +9818,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -6472,7 +9839,7 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck 0.4.1", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", @@ -6493,7 +9860,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", @@ -6578,20 +9945,20 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" 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.4", ] [[package]] @@ -6697,9 +10064,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", @@ -6707,14 +10074,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]] @@ -6724,8 +10089,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", ] @@ -6737,8 +10102,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", ] @@ -6760,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" @@ -6771,6 +10145,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "reed-solomon-novelpoly" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58130877ca403ab42c864fbac74bb319a0746c07a634a92a5cfc7f54af272582" +dependencies = [ + "derive_more", + "fs-err", + "itertools 0.11.0", + "static_init", + "thiserror", +] + [[package]] name = "ref-cast" version = "1.0.20" @@ -6788,7 +10175,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -6805,14 +10192,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.7", - "regex-syntax 0.7.5", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -6826,13 +10213,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.7" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", ] [[package]] @@ -6843,15 +10230,15 @@ 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" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" +checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" dependencies = [ "bytecheck", ] @@ -6887,6 +10274,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" @@ -6896,12 +10298,26 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "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" @@ -6940,6 +10356,108 @@ dependencies = [ "librocksdb-sys", ] +[[package]] +name = "rococo-runtime" +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", + "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-primitives", + "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-storage", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", + "substrate-wasm-builder", +] + +[[package]] +name = "rococo-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", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", +] + [[package]] name = "rpassword" version = "7.2.0" @@ -6995,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", @@ -7072,7 +10590,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.20", ] [[package]] @@ -7086,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", @@ -7100,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", @@ -7114,14 +10632,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.9" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfe0f2582b4931a45d1fa608f8a8722e8b3c7ac54dd6d5f3b3212791fedef49" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] @@ -7133,33 +10651,33 @@ 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", - "sct 0.7.0", - "webpki 0.22.0", + "ring 0.16.20", + "sct 0.7.1", + "webpki 0.22.4", ] [[package]] name = "rustls" -version = "0.21.6" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring", - "rustls-webpki 0.101.4", - "sct 0.7.0", + "ring 0.17.5", + "rustls-webpki", + "sct 0.7.1", ] [[package]] @@ -7180,27 +10698,17 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.3", -] - -[[package]] -name = "rustls-webpki" -version = "0.100.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" -dependencies = [ - "ring", - "untrusted", + "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -7209,13 +10717,24 @@ 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" 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", ] @@ -7247,7 +10766,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", @@ -7258,22 +10777,21 @@ 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", + "futures 0.3.29", "futures-timer", "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", @@ -7287,9 +10805,9 @@ 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 0.3.29", "futures-timer", "log", "parity-scale-codec", @@ -7310,7 +10828,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", @@ -7325,7 +10843,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", @@ -7344,24 +10862,24 @@ 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.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[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.7", "fdlimit", - "futures 0.3.28", + "futures 0.3.29", "libp2p-identity", "log", "names", @@ -7373,7 +10891,6 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -7395,10 +10912,10 @@ 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", + "futures 0.3.29", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -7411,7 +10928,6 @@ dependencies = [ "sp-core", "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", "sp-statement-store", @@ -7422,7 +10938,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", @@ -7448,10 +10964,10 @@ 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", + "futures 0.3.29", "futures-timer", "libp2p-identity", "log", @@ -7470,14 +10986,43 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-aura" +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.29", + "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" -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", - "futures 0.3.28", + "futures 0.3.29", "log", "num-bigint", "num-rational", @@ -7488,8 +11033,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", @@ -7509,9 +11054,9 @@ 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", + "futures 0.3.29", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -7528,10 +11073,63 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "array-bytes", + "async-channel", + "async-trait", + "fnv", + "futures 0.3.29", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-consensus", + "sc-network", + "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/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "futures 0.3.29", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-consensus-beefy", + "sc-rpc", + "serde", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "thiserror", +] + [[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", @@ -7544,15 +11142,15 @@ 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", + "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", @@ -7566,6 +11164,7 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -7584,10 +11183,10 @@ 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", + "futures 0.3.29", "jsonrpsee", "log", "parity-scale-codec", @@ -7604,10 +11203,10 @@ 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", + "futures 0.3.29", "futures-timer", "log", "parity-scale-codec", @@ -7627,13 +11226,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", @@ -7649,7 +11248,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", @@ -7661,14 +11260,13 @@ 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", + "rustix 0.36.17", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -7679,10 +11277,10 @@ 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", + "futures 0.3.29", "futures-timer", "log", "sc-client-api", @@ -7695,9 +11293,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", @@ -7709,63 +11307,58 @@ 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", "bytes", "either", "fnv", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "ip_network", "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", - "futures 0.3.28", + "futures 0.3.29", "libp2p-identity", "log", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", @@ -7775,45 +11368,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", + "futures 0.3.29", "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", + "ahash 0.8.6", + "futures 0.3.29", "futures-timer", "libp2p", "log", - "lru 0.8.1", "sc-network", "sc-network-common", - "sc-peerset", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -7822,11 +11403,11 @@ 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", + "futures 0.3.29", "libp2p-identity", "log", "parity-scale-codec", @@ -7834,28 +11415,43 @@ dependencies = [ "prost-build", "sc-client-api", "sc-network", - "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", "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.29", + "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" -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", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "libp2p", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "prost", @@ -7864,8 +11460,8 @@ dependencies = [ "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -7880,17 +11476,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", - "futures 0.3.28", + "array-bytes", + "futures 0.3.29", "libp2p", "log", "parity-scale-codec", - "pin-project", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-consensus", "sp-runtime", @@ -7900,16 +11494,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 0.3.29", "futures-timer", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", @@ -7918,36 +11513,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", @@ -7956,9 +11537,9 @@ 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", + "futures 0.3.29", "jsonrpsee", "log", "parity-scale-codec", @@ -7987,7 +11568,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", @@ -8006,7 +11587,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", @@ -8021,10 +11602,10 @@ 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", - "futures 0.3.28", + "array-bytes", + "futures 0.3.29", "futures-util", "hex", "jsonrpsee", @@ -8034,6 +11615,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -8041,18 +11623,19 @@ 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", "exit-future", - "futures 0.3.28", + "futures 0.3.29", "futures-timer", "jsonrpsee", "log", @@ -8074,11 +11657,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", @@ -8113,12 +11694,12 @@ 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", + "futures 0.3.29", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -8128,7 +11709,6 @@ dependencies = [ "sc-consensus", "sc-executor", "sc-network", - "sc-network-common", "sc-network-sync", "sc-service", "sc-transaction-pool-api", @@ -8151,7 +11731,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", @@ -8159,17 +11739,34 @@ 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/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.7", "fs4", - "futures 0.3.28", "log", "sc-client-db", - "sc-utils", "sp-core", "thiserror", "tokio", @@ -8178,7 +11775,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", @@ -8197,9 +11794,9 @@ 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", + "futures 0.3.29", "libc", "log", "rand 0.8.5", @@ -8216,10 +11813,10 @@ 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", + "futures 0.3.29", "libp2p", "log", "parking_lot 0.12.1", @@ -8235,7 +11832,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", @@ -8243,12 +11840,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", @@ -8266,25 +11861,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.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[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 0.3.29", "futures-timer", "linked-hash-map", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -8304,13 +11898,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", + "futures 0.3.29", "log", + "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -8318,10 +11914,10 @@ 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", + "futures 0.3.29", "futures-timer", "lazy_static", "log", @@ -8332,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", @@ -8346,11 +11942,11 @@ 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.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -8371,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", ] @@ -8386,7 +11982,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", @@ -8394,6 +11990,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" @@ -8412,18 +12024,18 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "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", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -8533,9 +12145,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -8548,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.29", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -8579,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", ] @@ -8599,7 +12211,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time 0.3.28", + "time", ] [[package]] @@ -8611,7 +12223,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -8629,9 +12241,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", @@ -8665,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", @@ -8686,18 +12298,18 @@ 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", ] [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" @@ -8768,11 +12380,139 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" +[[package]] +name = "slot-range-helper" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +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" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" + +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock", + "async-net", + "async-process", + "blocking", + "futures-lite", +] + +[[package]] +name = "smoldot" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" +dependencies = [ + "arrayvec 0.7.4", + "async-lock", + "atomic-take", + "base64 0.21.5", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "chacha20 0.9.1", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener 2.5.3", + "fnv", + "futures-lite", + "futures-util", + "hashbrown 0.14.2", + "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.8", + "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 = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" +dependencies = [ + "async-channel", + "async-lock", + "base64 0.21.5", + "blake2-rfc", + "derive_more", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-lite", + "futures-util", + "hashbrown 0.14.2", + "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" @@ -8789,19 +12529,19 @@ dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring", + "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", @@ -8809,9 +12549,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys 0.48.0", @@ -8826,7 +12566,7 @@ dependencies = [ "base64 0.13.1", "bytes", "flate2", - "futures 0.3.28", + "futures 0.3.29", "http", "httparse", "log", @@ -8837,7 +12577,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", @@ -8845,6 +12585,7 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -8857,21 +12598,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", - "proc-macro-crate 1.1.3", + "expander 2.0.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[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", @@ -8883,8 +12624,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", @@ -8898,7 +12639,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", @@ -8911,9 +12652,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", @@ -8923,13 +12663,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", + "futures 0.3.29", "log", - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -8941,10 +12681,10 @@ 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", + "futures 0.3.29", "log", "sp-core", "sp-inherents", @@ -8956,14 +12696,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", @@ -8974,7 +12713,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", @@ -8982,11 +12721,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", @@ -8995,7 +12732,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", @@ -9008,13 +12745,13 @@ dependencies = [ "sp-mmr-primitives", "sp-runtime", "sp-std", - "strum", + "strum 0.24.1", ] [[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", @@ -9032,7 +12769,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", @@ -9043,24 +12780,26 @@ 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", - "futures 0.3.28", + "ed25519-zebra 3.1.0", + "futures 0.3.29", "hash-db", "hash256-std-hasher", "impl-serde", "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -9068,7 +12807,7 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1", "secrecy", "serde", @@ -9082,38 +12821,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", + "sha2 0.10.8", "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.38", ] [[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", @@ -9121,18 +12859,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.38", ] [[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", @@ -9140,16 +12878,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", @@ -9157,13 +12905,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", @@ -9183,24 +12929,22 @@ 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", "sp-runtime", - "strum", + "strum 0.24.1", ] [[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", @@ -9209,7 +12953,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", @@ -9218,7 +12962,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", @@ -9229,7 +12973,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", @@ -9247,7 +12991,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", @@ -9261,7 +13005,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", @@ -9270,8 +13014,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", @@ -9281,7 +13025,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", @@ -9290,8 +13034,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", @@ -9312,8 +13056,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", @@ -9330,25 +13074,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.1.3", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[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", @@ -9357,8 +13102,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", @@ -9369,8 +13115,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", @@ -9385,16 +13131,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.3", + "curve25519-dalek 4.1.1", + "ed25519-dalek", + "hkdf", "parity-scale-codec", + "rand 0.8.5", "scale-info", + "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", @@ -9403,17 +13155,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", @@ -9426,11 +13179,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", @@ -9440,8 +13191,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", @@ -9453,7 +13204,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", @@ -9462,10 +13213,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", @@ -9477,10 +13227,10 @@ 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", + "ahash 0.8.6", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -9500,8 +13250,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", @@ -9517,33 +13267,32 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -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 = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +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", - "wasmi", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +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", @@ -9561,6 +13310,12 @@ 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" @@ -9569,7 +13324,7 @@ checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" dependencies = [ "lazy_static", "maplit", - "strum", + "strum 0.24.1", ] [[package]] @@ -9613,6 +13368,171 @@ 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 = "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", + "scale-info", + "serde", + "sp-weights", + "xcm-procedural", +] + +[[package]] +name = "staging-xcm-builder" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "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", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +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", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", + "staging-xcm", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -9689,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" @@ -9705,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" @@ -9716,7 +13655,7 @@ dependencies = [ "lazy_static", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "subtle", "thiserror", "tokio", @@ -9726,17 +13665,22 @@ 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", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "substrate-build-script-utils" +version = "3.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" + [[package]] name = "substrate-build-script-utils" version = "5.0.0" @@ -9749,10 +13693,10 @@ 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", + "futures 0.3.29", "jsonrpsee", "log", "parity-scale-codec", @@ -9768,7 +13712,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", @@ -9780,7 +13724,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", @@ -9790,14 +13734,31 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "substrate-state-trie-migration-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#f60318f68687e601c47de5ad5ca88e2c3f8139a7" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-client-api", + "sc-rpc-api", + "serde", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-trie", + "trie-db", +] + [[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", + "futures 0.3.29", "parity-scale-codec", "sc-client-api", "sc-client-db", @@ -9819,41 +13780,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", @@ -9867,12 +13823,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", + "futures 0.3.29", "sc-block-builder", - "sc-chain-spec", "sc-client-api", "sc-consensus", "sp-api", @@ -9887,16 +13841,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", + "strum 0.24.1", "tempfile", - "toml 0.7.6", + "toml 0.7.8", "walkdir", "wasm-opt", ] @@ -9916,6 +13871,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" @@ -9929,9 +13890,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -9979,28 +13940,28 @@ 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.0", - "redox_syscall 0.3.5", - "rustix 0.38.9", + "fastrand 2.0.1", + "redox_syscall 0.4.1", + "rustix 0.38.21", "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", ] @@ -10024,7 +13985,7 @@ dependencies = [ name = "thea" version = "5.3.0" dependencies = [ - "env_logger", + "env_logger 0.10.0", "frame-benchmarking", "frame-support", "frame-system", @@ -10048,6 +14009,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", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "thea", + "thea-message-handler", + "thea-primitives", + "xcm-helper", +] + [[package]] name = "thea-executor" version = "5.3.0" @@ -10055,6 +14044,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-assets", "pallet-balances", "pallet-timestamp", @@ -10068,9 +14058,9 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-std", + "staging-xcm", "thea", "thea-primitives", - "xcm", ] [[package]] @@ -10117,27 +14107,47 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "xcm", + "staging-xcm", ] [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" 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.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -10166,34 +14176,48 @@ dependencies = [ ] [[package]] -name = "tikv-jemalloc-sys" -version = "0.5.4+5.3.0-patched" +name = "thrift" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +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 = [ - "cc", "libc", + "paste", + "tikv-jemalloc-sys", ] [[package]] -name = "time" -version = "0.1.45" +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" dependencies = [ + "cc", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", ] [[package]] name = "time" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -10201,15 +14225,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", ] @@ -10226,13 +14250,22 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", "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" @@ -10260,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", @@ -10272,7 +14305,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] @@ -10285,7 +14318,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -10299,24 +14332,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.8", "tokio", ] @@ -10334,9 +14356,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -10358,9 +14380,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", @@ -10370,20 +14392,20 @@ 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", ] [[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", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -10403,11 +14425,11 @@ 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", + "bitflags 2.4.1", "bytes", "futures-core", "futures-util", @@ -10433,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", @@ -10446,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.29", + "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", @@ -10475,14 +14496,38 @@ dependencies = [ "tracing", ] +[[package]] +name = "tracing-gum" +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", + "tracing-gum-proc-macro", +] + +[[package]] +name = "tracing-gum-proc-macro" +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.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", ] @@ -10559,7 +14604,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tinyvec", "tokio", @@ -10596,10 +14641,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.7", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -10607,7 +14652,6 @@ dependencies = [ "parity-scale-codec", "sc-cli", "sc-executor", - "sc-service", "serde", "serde_json", "sp-api", @@ -10644,11 +14688,11 @@ checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" dependencies = [ "async-trait", "base64 0.13.1", - "futures 0.3.28", + "futures 0.3.29", "log", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "stun", "thiserror", "tokio", @@ -10669,9 +14713,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" @@ -10699,9 +14743,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" @@ -10720,9 +14764,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" @@ -10752,9 +14796,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", @@ -10768,11 +14812,17 @@ 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.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", @@ -10787,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", ] @@ -10835,15 +14885,15 @@ 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" -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", @@ -10864,12 +14914,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" @@ -10897,7 +14941,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -10931,7 +14975,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10953,14 +14997,14 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" +checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -10969,9 +15013,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" +checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" dependencies = [ "anyhow", "cxx", @@ -10981,9 +15025,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.112.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" +checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" dependencies = [ "anyhow", "cc", @@ -10997,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", @@ -11008,35 +15052,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]] @@ -11049,6 +15091,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" @@ -11093,14 +15144,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.21.3", + "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", @@ -11194,7 +15245,7 @@ checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ "object 0.30.4", "once_cell", - "rustix 0.36.15", + "rustix 0.36.17", ] [[package]] @@ -11225,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", @@ -11260,18 +15311,18 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -11280,16 +15331,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.0", -] - -[[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.2", + "webpki 0.22.4", ] [[package]] @@ -11314,17 +15356,17 @@ dependencies = [ "rand 0.8.5", "rcgen 0.9.3", "regex", - "ring", + "ring 0.16.20", "rtcp", "rtp", "rustls 0.19.1", "sdp", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "stun", "thiserror", - "time 0.3.28", + "time", "tokio", "turn", "url", @@ -11361,7 +15403,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", @@ -11378,12 +15420,12 @@ 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", "sha1", - "sha2 0.10.7", + "sha2 0.10.8", "signature 1.6.4", "subtle", "thiserror", @@ -11425,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", @@ -11506,22 +15548,136 @@ dependencies = [ "winapi", ] +[[package]] +name = "westend-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", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "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-mmr", + "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-primitives", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-application-crypto", + "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", + "substrate-wasm-builder", + "westend-runtime-constants", +] + +[[package]] +name = "westend-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", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", +] + [[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.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", @@ -11551,9 +15707,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", ] @@ -11566,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", ] @@ -11646,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" @@ -11664,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" @@ -11682,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" @@ -11700,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" @@ -11730,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" @@ -11750,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", ] @@ -11793,7 +15916,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.1", "rand_core 0.6.4", "serde", "zeroize", @@ -11812,10 +15935,10 @@ dependencies = [ "lazy_static", "nom", "oid-registry 0.4.0", - "ring", + "ring 0.16.20", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -11833,34 +15956,48 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] -name = "xcm" -version = "0.9.43" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" +name = "xcm-helper" +version = "0.1.0" dependencies = [ - "bounded-collections", - "derivative", - "impl-trait-for-tuples", - "log", + "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-weights", - "xcm-procedural", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "thea", + "thea-message-handler", + "thea-primitives", ] [[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.38", ] [[package]] @@ -11869,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", @@ -11889,7 +16026,27 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.28", + "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]] @@ -11909,7 +16066,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.38", ] [[package]] @@ -11952,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", ] diff --git a/Cargo.toml b/Cargo.toml index 1e4d14743..7d65144ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,10 @@ panic = "unwind" resolver = "2" members = [ "client", - "node", - "runtime", + "nodes/mainnet", + "nodes/parachain", + "runtimes/mainnet", + "runtimes/parachain", "rpc/assets", "rpc/assets/runtime-api", "pallets/pdex-migration", @@ -41,16 +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", ] -exclude = [ - "scripts/check-off-on-deviation", -] +exclude = ["scripts/check-off-on-deviation"] default-members = [ "client", - "node", - "runtime", + "nodes/mainnet", + "nodes/parachain", + "runtimes/mainnet", + "runtimes/parachain", "pallets/pdex-migration", "pallets/pdex-migration", "pallets/ocex", @@ -74,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 } @@ -81,117 +86,147 @@ 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 } +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 } + +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 } +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"] } 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/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/README.md b/README.md index 7a9eb1f0e..c56e239dc 100644 --- a/README.md +++ b/README.md @@ -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/client/Cargo.toml b/client/Cargo.toml index e2d98b3be..5ae053329 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -5,5 +5,6 @@ edition = "2021" [dependencies] sc-executor = { workspace = true } -node-polkadex-runtime = { path = "../runtime" } +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..81e786735 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) 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 && \ diff --git a/node/Cargo.toml b/node/Cargo.toml deleted file mode 100644 index 55a69856c..000000000 --- a/node/Cargo.toml +++ /dev/null @@ -1,110 +0,0 @@ -[package] -name = "polkadex-node" -version = "5.3.0" -authors = ["Polkadex OÜ "] -description = "Polkadex main blockchain" -edition = "2021" -license = "GNU GPL v3" -build = "build.rs" -homepage = "https://polkadex.trade" -repository = "https://github.com/Polkadex-Substrate/Polkadex/" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[build-dependencies] -substrate-build-script-utils = { version = "5.0.0" } -structopt = { version = "0.3.8", optional = true } - -[dependencies] -# third-party dependencies -codec = { package = "parity-scale-codec", version = "3.0.0" } -serde = { version = "1.0.136", features = ["derive"] } -futures = { version = "0.3.9", features = ["compat"] } -hex-literal = "0.4.1" -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" } - -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" } - -#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 } - - -## Force 0.9.2 as snow release to fix the compilation. -## -## When libp2p also enforces this version, we can get rid off this extra dep here. -#snow = "0.9.2" - -[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" } - -[features] -default = [] -runtime-benchmarks = ["node-polkadex-runtime/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks"] -cli = ["try-runtime-cli"] -try-runtime = ["node-polkadex-runtime/try-runtime", "try-runtime-cli/try-runtime"] diff --git a/nodes/mainnet/Cargo.toml b/nodes/mainnet/Cargo.toml new file mode 100644 index 000000000..2b86a38bb --- /dev/null +++ b/nodes/mainnet/Cargo.toml @@ -0,0 +1,105 @@ +[package] +name = "polkadex-node" +version = "5.4.0" +authors = ["Polkadex OÜ "] +description = "Polkadex main blockchain" +edition = "2021" +license = "GNU GPL v3" +build = "build.rs" +homepage = "https://polkadex.trade" +repository = "https://github.com/Polkadex-Substrate/Polkadex/" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[build-dependencies] +substrate-build-script-utils = { version = "5.0.0" } +structopt = { version = "0.3.8", optional = true } + +[dependencies] +# third-party dependencies +codec = { package = "parity-scale-codec", version = "3.0.0" } +serde = { version = "1.0.136", features = ["derive"] } +futures = { version = "0.3.9", features = ["compat"] } +hex-literal = "0.4.1" +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/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" } +# Substrate dependencies +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" } +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" } +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" } +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" } +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" } +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" } +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-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 } + +[dev-dependencies] +futures = "0.3.9" +tempfile = "3.1.0" +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 = [] +runtime-benchmarks = ["node-polkadex-runtime/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks"] +try-runtime = ["node-polkadex-runtime/try-runtime", "try-runtime-cli/try-runtime", "try-runtime-cli"] diff --git a/node/build.rs b/nodes/mainnet/build.rs similarity index 100% rename from node/build.rs rename to nodes/mainnet/build.rs diff --git a/node/src/benchmarking.rs b/nodes/mainnet/src/benchmarking.rs similarity index 100% rename from node/src/benchmarking.rs rename to nodes/mainnet/src/benchmarking.rs diff --git a/node/src/chain_spec.rs b/nodes/mainnet/src/chain_spec.rs similarity index 97% rename from node/src/chain_spec.rs rename to nodes/mainnet/src/chain_spec.rs index 7476b3902..5c3e553ba 100644 --- a/node/src/chain_spec.rs +++ b/nodes/mainnet/src/chain_spec.rs @@ -20,6 +20,11 @@ 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}; @@ -35,14 +40,6 @@ use sp_runtime::{ Perbill, }; -pub use node_polkadex_runtime::GenesisConfig; -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; const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; @@ -63,7 +60,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, @@ -76,7 +73,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, @@ -214,7 +211,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(); @@ -244,7 +241,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 = @@ -273,7 +270,7 @@ pub fn soba_testnet_config() -> ChainSpec { ) } -fn mainnet_genesis_constuctor() -> GenesisConfig { +fn mainnet_genesis_constuctor() -> RuntimeGenesisConfig { let initial_authorities: Vec<( AccountId, AccountId, @@ -380,7 +377,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 @@ -443,8 +440,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![] }, @@ -489,14 +486,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(), } } @@ -1228,7 +1229,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/node/src/cli.rs b/nodes/mainnet/src/cli.rs similarity index 92% rename from node/src/cli.rs rename to nodes/mainnet/src/cli.rs index e59008807..a441ca8db 100644 --- a/node/src/cli.rs +++ b/nodes/mainnet/src/cli.rs @@ -61,14 +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 some command against runtime state. Note: `try-runtime` feature must be enabled. - #[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, - /// Key management cli utilities #[clap(subcommand)] Key(Box), diff --git a/node/src/command.rs b/nodes/mainnet/src/command.rs similarity index 85% rename from node/src/command.rs rename to nodes/mainnet/src/command.rs index ca71c50f5..a21dbb929 100644 --- a/node/src/command.rs +++ b/nodes/mainnet/src/command.rs @@ -25,11 +25,10 @@ use crate::{ }; use node_polkadex_runtime::{Block, ExistentialDeposit}; -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 +73,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 +107,7 @@ pub fn run() -> Result<()> { ) } - cmd.run::(config) + cmd.run::(config) }, BenchmarkCmd::Block(cmd) => { let PartialComponents { client, .. } = new_partial(&config)?; @@ -218,7 +213,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)) @@ -226,28 +221,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/node/src/lib.rs b/nodes/mainnet/src/lib.rs similarity index 88% rename from node/src/lib.rs rename to nodes/mainnet/src/lib.rs index 62924165a..ec0d60f10 100644 --- a/node/src/lib.rs +++ b/nodes/mainnet/src/lib.rs @@ -15,9 +15,13 @@ // // 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; pub mod cli; -pub mod rpc; +pub mod node_rpc; pub mod service; + +#[cfg(feature = "try-runtime")] +use try_runtime_cli as _; diff --git a/node/src/main.rs b/nodes/mainnet/src/main.rs similarity index 98% rename from node/src/main.rs rename to nodes/mainnet/src/main.rs index 79c595f9c..da7276a7e 100644 --- a/node/src/main.rs +++ b/nodes/mainnet/src/main.rs @@ -25,8 +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/node/src/rpc.rs b/nodes/mainnet/src/node_rpc.rs similarity index 88% rename from node/src/rpc.rs rename to nodes/mainnet/src/node_rpc.rs index 52a6c58ad..fc5086a10 100644 --- a/node/src/rpc.rs +++ b/nodes/mainnet/src/node_rpc.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! A collection of 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 runtime, so do @@ -25,8 +25,8 @@ //! //! 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. +//! are part of it. Therefore all runtime-specific +//! RPCs can be placed here or imported from corresponding FRAME RPC definitions. #![warn(missing_docs)] @@ -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 sc_consensus_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 sp_keystore::KeystorePtr; use std::sync::Arc; @@ -59,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 node. + /// The keystore that manages the keys of the runtime-node. pub keystore: KeystorePtr, } @@ -93,7 +92,9 @@ pub struct FullDeps { pub babe: BabeDeps, /// GRANDPA specific dependencies. pub grandpa: GrandpaDeps, - /// The backend used by the node. + /// Shared statement store reference. + pub statement_store: Arc, + /// The backend used by the runtime-node. pub backend: Arc, } @@ -117,7 +118,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,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, 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 { @@ -182,5 +192,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/node/src/service.rs b/nodes/mainnet/src/service.rs similarity index 71% rename from node/src/service.rs rename to nodes/mainnet/src/service.rs index 9b889d7e7..5f6309cda 100644 --- a/node/src/service.rs +++ b/nodes/mainnet/src/service.rs @@ -1,6 +1,6 @@ -// This file is part of Substrate. +// This file is part of Polkadex. // -// Copyright (C) 2018-2021 Parity Technologies (UK) Ltd. +// 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 @@ -19,37 +19,48 @@ #![warn(unused_extern_crates)] //! Service implementation. Specialized wrapper over substrate service. -use crate::rpc as node_rpc; + +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 polkadex_client::ExecutorDispatch; use polkadex_primitives::Block; -use sc_client_api::BlockBackend; +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 substrate_frame_rpc_system::AccountNonceApi; +/// The full client type definition. pub type FullClient = 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, @@ -82,25 +92,28 @@ 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::CheckMortality::::from(generic::Era::mortal( - period, - best_block.saturated_into(), - )), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(tip), - ); + 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), + ); 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 +123,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,9 +132,9 @@ pub fn create_extrinsic( extra, ) } -use crate::cli::Cli; -use sc_network_common::sync::warp::WarpSyncParams; +/// 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, @@ -131,7 +143,7 @@ pub fn new_partial( FullClient, FullBackend, FullSelectChain, - sc_consensus::DefaultImportQueue, + sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool, ( impl Fn( @@ -140,11 +152,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, @@ -168,7 +181,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 +198,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 +214,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 +268,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 +279,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 +289,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,13 +307,11 @@ 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 node. pub task_manager: TaskManager, @@ -305,22 +329,20 @@ pub struct NewFullBase { /// 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); sc_sysinfo::gather_hwbench(Some(database_path)) })) .flatten(); + let sc_service::PartialComponents { client, backend, @@ -329,34 +351,28 @@ 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).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 +389,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 +397,20 @@ 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 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 +460,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( @@ -515,15 +525,15 @@ pub fn new_full_base( // 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 +544,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,18 +561,58 @@ 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(), + ); + + // 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 { task_manager, client, network, + sync: sync_service, transaction_pool, rpc_handlers, - sync: sync_service, }) } @@ -570,12 +621,14 @@ pub fn new_full(config: Configuration, cli: Cli) -> Result::Signer; @@ -620,14 +673,11 @@ mod tests { 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(); @@ -648,7 +698,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())); @@ -664,11 +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_hash = parent_header.hash(); - 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 }, @@ -755,9 +804,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); @@ -769,42 +818,56 @@ 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 (spec_version, transaction_version) = { - let version = service - .client() - .runtime_version_at(service.client().chain_info().best_hash) - .unwrap(); + let best_hash = service.client().chain_info().best_hash; + let (_, _) = { + 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_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 check_non_zero_sender = frame_system::CheckNonZeroSender::new(); + 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, (), (), ()), + 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(); index += 1; - UncheckedExtrinsic::new_signed(function, from, signature.into(), extra).into() + UncheckedExtrinsic::new_signed(function, from.into(), signature.into(), extra) + .into() }, ); } @@ -817,8 +880,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, diff --git a/nodes/parachain/Cargo.toml b/nodes/parachain/Cargo.toml new file mode 100644 index 000000000..0766d36fb --- /dev/null +++ b/nodes/parachain/Cargo.toml @@ -0,0 +1,89 @@ +[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"] } +futures = "0.3.28" +color-print = "0.3.4" + +# Local +parachain-polkadex-runtime = { path = "../../runtimes/parachain" } +hex-literal = { workspace = true, optional = false } + +# Substrate +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" } +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" } +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/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" } +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" } + +[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/parachain/build.rs b/nodes/parachain/build.rs new file mode 100644 index 000000000..1111816b6 --- /dev/null +++ b/nodes/parachain/build.rs @@ -0,0 +1,25 @@ +// 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() { + generate_cargo_keys(); + + rerun_if_git_head_changed(); +} diff --git a/nodes/parachain/src/chain_spec.rs b/nodes/parachain/src/chain_spec.rs new file mode 100644 index 000000000..841707f2f --- /dev/null +++ b/nodes/parachain/src/chain_spec.rs @@ -0,0 +1,304 @@ +// 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::{ + AccountId, AuraId, RuntimeGenesisConfig, 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, +) -> RuntimeGenesisConfig { + RuntimeGenesisConfig { + system: parachain_polkadex_runtime::SystemConfig { + 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 + .iter() + .cloned() + .map(|k| (k, EXISTENTIAL_DEPOSIT * 16)) + .collect(), + }, + 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, + ..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), + ..Default::default() + }, + sudo: parachain_polkadex_runtime::SudoConfig { key: Some(root_key) }, + assets: Default::default(), + transaction_payment: 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/parachain/src/cli.rs b/nodes/parachain/src/cli.rs new file mode 100644 index 000000000..0b412796d --- /dev/null +++ b/nodes/parachain/src/cli.rs @@ -0,0 +1,130 @@ +// 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. +#[derive(Debug, clap::Subcommand)] +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(Box), + + /// 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 +)] +#[clap(after_help = AFTER_HELP_EXAMPLE)] +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/parachain/src/command.rs b/nodes/parachain/src/command.rs new file mode 100644 index 000000000..f82d6709a --- /dev/null +++ b/nodes/parachain/src/command.rs @@ -0,0 +1,412 @@ +// 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; +use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; +use log::info; +use parachain_polkadex_runtime::Block; +use sc_cli::{ + ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, + NetworkParams, Result, SharedParams, SubstrateCli, +}; +use sc_service::config::{BasePath, PrometheusConfig}; +use sp_runtime::traits::AccountIdConversion; + +use crate::{ + chain_spec, + cli::{Cli, RelayChainCli, Subcommand}, + 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()), + "" | "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 Collator".into() + } + + fn impl_version() -> String { + env!("SUBSTRATE_CLI_IMPL_VERSION").into() + } + + fn description() -> String { + format!( + "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\ + {} -- ", + 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) + } +} + +impl SubstrateCli for RelayChainCli { + fn impl_name() -> String { + "Polkadex Parachain Collator".into() + } + + fn impl_version() -> String { + env!("SUBSTRATE_CLI_IMPL_VERSION").into() + } + + fn description() -> String { + format!( + "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\ + {} -- ", + 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> { + polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id) + } +} + +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 partials = new_partial(&config)?; + + cmd.run(&*config.chain_spec, &*partials.client) + }) + }, + 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.as_ref())?; + // Switch on the concrete benchmark sub-command- + match cmd.as_ref() { + BenchmarkCmd::Pallet(cmd) => + if cfg!(feature = "runtime-benchmarks") { + runner.sync_run(|config| cmd.run::(config)) + } else { + Err("Benchmarking wasn't enabled when building the 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()), + } + }, + 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 = (!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)) + })) + .flatten(); + + 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 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 Account: {parachain_account}"); + info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" }); + + 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 rpc_addr(&self, default_listen_port: u16) -> Result> { + self.base.base.rpc_addr(default_listen_port) + } + + 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_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) + } + + 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/parachain/src/main.rs b/nodes/parachain/src/main.rs new file mode 100644 index 000000000..e7e076035 --- /dev/null +++ b/nodes/parachain/src/main.rs @@ -0,0 +1,28 @@ +// 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] +mod service; +mod cli; +mod command; +mod rpc; + +fn main() -> sc_cli::Result<()> { + command::run() +} diff --git a/nodes/parachain/src/rpc.rs b/nodes/parachain/src/rpc.rs new file mode 100644 index 000000000..24db2fbfb --- /dev/null +++ b/nodes/parachain/src/rpc.rs @@ -0,0 +1,76 @@ +// 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 +//! 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; +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/parachain/src/service.rs b/nodes/parachain/src/service.rs new file mode 100644 index 000000000..4e187ee00 --- /dev/null +++ b/nodes/parachain/src/service.rs @@ -0,0 +1,449 @@ +// 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 +use std::{sync::Arc, time::Duration}; + +use cumulus_client_cli::CollatorOptions; +// Local Runtime Types +use parachain_polkadex_runtime::{opaque::Block, Hash, RuntimeApi}; + +// Cumulus Imports +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::{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, +}; +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; + +type ParachainPartialComponents = PartialComponents< + ParachainClient, + ParachainBackend, + (), + sc_consensus::DefaultImportQueue, + sc_transaction_pool::FullPool, + (ParachainBlockImport, Option, Option), +>; + +/// 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>; + +/// 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 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 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, + sybil_resistance_level: CollatorSybilResistance::Resistant, // because of Aura + }) + .await?; + + if parachain_config.offchain_worker.enabled { + 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(), + ); + } + + 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)))?; + + 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 { + start_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(), + relay_chain_slot_duration, + para_id, + collator_key.expect("Command line arguments do not allow this. qed"), + overseer_handle, + announce_block, + )?; + } + + 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)?; + + Ok(cumulus_client_consensus_aura::equivocation_import_queue::fully_verifying_import_queue::< + sp_consensus_aura::sr25519::AuthorityPair, + _, + _, + _, + _, + >( + client, + block_import, + move |_, _| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + Ok(timestamp) + }, + slot_duration, + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), + telemetry, + )) +} + +#[allow(clippy::too_many_arguments)] +fn start_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, + relay_chain_slot_duration: Duration, + para_id: ParaId, + 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( + task_manager.spawn_handle(), + client.clone(), + transaction_pool, + prometheus_registry, + telemetry.clone(), + ); + + 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, + relay_client: relay_chain_interface, + sync_oracle, + keystore, + collator_key, + para_id, + overseer_handle, + slot_duration, + relay_chain_slot_duration, + proposer, + collator_service, + // Very limited proposal time. + authoring_duration: Duration::from_millis(500), + }; + + let fut = + basic_aura::run::( + params, + ); + task_manager.spawn_essential_handle().spawn("aura", None, fut); + + Ok(()) +} + +/// Start a 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/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..00f1d08b8 100644 --- a/pallets/liquidity/src/benchmarking.rs +++ b/pallets/liquidity/src/benchmarking.rs @@ -20,8 +20,8 @@ #![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::benchmarks; +use frame_support::traits::{EnsureOrigin, UnfilteredDispatchable}; use frame_system::RawOrigin; use parity_scale_codec::Decode; use polkadex_primitives::{AssetId, UNIT_BALANCE}; diff --git a/pallets/liquidity/src/mock.rs b/pallets/liquidity/src/mock.rs index da37c607f..f38afe00c 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; @@ -39,17 +39,13 @@ 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, - { - 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}, + pub enum Test { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Timestamp: pallet_timestamp, + OCEX: pallet_ocex_lmp, + Liquidity: liquidity, } ); @@ -63,13 +59,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 +75,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 +87,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 +209,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/liquidity/src/weights.rs b/pallets/liquidity/src/weights.rs index 9b778d474..d495e5fdd 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-31, 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 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// liquidity_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -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: 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)) } - /// 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: 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)) } - /// 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,8 +97,8 @@ 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: 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/rpc/src/lib.rs b/pallets/ocex/rpc/src/lib.rs index fd5d57706..50d2b216a 100644 --- a/pallets/ocex/rpc/src/lib.rs +++ b/pallets/ocex/rpc/src/lib.rs @@ -68,7 +68,7 @@ pub trait PolkadexOcexRpcApi { /// # Type Parameters /// /// * `Client`: The client API used to interact with the Substrate runtime. -/// * `Block`: The block type of the Substrate runtime. +/// * `Block`: The block type of the Substrate. pub struct PolkadexOcexRpc { /// An `Arc` reference to the client API for accessing runtime functionality. client: Arc, @@ -114,8 +114,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 runtime -> + // polkadex-node with decoding tuple of underlying data into + // solid std type Decode::decode( &mut api .get_ob_recover_state(at) diff --git a/pallets/ocex/src/benchmarking.rs b/pallets/ocex/src/benchmarking.rs index eaae7ece7..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::{account, benchmarks}; -use frame_support::{dispatch::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/ocex/src/lib.rs b/pallets/ocex/src/lib.rs index f321408e9..19912fbad 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, @@ -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) { @@ -1431,7 +1432,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 @@ -1502,7 +1503,7 @@ pub mod pallet { pub(super) type IngressMessages = StorageMap< _, Identity, - T::BlockNumber, + BlockNumberFor, Vec>, ValueQuery, >; diff --git a/pallets/ocex/src/mock.rs b/pallets/ocex/src/mock.rs index 3cf6096ee..ac996a833 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,26 +31,21 @@ 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. -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, - { - 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}, + pub enum Test { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Timestamp: pallet_timestamp, + OCEX: crate, } ); @@ -65,13 +59,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 +75,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 +87,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 +160,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 9fedf0cca..864855b67 100644 --- a/pallets/ocex/src/rpc.rs +++ b/pallets/ocex/src/rpc.rs @@ -22,6 +22,7 @@ use crate::{ 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; @@ -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/storage.rs b/pallets/ocex/src/storage.rs index 126cbf390..a69d3089e 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-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/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 447edaadb..07c41795c 100644 --- a/pallets/ocex/src/validator.rs +++ b/pallets/ocex/src/validator.rs @@ -24,6 +24,7 @@ use crate::{ storage::{store_trie_root, OffchainState}, Config, Pallet, SnapshotNonce, Snapshots, }; +use frame_system::pallet_prelude::BlockNumberFor; use orderbook_primitives::{ types::{ApprovedSnapshot, Trade, UserActionBatch, UserActions, WithdrawalRequest}, ObCheckpointRaw, SnapshotSummary, @@ -52,7 +53,7 @@ pub const CHECKPOINT_BLOCKS: u64 = 1260; 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 @@ -204,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. @@ -266,7 +267,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/ocex/src/weights.rs b/pallets/ocex/src/weights.rs index 8f6f9e3ae..2b0d1f8f5 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-31, 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 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// ocex_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,279 +32,285 @@ 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 { + 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: 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)) } - /// 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: 64_241_000 picoseconds. + Weight::from_parts(66_354_637, 0) .saturating_add(Weight::from_parts(0, 3862)) - // Standard Error: 19 - .saturating_add(Weight::from_parts(57, 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)) } - /// 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: 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)) } - /// 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: 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)) } - /// 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 { // 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: 61_451_000 picoseconds. + Weight::from_parts(63_298_163, 0) .saturating_add(Weight::from_parts(0, 6107)) .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 { // 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: 69_131_000 picoseconds. + Weight::from_parts(71_264_937, 0) .saturating_add(Weight::from_parts(0, 3885)) .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 { // 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: 157_380_000 picoseconds. + Weight::from_parts(161_320_231, 0) .saturating_add(Weight::from_parts(0, 6232)) .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 { + 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: 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)) } - /// 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: 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)) } - /// 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 { // 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: 34_871_000 picoseconds. + Weight::from_parts(36_428_978, 0) .saturating_add(Weight::from_parts(0, 3665)) .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: 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)) } - /// 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: 24_260_000 picoseconds. + Weight::from_parts(25_365_570, 0) .saturating_add(Weight::from_parts(0, 3612)) + // 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)) } - /// 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: 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)) } - /// 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: 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)) } - /// 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: 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)) } - /// 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: 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)) } - /// 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: 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/benchmarking.rs b/pallets/pdex-migration/src/benchmarking.rs index def97ffaf..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::{account, benchmarks, whitelisted_caller}; -use frame_support::{assert_ok, dispatch::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/pdex-migration/src/lib.rs b/pallets/pdex-migration/src/lib.rs index 1d3352f9f..c4e0b0904 100644 --- a/pallets/pdex-migration/src/lib.rs +++ b/pallets/pdex-migration/src/lib.rs @@ -71,14 +71,15 @@ 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 runtime's definition of an + /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Max Number of relayers #[pallet::constant] type MaxRelayers: Get; /// Lock Period #[pallet::constant] - type LockPeriod: Get<::BlockNumber>; + type LockPeriod: Get>; } #[pallet::pallet] @@ -104,7 +105,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] @@ -124,7 +125,6 @@ pub mod pallet { pub max_tokens: T::Balance, } - #[cfg(feature = "std")] impl Default for GenesisConfig { fn default() -> Self { Self { @@ -135,7 +135,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::()); @@ -342,7 +342,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/pdex-migration/src/mock.rs b/pallets/pdex-migration/src/mock.rs index d720ef8fe..504acc089 100644 --- a/pallets/pdex-migration/src/mock.rs +++ b/pallets/pdex-migration/src/mock.rs @@ -19,31 +19,20 @@ 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::{ - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; +use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use crate::pallet as pdex_migration; +use sp_runtime::BuildStorage; -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 Runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - 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}, + pub enum Test { + System: frame_system, + Sudo: pallet_sudo, + Balances: pallet_balances, + PDEXMigration: pdex_migration, } ); parameter_types! { @@ -56,13 +45,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 +61,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 +79,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; @@ -114,10 +102,10 @@ impl pallet_sudo::Config for Test { type WeightInfo = (); } -// Build genesis storage according to the mock runtime. +// Build genesis storage according to the mock Runtime. 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/pdex-migration/src/weights.rs b/pallets/pdex-migration/src/weights.rs index f907706c3..1830fbcdd 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-31, 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 +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -33,92 +32,90 @@ 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: 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)) } - /// 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: 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)) } - /// 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: 213_401_000 picoseconds. + Weight::from_parts(217_399_148, 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 { + 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: 107_651_000 picoseconds. + Weight::from_parts(110_365_094, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 19 - .saturating_add(Weight::from_parts(11, 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: 217_871_000 picoseconds. + Weight::from_parts(222_659_097, 0) .saturating_add(Weight::from_parts(0, 4764)) + // 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/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/rpc/src/lib.rs b/pallets/rewards/rpc/src/lib.rs index e0b35061e..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 runtime. -/// * `Block`: The block type of the Substrate runtime. +/// * `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 runtime 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 diff --git a/pallets/rewards/src/benchmarking.rs b/pallets/rewards/src/benchmarking.rs index aa3b589f1..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::{account, benchmarks}; -use frame_support::{dispatch::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/rewards/src/lib.rs b/pallets/rewards/src/lib.rs index 9727b4698..adf629bd0 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/rewards/src/mock.rs b/pallets/rewards/src/mock.rs index 4f2e714a0..5c5428623 100644 --- a/pallets/rewards/src/mock.rs +++ b/pallets/rewards/src/mock.rs @@ -24,31 +24,24 @@ 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; type Balance = u128; -// For testing the pallet, we construct a mock runtime. +// For testing the pallet, we construct a mock Runtime. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - 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} + pub enum Test { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Timestamp: pallet_timestamp, + Rewards: rewards } ); @@ -63,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 = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -82,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; } pub const PDEX: Balance = 1_000_000_000_000; @@ -100,7 +92,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 +163,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/rewards/src/weights.rs b/pallets/rewards/src/weights.rs index e305e8ce5..e7b7069af 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-31, 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 -// rewards_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -33,8 +32,8 @@ 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]`. @@ -42,48 +41,48 @@ impl crate::WeightInfo for WeightInfo { // 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: 35_260_000 picoseconds. + Weight::from_parts(37_342_619, 0) .saturating_add(Weight::from_parts(0, 3541)) .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: 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)) } - /// 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: 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-council/Cargo.toml b/pallets/thea-council/Cargo.toml new file mode 100644 index 000000000..81435922f --- /dev/null +++ b/pallets/thea-council/Cargo.toml @@ -0,0 +1,60 @@ +[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", + "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/benchmarking.rs b/pallets/thea-council/src/benchmarking.rs new file mode 100644 index 000000000..252b627d4 --- /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::v1::{account, benchmarks}; +use frame_support::{sp_runtime::SaturatedConversion, BoundedVec}; +use frame_system::{pallet_prelude::BlockNumberFor, 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: BlockNumberFor = 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::v1::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..ff0ae603e --- /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 = "runtime-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 Runtime'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: BlockNumberFor, + 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: BlockNumberFor) -> 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..5eceef617 --- /dev/null +++ b/pallets/thea-council/src/mock.rs @@ -0,0 +1,217 @@ +// 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::{ + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, +}; +use thea::ecdsa::{AuthorityId, AuthoritySignature}; +use xcm::lts::{ + InteriorMultiLocation, + Junction::{GlobalConsensus, Parachain}, + Junctions::X2, +}; + +type Block = frame_system::mocking::MockBlock; + +// Configure a mock Runtime to test the pallet. +frame_support::construct_runtime!( + pub enum Test { + 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 Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + 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>; + type Nonce = u32; + type Block = Block; +} + +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 FreezeIdentifier = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; + type RuntimeHoldReason = (); +} + +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 runtime. +pub fn new_test_ext() -> sp_io::TestExternalities { + frame_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..58c7055ac --- /dev/null +++ b/pallets/thea-council/src/weights.rs @@ -0,0 +1,109 @@ +//! Autogenerated weights for `thea_council` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `150`, 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 + +// Executed Command: +// ./parachain-polkadex-node +// benchmark +// pallet +// --pallet +// thea-council +// --steps +// 100 +// --repeat +// 150 +// --extrinsic +// * +// --output +// 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`: 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/thea-executor/Cargo.toml b/pallets/thea-executor/Cargo.toml index 856b667f0..14034c755 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 019a731c9..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::{ - log, pallet_prelude::*, sp_runtime::SaturatedConversion, traits::{fungible::Mutate, fungibles::Inspect, tokens::Preservation}, @@ -70,7 +69,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 Runtime's definition of an + /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Balances Pallet type Currency: frame_support::traits::tokens::fungible::Mutate @@ -127,7 +127,7 @@ pub mod pallet { pub(super) type ReadyWithdrawals = StorageDoubleMap< _, Blake2_128Concat, - T::BlockNumber, + BlockNumberFor, Blake2_128Concat, Network, Vec, @@ -202,10 +202,9 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn on_initialize(block_no: T::BlockNumber) -> Weight { - let pending_withdrawals = >::iter_prefix( - block_no.saturating_sub(T::BlockNumber::from(1u8)), - ); + fn on_initialize(block_no: BlockNumberFor) -> Weight { + 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 52518c424..d423ba14f 100644 --- a/pallets/thea-executor/src/mock.rs +++ b/pallets/thea-executor/src/mock.rs @@ -22,27 +22,22 @@ 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; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - 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} + pub enum Test { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Thea: thea, + TheaExecutor: thea_executor } ); @@ -57,13 +52,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 +68,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 +86,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 +172,6 @@ where // Build genesis storage according to the mock runtime. 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-executor/src/weights.rs b/pallets/thea-executor/src/weights.rs index bf8bff8f8..dcba85933 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-31, 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 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// thea_executor_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,108 +32,106 @@ 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: 27_500_000 picoseconds. + Weight::from_parts(28_833_924, 0) .saturating_add(Weight::from_parts(0, 0)) + // 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) - /// 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: 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)) } - /// 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: 715_824_000 picoseconds. + Weight::from_parts(730_233_094, 0) .saturating_add(Weight::from_parts(0, 5011)) - // Standard Error: 25 - .saturating_add(Weight::from_parts(124, 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)) } - /// 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: 291_352_000 picoseconds. + Weight::from_parts(299_646_631, 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 { + 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: 292_152_000 picoseconds. + Weight::from_parts(298_959_519, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 23 - .saturating_add(Weight::from_parts(51, 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/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-message-handler/src/mock.rs b/pallets/thea-message-handler/src/mock.rs index 43a1cbbb5..81e1b15a0 100644 --- a/pallets/thea-message-handler/src/mock.rs +++ b/pallets/thea-message-handler/src/mock.rs @@ -21,8 +21,8 @@ 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; @@ -31,17 +31,13 @@ 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, - { - 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} + pub enum Test { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Thea: thea, + TheaExecutor: thea_executor, + TheaHandler: crate } ); @@ -56,13 +52,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 +68,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 +86,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 +181,6 @@ where // Build genesis storage according to the mock runtime. 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/weights.rs b/pallets/thea-message-handler/src/weights.rs index 1b8eb5ead..5dc4ab132 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-31, 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 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// thea_message_handler_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -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: 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)) } - /// 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: 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)) } - /// 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: 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)) } - /// 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: 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/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(), diff --git a/pallets/thea/src/lib.rs b/pallets/thea/src/lib.rs index 005b4ba52..6145a0a19 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/mock.rs b/pallets/thea/src/mock.rs index ea323ebd0..ae1e70145 100644 --- a/pallets/thea/src/mock.rs +++ b/pallets/thea/src/mock.rs @@ -22,26 +22,21 @@ 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; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - 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} + pub enum Test { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Thea: crate, + TheaExecutor: thea_executor } ); @@ -56,13 +51,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 +67,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 +85,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 +171,6 @@ where // Build genesis storage according to the mock runtime. 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/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/thea/src/session.rs b/pallets/thea/src/session.rs index 7355db27e..a1dc54044 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; @@ -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 runtime maintainers can simply reconfigure genesis and restart + // the chain easily Self::initialize_authorities(&authorities).expect("Authorities vec too big"); } diff --git a/pallets/thea/src/validation.rs b/pallets/thea/src/validation.rs index 744382953..b6de11901 100644 --- a/pallets/thea/src/validation.rs +++ b/pallets/thea/src/validation.rs @@ -22,6 +22,7 @@ use crate::{ resolver::Resolver, Config, Pallet, }; +use frame_system::pallet_prelude::BlockNumberFor; use serde::{Deserialize, Serialize}; use sp_std::vec::Vec; use thea_primitives::types::Destination; @@ -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/thea/src/weights.rs b/pallets/thea/src/weights.rs index 7c097c3d1..e65cf69b4 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-31, 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 @@ -19,7 +19,7 @@ // --extrinsic // * // --output -// thea_weights.rs +// weights.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -32,84 +32,86 @@ 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: 65_210_000 picoseconds. + Weight::from_parts(66_932_394, 0) .saturating_add(Weight::from_parts(0, 3471)) + // 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)) } - /// 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 { // 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_045_735_000 picoseconds. + Weight::from_parts(1_064_265_188, 0) .saturating_add(Weight::from_parts(0, 3610)) .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: 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)) } - /// 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_181_000 picoseconds. + Weight::from_parts(17_141_657, 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: 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)) } - /// 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: 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)) 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..7960aa457 --- /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 runtime 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..edaa15c39 --- /dev/null +++ b/pallets/xcm-helper/src/lib.rs @@ -0,0 +1,703 @@ +// 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 = "runtime-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, + pallet_prelude::*, + sp_runtime::traits::AccountIdConversion, + traits::{ + fungible::{Inspect as InspectNative, Mutate as MutateNative}, + fungibles::Inspect, + tokens::{Fortitude, Preservation}, + }, + PalletId, + __private::log, + }; + 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::{ConvertLocation 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 runtime'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, BlockNumberFor, Vec, ValueQuery>; + + /// Failed Withdrawals + #[pallet::storage] + #[pallet::getter(fn get_failed_withdrawals)] + pub(super) type FailedWithdrawals = + StorageMap<_, Blake2_128Concat, BlockNumberFor, 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: BlockNumberFor) -> 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_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 { + 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_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 = + 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_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) + .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: 0, interior } => { + 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: 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)?; + 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: BlockNumberFor, withdrawal: Withdraw) { + >::insert(block_no, vec![withdrawal]); + } + } + + 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: BlockNumberFor = + >::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..ef34875e3 --- /dev/null +++ b/pallets/xcm-helper/src/mock.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 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::{ + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, +}; +use thea::ecdsa::{AuthorityId, AuthoritySignature}; + +type Block = frame_system::mocking::MockBlock; + +// Configure a mock runtime to test the pallet. +frame_support::construct_runtime!( + pub enum Test { + 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 Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + 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>; + type Nonce = u32; + type Block = Block; +} + +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 FreezeIdentifier = (); + type MaxHolds = (); + type MaxFreezes = (); + type RuntimeHoldReason = (); +} + +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 runtime. +pub fn new_test_ext() -> sp_io::TestExternalities { + frame_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..08273387f --- /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}; +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..e1f6cdcdb --- /dev/null +++ b/pallets/xcm-helper/src/weights.rs @@ -0,0 +1,89 @@ +//! Autogenerated weights for `xcm_helper` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-10-31, STEPS: `100`, REPEAT: `150`, 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 + +// Executed Command: +// ./parachain-polkadex-node +// benchmark +// pallet +// --pallet +// xcm-helper +// --steps +// 100 +// --repeat +// 150 +// --extrinsic +// * +// --output +// 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: `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)) + } +} 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/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/rpc/assets/src/lib.rs b/rpc/assets/src/lib.rs index 474ced16f..660ddb776 100644 --- a/rpc/assets/src/lib.rs +++ b/rpc/assets/src/lib.rs @@ -58,7 +58,7 @@ pub trait PolkadexAssetHandlerRpcApi { /// /// # Type Parameters /// -/// * `Client`: The client API used to interact with the Substrate runtime. +/// * `Client`: The client API used to interact with the Substrate Runtime. /// * `Block`: The block type of the Substrate runtime. pub struct PolkadexAssetHandlerRpc { client: Arc, diff --git a/runtime/Cargo.toml b/runtimes/mainnet/Cargo.toml similarity index 81% rename from runtime/Cargo.toml rename to runtimes/mainnet/Cargo.toml index 84c81b388..9ae561ea1 100644 --- a/runtime/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-polkadex-runtime" -version = "5.3.0" +version = "5.4.0" authors = ["Polkadex OÜ "] edition = "2021" license = "GNU GPL v3" @@ -49,6 +49,12 @@ 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 } +pallet-asset-tx-payment = { 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 } @@ -64,6 +70,8 @@ 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 } +sp-storage = { workspace = true, default-features = false } #added sp-authority-discovery = { default-features = false, workspace = true } @@ -78,7 +86,7 @@ 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-node RPCs frame-system-rpc-runtime-api = { default-features = false, workspace = true } # Used for runtime benchmarking @@ -90,28 +98,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 } @@ -188,13 +196,20 @@ std = [ "frame-try-runtime?/std", "thea-message-handler?/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-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", @@ -207,6 +222,8 @@ runtime-benchmarks = [ "thea/runtime-benchmarks", "thea-executor/runtime-benchmarks", "thea-message-handler/runtime-benchmarks", + "pallet-asset-conversion/runtime-benchmarks", + "pallet-asset-tx-payment/runtime-benchmarks", ] try-runtime = [ @@ -252,4 +269,8 @@ 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", + "pallet-statement/try-runtime", + "pallet-asset-tx-payment/try-runtime", ] diff --git a/runtime/build.rs b/runtimes/mainnet/build.rs similarity index 100% rename from runtime/build.rs rename to runtimes/mainnet/build.rs diff --git a/runtime/src/constants.rs b/runtimes/mainnet/src/constants.rs similarity index 100% rename from runtime/src/constants.rs rename to runtimes/mainnet/src/constants.rs diff --git a/runtime/src/impls.rs b/runtimes/mainnet/src/impls.rs similarity index 84% rename from runtime/src/impls.rs rename to runtimes/mainnet/src/impls.rs index 9d48d6f43..2dd7fe164 100644 --- a/runtime/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,15 @@ //! Some configurable implementations as associated type for the substrate runtime. -use frame_support::traits::{Currency, OnUnbalanced}; +use frame_support::traits::{ + fungibles::{Balanced, Credit}, + Currency, OnUnbalanced, +}; +use pallet_asset_tx_payment::HandleCredit; -use crate::{Authorship, Balances, NegativeImbalance}; +use crate::{AccountId, Assets, Authorship, Balances, NegativeImbalance, Runtime}; pub struct Author; - impl OnUnbalanced for Author { fn on_nonzero_unbalanced(amount: NegativeImbalance) { if let Some(author) = Authorship::author() { @@ -31,13 +34,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 +64,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() @@ -83,14 +98,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; @@ -102,10 +131,10 @@ mod multiplier_tests { fn run_with_system_weight(w: Weight, assertions: F) where - F: Fn(), + 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 +169,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 +220,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(); diff --git a/runtime/src/lib.rs b/runtimes/mainnet/src/lib.rs similarity index 85% rename from runtime/src/lib.rs rename to runtimes/mainnet/src/lib.rs index 896c4da99..75da1e758 100644 --- a/runtime/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -23,16 +23,18 @@ #![deny(unused_crate_dependencies)] use constants::{currency::*, time::*}; -use frame_election_provider_support::{onchain, ElectionDataProvider, SequentialPhragmen}; +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, U128CurrencyToVote, + 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, RuntimeDebug, + 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; 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; @@ -83,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; @@ -109,8 +113,9 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { } /// Runtime version. +#[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("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 @@ -197,13 +202,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 +218,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 +389,7 @@ impl pallet_babe::Config for Runtime { type DisabledValidators = Session; type WeightInfo = (); type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominatorRewardedPerValidator; type KeyOwnerProof = >::Proof; type EquivocationReportSystem = @@ -417,18 +422,18 @@ 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; 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); - 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; @@ -537,8 +542,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 +552,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 +575,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 = (); type BenchmarkingConfig = StakingBenchmarkingConfig; type WeightInfo = pallet_staking::weights::SubstrateWeight; } @@ -621,7 +625,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 +634,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 +713,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 = (); @@ -1046,16 +1051,14 @@ where // so the actual block number is `n`. .saturating_sub(1); let extra = ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from(generic::Era::mortal( - period, - current_block, - )), + frame_system::CheckEra::::from(generic::Era::mortal(period, current_block)), 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| { @@ -1086,7 +1089,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 +1115,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 +1155,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 { @@ -1159,6 +1164,19 @@ 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 @@ -1358,107 +1376,181 @@ 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; +} + +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; + 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. +} + +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 = AssetU128; +} + +parameter_types! { + pub StatementCost: Balance = 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 enum Runtime where - Block = Block, - NodeBlock = polkadex_primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub struct Runtime { - 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, + AssetConversion: pallet_asset_conversion = 46, + AssetConversionTxPayment: pallet_asset_conversion_tx_payment = 47, + Statement: pallet_statement = 48, + AssetTxPayment: pallet_asset_tx_payment = 49, } ); #[cfg(not(feature = "runtime-benchmarks"))] construct_runtime!( - pub enum Runtime where - Block = Block, - 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, + pub struct Runtime { + 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, + AssetConversion: pallet_asset_conversion = 46, + AssetConversionTxPayment: pallet_asset_conversion_tx_payment = 47, + Statement: pallet_statement = 48, + AssetTxPayment: pallet_asset_tx_payment = 49, } ); /// Digest item type. @@ -1475,18 +1567,21 @@ pub type SignedBlock = generic::SignedBlock; 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-node/testing/src/keyring.rs`! /// /// [`sign`]: <../../testing/src/keyring.rs.html> pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, - frame_system::CheckMortality, + frame_system::CheckEra, frame_system::CheckNonce, frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, + pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, ); + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1503,7 +1598,10 @@ 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; impl_runtime_apis! { impl sp_api::Core for Runtime { @@ -1520,6 +1618,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()) @@ -1584,6 +1702,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, @@ -1772,7 +1899,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![ @@ -1797,7 +1925,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()) } diff --git a/runtimes/parachain/Cargo.toml b/runtimes/parachain/Cargo.toml new file mode 100644 index 000000000..8f44042f8 --- /dev/null +++ b/runtimes/parachain/Cargo.toml @@ -0,0 +1,195 @@ +[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 } +sp-staking = { workspace = true, default-features = false } +sp-storage = { default-features = false, workspace = true } + +# 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", + "sp-staking/std", + "sp-storage/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", + "pallet-assets/runtime-benchmarks", + "cumulus-pallet-parachain-system/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/parachain/build.rs b/runtimes/parachain/build.rs new file mode 100644 index 000000000..9b53d2457 --- /dev/null +++ b/runtimes/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/parachain/src/constants.rs b/runtimes/parachain/src/constants.rs new file mode 100644 index 000000000..574c3d5b7 --- /dev/null +++ b/runtimes/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/parachain/src/lib.rs b/runtimes/parachain/src/lib.rs new file mode 100644 index 000000000..712fb9b0b --- /dev/null +++ b/runtimes/parachain/src/lib.rs @@ -0,0 +1,867 @@ +#![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 frame_support::{ + 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; +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))] +pub use sp_runtime::BuildStorage; + +// Polkadot imports +use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; + +use frame_support::traits::{AsEnsureOriginWithArg, ConstBool}; +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; + +/// 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; + +/// 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-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; + + // 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 type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// 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>; + type Nonce = Nonce; + type Block = Block; +} + +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 FreezeIdentifier = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; + type RuntimeHoldReason = (); +} + +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; + type AllowMultipleBlocksPerSlot = ConstBool; +} + +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 MinEligibleCollators = ConstU32<4>; + 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 = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = AssetU128; +} + +#[cfg(feature = "runtime-benchmarks")] +pub struct AssetU128; +#[cfg(feature = "runtime-benchmarks")] +use pallet_assets::BenchmarkHelper; + +#[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! { + 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 struct Runtime { + // System support stuff. + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, + + // Monetary stuff. + 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 = 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 = 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 = 40, + TheaCouncil: thea_council = 41, + Sudo: pallet_sudo = 45, + + // Thea Pallet + TheaMessageHandler: thea_message_handler = 46 + } +); + +#[cfg(feature = "runtime-benchmarks")] +#[macro_use] +extern crate frame_benchmarking; + +#[cfg(feature = "runtime-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 = "runtime-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::{BenchmarkError, Benchmarking, BenchmarkBatch}; + 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> { + 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 {} + + 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/parachain/src/weights/block_weights.rs b/runtimes/parachain/src/weights/block_weights.rs new file mode 100644 index 000000000..b2092d875 --- /dev/null +++ b/runtimes/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/parachain/src/weights/extrinsic_weights.rs b/runtimes/parachain/src/weights/extrinsic_weights.rs new file mode 100644 index 000000000..332c3b324 --- /dev/null +++ b/runtimes/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/parachain/src/weights/mod.rs b/runtimes/parachain/src/weights/mod.rs new file mode 100644 index 000000000..ef1ab0d1a --- /dev/null +++ b/runtimes/parachain/src/weights/mod.rs @@ -0,0 +1,27 @@ +// 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 rocksdb_weights::constants::RocksDbWeight; diff --git a/runtimes/parachain/src/weights/paritydb_weights.rs b/runtimes/parachain/src/weights/paritydb_weights.rs new file mode 100644 index 000000000..db4579d9e --- /dev/null +++ b/runtimes/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/parachain/src/weights/rocksdb_weights.rs b/runtimes/parachain/src/weights/rocksdb_weights.rs new file mode 100644 index 000000000..b153c19f0 --- /dev/null +++ b/runtimes/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/parachain/src/xcm_config.rs b/runtimes/parachain/src/xcm_config.rs new file mode 100644 index 000000000..ead17ce6b --- /dev/null +++ b/runtimes/parachain/src/xcm_config.rs @@ -0,0 +1,391 @@ +// 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 Aliasers = Nothing; + 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 = "runtime-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, + _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))?; + 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/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"] } diff --git a/scripts/start_chain.sh b/scripts/start_chain.sh index a981679f7..da1a06207 100755 --- a/scripts/start_chain.sh +++ b/scripts/start_chain.sh @@ -149,4 +149,4 @@ parse_args $@ trap kill_nodes EXIT -start_chain +start_chain \ No newline at end of file