diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml new file mode 100644 index 000000000..9df168393 --- /dev/null +++ b/.github/workflows/e2e-tests.yml @@ -0,0 +1,50 @@ +name: End To End Testing + +# on PRs & and when they are merged run the following jobs: +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + e2e: + runs-on: ubuntu-20.04 + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + submodules: "recursive" + + - name: Cache cargo registry + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + + - name: Build Standalone Node for Integration Tests (Release) + run: cargo build --release -p dkg-standalone-node --features integration-tests + + - name: Install Nodejs + uses: actions/setup-node@v2 + with: + node-version-file: "./dkg-test-suite/.nvmrc" + cache: "yarn" + cache-dependency-path: "./dkg-test-suite/yarn.lock" + + - name: Install Packages + run: cd dkg-test-suite && yarn + + - name: Run E2E Tests + run: cd dkg-test-suite && yarn test diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..5da780760 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dkg-test-suite/protocol-solidity-fixtures"] + path = dkg-test-suite/protocol-solidity-fixtures + url = https://github.com/webb-tools/protocol-solidity-fixtures.git diff --git a/Cargo.lock b/Cargo.lock index 8e7e71b6a..e10a54922 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,22 +12,13 @@ dependencies = [ "regex", ] -[[package]] -name = "addr2line" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" -dependencies = [ - "gimli 0.25.0", -] - [[package]] name = "addr2line" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.26.1", + "gimli", ] [[package]] @@ -416,7 +407,7 @@ version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" dependencies = [ - "addr2line 0.17.0", + "addr2line", "cc", "cfg-if 1.0.0", "libc", @@ -461,7 +452,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "beefy-primitives", "fnv", @@ -490,7 +481,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -514,7 +505,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" [[package]] name = "beefy-merkle-tree" @@ -524,7 +515,7 @@ source = "git+https://github.com/paritytech/substrate#9eddaec3b8f15eec0c458e7bb3 [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "scale-info", @@ -1100,24 +1091,24 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.78.0" +version = "0.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc0cb7df82c8cf8f2e6a8dd394a0932a71369c160cc9b027dca414fced242513" +checksum = "9516ba6b2ba47b4cbf63b713f75b432fafa0a0e0464ec8381ec76e6efe931ab3" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.78.0" +version = "0.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4463c15fa42eee909e61e5eac4866b7c6d22d0d8c621e57a0c5380753bfa8c" +checksum = "489e5d0081f7edff6be12d71282a8bf387b5df64d5592454b75d662397f2d642" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.25.0", + "gimli", "log", "regalloc", "smallvec", @@ -1126,34 +1117,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.78.0" +version = "0.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793f6a94a053a55404ea16e1700202a88101672b8cd6b4df63e13cde950852bf" +checksum = "d36ee1140371bb0f69100e734b30400157a4adf7b86148dee8b0a438763ead48" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.78.0" +version = "0.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44aa1846df275bce5eb30379d65964c7afc63c05a117076e62a119c25fe174be" +checksum = "981da52d8f746af1feb96290c83977ff8d41071a7499e991d8abae0d4869f564" [[package]] name = "cranelift-entity" -version = "0.78.0" +version = "0.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a45d8d6318bf8fc518154d9298eab2a8154ec068a8885ff113f6db8d69bb3a" +checksum = "a2906740053dd3bcf95ce53df0fd9b5649c68ae4bd9adada92b406f059eae461" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.78.0" +version = "0.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e07339bd461766deb7605169de039e01954768ff730fa1254e149001884a8525" +checksum = "b7cb156de1097f567d46bf57a0cd720a72c3e15e1a2bd8b1041ba2fc894471b7" dependencies = [ "cranelift-codegen", "log", @@ -1163,9 +1153,9 @@ dependencies = [ [[package]] name = "cranelift-native" -version = "0.78.0" +version = "0.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e2fca76ff57e0532936a71e3fc267eae6a19a86656716479c66e7f912e3d7b" +checksum = "166028ca0343a6ee7bddac0e70084e142b23f99c701bd6f6ea9123afac1a7a46" dependencies = [ "cranelift-codegen", "libc", @@ -1174,9 +1164,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.78.0" +version = "0.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f46fec547a1f8a32c54ea61c28be4f4ad234ad95342b718a9a9adcaadb0c778" +checksum = "5012a1cde0c8b3898770b711490d803018ae9bec2d60674ba0e5b2058a874f80" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1346,7 +1336,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "sc-cli", "sc-service", @@ -1356,7 +1346,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1380,7 +1370,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1409,7 +1399,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1430,7 +1420,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1455,7 +1445,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -1479,7 +1469,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-client-collator", "cumulus-client-consensus-common", @@ -1508,7 +1498,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "frame-executive", "frame-support", @@ -1526,7 +1516,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1544,7 +1534,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", @@ -1574,7 +1564,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -1585,7 +1575,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1602,7 +1592,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1620,7 +1610,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "frame-support", "parity-scale-codec", @@ -1636,7 +1626,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1659,7 +1649,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-primitives-core", "sp-inherents", @@ -1670,7 +1660,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1687,25 +1677,28 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "async-trait", "cumulus-primitives-core", "derive_more", + "futures 0.3.19", "parking_lot 0.11.2", "polkadot-overseer", "sc-client-api", + "sc-service", "sp-api", "sp-blockchain", "sp-core", "sp-runtime", "sp-state-machine", + "thiserror", ] [[package]] name = "cumulus-relay-chain-local" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1733,7 +1726,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -1936,7 +1929,6 @@ dependencies = [ name = "dkg-gadget" version = "0.0.1" dependencies = [ - "bincode", "curv-kzen", "dkg-primitives", "dkg-runtime-primitives", @@ -2043,7 +2035,6 @@ dependencies = [ name = "dkg-primitives" version = "0.0.1" dependencies = [ - "bincode", "chacha20poly1305 0.9.0", "curv-kzen", "dkg-runtime-primitives", @@ -2162,6 +2153,7 @@ dependencies = [ "dkg-standalone-runtime", "frame-benchmarking", "frame-benchmarking-cli", + "futures 0.3.19", "hex-literal", "jsonrpc-core", "pallet-transaction-payment-rpc", @@ -2172,6 +2164,7 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-aura", + "sc-consensus-manual-seal", "sc-executor", "sc-finality-grandpa", "sc-keystore", @@ -2189,6 +2182,7 @@ dependencies = [ "sp-consensus-aura", "sp-core", "sp-finality-grandpa", + "sp-inherents", "sp-keystore", "sp-runtime", "sp-timestamp", @@ -2649,7 +2643,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", ] @@ -2667,7 +2661,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -2688,7 +2682,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "Inflector", "chrono", @@ -2714,7 +2708,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -2728,7 +2722,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -2756,7 +2750,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "bitflags", "frame-metadata", @@ -2785,7 +2779,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2797,7 +2791,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", @@ -2809,7 +2803,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "proc-macro2", "quote", @@ -2819,7 +2813,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "log", @@ -2836,7 +2830,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -2851,7 +2845,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "sp-api", @@ -2860,7 +2854,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "sp-api", @@ -3108,21 +3102,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" - [[package]] name = "glob" version = "0.3.0" @@ -3549,11 +3537,10 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "0.3.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278e90d6f8a6c76a8334b336e306efa3c5f2b604048cbfd486d6f49878e3af14" +checksum = "f6ef6787e7f0faedc040f95716bdd0e62bcfcf4ba93da053b62dea2691c13864" dependencies = [ - "rustc_version 0.4.0", "winapi 0.3.9", ] @@ -3867,8 +3854,8 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "beefy-primitives", "bitvec", @@ -3950,8 +3937,8 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "frame-support", "polkadot-primitives", @@ -4695,9 +4682,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.0.28" +version = "0.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687387ff42ec7ea4f2149035a5675fedb675d26f98db90a1846ac63d3addb5f5" +checksum = "a261afc61b7a5e323933b402ca6a1765183687c614789b1e4db7762ed4230bca" [[package]] name = "lock_api" @@ -4912,8 +4899,8 @@ dependencies = [ [[package]] name = "metered-channel" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "derive_more", "futures 0.3.19", @@ -5391,7 +5378,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5407,7 +5394,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5423,7 +5410,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5438,7 +5425,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5462,7 +5449,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5477,7 +5464,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5492,7 +5479,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "beefy-primitives", "frame-support", @@ -5508,9 +5495,9 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ - "beefy-merkle-tree 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=master)", + "beefy-merkle-tree 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16)", "beefy-primitives", "frame-support", "frame-system", @@ -5533,7 +5520,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5550,7 +5537,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5567,7 +5554,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5679,7 +5666,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5699,7 +5686,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5716,7 +5703,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5731,7 +5718,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5754,7 +5741,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5770,7 +5757,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5789,7 +5776,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5805,7 +5792,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5822,7 +5809,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5840,7 +5827,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5856,7 +5843,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5873,7 +5860,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5887,7 +5874,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5901,7 +5888,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5944,7 +5931,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5960,7 +5947,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5974,7 +5961,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -5988,7 +5975,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6002,7 +5989,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6018,7 +6005,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6039,7 +6026,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6053,7 +6040,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-election-provider-support", "frame-support", @@ -6074,7 +6061,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -6085,7 +6072,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "log", "sp-arithmetic", @@ -6094,7 +6081,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6108,7 +6095,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6126,7 +6113,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6144,7 +6131,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6161,7 +6148,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -6178,7 +6165,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6189,7 +6176,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6205,7 +6192,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6220,7 +6207,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-support", "frame-system", @@ -6233,8 +6220,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "frame-support", "frame-system", @@ -6252,7 +6239,7 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#60c3ccfd62059e2c3f575c62b957f2edd416543a" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -6621,8 +6608,8 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "polkadot-approval-distribution" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "polkadot-node-network-protocol", @@ -6635,8 +6622,8 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "polkadot-node-network-protocol", @@ -6648,8 +6635,8 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "derive_more", "futures 0.3.19", @@ -6670,8 +6657,8 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "lru 0.7.2", @@ -6690,8 +6677,8 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "frame-benchmarking-cli", "futures 0.3.19", @@ -6713,8 +6700,8 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -6743,8 +6730,8 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "always-assert", "derive_more", @@ -6764,8 +6751,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -6777,8 +6764,8 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "derive_more", "futures 0.3.19", @@ -6799,8 +6786,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -6813,8 +6800,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "futures-timer", @@ -6833,8 +6820,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "async-trait", "futures 0.3.19", @@ -6852,8 +6839,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "parity-scale-codec", @@ -6870,8 +6857,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bitvec", "derive_more", @@ -6898,8 +6885,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bitvec", "futures 0.3.19", @@ -6918,8 +6905,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bitvec", "futures 0.3.19", @@ -6936,8 +6923,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "polkadot-node-subsystem", @@ -6951,8 +6938,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "async-trait", "futures 0.3.19", @@ -6969,8 +6956,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "polkadot-node-subsystem", @@ -6984,8 +6971,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "futures-timer", @@ -7001,8 +6988,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "kvdb", @@ -7019,8 +7006,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "async-trait", "futures 0.3.19", @@ -7036,8 +7023,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bitvec", "futures 0.3.19", @@ -7053,8 +7040,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "always-assert", "assert_matches", @@ -7083,8 +7070,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "polkadot-node-primitives", @@ -7099,8 +7086,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "memory-lru", @@ -7117,8 +7104,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "async-std", "lazy_static", @@ -7135,8 +7122,8 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bs58", "futures 0.3.19", @@ -7154,8 +7141,8 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "async-trait", "derive_more", @@ -7172,8 +7159,8 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bounded-vec", "futures 0.3.19", @@ -7194,8 +7181,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7204,8 +7191,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "derive_more", "futures 0.3.19", @@ -7223,8 +7210,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "async-trait", "derive_more", @@ -7251,8 +7238,8 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "futures 0.3.19", "futures-timer", @@ -7272,8 +7259,8 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "async-trait", "futures 0.3.19", @@ -7289,8 +7276,8 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen-proc-macro" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -7300,8 +7287,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "derive_more", "frame-support", @@ -7317,8 +7304,8 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -7332,8 +7319,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bitvec", "frame-system", @@ -7362,8 +7349,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -7393,8 +7380,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "beefy-primitives", "bitvec", @@ -7472,8 +7459,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "beefy-primitives", "bitvec", @@ -7517,8 +7504,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "frame-support", "polkadot-primitives", @@ -7529,8 +7516,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bs58", "parity-scale-codec", @@ -7541,8 +7528,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "bitflags", "bitvec", @@ -7581,8 +7568,8 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "async-trait", "beefy-gadget", @@ -7678,8 +7665,8 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "arrayvec 0.5.2", "derive_more", @@ -7699,8 +7686,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -7709,8 +7696,8 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "beefy-primitives", "bitvec", @@ -7771,8 +7758,8 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "frame-benchmarking", "frame-system", @@ -8007,17 +7994,6 @@ dependencies = [ "cc", ] -[[package]] -name = "pwasm-utils" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" -dependencies = [ - "byteorder", - "log", - "parity-wasm 0.42.2", -] - [[package]] name = "quick-error" version = "1.2.3" @@ -8385,9 +8361,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.32" +version = "0.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6304468554ed921da3d32c355ea107b8d13d7b8996c3adfb7aab48d3bc321f4" +checksum = "7d808cff91dfca7b239d40b972ba628add94892b1d9e19a842aedc5cfae8ab1a" dependencies = [ "log", "rustc-hash", @@ -8435,7 +8411,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8544,23 +8520,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rsix" -version = "0.23.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f64c5788d5aab8b75441499d99576a24eb09f76fb267b36fec7e3d970c66431" -dependencies = [ - "bitflags", - "cc", - "errno", - "io-lifetimes", - "itoa 0.4.8", - "libc", - "linux-raw-sys", - "once_cell", - "rustc_version 0.4.0", -] - [[package]] name = "rust-gmp-kzen" version = "0.5.1" @@ -8617,6 +8576,20 @@ dependencies = [ "semver 1.0.4", ] +[[package]] +name = "rustix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2dcfc2778a90e38f56a708bfc90572422e11d6c7ee233d053d1f782cf9df6d2" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "winapi 0.3.9", +] + [[package]] name = "rustls" version = "0.19.1" @@ -8695,7 +8668,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "log", "sp-core", @@ -8706,7 +8679,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "derive_more", @@ -8733,7 +8706,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "futures-timer", @@ -8756,7 +8729,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8772,7 +8745,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.2", @@ -8789,7 +8762,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -8800,7 +8773,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "chrono", "fdlimit", @@ -8838,7 +8811,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "fnv", "futures 0.3.19", @@ -8866,7 +8839,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "hash-db", "kvdb", @@ -8891,7 +8864,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "futures 0.3.19", @@ -8915,7 +8888,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "derive_more", @@ -8944,7 +8917,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "derive_more", @@ -8987,7 +8960,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "derive_more", "futures 0.3.19", @@ -9011,7 +8984,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9021,10 +8994,46 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "sc-consensus-manual-seal" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" +dependencies = [ + "assert_matches", + "async-trait", + "derive_more", + "futures 0.3.19", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus", + "sc-consensus-aura", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-consensus-babe", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "sp-timestamp", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "futures 0.3.19", @@ -9049,7 +9058,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "sc-client-api", "sp-authorship", @@ -9060,7 +9069,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "lazy_static", "libsecp256k1 0.7.0", @@ -9088,25 +9097,25 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "derive_more", "environmental", "parity-scale-codec", - "pwasm-utils", "sc-allocator", "sp-core", "sp-maybe-compressed-blob", "sp-serializer", "sp-wasm-interface", "thiserror", + "wasm-instrument", "wasmi", ] [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "log", "parity-scale-codec", @@ -9122,7 +9131,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9140,7 +9149,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "derive_more", @@ -9178,7 +9187,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "derive_more", "finality-grandpa", @@ -9202,7 +9211,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "ansi_term", "futures 0.3.19", @@ -9219,7 +9228,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "derive_more", @@ -9234,7 +9243,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-std", "async-trait", @@ -9285,7 +9294,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "futures-timer", @@ -9301,7 +9310,7 @@ dependencies = [ [[package]] name = "sc-network-test" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-std", "async-trait", @@ -9329,7 +9338,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "bytes 1.1.0", "fnv", @@ -9357,7 +9366,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "libp2p", @@ -9370,7 +9379,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9379,7 +9388,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "hash-db", @@ -9410,7 +9419,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "jsonrpc-core", @@ -9435,7 +9444,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "jsonrpc-core", @@ -9452,7 +9461,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "directories", @@ -9516,7 +9525,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "log", "parity-scale-codec", @@ -9530,7 +9539,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9552,7 +9561,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "chrono", "futures 0.3.19", @@ -9570,7 +9579,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "ansi_term", "atty", @@ -9601,7 +9610,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -9612,7 +9621,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "futures-timer", @@ -9639,7 +9648,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "derive_more", "futures 0.3.19", @@ -9653,7 +9662,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "futures-timer", @@ -10038,8 +10047,8 @@ checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "slot-range-helper" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "enumn", "parity-scale-codec", @@ -10127,7 +10136,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "hash-db", "log", @@ -10144,7 +10153,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", @@ -10156,7 +10165,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "scale-info", @@ -10169,7 +10178,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "integer-sqrt", "num-traits", @@ -10184,7 +10193,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "scale-info", @@ -10197,7 +10206,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "parity-scale-codec", @@ -10209,7 +10218,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "sp-api", @@ -10221,7 +10230,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "log", @@ -10239,7 +10248,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "futures 0.3.19", @@ -10258,7 +10267,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "parity-scale-codec", @@ -10276,7 +10285,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "merlin", @@ -10299,7 +10308,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "scale-info", @@ -10311,7 +10320,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -10323,7 +10332,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "base58", "bitflags", @@ -10371,7 +10380,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "blake2-rfc", "byteorder", @@ -10384,7 +10393,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "proc-macro2", "quote", @@ -10395,7 +10404,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "kvdb", "parking_lot 0.11.2", @@ -10404,7 +10413,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "proc-macro2", "quote", @@ -10414,7 +10423,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "environmental", "parity-scale-codec", @@ -10425,7 +10434,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "finality-grandpa", "log", @@ -10443,7 +10452,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10457,7 +10466,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "hash-db", @@ -10480,8 +10489,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +version = "4.1.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "lazy_static", "sp-core", @@ -10492,7 +10501,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "derive_more", @@ -10509,7 +10518,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "zstd", ] @@ -10517,7 +10526,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "scale-info", @@ -10532,7 +10541,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -10543,7 +10552,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "sp-api", "sp-core", @@ -10553,7 +10562,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "backtrace", "lazy_static", @@ -10563,7 +10572,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "rustc-hash", "serde", @@ -10572,8 +10581,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +version = "4.1.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "either", "hash256-std-hasher", @@ -10595,7 +10604,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10612,7 +10621,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "Inflector", "proc-macro-crate 1.1.0", @@ -10624,7 +10633,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "serde", "serde_json", @@ -10633,7 +10642,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "scale-info", @@ -10647,7 +10656,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "scale-info", @@ -10658,7 +10667,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "hash-db", "log", @@ -10681,12 +10690,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" [[package]] name = "sp-storage" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10699,7 +10708,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "log", "sp-core", @@ -10712,7 +10721,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "futures-timer", @@ -10728,7 +10737,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "sp-std", @@ -10740,7 +10749,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "sp-api", "sp-runtime", @@ -10749,7 +10758,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "log", @@ -10765,7 +10774,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "hash-db", "memory-db 0.28.0", @@ -10780,7 +10789,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10797,7 +10806,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10808,7 +10817,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "impl-trait-for-tuples", "log", @@ -11007,7 +11016,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "platforms", ] @@ -11025,7 +11034,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.19", @@ -11047,7 +11056,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-std", "derive_more", @@ -11061,7 +11070,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "async-trait", "futures 0.3.19", @@ -11087,7 +11096,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "cfg-if 1.0.0", "frame-support", @@ -11129,7 +11138,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "futures 0.3.19", "parity-scale-codec", @@ -11148,7 +11157,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "ansi_term", "build-helper", @@ -11242,8 +11251,8 @@ dependencies = [ [[package]] name = "test-runtime-constants" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "frame-support", "polkadot-primitives", @@ -11520,7 +11529,7 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "parking_lot 0.11.2", + "parking_lot 0.10.2", "regex", "serde", "serde_json", @@ -11617,7 +11626,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9eddaec3b8f15eec0c458e7bb3a1c16db91d8199" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5" dependencies = [ "jsonrpsee", "log", @@ -11652,7 +11661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ "cfg-if 1.0.0", - "rand 0.8.4", + "rand 0.4.6", "static_assertions", ] @@ -11960,6 +11969,15 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "wasm-instrument" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f" +dependencies = [ + "parity-wasm 0.42.2", +] + [[package]] name = "wasm-timer" version = "0.2.5" @@ -12007,9 +12025,9 @@ checksum = "98930446519f63d00a836efdc22f67766ceae8dbcc1571379f2bcabc6b2b9abc" [[package]] name = "wasmtime" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311d06b0c49346d1fbf48a17052e844036b95a7753c1afb34e8c0af3f6b5bb13" +checksum = "414be1bc5ca12e755ffd3ff7acc3a6d1979922f8237fc34068b2156cebcc3270" dependencies = [ "anyhow", "backtrace", @@ -12039,9 +12057,9 @@ dependencies = [ [[package]] name = "wasmtime-cache" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147930a4995137dc096e5b17a573b446799be2bbaea433e821ce6a80abe2c5" +checksum = "8b9b4cd1949206fda9241faf8c460a7d797aa1692594d3dd6bc1cbfa57ee20d0" dependencies = [ "anyhow", "base64 0.13.0", @@ -12049,7 +12067,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rsix", + "rustix", "serde", "sha2 0.9.9", "toml", @@ -12059,9 +12077,9 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3083a47e1ede38aac06a1d9831640d673f9aeda0b82a64e4ce002f3432e2e7" +checksum = "a4693d33725773615a4c9957e4aa731af57b27dca579702d1d8ed5750760f1a9" dependencies = [ "anyhow", "cranelift-codegen", @@ -12069,7 +12087,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.25.0", + "gimli", "log", "more-asserts", "object", @@ -12081,14 +12099,13 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c2d194b655321053bc4111a1aa4ead552655c8a17d17264bc97766e70073510" +checksum = "5b17e47116a078b9770e6fb86cff8b9a660826623cebcfff251b047c8d8993ef" dependencies = [ "anyhow", - "cfg-if 1.0.0", "cranelift-entity", - "gimli 0.25.0", + "gimli", "indexmap", "log", "more-asserts", @@ -12102,24 +12119,21 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864ac8dfe4ce310ac59f16fdbd560c257389cb009ee5d030ac6e30523b023d11" +checksum = "60ea5b380bdf92e32911400375aeefb900ac9d3f8e350bb6ba555a39315f2ee7" dependencies = [ - "addr2line 0.16.0", + "addr2line", "anyhow", "bincode", "cfg-if 1.0.0", - "gimli 0.25.0", - "log", - "more-asserts", + "gimli", "object", "region", - "rsix", + "rustix", "serde", "target-lexicon", "thiserror", - "wasmparser", "wasmtime-environ", "wasmtime-runtime", "winapi 0.3.9", @@ -12127,9 +12141,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab97da813a26b98c9abfd3b0c2d99e42f6b78b749c0646344e2e262d212d8c8b" +checksum = "abc7cd79937edd6e238b337608ebbcaf9c086a8457f01dfd598324f7fa56d81a" dependencies = [ "anyhow", "backtrace", @@ -12144,7 +12158,7 @@ dependencies = [ "more-asserts", "rand 0.8.4", "region", - "rsix", + "rustix", "thiserror", "wasmtime-environ", "winapi 0.3.9", @@ -12152,9 +12166,9 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff94409cc3557bfbbcce6b14520ccd6bd3727e965c0fe68d63ef2c185bf379c6" +checksum = "d9e5e51a461a2cf2b69e1fc48f325b17d78a8582816e18479e8ead58844b23f8" dependencies = [ "cranelift-entity", "serde", @@ -12298,8 +12312,8 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -12311,8 +12325,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "frame-support", "frame-system", @@ -12331,8 +12345,8 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.13" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +version = "0.9.16" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -12349,7 +12363,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#82616422d04a00a2fda3305bbc22cdf3461b5f39" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" dependencies = [ "Inflector", "proc-macro2", diff --git a/dkg-gadget/Cargo.toml b/dkg-gadget/Cargo.toml index 7cc7f8e9f..db9cfbf38 100644 --- a/dkg-gadget/Cargo.toml +++ b/dkg-gadget/Cargo.toml @@ -22,27 +22,26 @@ curv = { package = "curv-kzen", version = "0.9", default-features = false } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } scale-info = { version = "1.0", default-features = false, features = ["derive"] } -prometheus = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "master" } - -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -#sc-utils = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } - -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +prometheus = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } + +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +#sc-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } + +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sc-network-gossip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } round-based = { version = "0.1.4", features = [] } serde = { version = "1.0", features = ["derive"] } -bincode = "1.2.1" multi-party-ecdsa = { git = "https://github.com/webb-tools/multi-party-ecdsa.git" } # Local dependencies @@ -50,4 +49,6 @@ dkg-runtime-primitives = { path = "../dkg-runtime-primitives", default-features dkg-primitives = { path = "../dkg-primitives", default-features = false } [dev-dependencies] -sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sc-network-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } + +[features] diff --git a/dkg-primitives/Cargo.toml b/dkg-primitives/Cargo.toml index 1ed65bf2c..53aa26207 100644 --- a/dkg-primitives/Cargo.toml +++ b/dkg-primitives/Cargo.toml @@ -17,7 +17,6 @@ serde_json = "1.0" codec = { version = "2.0.0", package = "parity-scale-codec", features = ["derive"] } serde = { version = "1.0", features = ["derive"] } -bincode = "1.3.3" rand = "0.8.4" chacha20poly1305 = "0.9.0" typed-builder = "0.9.1" @@ -26,12 +25,14 @@ curv = { package = "curv-kzen", version = "0.9", default-features = false } round-based = { version = "0.1.4", features = [] } multi-party-ecdsa = { git = "https://github.com/webb-tools/multi-party-ecdsa.git" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } dkg-runtime-primitives = { path = "../dkg-runtime-primitives" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [dev-dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } + +[features] diff --git a/dkg-runtime-primitives/Cargo.toml b/dkg-runtime-primitives/Cargo.toml index 06af26cb6..738ac7308 100644 --- a/dkg-runtime-primitives/Cargo.toml +++ b/dkg-runtime-primitives/Cargo.toml @@ -11,14 +11,14 @@ tiny-keccak = { version = "2.0.1", default-features = false, features = ["keccak ethereum = { version = "0.9.0", default-features = false, features = ["with-codec"] } ethereum-types = { version = "0.12", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = 'master', default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = 'polkadot-v0.9.16', default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } [dev-dependencies] hex = { version = "0.4", default-features = false } diff --git a/dkg-runtime-primitives/src/proposal.rs b/dkg-runtime-primitives/src/proposal.rs index 79ac7657c..32984ba49 100644 --- a/dkg-runtime-primitives/src/proposal.rs +++ b/dkg-runtime-primitives/src/proposal.rs @@ -1,4 +1,5 @@ use frame_support::RuntimeDebug; +use scale_info::TypeInfo; use sp_runtime::{create_runtime_str, traits::AtLeast32Bit}; use sp_std::hash::{Hash, Hasher}; @@ -13,12 +14,47 @@ pub type ResourceId = [u8; 32]; // Proposal Nonces (4 bytes) pub type ProposalNonce = u32; -#[derive(Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] +#[derive(Clone, RuntimeDebug, scale_info::TypeInfo)] pub struct RefreshProposal { pub nonce: ProposalNonce, pub pub_key: Vec, } +impl Decode for RefreshProposal { + fn decode(input: &mut I) -> Result { + const NONCE_LEN: usize = core::mem::size_of::(); + let mut data = [0u8; NONCE_LEN + 64]; + input.read(&mut data).map_err(|_| { + codec::Error::from("input bytes are less than the expected size (68 bytes)") + })?; + // _NOTE_: rustc won't generate bounds check for the following slice + // since we know the length of the slice is at least 68 bytes already. + let mut nonce_bytes = [0u8; NONCE_LEN]; + let mut pub_key_bytes = [0u8; 64]; + nonce_bytes.copy_from_slice(&data[0..NONCE_LEN]); + pub_key_bytes.copy_from_slice(&data[NONCE_LEN..]); + let nonce = ProposalNonce::from_be_bytes(nonce_bytes); + let pub_key = pub_key_bytes.to_vec(); + Ok(Self { nonce, pub_key }) + } +} + +impl Encode for RefreshProposal { + fn encode(&self) -> Vec { + const NONCE_LEN: usize = core::mem::size_of::(); + let mut ret = [0u8; NONCE_LEN + 64]; + let nonce = self.nonce.to_be_bytes(); + ret[0..NONCE_LEN].copy_from_slice(&nonce); + ret[NONCE_LEN..(NONCE_LEN + 64)].copy_from_slice(&self.pub_key); + ret.into() + } + + fn encoded_size(&self) -> usize { + const NONCE_LEN: usize = core::mem::size_of::(); + NONCE_LEN + 64 + } +} + #[derive( Eq, PartialEq, Clone, Encode, Decode, scale_info::TypeInfo, frame_support::RuntimeDebug, )] diff --git a/dkg-test-suite/.prettierrc.json b/dkg-test-suite/.prettierrc.json index 2fce7c1fa..01002bd2e 100644 --- a/dkg-test-suite/.prettierrc.json +++ b/dkg-test-suite/.prettierrc.json @@ -1,5 +1,6 @@ { "singleQuote": true, + "maxLength": 80, "semi": true, "tabWidth": 2 } diff --git a/dkg-test-suite/jest.config.js b/dkg-test-suite/jest.config.js new file mode 100644 index 000000000..3176fd8b6 --- /dev/null +++ b/dkg-test-suite/jest.config.js @@ -0,0 +1,12 @@ +/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + setupFilesAfterEnv: ['jest-extended/all'], + extensionsToTreatAsEsm: ['.ts'], + globals: { + 'ts-jest': { + useESM: true, + }, + }, +}; diff --git a/dkg-test-suite/package.json b/dkg-test-suite/package.json index 0ec9f9469..e7baa442b 100644 --- a/dkg-test-suite/package.json +++ b/dkg-test-suite/package.json @@ -18,16 +18,18 @@ "token-remove-proposal-substrate": "ts-node ./src/substrate/token/testTokenRemoveProposal.ts", "wrapping-fee-update-proposal-evm": "ts-node ./src/evm/testWrappingFeeUpdateProposal.ts", "wrapping-fee-update-proposal-substrate": "ts-node ./src/substrate/testWrappingFeeUpdateProposal.ts", - "script": "ts-node" + "script": "ts-node", + "test": "NODE_OPTIONS=--experimental-vm-modules jest --forceExit" }, "author": "", "license": "ISC", "dependencies": { "@polkadot/api": "^6.11.1", "@polkadot/util": "^8.1.2", - "@webb-tools/fixed-bridge": "^0.0.2", + "@webb-tools/protocol-solidity": "^0.1.3", "ecpair": "^1.0.0", - "ethers": "^5.5.2", + "ethers": "^5.5.4", + "ganache": "^7.0.2", "jest": "^27.4.5", "ora": "5", "ts-jest": "^27.1.2", @@ -38,7 +40,9 @@ "node": "17.x.x" }, "devDependencies": { + "@types/jest": "^27.4.0", "husky": "^7.0.4", + "jest-extended": "^2.0.0", "lint-staged": "^12.1.7", "prettier": "2.5.1" }, diff --git a/dkg-test-suite/protocol-solidity-fixtures b/dkg-test-suite/protocol-solidity-fixtures new file mode 160000 index 000000000..0aaa90ff7 --- /dev/null +++ b/dkg-test-suite/protocol-solidity-fixtures @@ -0,0 +1 @@ +Subproject commit 0aaa90ff7a78875d1f9c1993298c559db31ec4e3 diff --git a/dkg-test-suite/src/evm/testAnchorProposal.ts b/dkg-test-suite/src/evm/testAnchorProposal.ts index 9a1bf13a6..d83c98b7f 100644 --- a/dkg-test-suite/src/evm/testAnchorProposal.ts +++ b/dkg-test-suite/src/evm/testAnchorProposal.ts @@ -1,26 +1,19 @@ -import { ApiPromise } from '@polkadot/api'; -import { Option, Bytes } from '@polkadot/types'; +import { ApiPromise, WsProvider } from '@polkadot/api'; import { Keyring } from '@polkadot/keyring'; import { - AnchorUpdateProposal, - ChainIdType, encodeUpdateAnchorProposal, - makeResourceId, registerResourceId, resourceId, signAndSendUtil, unsubSignedPropsUtil, } from './util/utils'; -import { - provider, - hexToBytes, - waitNfinalizedBlocks, -} from '../utils'; -import { ethers } from 'ethers'; +import { waitNfinalizedBlocks } from '../utils'; import { keccak256 } from '@ethersproject/keccak256'; import { ECPair } from 'ecpair'; -import { assert, u8aToHex } from '@polkadot/util'; -import {anchorUpdateProposal} from "./util/proposals"; +import { u8aToHex } from '@polkadot/util'; + +const provider = new WsProvider('ws://127.0.0.1:9944'); +import { anchorUpdateProposal } from './util/proposals'; async function testAnchorProposal() { const api = await ApiPromise.create({ provider }); @@ -38,9 +31,15 @@ async function testAnchorProposal() { const propHash = keccak256(encodeUpdateAnchorProposal(anchorUpdateProposal)); - const proposalType = { anchorupdateproposal: anchorUpdateProposal.header.nonce } + const proposalType = { anchorupdateproposal: anchorUpdateProposal.header.nonce }; - const unsubSignedProps: any = await unsubSignedPropsUtil(api, chainIdType, dkgPubKey, proposalType, propHash); + const unsubSignedProps: any = await unsubSignedPropsUtil( + api, + chainIdType, + dkgPubKey, + proposalType, + propHash + ); await new Promise((resolve) => setTimeout(resolve, 20000)); diff --git a/dkg-test-suite/src/keyRefresh.ts b/dkg-test-suite/src/keyRefresh.ts index 34f687a7e..fda18f6b5 100644 --- a/dkg-test-suite/src/keyRefresh.ts +++ b/dkg-test-suite/src/keyRefresh.ts @@ -1,7 +1,9 @@ -import { ApiPromise, Keyring } from '@polkadot/api'; -import { provider, waitNfinalizedBlocks } from './utils'; +import { ApiPromise, Keyring, WsProvider } from '@polkadot/api'; +import { waitNfinalizedBlocks } from './utils'; import { assert } from '@polkadot/util'; +const provider = new WsProvider('ws://127.0.0.1:9944'); + async function dkg_refresh() { const api = await ApiPromise.create({ provider }); const keyring = new Keyring({ type: 'sr25519' }); diff --git a/dkg-test-suite/src/localEvm.ts b/dkg-test-suite/src/localEvm.ts new file mode 100644 index 000000000..0e3dd0a2e --- /dev/null +++ b/dkg-test-suite/src/localEvm.ts @@ -0,0 +1,115 @@ +import ganache from 'ganache'; +import { ethers } from 'ethers'; +import { Server } from 'ganache'; +import { Bridges } from '@webb-tools/protocol-solidity'; +import { BridgeInput, DeployerConfig, GovernorConfig } from '@webb-tools/interfaces'; +import { MintableToken } from '@webb-tools/tokens'; +import { fetchComponentsFromFilePaths } from '@webb-tools/utils'; +import path from 'path'; +import child from 'child_process'; + +export type GanacheAccounts = { + balance: string; + secretKey: string; +}; + +export function startGanacheServer( + port: number, + networkId: number, + populatedAccounts: GanacheAccounts[], + options: any = {} +): Server<'ethereum'> { + const ganacheServer = ganache.server({ + accounts: populatedAccounts, + quiet: true, + network_id: networkId, + chainId: networkId, + ...options, + }); + + ganacheServer.listen(port).then(() => { + process.stdout.write(`Ganache Started on http://127.0.0.1:${port} ..\n`); + }); + + return ganacheServer; +} + +export class LocalChain { + public readonly endpoint: string; + private readonly server: Server<'ethereum'>; + constructor( + public readonly name: string, + public readonly chainId: number, + readonly initalBalances: GanacheAccounts[] + ) { + this.endpoint = `http://localhost:${chainId}`; + this.server = startGanacheServer(chainId, chainId, initalBalances); + } + + public provider(): ethers.providers.WebSocketProvider { + return new ethers.providers.WebSocketProvider(this.endpoint); + } + + public async stop() { + await this.server.close(); + } + + public async deployToken( + name: string, + symbol: string, + wallet: ethers.Signer + ): Promise { + return MintableToken.createToken(name, symbol, wallet); + } + + public async deploySignatureBridge( + otherChain: LocalChain, + localToken: MintableToken, + otherToken: MintableToken, + localWallet: ethers.Signer, + otherWallet: ethers.Signer, + intinalGovernors: GovernorConfig + ): Promise { + const gitRoot = child.execSync('git rev-parse --show-toplevel').toString().trim(); + localWallet.connect(this.provider()); + otherWallet.connect(otherChain.provider()); + const bridgeInput: BridgeInput = { + anchorInputs: { + asset: { + [this.chainId]: [localToken.contract.address], + [otherChain.chainId]: [otherToken.contract.address], + }, + anchorSizes: [ethers.utils.parseEther('1')], + }, + chainIDs: [this.chainId, otherChain.chainId], + }; + const deployerConfig: DeployerConfig = { + [this.chainId]: localWallet, + [otherChain.chainId]: otherWallet, + }; + const zkComponents = await fetchComponentsFromFilePaths( + path.resolve( + gitRoot, + 'dkg-test-suite', + 'protocol-solidity-fixtures/fixtures/bridge/2/poseidon_bridge_2.wasm' + ), + path.resolve( + gitRoot, + 'dkg-test-suite', + 'protocol-solidity-fixtures/fixtures/bridge/2/witness_calculator.js' + ), + path.resolve( + gitRoot, + 'dkg-test-suite', + 'protocol-solidity-fixtures/fixtures/bridge/2/circuit_final.zkey' + ) + ); + + return Bridges.SignatureBridge.deployFixedDepositBridge( + bridgeInput, + deployerConfig, + intinalGovernors, + zkComponents + ); + } +} diff --git a/dkg-test-suite/src/proposalTypes.ts b/dkg-test-suite/src/proposalTypes.ts index 2f45b7d4c..c97ab1884 100644 --- a/dkg-test-suite/src/proposalTypes.ts +++ b/dkg-test-suite/src/proposalTypes.ts @@ -1,7 +1,6 @@ -import {ApiPromise} from "@polkadot/api"; -import {provider} from "./utils"; - -export const apiProposalTypes = function() { +import { ApiPromise, WsProvider } from '@polkadot/api'; +const provider = new WsProvider('ws://127.0.0.1:9944'); +export const apiProposalTypes = function () { return ApiPromise.create({ provider, types: { @@ -22,7 +21,7 @@ export const apiProposalTypes = function() { 'MaxExtLimitUpdate', 'MaxExtLimitUpdateSigned', 'MaxFeeLimitUpdate', - 'MaxFeeLimitUpdateSigned' + 'MaxFeeLimitUpdateSigned', ], }, EVMUnsigned: { @@ -83,4 +82,4 @@ export const apiProposalTypes = function() { }, }, }); -} +}; diff --git a/dkg-test-suite/src/testDirectProposal.ts b/dkg-test-suite/src/testDirectProposal.ts new file mode 100644 index 000000000..a550a0d79 --- /dev/null +++ b/dkg-test-suite/src/testDirectProposal.ts @@ -0,0 +1,102 @@ +import { ApiPromise, WsProvider } from '@polkadot/api'; +import { Keyring } from '@polkadot/keyring'; +import { hexToBytes, listenOneBlock, waitNfinalizedBlocks } from './utils'; +import { ethers } from 'ethers'; +import { keccak256 } from '@ethersproject/keccak256'; +import { ECPair } from 'ecpair'; +import { assert } from '@polkadot/util'; +import { apiProposalTypes } from './proposalTypes'; + +const provider = new WsProvider('ws://127.0.0.1:9944'); +const raw_data = + '00000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001'; +const tokenUpdateProp = new Uint8Array(hexToBytes(raw_data)); + +async function testDirectProposal() { + const api = await apiProposalTypes(); + + await waitNfinalizedBlocks(api, 10, 20 * 5); + + await sendSudoProposal(api); + + await waitNfinalizedBlocks(api, 20, 20 * 5); + + const dkgPubKeyCompressed: any = await api.query.dkg.dKGPublicKey(); + const dkgPubKey = ECPair.fromPublicKey( + Buffer.from(dkgPubKeyCompressed[1].toHex().substr(2), 'hex'), + { compressed: false } + ).publicKey.toString('hex'); + + const unsubSignedProps: any = await api.query.dKGProposalHandler.signedProposals( + 1, + { tokenupdateproposal: 1 }, + (res: any) => { + if (res) { + const parsedResult = JSON.parse(JSON.stringify(res)); + console.log(`Signed prop: ${parsedResult}`); + assert(parsedResult, 'Signed proposal should be on chain'); + + if (parsedResult) { + const sig = parsedResult.tokenUpdateSigned.signature; + console.log(`Signature: ${sig}`); + + const propHash = keccak256(tokenUpdateProp); + const recoveredPubKey = ethers.utils.recoverPublicKey(propHash, sig).substr(2); + console.log(`Recovered public key: ${recoveredPubKey}`); + console.log(`DKG public key: ${dkgPubKey}`); + + assert(recoveredPubKey == dkgPubKey, 'Public keys should match'); + if (recoveredPubKey == dkgPubKey) { + console.log(`Public keys match`); + } else { + console.error(`Public keys do not match`); + process.exit(); + } + } + } + } + ); + + await new Promise((resolve) => setTimeout(resolve, 20000)); + + unsubSignedProps(); +} + +async function sendSudoProposal(api: ApiPromise) { + const keyring = new Keyring({ type: 'sr25519' }); + const alice = keyring.addFromUri('//Alice'); + + await listenOneBlock(api); + + const [authoritySetId, dkgPubKey] = await Promise.all([ + api.query.dkg.authoritySetId(), + api.query.dkg.dKGPublicKey(), + ]); + + console.log(`DKG authority set id: ${authoritySetId}`); + console.log(`DKG pub key: ${dkgPubKey}`); + + const call = api.tx.dKGProposalHandler.forceSubmitUnsignedProposal({ + TokenUpdate: { + data: `0x${raw_data}`, + }, + }); + const unsub = await api.tx.sudo.sudo(call).signAndSend(alice, ({ events = [], status }) => { + console.log(`Current status is: ${status.type}`); + + if (status.isFinalized) { + console.log(`Transaction included at blockHash ${status.asFinalized}`); + + events.forEach(({ phase, event: { data, method, section } }) => { + console.log(`\t' ${phase}: ${section}.${method}:: ${data}`); + }); + + unsub(); + } + }); +} + +// Run +testDirectProposal() + .catch(console.error) + .finally(() => process.exit()); diff --git a/dkg-test-suite/src/testDkgRefresh.ts b/dkg-test-suite/src/testDkgRefresh.ts index 94c5545f6..5027b9c0e 100644 --- a/dkg-test-suite/src/testDkgRefresh.ts +++ b/dkg-test-suite/src/testDkgRefresh.ts @@ -1,7 +1,8 @@ -import { ApiPromise } from '@polkadot/api'; -import { provider, waitNfinalizedBlocks } from './utils'; +import { ApiPromise, WsProvider } from '@polkadot/api'; +import { waitNfinalizedBlocks, waitForTheNextSession } from './utils'; import ora from 'ora'; +const provider = new WsProvider('ws://127.0.0.1:9944'); async function testDkgRefresh() { const ROUNDS = 3; const api = await ApiPromise.create({ provider }); @@ -42,25 +43,6 @@ async function fetchPublicKey( }; } -function waitForTheNextSession(api: ApiPromise) { - return new Promise(async (reolve, _) => { - const currentBlock = await api.rpc.chain.getHeader(); - // Subscribe to system events via storage - const unsub = await api.query.system.events((events) => { - // Loop through the Vec - events.forEach((record) => { - const { event } = record; - if (event.section === 'session' && event.method === 'NewSession') { - // Unsubscribe from the storage - unsub(); - // Resolve the promise - reolve(void 0); - } - }); - }); - }); -} - testDkgRefresh() .then(() => { console.log('Done'); diff --git a/dkg-test-suite/src/testVAnchorConfigurableLimitsProposal.ts b/dkg-test-suite/src/testVAnchorConfigurableLimitsProposal.ts new file mode 100644 index 000000000..7018b6309 --- /dev/null +++ b/dkg-test-suite/src/testVAnchorConfigurableLimitsProposal.ts @@ -0,0 +1,167 @@ +import { ApiPromise, WsProvider } from '@polkadot/api'; +import { Keyring } from '@polkadot/keyring'; +import { hexToBytes, listenOneBlock, waitNfinalizedBlocks } from './utils'; +import { ethers } from 'ethers'; +import { keccak256 } from '@ethersproject/keccak256'; +import { ECPair } from 'ecpair'; +import { assert } from '@polkadot/util'; +import { apiProposalTypes } from './proposalTypes'; + +const provider = new WsProvider('ws://127.0.0.1:9944'); +const raw_data = + '00000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001'; +const tokenUpdateProp = new Uint8Array(hexToBytes(raw_data)); + +async function testDirectProposal() { + const api = await apiProposalTypes(); + + await waitNfinalizedBlocks(api, 10, 20 * 5); + + await sendSudoProposal(api); + + await waitNfinalizedBlocks(api, 20, 20 * 5); + + const dkgPubKeyCompressed: any = await api.query.dkg.dKGPublicKey(); + const dkgPubKey = ECPair.fromPublicKey( + Buffer.from(dkgPubKeyCompressed[1].toHex().substr(2), 'hex'), + { compressed: false } + ).publicKey.toString('hex'); + + const unsubSignedProps: any = await api.query.dKGProposalHandler.signedProposals( + 1, + { tokenupdateproposal: 1 }, + (res: any) => { + if (res) { + const parsedResult = JSON.parse(JSON.stringify(res)); + console.log(`Signed prop: ${parsedResult}`); + assert(parsedResult, 'Signed proposal should be on chain'); + + if (parsedResult) { + const sig = parsedResult.tokenUpdateSigned.signature; + console.log(`Signature: ${sig}`); + + const propHash = keccak256(tokenUpdateProp); + const recoveredPubKey = ethers.utils.recoverPublicKey(propHash, sig).substr(2); + console.log(`Recovered public key: ${recoveredPubKey}`); + console.log(`DKG public key: ${dkgPubKey}`); + + assert(recoveredPubKey == dkgPubKey, 'Public keys should match'); + if (recoveredPubKey == dkgPubKey) { + console.log(`Public keys match`); + } else { + console.error(`Public keys do not match`); + process.exit(); + } + } + } + } + ); + + await new Promise((resolve) => setTimeout(resolve, 20000)); + + unsubSignedProps(); +} + +async function sendSudoProposal(api: ApiPromise) { + const keyring = new Keyring({ type: 'sr25519' }); + const alice = keyring.addFromUri('//Alice'); + + await listenOneBlock(api); + + const [authoritySetId, dkgPubKey] = await Promise.all([ + api.query.dkg.authoritySetId(), + api.query.dkg.dKGPublicKey(), + ]); + + console.log(`DKG authority set id: ${authoritySetId}`); + console.log(`DKG pub key: ${dkgPubKey}`); + + const callMaxDepositLimit = api.tx.dKGProposalHandler.forceSubmitUnsignedProposal({ + MaxDepositLimitUpdate: { + data: `0x${raw_data}`, + }, + }); + const unsubMaxDeposit = await api.tx.sudo + .sudo(callMaxDepositLimit) + .signAndSend(alice, ({ events = [], status }) => { + console.log(`Current status is: ${status.type}`); + + if (status.isFinalized) { + console.log(`Transaction included at blockHash ${status.asFinalized}`); + + events.forEach(({ phase, event: { data, method, section } }) => { + console.log(`\t' ${phase}: ${section}.${method}:: ${data}`); + }); + + unsubMaxDeposit(); + } + }); + + const callMinWithdrawalLimit = api.tx.dKGProposalHandler.forceSubmitUnsignedProposal({ + MaxDepositLimitUpdate: { + data: `0x${raw_data}`, + }, + }); + const unsubMinWithdrawalLimit = await api.tx.sudo + .sudo(callMinWithdrawalLimit) + .signAndSend(alice, ({ events = [], status }) => { + console.log(`Current status is: ${status.type}`); + + if (status.isFinalized) { + console.log(`Transaction included at blockHash ${status.asFinalized}`); + + events.forEach(({ phase, event: { data, method, section } }) => { + console.log(`\t' ${phase}: ${section}.${method}:: ${data}`); + }); + + unsubMinWithdrawalLimit(); + } + }); + + const callMaxExtLimit = api.tx.dKGProposalHandler.forceSubmitUnsignedProposal({ + MaxDepositLimitUpdate: { + data: `0x${raw_data}`, + }, + }); + const unsubMaxExtLimit = await api.tx.sudo + .sudo(callMaxExtLimit) + .signAndSend(alice, ({ events = [], status }) => { + console.log(`Current status is: ${status.type}`); + + if (status.isFinalized) { + console.log(`Transaction included at blockHash ${status.asFinalized}`); + + events.forEach(({ phase, event: { data, method, section } }) => { + console.log(`\t' ${phase}: ${section}.${method}:: ${data}`); + }); + + unsubMaxExtLimit(); + } + }); + + const callMaxFeeLimit = api.tx.dKGProposalHandler.forceSubmitUnsignedProposal({ + MaxDepositLimitUpdate: { + data: `0x${raw_data}`, + }, + }); + const unsubMaxFeeLimit = await api.tx.sudo + .sudo(callMaxFeeLimit) + .signAndSend(alice, ({ events = [], status }) => { + console.log(`Current status is: ${status.type}`); + + if (status.isFinalized) { + console.log(`Transaction included at blockHash ${status.asFinalized}`); + + events.forEach(({ phase, event: { data, method, section } }) => { + console.log(`\t' ${phase}: ${section}.${method}:: ${data}`); + }); + + unsubMaxFeeLimit(); + } + }); +} + +// Run +testDirectProposal() + .catch(console.error) + .finally(() => process.exit()); diff --git a/dkg-test-suite/src/utils.ts b/dkg-test-suite/src/utils.ts index 98d92587b..e69e2ae68 100644 --- a/dkg-test-suite/src/utils.ts +++ b/dkg-test-suite/src/utils.ts @@ -1,9 +1,14 @@ -import { ApiPromise } from '@polkadot/api'; -import { WsProvider } from '@polkadot/api'; +import { ApiPromise, Keyring } from '@polkadot/api'; +import { u8aToHex, hexToU8a, assert } from '@polkadot/util'; +import child from 'child_process'; +import { ECPair } from 'ecpair'; +import { ethers } from 'ethers'; export const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; -export const provider = new WsProvider('ws://127.0.0.1:9944'); +export async function sleep(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} export const hexToBytes = function (hex: any) { for (var bytes = [], c = 0; c < hex.length; c += 2) { @@ -36,6 +41,35 @@ export const waitNfinalizedBlocks = async function (api: ApiPromise, n: number, }); }; +/** + * @description: fast forward {n} blocks from the current block number. + */ +export async function fastForward( + api: ApiPromise, + n: number, + { delayBetweenBlocks }: { delayBetweenBlocks?: number } = { delayBetweenBlocks: 5 } +): Promise { + for (let i = 0; i < n; i++) { + const createEmpty = true; + const finalize = true; + await api.rpc.engine.createBlock(createEmpty, finalize); + // sleep for delayBetweenBlocks milliseconds + await new Promise((resolve) => setTimeout(resolve, delayBetweenBlocks)); + } +} + +export async function fastForwardTo( + api: ApiPromise, + blockNumber: number, + { delayBetweenBlocks }: { delayBetweenBlocks?: number } = { delayBetweenBlocks: 0 } +): Promise { + const currentBlockNumber = await api.rpc.chain.getHeader(); + const diff = blockNumber - currentBlockNumber.number.toNumber(); + if (diff > 0) { + await fastForward(api, diff, { delayBetweenBlocks }); + } +} + export const printValidators = async function (api: ApiPromise) { const [{ nonce: accountNonce }, now, validators] = await Promise.all([ api.query.system.account(ALICE), @@ -60,4 +94,516 @@ export const printValidators = async function (api: ApiPromise) { })) ); } -}; \ No newline at end of file +}; + +export function startStandaloneNode( + authority: 'alice' | 'bob' | 'charlie', + options: { tmp: boolean; printLogs: boolean } = { tmp: true, printLogs: false } +): child.ChildProcess { + const gitRoot = child.execSync('git rev-parse --show-toplevel').toString().trim(); + const nodePath = `${gitRoot}/target/release/dkg-standalone-node`; + const ports = { + alice: { ws: 9944, http: 9933, p2p: 30333 }, + bob: { ws: 9945, http: 9934, p2p: 30334 }, + charlie: { ws: 9946, http: 9935, p2p: 30335 }, + }; + const proc = child.spawn( + nodePath, + [ + options.printLogs ? '-linfo' : '-lerror', + options.tmp ? '--tmp' : '', + `--ws-port=${ports[authority].ws}`, + `--rpc-port=${ports[authority].http}`, + `--port=${ports[authority].p2p}`, + ...(authority == 'alice' + ? ['--node-key', '0000000000000000000000000000000000000000000000000000000000000001'] + : [ + '--bootnodes', + `/ip4/127.0.0.1/tcp/${ports['alice'].p2p}/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp`, + ]), + // only print logs from the alice node + ...(authority === 'alice' + ? [ + '-ldkg=debug', + '-ldkg_metadata=debug', + '-lruntime::offchain=debug', + '-ldkg_proposal_handler=debug', + '--rpc-cors', + 'all', + '--ws-external', + ] + : []), + `--${authority}`, + ], + { + cwd: gitRoot, + } + ); + + proc.stdout.on('data', (data) => { + process.stdout.write(data); + }); + + proc.stderr.on('data', (data) => { + process.stdout.write(data); + }); + + return proc; +} + +/** + * Waits until a new session is started. + */ +export async function waitForTheNextSession(api: ApiPromise): Promise { + return waitForEvent(api, 'session', 'NewSession'); +} + +export async function waitForTheNextDkgPublicKey(api: ApiPromise): Promise { + return waitForEvent(api, 'dkg', 'NextPublicKeySubmitted'); +} + +export async function waitForTheNextDkgPublicKeySignature(api: ApiPromise): Promise { + return waitForEvent(api, 'dkg', 'NextPublicKeySignatureSubmitted'); +} + +export async function waitForPublicKeyToChange(api: ApiPromise): Promise { + return waitForEvent(api, 'dkg', 'PublicKeyChanged'); +} + +export async function waitForPublicKeySignatureToChange(api: ApiPromise): Promise { + return waitForEvent(api, 'dkg', 'PublicKeySignatureChanged'); +} + +export async function waitForEvent( + api: ApiPromise, + pallet: string, + eventVariant: string +): Promise { + return new Promise(async (reolve, _) => { + // Subscribe to system events via storage + const unsub = await api.query.system.events((events) => { + // Loop through the Vec + events.forEach((record) => { + const { event } = record; + // dkg.NextPublicKeySubmitted + if (event.section === pallet && event.method === eventVariant) { + // Unsubscribe from the storage + unsub(); + // Resolve the promise + reolve(void 0); + } + }); + }); + }); +} + +/** + * Wait until the DKG Public Key is available and return it uncompressed without the `04` prefix byte. + * @param api the current connected api. + */ +export async function waitUntilDKGPublicKeyStoredOnChain(api: ApiPromise): Promise<`0x${string}`> { + return new Promise(async (resolve, _reject) => { + const unsubscribe = await api.rpc.chain.subscribeNewHeads(async () => { + const dkgKey = await fetchDkgPublicKey(api); + if (dkgKey) { + unsubscribe(); + resolve(dkgKey); + } + }); + }); +} + +/** + * Fetch DKG Public Key and return it **uncompressed** without the `04` prefix byte. + * returns `null` if the key is not yet available. + * @param api the current connected api. + */ +export async function fetchDkgPublicKey(api: ApiPromise): Promise<`0x${string}` | null> { + const res = await api.query.dkg.dKGPublicKey(); + const json = res.toJSON() as [number, string]; + if (json && json[1] !== '0x') { + const key = json[1]; + const dkgPubKey = ECPair.fromPublicKey(Buffer.from(key.slice(2), 'hex'), { + compressed: false, + }).publicKey.toString('hex'); + // now we remove the `04` prefix byte and return it. + return `0x${dkgPubKey.slice(2)}`; + } else { + return null; + } +} + +/** + * Fetch DKG Public Key signature and return it. + * returns `null` if the key is not yet available. + * @param api the current connected api. + */ +export async function fetchDkgPublicKeySignature(api: ApiPromise): Promise<`0x${string}` | null> { + const sig = await api.query.dkg.dKGPublicKeySignature(); + if (!sig.isEmpty) { + return sig.toHex(); + } else { + return null; + } +} + +export async function fetchDkgRefreshNonce(api: ApiPromise): Promise { + const nonce = await api.query.dkg.refreshNonce(); + return nonce.toJSON() as number; +} + +export async function triggerDkgManualRefresh(api: ApiPromise): Promise { + const keyring = new Keyring({ type: 'sr25519' }); + const alice = keyring.addFromUri('//Alice'); + const call = api.tx.dkg.manualRefresh(); + const unsub = await api.tx.sudo.sudo(call).signAndSend(alice, ({ status }) => { + if (status.isFinalized) { + unsub(); + } + }); +} + +export async function triggerDkgManuaIncrementNonce(api: ApiPromise): Promise { + const keyring = new Keyring({ type: 'sr25519' }); + const alice = keyring.addFromUri('//Alice'); + const call = api.tx.dkg.manualIncrementNonce(); + const unsub = await api.tx.sudo.sudo(call).signAndSend(alice, ({ status }) => { + if (status.isFinalized) { + unsub(); + } + }); +} + +export function ethAddressFromUncompressedPublicKey(publicKey: `0x${string}`): `0x${string}` { + const pubKeyHash = ethers.utils.keccak256(publicKey); // we hash it. + const address = ethers.utils.getAddress(`0x${pubKeyHash.slice(-40)}`); // take the last 20 bytes and convert it to an address. + return address as `0x${string}`; +} + +const LE = true; +const BE = false; +export const enum ChainIdType { + UNKNOWN = 0x0000, + EVM = 0x0100, + SUBSTRATE = 0x0200, + POLKADOT_RELAYCHAIN = 0x0301, + KUSAMA_RELAYCHAIN = 0x0302, + COSMOS = 0x0400, + SOLANA = 0x0500, +} + +/** + * Proposal Header is the first 40 bytes of any proposal and it contains the following information: + * - resource id (32 bytes) + * - target chain id (4 bytes) encoded as the last 4 bytes of the resource id. + * - target function signature (4 bytes) + * - nonce (4 bytes). + */ +export interface ProposalHeader { + /** + * 32 bytes Hex-encoded string of the `ResourceID` for this proposal. + */ + readonly resourceId: string; + /** + * 2 bytes (u16) encoded as the last 2 bytes of the resource id **just** before the chainId. + * + * **Note**: this value is optional here since we can read it from the `ResourceID`, but would be provided for you if + * you want to decode the proposal header from bytes. + **/ + chainIdType?: ChainIdType; + /** + * 4 bytes number (u32) of the `chainId` this also encoded in the last 4 bytes of the `ResourceID`. + * + * **Note**: this value is optional here since we can read it from the `ResourceID`, but would be provided for you if + * you want to decode the proposal header from bytes. + */ + chainId?: number; + /** + * 4 bytes Hex-encoded string of the `functionSig` for this proposal. + */ + readonly functionSignature: string; + /** + * 4 bytes Hex-encoded string of the `nonce` for this proposal. + */ + readonly nonce: number; +} + +export function encodeProposalHeader(data: ProposalHeader): Uint8Array { + const header = new Uint8Array(40); + const resourceId = hexToU8a(data.resourceId).slice(0, 32); + const functionSignature = hexToU8a(data.functionSignature).slice(0, 4); + header.set(resourceId, 0); // 0 -> 32 + header.set(functionSignature, 32); // 32 -> 36 + const view = new DataView(header.buffer); + view.setUint32(36, data.nonce, false); // 36 -> 40 + return header; +} + +export function decodeProposalHeader(header: Uint8Array): ProposalHeader { + const resourceId = u8aToHex(header.slice(0, 32)); + const chainIdTypeInt = new DataView(header.buffer).getUint16(32 - 6, BE); + const chainIdType = castToChainIdType(chainIdTypeInt); + const chainId = new DataView(header.buffer).getUint32(32 - 4, BE); + const functionSignature = u8aToHex(header.slice(32, 36)); + const nonce = new DataView(header.buffer).getUint32(36, BE); + return { + resourceId, + chainId, + chainIdType, + functionSignature, + nonce, + }; +} + +function castToChainIdType(v: number): ChainIdType { + switch (v) { + case 0x0100: + return ChainIdType.EVM; + case 0x0200: + return ChainIdType.SUBSTRATE; + case 0x0301: + return ChainIdType.POLKADOT_RELAYCHAIN; + case 0x0302: + return ChainIdType.KUSAMA_RELAYCHAIN; + case 0x0400: + return ChainIdType.COSMOS; + case 0x0500: + return ChainIdType.SOLANA; + default: + return ChainIdType.UNKNOWN; + } +} + +/** + * Anchor Update Proposal is the next 40 bytes (after the header) and it contains the following information: + * - src chain id (4 bytes) encoded as the 4 bytes. + * - last leaf index (4 bytes). + * - merkle root (32 bytes). + */ +export interface AnchorUpdateProposal { + /** + * The Anchor Proposal Header. + * This is the first 40 bytes of the proposal. + * See `encodeProposalHeader` for more details. + */ + readonly header: ProposalHeader; + /** + * 4 bytes number (u32) of the `srcChainId`. + */ + readonly srcChainId: number; + /** + * 4 bytes number (u32) of the `lastLeafIndex`. + */ + readonly lastLeafIndex: number; + /** + * 32 bytes Hex-encoded string of the `merkleRoot`. + */ + readonly merkleRoot: string; +} + +export function encodeUpdateAnchorProposal(proposal: AnchorUpdateProposal): Uint8Array { + const header = encodeProposalHeader(proposal.header); + const updateProposal = new Uint8Array(40 + 40); + updateProposal.set(header, 0); // 0 -> 40 + const view = new DataView(updateProposal.buffer); + view.setUint32(40, proposal.srcChainId, false); // 40 -> 44 + view.setUint32(44, proposal.lastLeafIndex, false); // 44 -> 48 + const merkleRoot = hexToU8a(proposal.merkleRoot).slice(0, 32); + updateProposal.set(merkleRoot, 48); // 48 -> 80 + return updateProposal; +} + +export function decodeUpdateAnchorProposal(data: Uint8Array): AnchorUpdateProposal { + const header = decodeProposalHeader(data.slice(0, 40)); // 0 -> 40 + const srcChainId = new DataView(data.buffer).getUint32(40, false); // 40 -> 44 + const lastLeafIndex = new DataView(data.buffer).getUint32(44, false); // 44 -> 48 + const merkleRoot = u8aToHex(data.slice(48, 80)); // 48 -> 80 + return { + header, + srcChainId, + lastLeafIndex, + merkleRoot, + }; +} + +export interface TokenAddProposal { + /** + * The Token Add Proposal Header. + * This is the first 40 bytes of the proposal. + * See `encodeProposalHeader` for more details. + */ + readonly header: ProposalHeader; + /** + * 20 bytes Hex-encoded string. + */ + readonly newTokenAddress: string; +} + +export interface TokenRemoveProposal { + /** + * The Token Remove Proposal Header. + * This is the first 40 bytes of the proposal. + * See `encodeProposalHeader` for more details. + */ + readonly header: ProposalHeader; + /** + * 20 bytes Hex-encoded string. + */ + readonly removeTokenAddress: string; +} + +export function encodeTokenAddProposal(proposal: TokenAddProposal): Uint8Array { + const header = encodeProposalHeader(proposal.header); + const tokenAddProposal = new Uint8Array(40 + 20); + tokenAddProposal.set(header, 0); // 0 -> 40 + const address = hexToU8a(proposal.newTokenAddress).slice(0, 20); + tokenAddProposal.set(address, 40); // 40 -> 60 + return tokenAddProposal; +} + +export function decodeTokenAddProposal(data: Uint8Array): TokenAddProposal { + const header = decodeProposalHeader(data.slice(0, 40)); // 0 -> 40 + const newTokenAddress = u8aToHex(data.slice(40, 60)); // 40 -> 60 + return { + header, + newTokenAddress, + }; +} + +export function encodeTokenRemoveProposal(proposal: TokenRemoveProposal): Uint8Array { + const header = encodeProposalHeader(proposal.header); + const tokenAddProposal = new Uint8Array(40 + 20); + tokenAddProposal.set(header, 0); // 0 -> 40 + const address = hexToU8a(proposal.removeTokenAddress).slice(0, 20); + tokenAddProposal.set(address, 40); // 40 -> 60 + return tokenAddProposal; +} + +export function decodeTokenRemoveProposal(data: Uint8Array): TokenRemoveProposal { + const header = decodeProposalHeader(data.slice(0, 40)); // 0 -> 40 + const removeTokenAddress = u8aToHex(data.slice(40, 60)); // 40 -> 60 + return { + header, + removeTokenAddress, + }; +} + +export interface WrappingFeeUpdateProposal { + /** + * The Wrapping Fee Update Proposal Header. + * This is the first 40 bytes of the proposal. + * See `encodeProposalHeader` for more details. + */ + readonly header: ProposalHeader; + /** + * 1 byte Hex-encoded string. + */ + readonly newFee: string; +} + +export function encodeWrappingFeeUpdateProposal(proposal: WrappingFeeUpdateProposal): Uint8Array { + const header = encodeProposalHeader(proposal.header); + const wrappingFeeUpdateProposal = new Uint8Array(40 + 1); + wrappingFeeUpdateProposal.set(header, 0); // 0 -> 40 + const newFee = hexToU8a(proposal.newFee).slice(0, 1); + wrappingFeeUpdateProposal.set(newFee, 40); // 40 -> 41 + return wrappingFeeUpdateProposal; +} + +export function decodeWrappingFeeUpdateProposal(data: Uint8Array): WrappingFeeUpdateProposal { + const header = decodeProposalHeader(data.slice(0, 40)); // 0 -> 40 + const newFee = u8aToHex(data.slice(40, 41)); // 40 -> 41 + return { + header, + newFee, + }; +} + +export interface VAnchorConfigurableLimitProposal { + /** + * The Wrapping Fee Update Proposal Header. + * This is the first 40 bytes of the proposal. + * See `encodeProposalHeader` for more details. + */ + readonly header: ProposalHeader; + /** + * 32 bytes Hex-encoded string. + */ + readonly min_withdrawal_limit_bytes: string; +} + +export function encodeVAnchorConfigurableLimitProposal( + proposal: VAnchorConfigurableLimitProposal +): Uint8Array { + const header = encodeProposalHeader(proposal.header); + const vAnchorConfigurableLimitProposal = new Uint8Array(40 + 32); + vAnchorConfigurableLimitProposal.set(header, 0); // 0 -> 40 + const newFee = hexToU8a(proposal.min_withdrawal_limit_bytes).slice(0, 1); + vAnchorConfigurableLimitProposal.set(newFee, 40); // 40 -> 41 + return vAnchorConfigurableLimitProposal; +} + +export function decodeVAnchorConfigurableLimitProposal( + data: Uint8Array +): VAnchorConfigurableLimitProposal { + const header = decodeProposalHeader(data.slice(0, 40)); // 0 -> 40 + const min_withdrawal_limit_bytes = u8aToHex(data.slice(40, 72)); // 40 -> 72 + return { + header, + min_withdrawal_limit_bytes, + }; +} + +/** + * A ResourceID is a 32 bytes hex-encoded string of the following format: + * - 26 bytes of the `anchorHandlerContractAddress` which is usually is just 20 bytes, but we pad it with zeros + * to make it 26 bytes. + * - 2 bytes of the `chainIdType` encoded as the last 2 bytes just before the `chainId`. + * - 4 bytes of the `chainId` which is the last 4 bytes. + */ +export function makeResourceId(addr: string, chainIdType: ChainIdType, chainId: number): string { + const rId = new Uint8Array(32); + const address = hexToU8a(addr).slice(0, 20); + rId.set(address, 6); // 6 -> 26 + const view = new DataView(rId.buffer); + view.setUint16(26, chainIdType, BE); // 26 -> 28 + view.setUint32(28, chainId, BE); // 28 -> 32 + return u8aToHex(rId); +} + +function _testEncodeDecode() { + const anchorHandlerAddress = '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; + const chainId = 0xcafe; + const chainIdType = ChainIdType.EVM; + const resourceId = makeResourceId(anchorHandlerAddress, chainIdType, chainId); + const functionSignature = '0xdeadbeef'; + const nonce = 0xdad; + const header: ProposalHeader = { + resourceId, + functionSignature, + nonce, + }; + const srcChainId = 0xbabe; + const lastLeafIndex = 0xfeed; + const merkleRoot = '0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'; + const updateProposal: AnchorUpdateProposal = { + header, + srcChainId, + lastLeafIndex, + merkleRoot, + }; + const headerEncoded = encodeProposalHeader(header); + const headerDecoded = decodeProposalHeader(headerEncoded); + assert(headerDecoded.resourceId === resourceId, 'resourceId'); + assert(headerDecoded.functionSignature === functionSignature, 'functionSignature'); + assert(headerDecoded.nonce === nonce, 'nonce'); + + const updateProposalEncoded = encodeUpdateAnchorProposal(updateProposal); + const updateProposalDecoded = decodeUpdateAnchorProposal(updateProposalEncoded); + assert(updateProposalDecoded.header.resourceId === resourceId, 'resourceId'); + assert(updateProposalDecoded.header.functionSignature === functionSignature, 'functionSignature'); + assert(updateProposalDecoded.header.nonce === nonce, 'nonce'); + assert(updateProposalDecoded.srcChainId === srcChainId, 'srcChainId'); + assert(updateProposalDecoded.lastLeafIndex === lastLeafIndex, 'lastLeafIndex'); + assert(updateProposalDecoded.merkleRoot === merkleRoot, 'merkleRoot'); +} diff --git a/dkg-test-suite/tests/blueprint.test.ts b/dkg-test-suite/tests/blueprint.test.ts new file mode 100644 index 000000000..553ddfb51 --- /dev/null +++ b/dkg-test-suite/tests/blueprint.test.ts @@ -0,0 +1,7 @@ +// just a blueprint test using jest + +describe('Blueprint test', () => { + it('should pass', () => { + expect(true).toBe(true); + }); +}); diff --git a/dkg-test-suite/tests/updateGovernor.test.ts b/dkg-test-suite/tests/updateGovernor.test.ts new file mode 100644 index 000000000..2493534c9 --- /dev/null +++ b/dkg-test-suite/tests/updateGovernor.test.ts @@ -0,0 +1,171 @@ +import { jest } from '@jest/globals'; +import 'jest-extended'; +import { + ethAddressFromUncompressedPublicKey, + fetchDkgPublicKey, + fetchDkgPublicKeySignature, + fetchDkgRefreshNonce, + sleep, + startStandaloneNode, + triggerDkgManualRefresh, + triggerDkgManuaIncrementNonce, + waitForPublicKeySignatureToChange, + waitForPublicKeyToChange, + waitUntilDKGPublicKeyStoredOnChain, +} from '../src/utils'; +import { LocalChain } from '../src/localEvm'; +import { ChildProcess } from 'child_process'; +import { ethers } from 'ethers'; +import { Bridges } from '@webb-tools/protocol-solidity'; +import { MintableToken } from '@webb-tools/tokens'; +import { ApiPromise, Keyring, WsProvider } from '@polkadot/api'; + +describe('Update SignatureBridge Governor', () => { + const SECONDS = 1000; + const MINUTES = 60 * SECONDS; + const BLOCK_TIME = 3 * SECONDS; + const ACC1_PK = '0x0000000000000000000000000000000000000000000000000000000000000001'; + const ACC2_PK = '0x0000000000000000000000000000000000000000000000000000000000000002'; + jest.setTimeout(100 * BLOCK_TIME); // 100 blocks + + let polkadotApi: ApiPromise; + let aliceNode: ChildProcess; + let bobNode: ChildProcess; + let charlieNode: ChildProcess; + + let localChain: LocalChain; + let localChain2: LocalChain; + let wallet1: ethers.Wallet; + let wallet2: ethers.Wallet; + + let signatureBridge: Bridges.SignatureBridge; + + beforeAll(async () => { + aliceNode = startStandaloneNode('alice', { tmp: true, printLogs: false }); + bobNode = startStandaloneNode('bob', { tmp: true, printLogs: false }); + charlieNode = startStandaloneNode('charlie', { tmp: true, printLogs: false }); + + localChain = new LocalChain('local', 5001, [ + { + balance: ethers.utils.parseEther('1000').toHexString(), + secretKey: ACC1_PK, + }, + { + balance: ethers.utils.parseEther('1000').toHexString(), + secretKey: ACC2_PK, + }, + ]); + localChain2 = new LocalChain('local2', 5002, [ + { + balance: ethers.utils.parseEther('1000').toHexString(), + secretKey: ACC1_PK, + }, + { + balance: ethers.utils.parseEther('1000').toHexString(), + secretKey: ACC2_PK, + }, + ]); + wallet1 = new ethers.Wallet(ACC1_PK, localChain.provider()); + wallet2 = new ethers.Wallet(ACC2_PK, localChain2.provider()); + // Deploy the token. + const localToken = await localChain.deployToken('Webb Token', 'WEBB', wallet1); + const localToken2 = await localChain2.deployToken('Webb Token', 'WEBB', wallet2); + + polkadotApi = await ApiPromise.create({ + provider: new WsProvider('ws://127.0.0.1:9944'), + }); + + // Update the signature bridge governor. + const dkgPublicKey = await waitUntilDKGPublicKeyStoredOnChain(polkadotApi); + expect(dkgPublicKey).toBeString(); + const governorAddress = ethAddressFromUncompressedPublicKey(dkgPublicKey); + + let intialGovernors = { + [localChain.chainId]: wallet1, + [localChain2.chainId]: wallet2, + }; + + // Depoly the signature bridge. + signatureBridge = await localChain.deploySignatureBridge( + localChain2, + localToken, + localToken2, + wallet1, + wallet2, + intialGovernors + ); + const signatureSide = signatureBridge.getBridgeSide(localChain.chainId); + const contract = signatureSide.contract; + contract.connect(localChain.provider()); + // now we transferOwnership, forcefully. + const tx = await contract.transferOwnership(governorAddress, 1); + expect(tx.wait()).toResolve(); + // check that the new governor is the same as the one we just set. + const currentGovernor = await contract.governor(); + expect(currentGovernor).toEqualCaseInsensitive(governorAddress); + + // get the anhor on localchain1 + const anchor = signatureBridge.getAnchor(localChain.chainId, ethers.utils.parseEther('1'))!; + await anchor.setSigner(wallet1); + // approve token spending + const tokenAddress = signatureBridge.getWebbTokenAddress(localChain.chainId)!; + const token = await MintableToken.tokenFromAddress(tokenAddress, wallet1); + await token.approveSpending(anchor.contract.address); + await token.mintTokens(wallet1.address, ethers.utils.parseEther('1000')); + + // do the same but on localchain2 + const anchor2 = signatureBridge.getAnchor(localChain2.chainId, ethers.utils.parseEther('1'))!; + await anchor2.setSigner(wallet2); + const tokenAddress2 = signatureBridge.getWebbTokenAddress(localChain2.chainId)!; + const token2 = await MintableToken.tokenFromAddress(tokenAddress2, wallet2); + await token2.approveSpending(anchor2.contract.address); + await token2.mintTokens(wallet2.address, ethers.utils.parseEther('1000')); + }); + + test('should be able to transfer ownership to new Governor with Signature', async () => { + // we trigger a manual renonce since we already transfered the ownership before. + await triggerDkgManuaIncrementNonce(polkadotApi); + // for some reason, we have to wait for a bit ¯\_(ツ)_/¯. + await sleep(2 * BLOCK_TIME); + // we trigger a manual DKG Refresh. + await triggerDkgManualRefresh(polkadotApi); + // then we wait until the dkg public key and its signature to get changed. + await Promise.all([ + waitForPublicKeyToChange(polkadotApi), + waitForPublicKeySignatureToChange(polkadotApi), + ]); + // then we fetch them. + const dkgPublicKey = await fetchDkgPublicKey(polkadotApi); + const dkgPublicKeySignature = await fetchDkgPublicKeySignature(polkadotApi); + const refreshNonce = await fetchDkgRefreshNonce(polkadotApi); + expect(dkgPublicKey).toBeString(); + expect(dkgPublicKeySignature).toBeString(); + expect(refreshNonce).toBeGreaterThan(0); + // now we can transfer ownership. + const signatureSide = signatureBridge.getBridgeSide(localChain.chainId); + const contract = signatureSide.contract; + contract.connect(localChain.provider()); + const governor = await contract.governor(); + let nextGovernorAddress = ethAddressFromUncompressedPublicKey(dkgPublicKey!); + // sanity check + expect(nextGovernorAddress).not.toEqualCaseInsensitive(governor); + const tx = await contract.transferOwnershipWithSignaturePubKey( + dkgPublicKey!, + refreshNonce, + dkgPublicKeySignature! + ); + await expect(tx.wait()).toResolve(); + // check that the new governor is the same as the one we just set. + const newGovernor = await contract.governor(); + expect(newGovernor).not.toEqualCaseInsensitive(governor); + expect(newGovernor).toEqualCaseInsensitive(nextGovernorAddress); + }); + + afterAll(async () => { + await polkadotApi.disconnect(); + aliceNode?.kill('SIGINT'); + bobNode?.kill('SIGINT'); + charlieNode?.kill('SIGINT'); + await localChain?.stop(); + }); +}); diff --git a/dkg-test-suite/tsconfig.json b/dkg-test-suite/tsconfig.json new file mode 100644 index 000000000..8e61ab1b2 --- /dev/null +++ b/dkg-test-suite/tsconfig.json @@ -0,0 +1,101 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + // "incremental": true, /* Enable incremental compilation */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "ES2020" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ + // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + + /* Modules */ + "module": "es6" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "resolveJsonModule": true, /* Enable importing .json files */ + // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + "importsNotUsedAsValues": "remove" /* Specify emit/checking behavior for imports that are only used for types */, + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */, + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ + "strictNullChecks": true /* When type checking, take into account `null` and `undefined`. */, + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ + // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ + "alwaysStrict": true /* Ensure 'use strict' is always emitted. */, + // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + "noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */, + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} diff --git a/dkg-test-suite/yarn.lock b/dkg-test-suite/yarn.lock index da5cba9aa..1b7d97f9a 100644 --- a/dkg-test-suite/yarn.lock +++ b/dkg-test-suite/yarn.lock @@ -511,7 +511,14 @@ dependencies: "@ethersproject/logger" "^5.5.0" -"@ethersproject/networks@5.5.1", "@ethersproject/networks@^5.5.0": +"@ethersproject/networks@5.5.2": + version "5.5.2" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.5.2.tgz#784c8b1283cd2a931114ab428dae1bd00c07630b" + integrity sha512-NEqPxbGBfy6O3x4ZTISb90SjEDkWYDUbEeIFhJly0F7sZjoQMnj5KYzMSkMkLKZ+1fGpx00EDpHQCy6PrDupkQ== + dependencies: + "@ethersproject/logger" "^5.5.0" + +"@ethersproject/networks@^5.5.0": version "5.5.1" resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.5.1.tgz#b7f7b9fb88dec1ea48f739b7fb9621311aa8ce6c" integrity sha512-tYRDM4zZtSUcKnD4UMuAlj7SeXH/k5WC4SP2u1Pn57++JdXHkRu2zwNkgNogZoxHzhm9Q6qqurDBVptHOsW49Q== @@ -558,10 +565,10 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.5.1": - version "5.5.1" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.5.1.tgz#ba87e3c93219bbd2e2edf8b369873aee774abf04" - integrity sha512-2zdD5sltACDWhjUE12Kucg2PcgM6V2q9JMyVvObtVGnzJu+QSmibbP+BHQyLWZUBfLApx2942+7DC5D+n4wBQQ== +"@ethersproject/providers@5.5.3": + version "5.5.3" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.5.3.tgz#56c2b070542ac44eb5de2ed3cf6784acd60a3130" + integrity sha512-ZHXxXXXWHuwCQKrgdpIkbzMNJMvs+9YWemanwp1fA7XZEv7QlilseysPvQe0D7Q7DlkJX/w/bGA1MdgK2TbGvA== dependencies: "@ethersproject/abstract-provider" "^5.5.0" "@ethersproject/abstract-signer" "^5.5.0" @@ -591,6 +598,14 @@ "@ethersproject/bytes" "^5.5.0" "@ethersproject/logger" "^5.5.0" +"@ethersproject/random@5.5.1": + version "5.5.1" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.5.1.tgz#7cdf38ea93dc0b1ed1d8e480ccdaf3535c555415" + integrity sha512-YaU2dQ7DuhL5Au7KbcQLHxcRHfgyNgvFV4sQOo0HrtW3Zkrc9ctWNz8wXQ4uCSfSDsqX2vcjhroxU5RQRV0nqA== + dependencies: + "@ethersproject/bytes" "^5.5.0" + "@ethersproject/logger" "^5.5.0" + "@ethersproject/rlp@5.5.0", "@ethersproject/rlp@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.5.0.tgz#530f4f608f9ca9d4f89c24ab95db58ab56ab99a0" @@ -1179,6 +1194,13 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== +"@trufflesuite/bigint-buffer@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.9.tgz#e2604d76e1e4747b74376d68f1312f9944d0d75d" + integrity sha512-bdM5cEGCOhDSwminryHJbRmXc1x7dPKg6Pqns3qyTwFlxsqUgxE29lsERS3PlIW1HTjoIGMUqsk1zQQwST1Yxw== + dependencies: + node-gyp-build "4.3.0" + "@tsconfig/node10@^1.0.7": version "1.0.8" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" @@ -1247,7 +1269,7 @@ dependencies: "@babel/types" "^7.3.0" -"@types/bn.js@^4.11.5", "@types/bn.js@^4.11.6": +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5", "@types/bn.js@^4.11.6": version "4.11.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== @@ -1287,6 +1309,14 @@ dependencies: "@types/istanbul-lib-report" "*" +"@types/jest@^27.4.0": + version "27.4.0" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.4.0.tgz#037ab8b872067cae842a320841693080f9cb84ed" + integrity sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ== + dependencies: + jest-diff "^27.0.0" + pretty-format "^27.0.0" + "@types/node-fetch@^2.5.12": version "2.5.12" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" @@ -1348,51 +1378,122 @@ dependencies: "@types/yargs-parser" "*" -"@webb-tools/contracts@^0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@webb-tools/contracts/-/contracts-0.0.2.tgz#f23643716d5ce76bc82fe0b14195fdc5b42ef3cb" - integrity sha512-2cW5bhsmjRI+dK+sc/AV9EX8LR+9s16TqNlciBsQzITZJ5fqKLPZ5YXbUz84P4b5XdMMY39m9m18NcXnLCgC5Q== +"@webb-tools/anchors@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@webb-tools/anchors/-/anchors-0.1.2.tgz#58dfb45fbd1b837c3f151693d09dcc574302284a" + integrity sha512-lMr4OpQtjmKkluAoH5qKjc6rAozawpChdg6lpK1gCQNWiI+VWWosMcPnDvZHo2n5cHS8m1Vu+tC5wIfKuNaN3g== dependencies: - "@typechain/ethers-v5" "^7.0.1" - "@typechain/hardhat" "^2.3.0" - ethers "5.5.1" + "@webb-tools/contracts" "^0.1.2" + "@webb-tools/interfaces" "^0.1.2" + "@webb-tools/merkle-tree" "^0.1.2" + "@webb-tools/utils" "^0.1.3" -"@webb-tools/fixed-bridge@^0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@webb-tools/fixed-bridge/-/fixed-bridge-0.0.2.tgz#89a0748e4b927cfab75276c7759f7f75aae46705" - integrity sha512-dkwTSP6ZZBHaixyukYO/5vbiC41CuHSEKPMRZ8zntY8YxNTz5p9dm2cSbb3ipOw1XHQiH0A9VBQE6GqwitqK9g== - dependencies: - "@webb-tools/contracts" "^0.0.2" - "@webb-tools/tokens" "^0.0.2" - "@webb-tools/utils" "^0.0.2" +"@webb-tools/bridges@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@webb-tools/bridges/-/bridges-0.1.2.tgz#09edfd17995ee55d2cf4915640b9fea256a22ba7" + integrity sha512-sLjzN/yt5+SqQRWc/VSV26ZZ78OMJYM8TfordUdqhnGkpsmNNYiCUNln66P6eDDKL15xXWz/qz1qqW1y0Tq7Mw== + dependencies: + "@webb-tools/anchors" "^0.1.2" + "@webb-tools/contracts" "^0.1.2" + "@webb-tools/interfaces" "^0.1.2" + "@webb-tools/tokens" "^0.1.2" + "@webb-tools/utils" "^0.1.3" circomlibjs "^0.0.8" ethers "5.5.1" ffjavascript "^0.2.38" snarkjs "0.4.10" -"@webb-tools/tokens@^0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@webb-tools/tokens/-/tokens-0.0.2.tgz#5ab32b4efe2470b94c5986dd37fadf7864f08690" - integrity sha512-7tokZasf9Q5YayEyOU5TBkzNctbdxR+e3p1ghrWdDNi9m7bbA4IOcKmWvFzZIQotiD3O7XUcPKO9OBSW/iyCYg== +"@webb-tools/contracts@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@webb-tools/contracts/-/contracts-0.1.2.tgz#fc20ed593866cb0657d800673fbd6395fac72d62" + integrity sha512-Ws2+LKaRfgumDbzyUbiHPp/xLnccIPU0VgafvlGCP5Fp1bzTRzhH2r3kUM4Kcier2diwiO5D/AjxXoajp3kSWA== dependencies: - "@webb-tools/contracts" "^0.0.2" + "@typechain/ethers-v5" "^7.0.1" + "@typechain/hardhat" "^2.3.0" ethers "5.5.1" -"@webb-tools/utils@^0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@webb-tools/utils/-/utils-0.0.2.tgz#382f0eee88a82705c0819108faa52bbdad971c18" - integrity sha512-IpY5e0uSo5B4odgH3CZFpPgcTMRx8k94pSq9oJRvrdJmIypMRr8L9idyOSlIfRcFINunUSpncu8ad4TbmX65ow== +"@webb-tools/interfaces@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@webb-tools/interfaces/-/interfaces-0.1.2.tgz#f388788faffbe5688570546fb087a0fe59cc97d0" + integrity sha512-/NOSdPzff4CEKtXrDejIR+Lciuy2hbc0iuqhBtu/PyUbExk0znqnUsvs/ieGQg1rYaQhrJ+spjv7JaOGD71hhA== + dependencies: + "@webb-tools/utils" "^0.1.3" + +"@webb-tools/merkle-tree@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@webb-tools/merkle-tree/-/merkle-tree-0.1.2.tgz#aadc479dc3d57e54ad4ac73aea44083a9631b996" + integrity sha512-GdRy+eNxMvmVxZknwcxniU8YVZgEF19cNC11mocP7Lw3rxzLbiKhVClQM+pxSn9xZtLROcUX9/VvblPIxuLPWA== + dependencies: + "@webb-tools/contracts" "^0.1.2" + "@webb-tools/interfaces" "^0.1.2" + "@webb-tools/tokens" "^0.1.2" + "@webb-tools/utils" "^0.1.3" + +"@webb-tools/protocol-solidity@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@webb-tools/protocol-solidity/-/protocol-solidity-0.1.3.tgz#4483dd6c19e3297a5603f73621df3a82d698f423" + integrity sha512-7o2DDrjLJJxLadhXVk7LZiswCbuemZAvrBCCJxJcRMzU3SE3ikt0EMEy1F9gynAiXb5nF19fr4mJTDxP4nUJTg== + dependencies: + "@webb-tools/anchors" "^0.1.2" + "@webb-tools/bridges" "^0.1.2" + "@webb-tools/contracts" "^0.1.2" + "@webb-tools/interfaces" "^0.1.2" + "@webb-tools/merkle-tree" "^0.1.2" + "@webb-tools/tokens" "^0.1.2" + "@webb-tools/utils" "^0.1.3" + "@webb-tools/vbridge" "^0.1.2" + +"@webb-tools/tokens@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@webb-tools/tokens/-/tokens-0.1.2.tgz#beda9cca9cc050db8d8f188a19eda399ac25a804" + integrity sha512-2dahCewx6htd8/jE3AJiEJiuPRYdwr9AGzVlP0cyUxmpJ9JTAeoskwySq0HtjSel+E9Islw1Z5Y84H9V6CxeyA== + dependencies: + "@webb-tools/contracts" "^0.1.2" + "@webb-tools/utils" "^0.1.3" + ethers "5.5.1" + +"@webb-tools/utils@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@webb-tools/utils/-/utils-0.1.3.tgz#d0031e4ff3b86700ee3ed0b530ad480e9dd036eb" + integrity sha512-zffu0cyG4DSB6frjd0q2HJZ0NrLu97l+vwv3IpvR8EuWd1x9NDa4AD/solnYjbYZo+Vd9jKC5dQQIlIss99mkw== dependencies: circomlibjs "^0.0.8" + eth-sig-util "^3.0.1" ethers "5.5.1" ffjavascript "^0.2.43" maci-crypto "^0.9.1" +"@webb-tools/vbridge@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@webb-tools/vbridge/-/vbridge-0.1.2.tgz#cb3fc5a94e0f7857984f16f446b7754f82f410f6" + integrity sha512-i7pDMsKQX5E///7bRfIojDMR3kL21t9pK08cad9wocvBfBXP8u05Ly2A7yWYCrWApSQF4I9HqpGvDvXzJx75uw== + dependencies: + "@webb-tools/bridges" "^0.1.2" + "@webb-tools/contracts" "^0.1.2" + "@webb-tools/tokens" "^0.1.2" + "@webb-tools/utils" "^0.1.3" + circomlibjs "^0.0.8" + ethers "5.5.1" + ffjavascript "^0.2.38" + snarkjs "0.4.10" + abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== +abstract-leveldown@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz#08d19d4e26fb5be426f7a57004851b39e1795a2e" + integrity sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ== + dependencies: + buffer "^6.0.3" + catering "^2.0.0" + is-buffer "^2.0.5" + level-concat-iterator "^3.0.0" + level-supports "^2.0.1" + queue-microtask "^1.2.3" + accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1762,7 +1863,7 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.12.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.12.0: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== @@ -1931,7 +2032,15 @@ buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: base64-js "^1.3.1" ieee754 "^1.1.13" -bufferutil@^4.0.1: +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +bufferutil@4.0.5, bufferutil@^4.0.1: version "4.0.5" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.5.tgz#da9ea8166911cc276bf677b8aed2d02d31f59028" integrity sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A== @@ -1989,6 +2098,11 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +catering@^2.0.0, catering@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" + integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== + chai@^4.2.0: version "4.3.4" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" @@ -2517,6 +2631,11 @@ diff-sequences@^27.4.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.4.0.tgz#d783920ad8d06ec718a060d00196dfef25b132a5" integrity sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww== +diff-sequences@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" + integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -2595,7 +2714,7 @@ electron-to-chromium@^1.4.17: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.23.tgz#c8fa28db6354062bbd388e24d95c4a263fff5cac" integrity sha512-q3tB59Api3+DMbLnDPkW/UBHBO7KTGcF+rDCeb0GAGyqFj562s6y+c/2tDKTS/y5lbC+JOvT4MSUALJLPqlcSA== -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4: +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -2608,6 +2727,11 @@ elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +emittery@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.0.tgz#bb373c660a9d421bb44706ec4967ed50c02a8026" + integrity sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ== + emittery@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" @@ -2777,6 +2901,16 @@ eth-lib@^0.1.26: ws "^3.0.0" xhr-request-promise "^0.1.2" +eth-sig-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.1.tgz#8753297c83a3f58346bd13547b59c4b2cd110c96" + integrity sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.0" + ethereum-bloom-filters@^1.0.6: version "1.0.10" resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" @@ -2805,6 +2939,40 @@ ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" + integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "^0.1.3" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-util@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + ethereumjs-util@^7.0.10, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz#b55d7b64dde3e3e45749e4c41288238edec32d23" @@ -2867,10 +3035,10 @@ ethers@^4.0.45: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.5.2.tgz#cd2e508c7342c44fa70392f722e8de8f2416489f" - integrity sha512-EF5W+6Wwcu6BqVwpgmyR5U2+L4c1FQzlM/02dkZOugN3KF0cG9bzHZP+TDJglmPm2/IzCEJDT7KBxzayk7SAHw== +ethers@^5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.5.4.tgz#e1155b73376a2f5da448e4a33351b57a885f4352" + integrity sha512-N9IAXsF8iKhgHIC6pquzRgPBJEzc9auw3JoRkaKe+y4Wl/LFBtDDunNe7YmdomontECAcC5APaAgWZBiu1kirw== dependencies: "@ethersproject/abi" "5.5.0" "@ethersproject/abstract-provider" "5.5.1" @@ -2887,11 +3055,11 @@ ethers@^5.5.2: "@ethersproject/json-wallets" "5.5.0" "@ethersproject/keccak256" "5.5.0" "@ethersproject/logger" "5.5.0" - "@ethersproject/networks" "5.5.1" + "@ethersproject/networks" "5.5.2" "@ethersproject/pbkdf2" "5.5.0" "@ethersproject/properties" "5.5.0" - "@ethersproject/providers" "5.5.1" - "@ethersproject/random" "5.5.0" + "@ethersproject/providers" "5.5.3" + "@ethersproject/random" "5.5.1" "@ethersproject/rlp" "5.5.0" "@ethersproject/sha2" "5.5.0" "@ethersproject/signing-key" "5.5.0" @@ -2911,6 +3079,14 @@ ethjs-unit@0.1.6: bn.js "4.11.6" number-to-bn "1.7.0" +ethjs-util@0.1.6, ethjs-util@^0.1.3: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + eventemitter3@4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" @@ -3250,6 +3426,20 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +ganache@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/ganache/-/ganache-7.0.2.tgz#c6b43061dd37d722dbf02db992cc38600389b757" + integrity sha512-cywtnBJQY/olx87mb6IT0NiBr8aTk58WccRF8fHtVQLQXxyEUbQfozqAZmpTA25Vdme+i+kFrGr9TrEA0GGq7g== + dependencies: + "@trufflesuite/bigint-buffer" "1.1.9" + emittery "0.10.0" + keccak "3.0.1" + leveldown "6.1.0" + secp256k1 "4.0.2" + optionalDependencies: + bufferutil "4.0.5" + utf-8-validate "5.0.7" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -3566,7 +3756,7 @@ idna-uts46-hx@^2.3.1: dependencies: punycode "2.1.0" -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -3644,6 +3834,11 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-buffer@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" @@ -3962,6 +4157,16 @@ jest-config@^27.4.5: pretty-format "^27.4.2" slash "^3.0.0" +jest-diff@^27.0.0, jest-diff@^27.2.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" + integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== + dependencies: + chalk "^4.0.0" + diff-sequences "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + jest-diff@^27.4.2: version "27.4.2" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.4.2.tgz#786b2a5211d854f848e2dcc1e324448e9481f36f" @@ -4015,6 +4220,19 @@ jest-environment-node@^27.4.4: jest-mock "^27.4.2" jest-util "^27.4.2" +jest-extended@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jest-extended/-/jest-extended-2.0.0.tgz#8a6cef7369c2ef774bd966279a30cd73abe408dd" + integrity sha512-6AgjJQVaBEKGSK3FH90kOiRUWJsbzn9NWtW0pjGkAFIdH0oPilfkV/gHPJdVvJeBiqT3jMHw8TUg9pUGC1azDg== + dependencies: + jest-diff "^27.2.5" + jest-get-type "^27.0.6" + +jest-get-type@^27.0.6, jest-get-type@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" + integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== + jest-get-type@^27.4.0: version "27.4.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.4.0.tgz#7503d2663fffa431638337b3998d39c5e928e9b5" @@ -4412,6 +4630,14 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" +keccak@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" + integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + keccak@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" @@ -4433,6 +4659,27 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +level-concat-iterator@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz#5235b1f744bc34847ed65a50548aa88d22e881cf" + integrity sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ== + dependencies: + catering "^2.1.0" + +level-supports@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-2.1.0.tgz#9af908d853597ecd592293b2fad124375be79c5f" + integrity sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA== + +leveldown@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-6.1.0.tgz#7ab1297706f70c657d1a72b31b40323aa612b9ee" + integrity sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w== + dependencies: + abstract-leveldown "^7.2.0" + napi-macros "~2.0.0" + node-gyp-build "^4.3.0" + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -4785,6 +5032,11 @@ nanoassert@^2.0.0: resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-2.0.0.tgz#a05f86de6c7a51618038a620f88878ed1e490c09" integrity sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA== +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -4817,7 +5069,7 @@ node-fetch@^2.6.6: dependencies: whatwg-url "^5.0.0" -node-gyp-build@^4.2.0, node-gyp-build@^4.2.2, node-gyp-build@^4.3.0: +node-gyp-build@4.3.0, node-gyp-build@^4.2.0, node-gyp-build@^4.2.2, node-gyp-build@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== @@ -5109,6 +5361,15 @@ prettier@2.5.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== +pretty-format@^27.0.0, pretty-format@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + pretty-format@^27.4.2: version "27.4.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.4.2.tgz#e4ce92ad66c3888423d332b40477c87d1dac1fb8" @@ -5199,6 +5460,11 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +queue-microtask@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + r1csfile@0.0.16: version "0.0.16" resolved "https://registry.yarnpkg.com/r1csfile/-/r1csfile-0.0.16.tgz#53c66a79b50eebc2d15a1048e39d548ce9da7ccd" @@ -5375,7 +5641,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rlp@^2.2.4: +rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4: version "2.2.7" resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== @@ -5428,6 +5694,15 @@ scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== +secp256k1@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" + integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== + dependencies: + elliptic "^6.5.2" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + secp256k1@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" @@ -5990,6 +6265,11 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +tweetnacl-util@^0.15.0: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + tweetnacl@1.x.x, tweetnacl@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" @@ -6113,7 +6393,7 @@ url-to-options@^1.0.1: resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= -utf-8-validate@^5.0.2: +utf-8-validate@5.0.7, utf-8-validate@^5.0.2: version "5.0.7" resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.7.tgz#c15a19a6af1f7ad9ec7ddc425747ca28c3644922" integrity sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q== diff --git a/node/Cargo.toml b/node/Cargo.toml index 3a56b6d1d..bbe1ae250 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -13,7 +13,7 @@ build = 'build.rs' targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [[bin]] name = 'dkg-node' @@ -41,60 +41,60 @@ dkg-gadget = { path = '../dkg-gadget' } parachain-staking = { package = 'pallet-parachain-staking', path = '../pallets/parachain-staking', default-features = false } # Substrate Dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } ## Substrate Client Dependencies -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-service = { git = 'https://github.com/paritytech/substrate', branch = "master", features = ['wasmtime'] } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-service = { git = 'https://github.com/paritytech/substrate', branch = "polkadot-v0.9.16", features = ['wasmtime'] } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } ## Substrate Primitive Dependencies -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } # Cumulus dependencies -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "master" } -cumulus-relay-chain-local = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } +cumulus-relay-chain-local = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16" } # Polkadot dependencies -polkadot-cli = { git = 'https://github.com/paritytech/polkadot', branch = 'master'} -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'master'} -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = 'master'} -polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = 'master'} -polkadot-test-service = { git = 'https://github.com/paritytech/polkadot', branch = 'master'} \ No newline at end of file +polkadot-cli = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16'} +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16'} +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16'} +polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16'} +polkadot-test-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16'} \ No newline at end of file diff --git a/node/src/service.rs b/node/src/service.rs index c2ab2dd40..3533248f1 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -331,7 +331,7 @@ where let network = network.clone(); Arc::new(move |hash, data| network.announce_block(hash, data)) }; - + let relay_chain_slot_duration = Duration::from_secs(6); if validator { let parachain_consensus = build_consensus( client.clone(), @@ -358,7 +358,7 @@ where parachain_consensus, import_queue, collator_key, - slot_duration: Duration::from_secs(6), + relay_chain_slot_duration, }; start_collator(params).await?; @@ -369,6 +369,8 @@ where task_manager: &mut task_manager, para_id: id, relay_chain_interface, + relay_chain_slot_duration, + import_queue, }; start_full_node(params)?; @@ -457,14 +459,15 @@ pub async fn start_parachain_node( BuildAuraConsensusParams { proposer_factory, create_inherent_data_providers: move |_, (relay_parent, validation_data)| { - let parachain_inherent = + let relay_chain_interface = relay_chain_interface.clone(); + async move { + let parachain_inherent = cumulus_primitives_parachain_inherent::ParachainInherentData::create_at( relay_parent, &relay_chain_interface, &validation_data, id, - ); - async move { + ).await; let time = sp_timestamp::InherentDataProvider::from_system_time(); let slot = diff --git a/pallets/dkg-metadata/Cargo.toml b/pallets/dkg-metadata/Cargo.toml index a12341502..6b0cb34df 100644 --- a/pallets/dkg-metadata/Cargo.toml +++ b/pallets/dkg-metadata/Cargo.toml @@ -21,18 +21,18 @@ scale-info = { version = "1.0", default-features = false, features = [ hex = { version = "0.4", default-features = false } libsecp256k1 = { version = "0.7.0", default-features = false } dkg-runtime-primitives = { path = '../../dkg-runtime-primitives', default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } [dev-dependencies] serde = { version = "1.0.119" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [features] default = ['std'] diff --git a/pallets/dkg-metadata/src/lib.rs b/pallets/dkg-metadata/src/lib.rs index 9230c64c6..ad9df1c31 100644 --- a/pallets/dkg-metadata/src/lib.rs +++ b/pallets/dkg-metadata/src/lib.rs @@ -41,7 +41,7 @@ use sp_runtime::{ traits::{IsMember, Member}, DispatchError, Permill, RuntimeAppPublic, }; -use sp_std::{collections::btree_map::BTreeMap, convert::TryFrom, prelude::*}; +use sp_std::{borrow::ToOwned, collections::btree_map::BTreeMap, convert::TryFrom, prelude::*}; pub mod types; use types::RoundMetadata; @@ -101,6 +101,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(PhantomData); #[pallet::hooks] @@ -184,7 +185,7 @@ pub mod pallet { ); // set the new maintainer SignatureThreshold::::try_mutate(|threshold| { - *threshold = new_threshold.clone(); + *threshold = new_threshold; Ok(().into()) }) } @@ -323,7 +324,7 @@ pub mod pallet { if valid_reporters.len() >= threshold as usize { Self::deposit_event(Event::MisbehaviourReportsSubmitted { - reporters: valid_reporters.clone(), + reporters: valid_reporters, }); // Deduct one point for misbehaviour report let reputation = AuthorityReputations::::get(&offender); @@ -343,6 +344,59 @@ pub mod pallet { TimeToRestart::::put(interval); Ok(().into()) } + + /// Manually Update the `RefreshNonce` (increment it by one). + /// + /// * `origin` - The account that is calling this must be root. + /// **Important**: This function is only available for testing purposes. + #[pallet::weight(0)] + #[transactional] + pub fn manual_increment_nonce(origin: OriginFor) -> DispatchResultWithPostInfo { + ensure_root(origin)?; + if Self::refresh_in_progress() { + return Err(Error::::RefreshInProgress.into()) + } + let next_nonce = Self::refresh_nonce() + 1u32; + RefreshNonce::::put(next_nonce); + Ok(().into()) + } + + /// Manual Trigger DKG Refresh process. + /// + /// * `origin` - The account that is initiating the refresh process and must be root. + /// **Important**: This function is only available for testing purposes. + #[pallet::weight(0)] + #[transactional] + pub fn manual_refresh(origin: OriginFor) -> DispatchResultWithPostInfo { + ensure_root(origin)?; + if Self::refresh_in_progress() { + return Err(Error::::RefreshInProgress.into()) + } + if let Some(pub_key) = Self::next_dkg_public_key() { + RefreshInProgress::::put(true); + let uncompressed_pub_key = Self::decompress_public_key(pub_key.1).unwrap(); + let next_nonce = Self::refresh_nonce() + 1u32; + let data = dkg_runtime_primitives::RefreshProposal { + nonce: next_nonce, + pub_key: uncompressed_pub_key, + }; + + match T::ProposalHandler::handle_unsigned_refresh_proposal(data) { + Ok(()) => { + RefreshNonce::::put(next_nonce); + ShouldManualRefresh::::put(true); + frame_support::log::debug!("Handled refresh proposal"); + Ok(().into()) + }, + Err(e) => { + frame_support::log::warn!("Failed to handle refresh proposal: {:?}", e); + Err(Error::::ManualRefreshFailed.into()) + }, + } + } else { + Err(Error::::NoNextPublicKey.into()) + } + } } /// Public key Signatures for past sessions @@ -360,11 +414,16 @@ pub mod pallet { #[pallet::getter(fn refresh_delay)] pub type RefreshDelay = StorageValue<_, Permill, ValueQuery>; - /// Nonce value for next refresh proposal + /// Check if there is a refresh in progress. #[pallet::storage] #[pallet::getter(fn refresh_in_progress)] pub type RefreshInProgress = StorageValue<_, bool, ValueQuery>; + /// Should we manually trigger a DKG refresh process. + #[pallet::storage] + #[pallet::getter(fn should_manual_refresh)] + pub type ShouldManualRefresh = StorageValue<_, bool, ValueQuery>; + /// Number of blocks that should elapse after which the dkg keygen is restarted /// if it has stalled #[pallet::storage] @@ -489,6 +548,12 @@ pub mod pallet { InvalidSignature, /// Invalid misbehaviour reports InvalidMisbehaviourReports, + /// DKG Refresh is already in progress. + RefreshInProgress, + /// Manual DKG Refresh failed to progress. + ManualRefreshFailed, + /// No NextPublicKey stored on-chain. + NoNextPublicKey, } // Pallets use events to inform users when important changes are made. @@ -501,8 +566,14 @@ pub mod pallet { NextPublicKeySubmitted { compressed_pub_key: Vec, uncompressed_pub_key: Vec }, /// Next public key signature submitted NextPublicKeySignatureSubmitted { pub_key_sig: Vec }, + /// Current Public Key Changed. + PublicKeyChanged { compressed_pub_key: Vec, uncompressed_pub_key: Vec }, + /// Current Public Key Signature Changed. + PublicKeySignatureChanged { pub_key_sig: Vec }, /// Misbehaviour reports submitted MisbehaviourReportsSubmitted { reporters: Vec }, + /// Refresh DKG Keys Finished (forcefully). + RefreshKeysFinished { next_authority_set_id: dkg_runtime_primitives::AuthoritySetId }, } #[cfg(feature = "std")] @@ -541,8 +612,13 @@ impl Pallet { Some(libsecp256k1::PublicKeyFormat::Compressed), ) .map(|pk| pk.serialize()) - .map_err(|e| Error::::InvalidPublicKeys)?; - Ok(result.to_vec()) + .map_err(|_| Error::::InvalidPublicKeys)?; + if result.len() == 65 { + // remove the 0x04 prefix + Ok(result[1..].to_vec()) + } else { + Ok(result.to_vec()) + } } pub fn process_public_key_submissions( @@ -572,7 +648,7 @@ impl Pallet { } } - return dict + dict } pub fn process_misbehaviour_reports( @@ -594,14 +670,14 @@ impl Pallet { signed_payload.extend_from_slice(reports.round_id.to_be_bytes().as_ref()); signed_payload.extend_from_slice(reports.offender.as_ref()); - let can_proceed = verify_signer_from_set(maybe_signers, &signed_payload, &signature); + let can_proceed = verify_signer_from_set(maybe_signers, &signed_payload, signature); if can_proceed.1 && !valid_reporters.contains(&reports.reporters[inx]) { valid_reporters.push(reports.reporters[inx]); } } - return valid_reporters + valid_reporters } fn change_authorities( @@ -674,7 +750,7 @@ impl Pallet { submit_at_ref.clear(); } } else { - Err(RECENTLY_SENT)? + return Err(RECENTLY_SENT) } if !Self::dkg_public_key().1.is_empty() { @@ -686,7 +762,9 @@ impl Pallet { let signer = Signer::::all_accounts(); if !signer.can_sign() { - Err("No local accounts available. Consider adding one via `author_insertKey` RPC.")? + return Err( + "No local accounts available. Consider adding one via `author_insertKey` RPC.", + ) } if let Ok(Some(agg_keys)) = agg_keys { @@ -697,7 +775,7 @@ impl Pallet { agg_key_ref.clear(); } - return Ok(()) + Ok(()) } fn submit_next_public_key_onchain(block_number: T::BlockNumber) -> Result<(), &'static str> { @@ -714,7 +792,7 @@ impl Pallet { submit_at_ref.clear(); } } else { - Err(RECENTLY_SENT)? + return Err(RECENTLY_SENT) } if Self::next_dkg_public_key().is_some() { @@ -726,7 +804,9 @@ impl Pallet { let signer = Signer::::all_accounts(); if !signer.can_sign() { - Err("No local accounts available. Consider adding one via `author_insertKey` RPC.")? + return Err( + "No local accounts available. Consider adding one via `author_insertKey` RPC.", + ) } if let Ok(Some(agg_keys)) = agg_keys { @@ -737,7 +817,7 @@ impl Pallet { agg_key_ref.clear(); } - return Ok(()) + Ok(()) } fn submit_public_key_signature_onchain( @@ -754,7 +834,9 @@ impl Pallet { let signer = Signer::::all_accounts(); if !signer.can_sign() { - Err("No local accounts available. Consider adding one via `author_insertKey` RPC.")? + return Err( + "No local accounts available. Consider adding one via `author_insertKey` RPC.", + ) } if let Ok(Some(refresh_proposal)) = refresh_proposal { @@ -766,7 +848,7 @@ impl Pallet { pub_key_sig_ref.clear(); } - return Ok(()) + Ok(()) } fn submit_misbehaviour_reports_onchain( @@ -774,7 +856,9 @@ impl Pallet { ) -> Result<(), &'static str> { let signer = Signer::::all_accounts(); if !signer.can_sign() { - Err("No local accounts available. Consider adding one via `author_insertKey` RPC.")? + return Err( + "No local accounts available. Consider adding one via `author_insertKey` RPC.", + ) } let mut agg_reports_ref = StorageValueRef::persistent(AGGREGATED_MISBEHAVIOUR_REPORTS); @@ -796,7 +880,7 @@ impl Pallet { agg_reports_ref.clear(); } - return Ok(()) + Ok(()) } pub fn should_refresh(now: T::BlockNumber) -> bool { @@ -817,12 +901,11 @@ impl Pallet { ) -> DispatchResultWithPostInfo { let refresh_nonce = Self::refresh_nonce(); if let Some(pub_key) = Self::next_dkg_public_key() { - let uncompressed_pub_key = - Self::decompress_public_key(pub_key.1.clone()).unwrap_or_default(); + let uncompressed_pub_key = Self::decompress_public_key(pub_key.1).unwrap_or_default(); let data = RefreshProposal { nonce: refresh_nonce, pub_key: uncompressed_pub_key }; - dkg_runtime_primitives::utils::ensure_signed_by_dkg::(&signature, &data.encode()) + dkg_runtime_primitives::utils::ensure_signed_by_dkg::(signature, &data.encode()) .map_err(|_| { - frame_support::log::debug!( + frame_support::log::error!( target: "dkg", "Invalid signature: {:?}", signature @@ -831,12 +914,19 @@ impl Pallet { })?; if Self::next_public_key_signature().is_none() { - NextPublicKeySignature::::put(signature.clone()); + NextPublicKeySignature::::put(signature.to_owned()); // Remove unsigned refresh proposal from queue T::ProposalHandler::handle_signed_refresh_proposal(data)?; Self::deposit_event(Event::NextPublicKeySignatureSubmitted { - pub_key_sig: signature.clone(), + pub_key_sig: signature.to_owned(), }); + if Self::should_manual_refresh() { + ShouldManualRefresh::::put(false); + let next_authority_set_id = Self::authority_set_id() + 1u64; + AuthoritySetId::::put(next_authority_set_id); + Self::refresh_keys(); + Self::deposit_event(Event::RefreshKeysFinished { next_authority_set_id }); + } } } @@ -850,21 +940,22 @@ impl Pallet { let pub_key_signature = Self::public_key_signature(); NextDKGPublicKey::::kill(); NextPublicKeySignature::::kill(); - if next_pub_key.is_some() && next_pub_key_signature.is_some() { + let v = next_pub_key.zip(next_pub_key_signature); + if let Some((next_pub_key, next_pub_key_signature)) = v { // Insert historical round metadata consisting of the current round's // public key before rotation, the next round's public key, and the refresh // signature signed by the current key refreshing the next. HistoricalRounds::::insert( - next_pub_key.clone().unwrap().0, + next_pub_key.0, RoundMetadata { curr_round_pub_key: dkg_pub_key.1.clone(), - next_round_pub_key: next_pub_key.clone().unwrap().1, - refresh_signature: next_pub_key_signature.clone().unwrap(), + next_round_pub_key: next_pub_key.clone().1, + refresh_signature: next_pub_key_signature.clone(), }, ); // Set new keys - DKGPublicKey::::put(next_pub_key.clone().unwrap()); - DKGPublicKeySignature::::put(next_pub_key_signature.clone().unwrap()); + DKGPublicKey::::put(next_pub_key.clone()); + DKGPublicKeySignature::::put(next_pub_key_signature.clone()); PreviousPublicKey::::put(dkg_pub_key.clone()); UsedSignatures::::mutate(|val| { val.push(pub_key_signature.clone()); @@ -874,13 +965,22 @@ impl Pallet { let log: DigestItem = DigestItem::Consensus( DKG_ENGINE_ID, ConsensusLog::::KeyRefresh { - new_key_signature: next_pub_key_signature.unwrap(), + new_key_signature: next_pub_key_signature.clone(), old_public_key: dkg_pub_key.1, - new_public_key: next_pub_key.unwrap().1, + new_public_key: next_pub_key.1.clone(), } .encode(), ); + let uncompressed_pub_key = Self::decompress_public_key(next_pub_key.1.clone()).unwrap(); >::deposit_log(log); + // Emit events so other front-end know that. + Self::deposit_event(Event::PublicKeyChanged { + uncompressed_pub_key, + compressed_pub_key: next_pub_key.1, + }); + Self::deposit_event(Event::PublicKeySignatureChanged { + pub_key_sig: next_pub_key_signature, + }) } } @@ -889,8 +989,8 @@ impl Pallet { let session_length = >::average_session_length(); - let max_delay = Permill::from_percent(50) * (refresh_delay * session_length); - max_delay + + Permill::from_percent(50) * (refresh_delay * session_length) } #[cfg(feature = "runtime-benchmarks")] diff --git a/pallets/dkg-mmr/Cargo.toml b/pallets/dkg-mmr/Cargo.toml index d05c81146..5590fb2dc 100644 --- a/pallets/dkg-mmr/Cargo.toml +++ b/pallets/dkg-mmr/Cargo.toml @@ -14,22 +14,22 @@ log = { version = "0.4.13", default-features = false } scale-info = { version = "1.0", default-features = false, features = ["derive"] } serde = { version = "1.0.130", optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -pallet-mmr = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } dkg-merkle-tree = { package = "beefy-merkle-tree", git = "https://github.com/paritytech/substrate", default-features = false } dkg-runtime-primitives = { path = "../../dkg-runtime-primitives", default-features = false } pallet-dkg-metadata = { path = "../dkg-metadata", default-features = false } [dev-dependencies] -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } hex-literal = "0.3" [features] diff --git a/pallets/dkg-mmr/src/lib.rs b/pallets/dkg-mmr/src/lib.rs index 55d70330e..7b94709b7 100644 --- a/pallets/dkg-mmr/src/lib.rs +++ b/pallets/dkg-mmr/src/lib.rs @@ -120,6 +120,7 @@ pub mod pallet { /// DKG-MMR pallet. #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); /// The module's configuration trait. diff --git a/pallets/dkg-proposal-handler/Cargo.toml b/pallets/dkg-proposal-handler/Cargo.toml index b70b859b8..0117c16e5 100644 --- a/pallets/dkg-proposal-handler/Cargo.toml +++ b/pallets/dkg-proposal-handler/Cargo.toml @@ -17,23 +17,23 @@ scale-info = { version = "1.0", default-features = false, features = ["derive"] dkg-runtime-primitives = { path = '../../dkg-runtime-primitives', default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = 'master', default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16', default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } pallet-dkg-metadata = { path = "../dkg-metadata", default-features = false } hex-literal = { version = "0.3", optional = true } [dev-dependencies] pallet-dkg-proposals = { path = "../dkg-proposals" } serde = { version = "1.0.119" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [features] default = ["std"] diff --git a/pallets/dkg-proposal-handler/rpc/Cargo.toml b/pallets/dkg-proposal-handler/rpc/Cargo.toml index 500dd1af6..799a70b95 100644 --- a/pallets/dkg-proposal-handler/rpc/Cargo.toml +++ b/pallets/dkg-proposal-handler/rpc/Cargo.toml @@ -8,13 +8,13 @@ authors = ["Webb Tools"] jsonrpc-core = "18.0.0" jsonrpc-core-client = "18.0.0" jsonrpc-derive = "18.0.0" -sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } pallet-dkg-proposal-handler-runtime-api = { path = "./runtime-api", default-features = false } diff --git a/pallets/dkg-proposal-handler/rpc/runtime-api/Cargo.toml b/pallets/dkg-proposal-handler/rpc/runtime-api/Cargo.toml index 22aea3196..430f72803 100644 --- a/pallets/dkg-proposal-handler/rpc/runtime-api/Cargo.toml +++ b/pallets/dkg-proposal-handler/rpc/runtime-api/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [features] default = ["std"] diff --git a/pallets/dkg-proposal-handler/src/lib.rs b/pallets/dkg-proposal-handler/src/lib.rs index 6b9d58630..afbebf6fb 100644 --- a/pallets/dkg-proposal-handler/src/lib.rs +++ b/pallets/dkg-proposal-handler/src/lib.rs @@ -69,6 +69,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); /// All unsigned proposals. diff --git a/pallets/dkg-proposals/Cargo.toml b/pallets/dkg-proposals/Cargo.toml index ecd92e276..163b47b87 100644 --- a/pallets/dkg-proposals/Cargo.toml +++ b/pallets/dkg-proposals/Cargo.toml @@ -17,26 +17,26 @@ codec = { package = "parity-scale-codec", version = "2.3.0", default-features = scale-info = { version = "1.0", default-features = false, features = ["derive"] } dkg-runtime-primitives = { path = '../../dkg-runtime-primitives', default-features = false } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master' } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master' } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master' } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master' } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16' } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16' } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16' } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16' } # frame dependencies -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master' } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master' } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master' } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16' } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16' } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16' } -frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master', optional = true } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'master', optional = true } +frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16', optional = true } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = 'polkadot-v0.9.16', optional = true } [dev-dependencies] pallet-dkg-proposal-handler = { path = "../dkg-proposal-handler" } pallet-parachain-staking = { path = "../parachain-staking" } pallet-dkg-metadata = { path = "../dkg-metadata" } -pallet-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [features] default = ["std"] diff --git a/pallets/dkg-proposals/rpc/Cargo.toml b/pallets/dkg-proposals/rpc/Cargo.toml index 6fe468b81..b3750082e 100644 --- a/pallets/dkg-proposals/rpc/Cargo.toml +++ b/pallets/dkg-proposals/rpc/Cargo.toml @@ -7,13 +7,13 @@ edition = "2021" jsonrpc-core = "18.0.0" jsonrpc-core-client = "18.0.0" jsonrpc-derive = "18.0.0" -sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } pallet-dkg-proposals-runtime-api = { path = "./runtime-api", default-features = false } diff --git a/pallets/dkg-proposals/rpc/runtime-api/Cargo.toml b/pallets/dkg-proposals/rpc/runtime-api/Cargo.toml index ca7d9aa14..e35c33aa2 100644 --- a/pallets/dkg-proposals/rpc/runtime-api/Cargo.toml +++ b/pallets/dkg-proposals/rpc/runtime-api/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [features] default = ["std"] diff --git a/pallets/dkg-proposals/src/lib.rs b/pallets/dkg-proposals/src/lib.rs index 6657f5b60..90064eb6b 100644 --- a/pallets/dkg-proposals/src/lib.rs +++ b/pallets/dkg-proposals/src/lib.rs @@ -82,6 +82,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::config] diff --git a/pallets/parachain-staking/Cargo.toml b/pallets/parachain-staking/Cargo.toml index 20bb2c19b..6f43419ba 100644 --- a/pallets/parachain-staking/Cargo.toml +++ b/pallets/parachain-staking/Cargo.toml @@ -7,28 +7,28 @@ license = "GNU GPL 3.0" description = "parachain staking pallet for collator selection and reward distribution" [dependencies] -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } log = {version = "0.4.14", default-features = false} parity-scale-codec = { version = "2.3.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } substrate-fixed = { default-features = false, git = "https://github.com/encointer/substrate-fixed" } scale-info = { version = "1.0", default-features = false, features = ["derive"] } -pallet-session = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false} +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false} [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "master"} -pallet-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master"} -pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "master"} -sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master"} +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"} +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"} +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"} +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"} similar-asserts = "1.1.0" -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [features] default = ["std"] diff --git a/pallets/parachain-staking/src/lib.rs b/pallets/parachain-staking/src/lib.rs index 0af615f3a..a0bf413a3 100644 --- a/pallets/parachain-staking/src/lib.rs +++ b/pallets/parachain-staking/src/lib.rs @@ -91,6 +91,7 @@ pub mod pallet { /// Pallet for parachain staking #[pallet::pallet] + #[pallet::without_storage_info] pub struct Pallet(PhantomData); #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 32e456db1..e3bec82c5 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -11,7 +11,7 @@ edition = '2018' targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [dependencies] codec = { package = 'parity-scale-codec', version = '2.0.0', default-features = false, features = ['derive']} @@ -30,57 +30,57 @@ pallet-dkg-proposal-handler = { path = '../pallets/dkg-proposal-handler', defaul # Substrate Dependencies ## Substrate Primitive Dependencies -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } ## Substrate FRAME Dependencies -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate', default-features = false, branch = 'master' } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate', default-features = false, branch = 'polkadot-v0.9.16' } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } ## Substrate Pallet Dependencies -pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-mmr = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } # Cumulus Dependencies -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.16", default-features = false } # Polkadot Dependencies -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'master', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'master', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'master', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'master', default-features = false } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'master', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.16', default-features = false } [features] default = ['std'] diff --git a/scripts/run-standalone.sh b/scripts/run-standalone.sh index 4b335943a..513944e2b 100755 --- a/scripts/run-standalone.sh +++ b/scripts/run-standalone.sh @@ -3,9 +3,10 @@ set -e echo "*** Start Webb DKG Node ***" -./target/release/dkg-standalone-node --tmp -lerror --alice & -./target/release/dkg-standalone-node --tmp -lerror --bob & +./target/release/dkg-standalone-node --tmp -lerror --alice --rpc-cors all --ws-external --ws-port 9944 & +./target/release/dkg-standalone-node --tmp -lerror --bob --ws-port 9945 & ./target/release/dkg-standalone-node --tmp \ + --ws-port 9946 \ -lerror \ -ldkg=debug \ -ldkg_metadata=debug \ diff --git a/standalone/node/Cargo.toml b/standalone/node/Cargo.toml index 55b7a4409..45fba75e6 100644 --- a/standalone/node/Cargo.toml +++ b/standalone/node/Cargo.toml @@ -17,45 +17,54 @@ targets = ["x86_64-unknown-linux-gnu"] name = "dkg-standalone-node" [dependencies] +futures = "0.3.15" structopt = "0.3.8" rand = "0.7.2" codec = { package = "parity-scale-codec", version = "2.0.0" } hex-literal = { package = "hex-literal", version = "0.3.3" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["wasmtime"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["wasmtime"] } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["wasmtime"] } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", features = [ + "wasmtime", +] } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", features = [ + "wasmtime", +] } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", features = [ + "wasmtime", +] } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } # These dependencies are used for the node template's RPCs jsonrpc-core = "18.0.0" -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } # These dependencies are used for runtime benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } # Local dependencies dkg-gadget = { path = "../../dkg-gadget", default-features = false } @@ -64,10 +73,10 @@ dkg-primitives = { path = "../../dkg-primitives", default-features = false } dkg-standalone-runtime = { version = "3.0.0", path = "../runtime" } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [features] default = [] -runtime-benchmarks = [ - "dkg-standalone-runtime/runtime-benchmarks", -] +runtime-benchmarks = ["dkg-standalone-runtime/runtime-benchmarks"] +integration-tests = ["dkg-standalone-runtime/integration-tests"] +manual-seal = ["dkg-standalone-runtime/manual-seal"] diff --git a/standalone/node/src/rpc.rs b/standalone/node/src/rpc.rs index 11461f42f..adc9e3a03 100644 --- a/standalone/node/src/rpc.rs +++ b/standalone/node/src/rpc.rs @@ -5,8 +5,12 @@ #![warn(missing_docs)] -use dkg_standalone_runtime::{opaque::Block, AccountId, Balance, Index as Nonce}; +use dkg_standalone_runtime::{opaque::Block, AccountId, Balance, Hash, Index as Nonce}; use sc_client_api::AuxStore; +use sc_consensus_manual_seal::{ + rpc::{ManualSeal, ManualSealApi}, + EngineCommand, +}; pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; @@ -25,6 +29,8 @@ pub struct FullDeps { pub pool: Arc

, /// Whether to deny unsafe calls pub deny_unsafe: DenyUnsafe, + /// Manual seal command sink + pub command_sink: Option>>, } /// Instantiate all full RPC extensions. @@ -46,12 +52,19 @@ where use substrate_frame_rpc_system::{FullSystem, SystemApi}; let mut io = jsonrpc_core::IoHandler::default(); - let FullDeps { client, pool, deny_unsafe } = deps; + let FullDeps { client, pool, deny_unsafe, command_sink } = deps; io.extend_with(SystemApi::to_delegate(FullSystem::new(client.clone(), pool, deny_unsafe))); io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone()))); + if let Some(command_sink) = command_sink { + io.extend_with( + // We provide the rpc handler with the sending end of the channel to allow the rpc + // send EngineCommands to the background block authorship task. + ManualSealApi::to_delegate(ManualSeal::new(command_sink)), + ); + } // Extend this RPC with a custom API by using the following syntax. // `YourRpcStruct` should have a reference to a client, which is needed // to call into the runtime. diff --git a/standalone/node/src/service.rs b/standalone/node/src/service.rs index 77f293816..538ae36cf 100644 --- a/standalone/node/src/service.rs +++ b/standalone/node/src/service.rs @@ -4,6 +4,7 @@ use dkg_gadget::DKG_PROTOCOL_NAME; use dkg_standalone_runtime::{self, opaque::Block, RuntimeApi}; use sc_client_api::{BlockBackend, ExecutorProvider}; use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; +use sc_consensus_manual_seal::consensus::timestamp::SlotTimestampProvider; use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; @@ -33,6 +34,16 @@ type FullClient = sc_service::TFullClient; type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; +#[cfg(not(feature = "manual-seal"))] +type Extra = ( + sc_finality_grandpa::GrandpaBlockImport, + sc_finality_grandpa::LinkHalf, + Option, +); + +#[cfg(feature = "manual-seal")] +type Extra = Option; + pub fn new_partial( config: &Configuration, ) -> Result< @@ -42,16 +53,7 @@ pub fn new_partial( FullSelectChain, sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool, - ( - sc_finality_grandpa::GrandpaBlockImport< - FullBackend, - Block, - FullClient, - FullSelectChain, - >, - sc_finality_grandpa::LinkHalf, - Option, - ), + Extra, >, ServiceError, > { @@ -79,7 +81,7 @@ pub fn new_partial( let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( - &config, + config, telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), executor, )?; @@ -100,6 +102,7 @@ pub fn new_partial( client.clone(), ); + #[cfg(not(feature = "manual-seal"))] let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( client.clone(), &(client.clone() as Arc<_>), @@ -107,8 +110,17 @@ pub fn new_partial( telemetry.as_ref().map(|x| x.handle()), )?; + #[cfg(feature = "manual-seal")] + let import_queue = sc_consensus_manual_seal::import_queue( + Box::new(client.clone()), + &task_manager.spawn_essential_handle(), + config.prometheus_registry(), + ); + + #[cfg(not(feature = "manual-seal"))] let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration(); + #[cfg(not(feature = "manual-seal"))] let import_queue = sc_consensus_aura::import_queue::(ImportQueueParams { block_import: grandpa_block_import.clone(), @@ -142,7 +154,10 @@ pub fn new_partial( keystore_container, select_chain, transaction_pool, + #[cfg(not(feature = "manual-seal"))] other: (grandpa_block_import, grandpa_link, telemetry), + #[cfg(feature = "manual-seal")] + other: telemetry, }) } @@ -163,9 +178,15 @@ pub fn new_full(mut config: Configuration) -> Result mut keystore_container, select_chain, transaction_pool, - other: (block_import, grandpa_link, mut telemetry), + other, } = new_partial(&config)?; + #[cfg(not(feature = "manual-seal"))] + let (block_import, grandpa_link, mut telemetry) = other; + + #[cfg(feature = "manual-seal")] + let mut telemetry = other; + if let Some(url) = &config.keystore_remote { match remote_keystore(url) { Ok(k) => keystore_container.set_remote_keystore(k), @@ -215,18 +236,6 @@ pub fn new_full(mut config: Configuration) -> Result let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); - let rpc_extensions_builder = { - let client = client.clone(); - let pool = transaction_pool.clone(); - - Box::new(move |deny_unsafe, _| { - let deps = - crate::rpc::FullDeps { client: client.clone(), pool: pool.clone(), deny_unsafe }; - - Ok(crate::rpc::create_full(deps)) - }) - }; - let base_path = if config.base_path.is_some() { match config.base_path.as_ref() { Some(BasePath::Permanenent(path_buf)) => Some(path_buf.clone()), @@ -243,78 +252,16 @@ pub fn new_full(mut config: Configuration) -> Result ); } - let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { - network: network.clone(), - client: client.clone(), - keystore: keystore_container.sync_keystore(), - task_manager: &mut task_manager, - transaction_pool: transaction_pool.clone(), - rpc_extensions_builder, - backend: backend.clone(), - system_rpc_tx, - config, - telemetry: telemetry.as_mut(), - })?; - // if the node isn't actively participating in consensus then it doesn't // need a keystore, regardless of which protocol we use below. let keystore = if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None }; - if role.is_authority() { - let proposer_factory = sc_basic_authorship::ProposerFactory::new( - task_manager.spawn_handle(), - client.clone(), - transaction_pool, - prometheus_registry.as_ref(), - telemetry.as_ref().map(|x| x.handle()), - ); - - let can_author_with = - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - - let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let raw_slot_duration = slot_duration.slot_duration(); - - let aura = sc_consensus_aura::start_aura::( - StartAuraParams { - slot_duration, - client: client.clone(), - select_chain, - block_import, - proposer_factory, - create_inherent_data_providers: move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( - *timestamp, - raw_slot_duration, - ); - - Ok((timestamp, slot)) - }, - force_authoring, - backoff_authoring_blocks, - keystore: keystore_container.sync_keystore(), - can_author_with, - sync_oracle: network.clone(), - justification_sync_link: network.clone(), - block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), - max_block_proposal_slot_portion: None, - telemetry: telemetry.as_ref().map(|x| x.handle()), - }, - )?; - - // the AURA authoring task is considered essential, i.e. if it - // fails we take down the service with it. - task_manager - .spawn_essential_handle() - .spawn_blocking("aura", Some("block-authoring"), aura); - + let rpc_client = client.clone(); + let command_sink = if role.is_authority() { let dkg_params = dkg_gadget::DKGParams { - client, - backend, + client: client.clone(), + backend: backend.clone(), key_store: keystore.clone(), network: network.clone(), min_block_delta: 4, @@ -330,8 +277,136 @@ pub fn new_full(mut config: Configuration) -> Result None, dkg_gadget::start_dkg_gadget::<_, _, _, _>(dkg_params), ); - } + let proposer_factory = sc_basic_authorship::ProposerFactory::new( + task_manager.spawn_handle(), + client.clone(), + transaction_pool.clone(), + prometheus_registry.as_ref(), + telemetry.as_ref().map(|x| x.handle()), + ); + + if cfg!(feature = "manual-seal") { + use futures::prelude::*; + // Channel for the rpc handler to communicate with the authorship task. + let (command_sink, commands_stream) = futures::channel::mpsc::channel(1024); + + let pool = transaction_pool.pool().clone(); + let import_stream = pool.validated_pool().import_notification_stream().map(|_| { + sc_consensus_manual_seal::rpc::EngineCommand::SealNewBlock { + create_empty: true, + finalize: true, + parent_hash: None, + sender: None, + } + }); + let authorship_future = sc_consensus_manual_seal::run_manual_seal( + sc_consensus_manual_seal::ManualSealParams { + block_import: client.clone(), + env: proposer_factory, + client, + pool: transaction_pool.clone(), + commands_stream: futures::stream_select!(commands_stream, import_stream), + select_chain, + consensus_data_provider: None, + create_inherent_data_providers: Box::new(move |_, _| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + Ok(timestamp) + }), + }, + ); + // we spawn the future on a background thread managed by service. + task_manager.spawn_essential_handle().spawn_blocking( + "manual-seal", + Some("block-authoring"), + authorship_future, + ); + Some(command_sink) + } else { + #[cfg(not(feature = "manual-seal"))] + { + let can_author_with = + sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); + + let slot_duration = sc_consensus_aura::slot_duration(&*client)?; + let raw_slot_duration = slot_duration.slot_duration(); + + let aura = + sc_consensus_aura::start_aura::( + StartAuraParams { + slot_duration, + client, + select_chain, + block_import, + proposer_factory, + create_inherent_data_providers: move |_, ()| async move { + let timestamp = + sp_timestamp::InherentDataProvider::from_system_time(); + + let slot = + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( + *timestamp, + raw_slot_duration, + ); + + Ok((timestamp, slot)) + }, + force_authoring, + backoff_authoring_blocks, + keystore: keystore_container.sync_keystore(), + can_author_with, + sync_oracle: network.clone(), + justification_sync_link: network.clone(), + block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), + max_block_proposal_slot_portion: None, + telemetry: telemetry.as_ref().map(|x| x.handle()), + }, + )?; + + // the AURA authoring task is considered essential, i.e. if it + // fails we take down the service with it. + task_manager.spawn_essential_handle().spawn_blocking( + "aura", + Some("block-authoring"), + aura, + ); + } + None + } + } else { + None + }; + + let rpc_extensions_builder = { + let client = rpc_client.clone(); + let pool = transaction_pool.clone(); + + Box::new(move |deny_unsafe, _| { + let deps = crate::rpc::FullDeps { + client: client.clone(), + pool: pool.clone(), + command_sink: command_sink.clone(), + deny_unsafe, + }; + + Ok(crate::rpc::create_full(deps)) + }) + }; + + let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { + network: network.clone(), + client: rpc_client, + keystore: keystore_container.sync_keystore(), + task_manager: &mut task_manager, + transaction_pool, + rpc_extensions_builder, + backend, + system_rpc_tx, + config, + telemetry: telemetry.as_mut(), + })?; + + #[cfg(not(feature = "manual-seal"))] let grandpa_config = sc_finality_grandpa::Config { // FIXME #1578 make this available through chainspec gossip_duration: Duration::from_millis(333), @@ -344,6 +419,7 @@ pub fn new_full(mut config: Configuration) -> Result protocol_name: grandpa_protocol_name, }; + #[cfg(not(feature = "manual-seal"))] if enable_grandpa { // start the full GRANDPA voter // NOTE: non-authorities could run the GRANDPA observer protocol, but at diff --git a/standalone/runtime/Cargo.toml b/standalone/runtime/Cargo.toml index c706b5ff4..aba6331bc 100644 --- a/standalone/runtime/Cargo.toml +++ b/standalone/runtime/Cargo.toml @@ -13,39 +13,43 @@ repository = "https://github.com/webb-tools/dkg-substrate" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ + "derive", +] } +scale-info = { version = "1.0", default-features = false, features = [ + "derive", +] } -pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-mmr = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -pallet-staking-reward-curve = {default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master"} -pallet-election-provider-multi-phase = {default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master"} -sp-npos-elections = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "master"} -frame-election-provider-support = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "master"} -sp-staking = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "master"} -sp-io = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "master"} +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } # Local dependencies dkg-runtime-primitives = { path = "../../dkg-runtime-primitives", default-features = false } @@ -55,16 +59,16 @@ pallet-dkg-proposals = { path = '../../pallets/dkg-proposals', default-features pallet-dkg-proposal-handler = { path = '../../pallets/dkg-proposal-handler', default-features = false } # Used for the node template's RPCs -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false } # Used for runtime benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false, optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", default-features = false, optional = true } hex-literal = { version = "0.3.3", optional = true } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16" } [features] default = ["std"] @@ -106,7 +110,7 @@ std = [ 'sp-npos-elections/std', 'frame-election-provider-support/std', 'sp-staking/std', - 'sp-io/std' + 'sp-io/std', ] runtime-benchmarks = [ "frame-benchmarking", @@ -119,6 +123,8 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "pallet-dkg-proposal-handler/runtime-benchmarks", "pallet-dkg-proposals/runtime-benchmarks", - "pallet-dkg-metadata/runtime-benchmarks" + "pallet-dkg-metadata/runtime-benchmarks", ] +integration-tests = [] +manual-seal = [] diff --git a/standalone/runtime/src/constants.rs b/standalone/runtime/src/constants.rs index c311cfced..1e6a842ee 100644 --- a/standalone/runtime/src/constants.rs +++ b/standalone/runtime/src/constants.rs @@ -54,6 +54,9 @@ pub mod time { /// `SLOT_DURATION` should have the same value. /// /// + #[cfg(feature = "manual-seal")] + pub const MILLISECS_PER_BLOCK: Moment = 1000; + #[cfg(not(feature = "manual-seal"))] pub const MILLISECS_PER_BLOCK: Moment = 3000; pub const SECS_PER_BLOCK: Moment = MILLISECS_PER_BLOCK / 1000; diff --git a/standalone/runtime/src/lib.rs b/standalone/runtime/src/lib.rs index e4780f335..7b3ae6d73 100644 --- a/standalone/runtime/src/lib.rs +++ b/standalone/runtime/src/lib.rs @@ -7,9 +7,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use codec::{Decode, Encode}; -use dkg_runtime_primitives::{ - mmr::MmrLeafVersion, ChainId, ChainIdType, DKGPayloadKey, Proposal, ProposalNonce, -}; +use dkg_runtime_primitives::{mmr::MmrLeafVersion, ChainId, ChainIdType, DKGPayloadKey, Proposal}; use frame_support::traits::{ConstU32, Everything, U128CurrencyToVote}; use pallet_grandpa::{ fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList, @@ -229,14 +227,26 @@ parameter_types! { impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; + #[cfg(feature = "manual-seal")] + type OnTimestampSet = (); + #[cfg(not(feature = "manual-seal"))] type OnTimestampSet = Aura; type MinimumPeriod = MinimumPeriod; type WeightInfo = (); } +#[cfg(feature = "integration-tests")] +parameter_types! { + // How often we trigger a new session. + // during integration tests, we use manual sessions. + pub const Period: BlockNumber = 6 * HOURS; + pub const Offset: BlockNumber = 0; +} + +#[cfg(not(feature = "integration-tests"))] parameter_types! { // How often we trigger a new session. - pub const Period: BlockNumber = 20; + pub const Period: BlockNumber = 3 * MINUTES; pub const Offset: BlockNumber = 0; } @@ -278,8 +288,8 @@ impl onchain::Config for Runtime { parameter_types! { pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); pub const SessionsPerEra: sp_staking::SessionIndex = 6; - pub const BondingDuration: pallet_staking::EraIndex = 24 * 28; - pub const SlashDeferDuration: pallet_staking::EraIndex = 24 * 7; // 1/4 the bonding duration. + pub const BondingDuration: u32 = 24 * 28; + pub const SlashDeferDuration: u32 = 24 * 7; // 1/4 the bonding duration. pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; pub const MaxNominatorRewardedPerValidator: u32 = 256; pub OffchainRepeat: BlockNumber = 5;