From af0a725fb9191ad4b6fa2d8b68cffbb57e0c90e4 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Wed, 16 Dec 2020 12:36:19 -0700 Subject: [PATCH 01/13] Add clippy/rustfmt checks to CI Add clippy check to CI Apply uses correctly Specify runs-on Use checkout specified from check-prettier Try specifying toolchain with clippy as components Apply to correct action Specify nightly without date Use 'rustup component add clippy' instead of toolchain Uses on steps Typo Specify rustfmt and clippy in rust-toolchain file Try only rustfmt Undo Revert rust-toolchain file Add --workspace arg to clippy --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0958f82e2d..26cb6ea268 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -98,6 +98,33 @@ jobs: - name: Check with Prettier run: npx prettier --check --ignore-path .gitignore '**/*.(yml|js|ts|json)' + check-clippy: + name: "Check with Clippy" + runs-on: ubuntu-latest + steps: + - name: Checkout + if: github.event_name == 'pull_request_target' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: refs/pull/${{ github.event.pull_request.number }}/merge + + - name: Checkout + if: github.event_name != 'pull_request_target' + uses: actions/checkout@v2 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2020-10-03 + components: clippy, rustfmt + target: wasm32-unknown-unknown + default: true + + - name: Check with Clippy + run: cargo clippy --workspace --tests -- -D warnings + ####### Building and Testing binaries ####### build: From f5d40aa2538d1e75a91ad7799324560a1f0cb87e Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Wed, 16 Dec 2020 14:14:16 -0700 Subject: [PATCH 02/13] rustup clippy in init.sh --- .github/workflows/release.yml | 9 --------- scripts/init.sh | 3 +++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26cb6ea268..e54a20221d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,15 +113,6 @@ jobs: if: github.event_name != 'pull_request_target' uses: actions/checkout@v2 - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2020-10-03 - components: clippy, rustfmt - target: wasm32-unknown-unknown - default: true - - name: Check with Clippy run: cargo clippy --workspace --tests -- -D warnings diff --git a/scripts/init.sh b/scripts/init.sh index 1bfe5a449c..6b4a3df292 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -5,6 +5,8 @@ source $HOME/.cargo/env echo "*** Initializing WASM build environment" +# TODO: 'rust-toolchain' is allowed to be a TOML file: +# https://github.com/rust-lang/rustup/blob/master/doc/src/overrides.md#the-toolchain-file RUST_NIGHTLY_VERSION=$(cat rust-toolchain) if [ -z ${WASM_BUILD_TOOLCHAIN+x} ]; then @@ -14,6 +16,7 @@ fi if [ -z $CI_PROJECT_NAME ] ; then rustup update $WASM_BUILD_TOOLCHAIN rustup update stable + rustup component add clippy fi rustup target add wasm32-unknown-unknown --toolchain $WASM_BUILD_TOOLCHAIN From cf3bd64b9be8968eb64d9420182961b5f596c74c Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Wed, 16 Dec 2020 14:20:38 -0700 Subject: [PATCH 03/13] Introduce 'install toolchain' step for Clippy --- .github/workflows/release.yml | 9 + Cargo.lock | 368 +++++++++++++++++----------------- scripts/init.sh | 3 +- 3 files changed, 195 insertions(+), 185 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e54a20221d..26cb6ea268 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,6 +113,15 @@ jobs: if: github.event_name != 'pull_request_target' uses: actions/checkout@v2 + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2020-10-03 + components: clippy, rustfmt + target: wasm32-unknown-unknown + default: true + - name: Check with Clippy run: cargo clippy --workspace --tests -- -D warnings diff --git a/Cargo.lock b/Cargo.lock index a68c3b47f8..0843d55087 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1034,7 +1034,7 @@ dependencies = [ [[package]] name = "cumulus-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#f327cd96dcd6a245aff150f48966ac0aff0ad509" +source = "git+https://github.com/paritytech/cumulus#f327cd96dcd6a245aff150f48966ac0aff0ad509" dependencies = [ "cumulus-consensus", "cumulus-network", @@ -1067,7 +1067,7 @@ dependencies = [ [[package]] name = "cumulus-consensus" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#f327cd96dcd6a245aff150f48966ac0aff0ad509" +source = "git+https://github.com/paritytech/cumulus#f327cd96dcd6a245aff150f48966ac0aff0ad509" dependencies = [ "futures 0.3.8", "log", @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "cumulus-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#f327cd96dcd6a245aff150f48966ac0aff0ad509" +source = "git+https://github.com/paritytech/cumulus#f327cd96dcd6a245aff150f48966ac0aff0ad509" dependencies = [ "cumulus-primitives", "derive_more 0.99.11", @@ -1116,7 +1116,7 @@ dependencies = [ [[package]] name = "cumulus-parachain-upgrade" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#f327cd96dcd6a245aff150f48966ac0aff0ad509" +source = "git+https://github.com/paritytech/cumulus#f327cd96dcd6a245aff150f48966ac0aff0ad509" dependencies = [ "cumulus-primitives", "cumulus-runtime", @@ -1137,7 +1137,7 @@ dependencies = [ [[package]] name = "cumulus-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#f327cd96dcd6a245aff150f48966ac0aff0ad509" +source = "git+https://github.com/paritytech/cumulus#f327cd96dcd6a245aff150f48966ac0aff0ad509" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -1153,7 +1153,7 @@ dependencies = [ [[package]] name = "cumulus-runtime" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#f327cd96dcd6a245aff150f48966ac0aff0ad509" +source = "git+https://github.com/paritytech/cumulus#f327cd96dcd6a245aff150f48966ac0aff0ad509" dependencies = [ "cumulus-primitives", "frame-executive", @@ -1174,7 +1174,7 @@ dependencies = [ [[package]] name = "cumulus-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#f327cd96dcd6a245aff150f48966ac0aff0ad509" +source = "git+https://github.com/paritytech/cumulus#f327cd96dcd6a245aff150f48966ac0aff0ad509" dependencies = [ "cumulus-collator", "cumulus-consensus", @@ -1780,7 +1780,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", ] @@ -1826,7 +1826,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -1844,7 +1844,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "chrono", "frame-benchmarking", @@ -1866,7 +1866,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -1882,7 +1882,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "12.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "serde", @@ -1893,7 +1893,7 @@ dependencies = [ [[package]] name = "frame-support" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "bitflags", "frame-metadata", @@ -1918,7 +1918,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support-procedural-tools", "proc-macro2 1.0.24", @@ -1929,7 +1929,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1941,7 +1941,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "proc-macro2 1.0.24", "quote 1.0.7", @@ -1951,7 +1951,7 @@ dependencies = [ [[package]] name = "frame-system" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1967,7 +1967,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sp-api", @@ -2968,7 +2968,7 @@ dependencies = [ [[package]] name = "kusama-runtime" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "frame-executive", @@ -4311,7 +4311,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4330,7 +4330,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4346,7 +4346,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4361,7 +4361,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4386,7 +4386,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4400,7 +4400,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4415,7 +4415,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4430,7 +4430,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4507,7 +4507,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4528,7 +4528,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4544,7 +4544,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4563,7 +4563,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4579,7 +4579,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4593,7 +4593,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4608,7 +4608,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4622,7 +4622,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4637,7 +4637,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4652,7 +4652,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4665,7 +4665,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "enumflags2", "frame-support", @@ -4680,7 +4680,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4695,7 +4695,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4715,7 +4715,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4729,7 +4729,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4749,7 +4749,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.24", @@ -4760,7 +4760,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4774,7 +4774,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4791,7 +4791,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4808,7 +4808,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "jsonrpc-core 15.1.0", "jsonrpc-core-client 15.1.0", @@ -4826,7 +4826,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "parity-scale-codec", @@ -4839,7 +4839,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4853,7 +4853,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-support", "frame-system", @@ -4868,7 +4868,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "enumflags2", "frame-support", @@ -5325,7 +5325,7 @@ checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e" [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "parity-scale-codec", @@ -5340,7 +5340,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "parity-scale-codec", @@ -5359,7 +5359,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "frame-benchmarking-cli", "log", @@ -5379,7 +5379,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "polkadot-node-network-protocol", @@ -5394,7 +5394,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.7.30" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "parity-scale-codec", "sp-core", @@ -5405,7 +5405,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -5418,7 +5418,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "async-trait", "futures 0.3.8", @@ -5435,7 +5435,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "polkadot-erasure-coding", @@ -5452,7 +5452,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "futures-timer 3.0.2", @@ -5473,7 +5473,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "futures 0.3.8", @@ -5492,7 +5492,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "polkadot-node-subsystem", @@ -5508,7 +5508,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-selection" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "polkadot-node-subsystem", @@ -5523,7 +5523,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "parity-scale-codec", @@ -5540,7 +5540,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "polkadot-node-subsystem", @@ -5554,7 +5554,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-proposer" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "futures-timer 3.0.2", @@ -5578,7 +5578,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "futures 0.3.8", @@ -5594,7 +5594,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "polkadot-node-subsystem", @@ -5609,7 +5609,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -5620,7 +5620,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "parity-scale-codec", @@ -5633,7 +5633,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -5657,7 +5657,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "async-trait", "futures 0.3.8", @@ -5681,7 +5681,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "async-trait", "futures 0.3.8", @@ -5699,7 +5699,7 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "derive_more 0.99.11", "futures 0.3.8", @@ -5722,7 +5722,7 @@ dependencies = [ [[package]] name = "polkadot-pov-distribution" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "polkadot-node-network-protocol", @@ -5737,7 +5737,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "frame-system", @@ -5762,7 +5762,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "jsonrpc-core 15.1.0", "pallet-transaction-payment-rpc", @@ -5792,7 +5792,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "frame-executive", @@ -5855,7 +5855,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "frame-support", @@ -5890,7 +5890,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "derive_more 0.99.11", @@ -5926,7 +5926,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.8.3" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "frame-benchmarking", "frame-system-rpc-runtime-api", @@ -6003,7 +6003,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "arrayvec 0.5.2", "futures 0.3.8", @@ -6021,7 +6021,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -6031,7 +6031,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "frame-executive", @@ -6085,7 +6085,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "frame-benchmarking", "frame-system", @@ -6137,7 +6137,7 @@ dependencies = [ [[package]] name = "polkadot-validation" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "futures 0.3.8", "log", @@ -6847,7 +6847,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "frame-executive", "frame-support", @@ -7020,7 +7020,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -7048,7 +7048,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "futures-timer 3.0.2", @@ -7071,7 +7071,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7088,7 +7088,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7109,7 +7109,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.24", @@ -7120,7 +7120,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "atty", "chrono", @@ -7163,7 +7163,7 @@ dependencies = [ [[package]] name = "sc-cli-proc-macro" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.24", @@ -7174,7 +7174,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "fnv", @@ -7208,7 +7208,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "blake2-rfc", "hash-db", @@ -7238,7 +7238,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "sc-client-api", "sp-blockchain", @@ -7249,7 +7249,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "fork-tree", @@ -7294,7 +7294,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "futures 0.3.8", @@ -7318,7 +7318,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7331,7 +7331,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "assert_matches", "derive_more 0.99.11", @@ -7364,7 +7364,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "futures-timer 3.0.2", @@ -7390,7 +7390,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "log", "sc-client-api", @@ -7404,7 +7404,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "lazy_static", @@ -7433,7 +7433,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "parity-scale-codec", @@ -7449,7 +7449,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "log", "parity-scale-codec", @@ -7464,7 +7464,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "log", "parity-scale-codec", @@ -7482,7 +7482,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "finality-grandpa", @@ -7519,7 +7519,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "finality-grandpa", @@ -7543,7 +7543,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "ansi_term 0.12.1", "futures 0.3.8", @@ -7561,7 +7561,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -7581,7 +7581,7 @@ dependencies = [ [[package]] name = "sc-light" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "hash-db", "lazy_static", @@ -7600,7 +7600,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "async-std", "async-trait", @@ -7654,7 +7654,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "futures-timer 3.0.2", @@ -7669,7 +7669,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "bytes 0.5.6", "fnv", @@ -7696,7 +7696,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "libp2p", @@ -7709,7 +7709,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7718,7 +7718,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "hash-db", @@ -7752,7 +7752,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "futures 0.3.8", @@ -7776,7 +7776,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.1.30", "jsonrpc-core 15.1.0", @@ -7794,7 +7794,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "directories 3.0.1", "exit-future 0.2.0", @@ -7858,7 +7858,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "log", "parity-scale-codec", @@ -7873,7 +7873,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "jsonrpc-core 15.1.0", "jsonrpc-core-client 15.1.0", @@ -7893,7 +7893,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "futures-timer 3.0.2", @@ -7914,7 +7914,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "ansi_term 0.12.1", "erased-serde", @@ -7938,7 +7938,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "futures 0.3.8", @@ -7960,7 +7960,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "futures-diagnose", @@ -8428,7 +8428,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "log", "sp-core", @@ -8440,7 +8440,7 @@ dependencies = [ [[package]] name = "sp-api" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "hash-db", "parity-scale-codec", @@ -8456,7 +8456,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -8468,7 +8468,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "serde", @@ -8480,7 +8480,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "integer-sqrt", "num-traits 0.2.14", @@ -8493,7 +8493,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sp-api", @@ -8505,7 +8505,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -8516,7 +8516,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sp-api", @@ -8528,7 +8528,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "log", @@ -8546,7 +8546,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "serde", "serde_json", @@ -8555,7 +8555,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "futures-timer 3.0.2", @@ -8581,7 +8581,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sp-api", @@ -8595,7 +8595,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "merlin", "parity-scale-codec", @@ -8615,7 +8615,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -8624,7 +8624,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -8636,7 +8636,7 @@ dependencies = [ [[package]] name = "sp-core" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "base58", "blake2-rfc", @@ -8680,7 +8680,7 @@ dependencies = [ [[package]] name = "sp-database" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "kvdb", "parking_lot 0.10.2", @@ -8689,7 +8689,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "proc-macro2 1.0.24", "quote 1.0.7", @@ -8699,7 +8699,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "environmental", "parity-scale-codec", @@ -8710,7 +8710,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "finality-grandpa", "log", @@ -8727,7 +8727,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "parking_lot 0.10.2", @@ -8739,7 +8739,7 @@ dependencies = [ [[package]] name = "sp-io" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "hash-db", @@ -8763,7 +8763,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "lazy_static", "sp-core", @@ -8774,7 +8774,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "async-trait", "derive_more 0.99.11", @@ -8790,7 +8790,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "serde", @@ -8802,7 +8802,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.24", @@ -8813,7 +8813,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "sp-api", "sp-core", @@ -8823,7 +8823,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "backtrace", ] @@ -8831,7 +8831,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "serde", "sp-core", @@ -8840,7 +8840,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "either", "hash256-std-hasher", @@ -8861,7 +8861,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "primitive-types", @@ -8877,7 +8877,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "Inflector", "proc-macro-crate", @@ -8889,7 +8889,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "serde", "serde_json", @@ -8898,7 +8898,7 @@ dependencies = [ [[package]] name = "sp-session" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sp-api", @@ -8911,7 +8911,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -8921,7 +8921,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "hash-db", "log", @@ -8943,12 +8943,12 @@ dependencies = [ [[package]] name = "sp-std" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" [[package]] name = "sp-storage" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8961,7 +8961,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "log", "sp-core", @@ -8974,7 +8974,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8988,7 +8988,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "log", "parity-scale-codec", @@ -9001,7 +9001,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "derive_more 0.99.11", "futures 0.3.8", @@ -9017,7 +9017,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "hash-db", "memory-db", @@ -9031,7 +9031,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "futures-core", @@ -9043,7 +9043,7 @@ dependencies = [ [[package]] name = "sp-version" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9055,7 +9055,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9188,7 +9188,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "platforms", ] @@ -9196,7 +9196,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.8", @@ -9219,7 +9219,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "async-std", "derive_more 0.99.11", @@ -9233,7 +9233,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.1.30", "futures 0.3.8", @@ -9260,7 +9260,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "cfg-if 0.1.10", "frame-executive", @@ -9302,7 +9302,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "futures 0.3.8", "parity-scale-codec", @@ -9323,8 +9323,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79091baab813855ddf65b191de9fe53e656b6b67c1e9bd23fdcbff8788164684" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "ansi_term 0.12.1", "atty", @@ -9339,7 +9338,8 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#39278096356942a087213b0f21c976ac100cb8f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79091baab813855ddf65b191de9fe53e656b6b67c1e9bd23fdcbff8788164684" dependencies = [ "ansi_term 0.12.1", "atty", @@ -10538,7 +10538,7 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.8.26" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "bitvec", "frame-executive", @@ -10678,7 +10678,7 @@ dependencies = [ [[package]] name = "xcm" version = "0.8.22" -source = "git+https://github.com/paritytech/polkadot?branch=master#d72570266223d2ace38a777cad785b63b7fc485b" +source = "git+https://github.com/paritytech/polkadot#d72570266223d2ace38a777cad785b63b7fc485b" dependencies = [ "parity-scale-codec", ] diff --git a/scripts/init.sh b/scripts/init.sh index 6b4a3df292..791232afd9 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -16,7 +16,8 @@ fi if [ -z $CI_PROJECT_NAME ] ; then rustup update $WASM_BUILD_TOOLCHAIN rustup update stable - rustup component add clippy fi +rustup component add clippy + rustup target add wasm32-unknown-unknown --toolchain $WASM_BUILD_TOOLCHAIN From 045709b11658b342258874eacecdc8fca4d456da Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Wed, 16 Dec 2020 15:47:12 -0700 Subject: [PATCH 04/13] Add rustfmt check Add rustfmt check -- --- .github/workflows/release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26cb6ea268..1ff2cbb455 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,7 +99,7 @@ jobs: run: npx prettier --check --ignore-path .gitignore '**/*.(yml|js|ts|json)' check-clippy: - name: "Check with Clippy" + name: "Code checks" runs-on: ubuntu-latest steps: - name: Checkout @@ -122,8 +122,11 @@ jobs: target: wasm32-unknown-unknown default: true - - name: Check with Clippy - run: cargo clippy --workspace --tests -- -D warnings + # - name: Check with Clippy + # run: cargo clippy --workspace --tests -- -D warnings + + - name: Format code with rustfmt + run: cargo fmt -- --check ####### Building and Testing binaries ####### From 74ae1d82bc38a3f953c000f1c2caaaac05e41dc1 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Fri, 18 Dec 2020 12:58:13 -0700 Subject: [PATCH 05/13] Update .rustfmt.toml to remove license checking (for now) --- .rustfmt.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.rustfmt.toml b/.rustfmt.toml index 317959df8c..93cc405cbb 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -5,4 +5,6 @@ reorder_imports = true hard_tabs = true max_width = 100 -license_template_path = "FILE_TEMPLATE" +# TODO: add template for license checking. +# this will still fail for some licenses where e.g. Parity's license is used +# license_template_path = "FILE_TEMPLATE" From 6f4e984d3d9e42d393ac9f21cad1d74f99d35388 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Fri, 18 Dec 2020 12:59:22 -0700 Subject: [PATCH 06/13] Enforce rustfmt rules on codebase --- node/parachain/src/chain_spec.rs | 19 +- node/parachain/src/command.rs | 4 +- node/parachain/src/service.rs | 47 +-- node/rpc/src/lib.rs | 120 +++--- node/rpc/src/pubsub_hotfixes.rs | 418 ++++++++++----------- node/rpc/src/server_hotfixes.rs | 540 ++++++++++++++------------- pallets/ethereum-chain-id/src/lib.rs | 3 +- pallets/parachain-info/src/lib.rs | 2 +- runtime/account/src/signer.rs | 27 +- runtime/precompiles/src/lib.rs | 48 +-- runtime/src/lib.rs | 21 +- runtime/src/parachain.rs | 1 - runtime/src/standalone.rs | 6 +- 13 files changed, 603 insertions(+), 653 deletions(-) diff --git a/node/parachain/src/chain_spec.rs b/node/parachain/src/chain_spec.rs index 9bd24f8c4f..c52f099975 100644 --- a/node/parachain/src/chain_spec.rs +++ b/node/parachain/src/chain_spec.rs @@ -16,8 +16,8 @@ use cumulus_primitives::ParaId; use moonbeam_runtime::{ - AccountId, BalancesConfig, GenesisConfig, SudoConfig, SystemConfig, - ParachainInfoConfig, WASM_BINARY, EthereumChainIdConfig, EVMConfig, EthereumConfig + AccountId, BalancesConfig, EVMConfig, EthereumChainIdConfig, EthereumConfig, GenesisConfig, + ParachainInfoConfig, SudoConfig, SystemConfig, WASM_BINARY, }; use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use sc_service::ChainType; @@ -55,9 +55,7 @@ pub fn get_chain_spec(para_id: ParaId) -> Result { testnet_genesis( wasm_binary, AccountId::from_str("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b").unwrap(), - vec![ - AccountId::from_str("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b").unwrap(), - ], + vec![AccountId::from_str("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b").unwrap()], para_id, 1280, //ChainId ) @@ -65,12 +63,7 @@ pub fn get_chain_spec(para_id: ParaId) -> Result { vec![], None, None, - Some( - serde_json::from_str( - "{\"tokenDecimals\": 18}" - ) - .expect("Provided valid json map") - ), + Some(serde_json::from_str("{\"tokenDecimals\": 18}").expect("Provided valid json map")), Extensions { relay_chain: "local_testnet".into(), para_id: para_id.into(), @@ -98,7 +91,9 @@ fn testnet_genesis( .collect(), }), pallet_sudo: Some(SudoConfig { key: root_key }), - parachain_info: Some(ParachainInfoConfig { parachain_id: para_id }), + parachain_info: Some(ParachainInfoConfig { + parachain_id: para_id, + }), pallet_ethereum_chain_id: Some(EthereumChainIdConfig { chain_id: chain_id }), pallet_evm: Some(EVMConfig { accounts: BTreeMap::new(), diff --git a/node/parachain/src/command.rs b/node/parachain/src/command.rs index db057d77af..615932c4db 100644 --- a/node/parachain/src/command.rs +++ b/node/parachain/src/command.rs @@ -24,8 +24,8 @@ use log::info; use moonbeam_runtime::Block; use polkadot_parachain::primitives::AccountIdConversion; use sc_cli::{ - ChainSpec, CliConfiguration, ImportParams, KeystoreParams, NetworkParams, Result, - RuntimeVersion, SharedParams, SubstrateCli, DefaultConfigurationValues, + ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, + NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli, }; use sc_service::{ config::{BasePath, PrometheusConfig}, diff --git a/node/parachain/src/service.rs b/node/parachain/src/service.rs index fbbef92bc9..cda54ce192 100644 --- a/node/parachain/src/service.rs +++ b/node/parachain/src/service.rs @@ -18,6 +18,8 @@ use cumulus_network::build_block_announce_validator; use cumulus_service::{ prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams, }; +use frontier_consensus::FrontierBlockImport; +use moonbeam_runtime::{opaque::Block, RuntimeApi}; use polkadot_primitives::v0::CollatorPair; use sc_executor::native_executor_instance; pub use sc_executor::NativeExecutor; @@ -26,8 +28,6 @@ use sp_core::Pair; use sp_runtime::traits::BlakeTwo256; use sp_trie::PrefixedMemoryDB; use std::sync::Arc; -use frontier_consensus::FrontierBlockImport; -use moonbeam_runtime::{RuntimeApi, opaque::Block}; // Our native executor instance. native_executor_instance!( pub Executor, @@ -49,19 +49,9 @@ pub fn new_partial( FullClient, FullBackend, (), - sp_consensus::import_queue::BasicQueue< - Block, - PrefixedMemoryDB, - >, - sc_transaction_pool::FullPool< - Block, - FullClient, - >, - FrontierBlockImport< - Block, - Arc, - FullClient, - >, + sp_consensus::import_queue::BasicQueue>, + sc_transaction_pool::FullPool, + FrontierBlockImport, FullClient>, >, sc_service::Error, > { @@ -80,11 +70,7 @@ pub fn new_partial( client.clone(), ); - let frontier_block_import = FrontierBlockImport::new( - client.clone(), - client.clone(), - true - ); + let frontier_block_import = FrontierBlockImport::new(client.clone(), client.clone(), true); let import_queue = cumulus_consensus::import_queue::import_queue( client.clone(), @@ -119,7 +105,7 @@ async fn start_node_impl( id: polkadot_primitives::v0::Id, validator: bool, _rpc_ext_builder: RB, -) -> sc_service::error::Result<(TaskManager,Arc)> +) -> sc_service::error::Result<(TaskManager, Arc)> where RB: Fn( Arc>, @@ -158,13 +144,13 @@ where let block_import = params.other; let (network, network_status_sinks, system_rpc_tx, start_network) = sc_service::build_network(sc_service::BuildNetworkParams { - config: ¶chain_config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), - import_queue, - on_demand: None, - block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)), + config: ¶chain_config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue, + on_demand: None, + block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)), })?; let is_authority = parachain_config.role.is_authority(); @@ -186,10 +172,7 @@ where command_sink: None, }; - moonbeam_rpc::create_full( - deps, - subscription_task_executor.clone() - ) + moonbeam_rpc::create_full(deps, subscription_task_executor.clone()) }) }; diff --git a/node/rpc/src/lib.rs b/node/rpc/src/lib.rs index af1243f80e..cfa20182f6 100644 --- a/node/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -17,27 +17,27 @@ //! A collection of node-specific RPC methods. // Our drop-in replacements for Frontier's RPC servers. -mod server_hotfixes; mod pubsub_hotfixes; +mod server_hotfixes; -use std::{sync::Arc, fmt}; +use std::{fmt, sync::Arc}; -use sc_consensus_manual_seal::rpc::{EngineCommand, ManualSeal, ManualSealApi}; -use moonbeam_runtime::{Hash, AccountId, Index, opaque::Block, Balance}; -use sp_api::ProvideRuntimeApi; -use sp_transaction_pool::TransactionPool; -use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend}; -use sc_rpc_api::DenyUnsafe; +use frontier_rpc::HexEncodedIdProvider; +use jsonrpc_pubsub::manager::SubscriptionManager; +use moonbeam_runtime::{opaque::Block, AccountId, Balance, Hash, Index}; use sc_client_api::{ - backend::{StorageProvider, Backend, StateBackend, AuxStore}, - client::BlockchainEvents + backend::{AuxStore, Backend, StateBackend, StorageProvider}, + client::BlockchainEvents, }; +use sc_consensus_manual_seal::rpc::{EngineCommand, ManualSeal, ManualSealApi}; +use sc_network::NetworkService; use sc_rpc::SubscriptionTaskExecutor; -use sp_runtime::traits::BlakeTwo256; +use sc_rpc_api::DenyUnsafe; +use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; -use sc_network::NetworkService; -use jsonrpc_pubsub::manager::SubscriptionManager; -use frontier_rpc::HexEncodedIdProvider; +use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_runtime::traits::BlakeTwo256; +use sp_transaction_pool::TransactionPool; /// Light client extra dependencies. pub struct LightDeps { @@ -70,28 +70,29 @@ pub struct FullDeps { /// Instantiate all Full RPC extensions. pub fn create_full( deps: FullDeps, - subscription_task_executor: SubscriptionTaskExecutor -) -> jsonrpc_core::IoHandler where + subscription_task_executor: SubscriptionTaskExecutor, +) -> jsonrpc_core::IoHandler +where BE: Backend + 'static, BE::State: StateBackend, C: ProvideRuntimeApi + StorageProvider + AuxStore, C: BlockchainEvents, - C: HeaderBackend + HeaderMetadata + 'static, + C: HeaderBackend + HeaderMetadata + 'static, C: Send + Sync + 'static, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: BlockBuilder, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: frontier_rpc_primitives::EthereumRuntimeRPCApi, ::Error: fmt::Debug, - P: TransactionPool + 'static, + P: TransactionPool + 'static, { - use substrate_frame_rpc_system::{FullSystem, SystemApi}; + use frontier_rpc::{EthApiServer, EthPubSubApiServer, NetApi, NetApiServer}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi}; - use frontier_rpc::{EthApiServer, NetApi, NetApiServer, EthPubSubApiServer}; + use substrate_frame_rpc_system::{FullSystem, SystemApi}; // Our drop in replacements for the Eth APIs. These can be removed after // https://github.com/paritytech/frontier/pull/199 lands - use server_hotfixes::EthApi; use pubsub_hotfixes::EthPubSubApi; + use server_hotfixes::EthApi; let mut io = jsonrpc_core::IoHandler::default(); let FullDeps { @@ -103,43 +104,39 @@ pub fn create_full( command_sink, } = deps; - io.extend_with( - SystemApi::to_delegate(FullSystem::new(client.clone(), pool.clone(), deny_unsafe)) - ); - io.extend_with( - TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone())) - ); + io.extend_with(SystemApi::to_delegate(FullSystem::new( + client.clone(), + pool.clone(), + deny_unsafe, + ))); + io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new( + client.clone(), + ))); // We currently don't want to support signing in the node. Users should prefer external tools // for transaction signing. So just pass in an empty vector of signers. let signers = Vec::new(); - io.extend_with( - EthApiServer::to_delegate(EthApi::new( - client.clone(), - pool.clone(), - moonbeam_runtime::TransactionConverter, - network.clone(), - signers, - is_authority, - )) - ); - io.extend_with( - NetApiServer::to_delegate(NetApi::new( - client.clone(), - network.clone(), - )) - ); - io.extend_with( - EthPubSubApiServer::to_delegate(EthPubSubApi::new( - pool.clone(), - client.clone(), - network.clone(), - SubscriptionManager::::with_id_provider( - HexEncodedIdProvider::default(), - Arc::new(subscription_task_executor) - ), - )) - ); + io.extend_with(EthApiServer::to_delegate(EthApi::new( + client.clone(), + pool.clone(), + moonbeam_runtime::TransactionConverter, + network.clone(), + signers, + is_authority, + ))); + io.extend_with(NetApiServer::to_delegate(NetApi::new( + client.clone(), + network.clone(), + ))); + io.extend_with(EthPubSubApiServer::to_delegate(EthPubSubApi::new( + pool.clone(), + client.clone(), + network.clone(), + SubscriptionManager::::with_id_provider( + HexEncodedIdProvider::default(), + Arc::new(subscription_task_executor), + ), + ))); match command_sink { Some(command_sink) => { @@ -156,9 +153,8 @@ pub fn create_full( } /// Instantiate all Light RPC extensions. -pub fn create_light( - deps: LightDeps, -) -> jsonrpc_core::IoHandler where +pub fn create_light(deps: LightDeps) -> jsonrpc_core::IoHandler +where C: sp_blockchain::HeaderBackend, C: Send + Sync + 'static, F: sc_client_api::light::Fetcher + 'static, @@ -171,14 +167,12 @@ pub fn create_light( client, pool, remote_blockchain, - fetcher + fetcher, } = deps; let mut io = jsonrpc_core::IoHandler::default(); - io.extend_with( - SystemApi::::to_delegate( - LightSystem::new(client, remote_blockchain, fetcher, pool) - ) - ); + io.extend_with(SystemApi::::to_delegate( + LightSystem::new(client, remote_blockchain, fetcher, pool), + )); io } diff --git a/node/rpc/src/pubsub_hotfixes.rs b/node/rpc/src/pubsub_hotfixes.rs index f9325f907b..738e130465 100644 --- a/node/rpc/src/pubsub_hotfixes.rs +++ b/node/rpc/src/pubsub_hotfixes.rs @@ -16,45 +16,42 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use std::{marker::PhantomData, sync::Arc}; -use std::collections::BTreeMap; -use sp_runtime::traits::{ - Block as BlockT, BlakeTwo256, - UniqueSaturatedInto -}; -use sp_transaction_pool::TransactionPool; -use sp_api::{ProvideRuntimeApi, BlockId}; -use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend}; -use sp_storage::{StorageKey, StorageData}; -use sp_io::hashing::twox_128; +use log::warn; use sc_client_api::{ - backend::{StorageProvider, Backend, StateBackend, AuxStore}, - client::BlockchainEvents + backend::{AuxStore, Backend, StateBackend, StorageProvider}, + client::BlockchainEvents, }; use sc_rpc::Metadata; -use log::warn; +use sp_api::{BlockId, ProvideRuntimeApi}; +use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_io::hashing::twox_128; +use sp_runtime::traits::{BlakeTwo256, Block as BlockT, UniqueSaturatedInto}; +use sp_storage::{StorageData, StorageKey}; +use sp_transaction_pool::TransactionPool; +use std::collections::BTreeMap; +use std::{marker::PhantomData, sync::Arc}; -use jsonrpc_pubsub::{ - typed::Subscriber, SubscriptionId, - manager::SubscriptionManager, -}; -use frontier_rpc_core::EthPubSubApi::{self as EthPubSubApiT}; +use codec::Decode; +use ethereum_types::{H256, U256}; use frontier_rpc_core::types::{ - Rich, Header, Bytes, Log, FilteredParams, - pubsub::{Kind, Params, Result as PubSubResult, PubSubSyncStatus} + pubsub::{Kind, Params, PubSubSyncStatus, Result as PubSubResult}, + Bytes, FilteredParams, Header, Log, Rich, }; -use ethereum_types::{H256, U256}; -use codec::Decode; -use sha3::{Keccak256, Digest}; +use frontier_rpc_core::EthPubSubApi::{self as EthPubSubApiT}; +use jsonrpc_pubsub::{manager::SubscriptionManager, typed::Subscriber, SubscriptionId}; +use sha3::{Digest, Keccak256}; pub use frontier_rpc_core::EthPubSubApiServer; use futures::{StreamExt as _, TryStreamExt as _}; -use jsonrpc_core::{Result as JsonRpcResult, futures::{Future, Sink}}; use frontier_rpc_primitives::{EthereumRuntimeRPCApi, TransactionStatus}; +use jsonrpc_core::{ + futures::{Future, Sink}, + Result as JsonRpcResult, +}; -use sc_network::{NetworkService, ExHashT}; use frontier_rpc::HexEncodedIdProvider; +use sc_network::{ExHashT, NetworkService}; pub struct EthPubSubApi { _pool: Arc

, @@ -71,64 +68,62 @@ impl EthPubSubApi { network: Arc>, subscriptions: SubscriptionManager, ) -> Self { - Self { _pool, client, network, subscriptions, _marker: PhantomData } + Self { + _pool, + client, + network, + subscriptions, + _marker: PhantomData, + } } } struct SubscriptionResult {} impl SubscriptionResult { - pub fn new() -> Self { SubscriptionResult{} } + pub fn new() -> Self { + SubscriptionResult {} + } pub fn new_heads(&self, block: ethereum::Block) -> PubSubResult { - PubSubResult::Header(Box::new( - Rich { - inner: Header { - hash: Some(H256::from_slice(Keccak256::digest( - &rlp::encode(&block.header) - ).as_slice())), - parent_hash: block.header.parent_hash, - uncles_hash: block.header.ommers_hash, - author: block.header.beneficiary, - miner: block.header.beneficiary, - state_root: block.header.state_root, - transactions_root: block.header.transactions_root, - receipts_root: block.header.receipts_root, - number: Some(block.header.number), - gas_used: block.header.gas_used, - gas_limit: block.header.gas_limit, - extra_data: Bytes(block.header.extra_data.clone()), - logs_bloom: block.header.logs_bloom, - timestamp: U256::from(block.header.timestamp), - difficulty: block.header.difficulty, - seal_fields: vec![ - Bytes( - block.header.mix_hash.as_bytes().to_vec() - ), - Bytes( - block.header.nonce.as_bytes().to_vec() - ) - ], - size: Some(U256::from( - rlp::encode(&block).len() as u32 - )), - }, - extra_info: BTreeMap::new() - } - )) + PubSubResult::Header(Box::new(Rich { + inner: Header { + hash: Some(H256::from_slice( + Keccak256::digest(&rlp::encode(&block.header)).as_slice(), + )), + parent_hash: block.header.parent_hash, + uncles_hash: block.header.ommers_hash, + author: block.header.beneficiary, + miner: block.header.beneficiary, + state_root: block.header.state_root, + transactions_root: block.header.transactions_root, + receipts_root: block.header.receipts_root, + number: Some(block.header.number), + gas_used: block.header.gas_used, + gas_limit: block.header.gas_limit, + extra_data: Bytes(block.header.extra_data.clone()), + logs_bloom: block.header.logs_bloom, + timestamp: U256::from(block.header.timestamp), + difficulty: block.header.difficulty, + seal_fields: vec![ + Bytes(block.header.mix_hash.as_bytes().to_vec()), + Bytes(block.header.nonce.as_bytes().to_vec()), + ], + size: Some(U256::from(rlp::encode(&block).len() as u32)), + }, + extra_info: BTreeMap::new(), + })) } pub fn logs( &self, block_input: Option, receipts: Vec, - params: &FilteredParams + params: &FilteredParams, ) -> Vec { if block_input.is_none() { return Vec::new(); } let block = block_input.unwrap(); let block_hash = Some(H256::from_slice( - Keccak256::digest(&rlp::encode( - &block.header - )).as_slice() + Keccak256::digest(&rlp::encode(&block.header)).as_slice(), )); let mut logs: Vec = vec![]; let mut log_index: u32 = 0; @@ -136,18 +131,14 @@ impl SubscriptionResult { let mut transaction_log_index: u32 = 0; let transaction_hash: Option = if receipt.logs.len() > 0 { Some(H256::from_slice( - Keccak256::digest(&rlp::encode( - &block.transactions[receipt_index as usize] - )).as_slice() + Keccak256::digest(&rlp::encode(&block.transactions[receipt_index as usize])) + .as_slice(), )) - } else { None }; + } else { + None + }; for log in receipt.logs { - if self.add_log( - block_hash.unwrap(), - &log, - &block, - params - ) { + if self.add_log(block_hash.unwrap(), &log, &block, params) { logs.push(Log { address: log.address, topics: log.topics, @@ -157,9 +148,7 @@ impl SubscriptionResult { transaction_hash: transaction_hash, transaction_index: Some(U256::from(log_index)), log_index: Some(U256::from(log_index)), - transaction_log_index: Some(U256::from( - transaction_log_index - )), + transaction_log_index: Some(U256::from(transaction_log_index)), removed: false, }); } @@ -174,7 +163,7 @@ impl SubscriptionResult { block_hash: H256, ethereum_log: ðereum::Log, block: ðereum::Block, - params: &FilteredParams + params: &FilteredParams, ) -> bool { let log = Log { address: ethereum_log.address.clone(), @@ -189,12 +178,13 @@ impl SubscriptionResult { removed: false, }; if let Some(_) = params.filter { - let block_number = UniqueSaturatedInto::::unique_saturated_into( - block.header.number - ); - if !params.filter_block_range(block_number) || - !params.filter_block_hash(block_hash) || - !params.filter_address(&log) || !params.filter_topics(&log) { + let block_number = + UniqueSaturatedInto::::unique_saturated_into(block.header.number); + if !params.filter_block_range(block_number) + || !params.filter_block_hash(block_hash) + || !params.filter_address(&log) + || !params.filter_topics(&log) + { return false; } } @@ -208,30 +198,27 @@ fn storage_prefix_build(module: &[u8], storage: &[u8]) -> Vec { macro_rules! stream_build { ($context:expr => $module:expr, $storage:expr) => {{ - let key: StorageKey = StorageKey( - storage_prefix_build($module, $storage) - ); - match $context.client.storage_changes_notification_stream( - Some(&[key]), - None - ) { + let key: StorageKey = StorageKey(storage_prefix_build($module, $storage)); + match $context + .client + .storage_changes_notification_stream(Some(&[key]), None) + { Ok(stream) => Some(stream), Err(_err) => None, - } - }}; + } + }}; } impl EthPubSubApiT for EthPubSubApi - where - B: BlockT + Send + Sync + 'static, - P: TransactionPool + Send + Sync + 'static, - C: ProvideRuntimeApi + StorageProvider + - BlockchainEvents + AuxStore, - C: HeaderBackend + HeaderMetadata + 'static, - C: Send + Sync + 'static, - C::Api: EthereumRuntimeRPCApi, - BE: Backend + 'static, - BE::State: StateBackend, +where + B: BlockT + Send + Sync + 'static, + P: TransactionPool + Send + Sync + 'static, + C: ProvideRuntimeApi + StorageProvider + BlockchainEvents + AuxStore, + C: HeaderBackend + HeaderMetadata + 'static, + C: Send + Sync + 'static, + C::Api: EthereumRuntimeRPCApi, + BE: Backend + 'static, + BE::State: StateBackend, { type Metadata = Metadata; fn subscribe( @@ -243,7 +230,7 @@ impl EthPubSubApiT for EthPubSubApi FilteredParams::new(Some(filter)), - _ => FilteredParams::default() + _ => FilteredParams::default(), }; let client = self.client.clone(); @@ -255,122 +242,115 @@ impl EthPubSubApiT for EthPubSubApi = - Decode::decode(&mut &data.0[..]).unwrap(); - let block: Option = if let Ok(Some(data)) = client.storage( - &id, - &StorageKey( - storage_prefix_build(b"Ethereum", b"CurrentBlock") - ) - ) { - if let Ok(result) = Decode::decode(&mut &data.0[..]) { - Some(result) - } else { None } - } else { None }; - futures::stream::iter( - SubscriptionResult::new() - .logs(block, receipts, &filtered_params) - ) - }) - .map(|x| { - return Ok::, ()>(Ok( - PubSubResult::Log(Box::new(x)) - )); - }) - .compat(); + .flat_map(move |(block_hash, changes)| { + let id = BlockId::Hash(block_hash); + let data = changes.iter().last().unwrap().2.unwrap(); + let receipts: Vec = + Decode::decode(&mut &data.0[..]).unwrap(); + let block: Option = if let Ok(Some(data)) = client + .storage( + &id, + &StorageKey(storage_prefix_build( + b"Ethereum", + b"CurrentBlock", + )), + ) { + if let Ok(result) = Decode::decode(&mut &data.0[..]) { + Some(result) + } else { + None + } + } else { + None + }; + futures::stream::iter(SubscriptionResult::new().logs( + block, + receipts, + &filtered_params, + )) + }) + .map(|x| { + return Ok::< + Result, + (), + >(Ok(PubSubResult::Log(Box::new(x)))); + }) + .compat(); - sink - .sink_map_err(|e| warn!( - "Error sending notifications: {:?}", e - )) + sink.sink_map_err(|e| warn!("Error sending notifications: {:?}", e)) .send_all(stream) .map(|_| ()) }); } - }, + } Kind::NewHeads => { if let Some(stream) = stream_build!( self => b"Ethereum", b"CurrentBlock" ) { self.subscriptions.add(subscriber, |sink| { let stream = stream - .map(|(_block, changes)| { - let data = changes.iter().last().unwrap().2.unwrap(); - let block: ethereum::Block = - Decode::decode(&mut &data.0[..]).unwrap(); - return Ok::<_, ()>(Ok( - SubscriptionResult::new() - .new_heads(block) - )); - }) - .compat(); + .map(|(_block, changes)| { + let data = changes.iter().last().unwrap().2.unwrap(); + let block: ethereum::Block = + Decode::decode(&mut &data.0[..]).unwrap(); + return Ok::<_, ()>(Ok(SubscriptionResult::new().new_heads(block))); + }) + .compat(); - sink - .sink_map_err(|e| warn!( - "Error sending notifications: {:?}", e - )) + sink.sink_map_err(|e| warn!("Error sending notifications: {:?}", e)) .send_all(stream) .map(|_| ()) }); } - }, + } Kind::NewPendingTransactions => { if let Some(stream) = stream_build!( self => b"Ethereum", b"Pending" ) { self.subscriptions.add(subscriber, |sink| { let stream = stream - .flat_map(|(_block, changes)| { - let mut transactions: Vec = vec![]; - let storage: Vec> = changes.iter() - .filter_map(|(o_sk, _k, v)| { - if o_sk.is_none() { - Some(v.cloned()) - } else { None } - }).collect(); - for change in storage { - if let Some(data) = change { - let storage: Vec<( - ethereum::Transaction, - TransactionStatus, - ethereum::Receipt - )> = Decode::decode(&mut &data.0[..]).unwrap(); - let tmp: Vec = - storage.iter().map(|x| x.0.clone()).collect(); - transactions.extend(tmp); + .flat_map(|(_block, changes)| { + let mut transactions: Vec = vec![]; + let storage: Vec> = changes + .iter() + .filter_map(|(o_sk, _k, v)| { + if o_sk.is_none() { + Some(v.cloned()) + } else { + None + } + }) + .collect(); + for change in storage { + if let Some(data) = change { + let storage: Vec<( + ethereum::Transaction, + TransactionStatus, + ethereum::Receipt, + )> = Decode::decode(&mut &data.0[..]).unwrap(); + let tmp: Vec = + storage.iter().map(|x| x.0.clone()).collect(); + transactions.extend(tmp); + } } - } - futures::stream::iter(transactions) - }) - .map(|transaction| { - return Ok::, ()>(Ok( - PubSubResult::TransactionHash(H256::from_slice( - Keccak256::digest( - &rlp::encode(&transaction) - ).as_slice() - )) - )); - }) - .compat(); + futures::stream::iter(transactions) + }) + .map(|transaction| { + return Ok::< + Result, + (), + >(Ok(PubSubResult::TransactionHash(H256::from_slice( + Keccak256::digest(&rlp::encode(&transaction)).as_slice(), + )))); + }) + .compat(); - sink - .sink_map_err(|e| warn!( - "Error sending notifications: {:?}", e - )) + sink.sink_map_err(|e| warn!("Error sending notifications: {:?}", e)) .send_all(stream) .map(|_| ()) }); } - }, + } Kind::Syncing => { if let Some(stream) = stream_build!( self => b"Ethereum", b"CurrentBlock" @@ -378,43 +358,37 @@ impl EthPubSubApiT for EthPubSubApi, ()>(Ok( - PubSubResult::SyncState(PubSubSyncStatus { - syncing: syncing - }) - )); - }) - .compat(); - sink - .sink_map_err(|e| warn!( - "Error sending notifications: {:?}", e - )) + .filter_map(move |(_, _)| { + let syncing = network.is_major_syncing(); + if previous_syncing != syncing { + previous_syncing = syncing; + futures::future::ready(Some(syncing)) + } else { + futures::future::ready(None) + } + }) + .map(|syncing| { + return Ok::< + Result, + (), + >(Ok(PubSubResult::SyncState(PubSubSyncStatus { + syncing: syncing, + }))); + }) + .compat(); + sink.sink_map_err(|e| warn!("Error sending notifications: {:?}", e)) .send_all(stream) .map(|_| ()) - }); } - }, + } } } fn unsubscribe( &self, _metadata: Option, - subscription_id: SubscriptionId + subscription_id: SubscriptionId, ) -> JsonRpcResult { Ok(self.subscriptions.cancel(subscription_id)) } diff --git a/node/rpc/src/server_hotfixes.rs b/node/rpc/src/server_hotfixes.rs index cbba45132b..147920964f 100644 --- a/node/rpc/src/server_hotfixes.rs +++ b/node/rpc/src/server_hotfixes.rs @@ -20,39 +20,44 @@ //! replacements will be removed and we will head in the direction of //! https://github.com/paritytech/frontier/pull/199 -use std::{marker::PhantomData, sync::Arc}; -use std::collections::BTreeMap; +use codec::Decode; use ethereum::{ Block as EthereumBlock, Transaction as EthereumTransaction, TransactionMessage as EthereumTransactionMessage, }; -use ethereum_types::{H160, H256, H64, U256, U64, H512}; -use jsonrpc_core::{BoxFuture, Result, futures::future::{self, Future}}; +use ethereum_types::{H160, H256, H512, H64, U256, U64}; +use frontier_rpc::{error_on_execution_failure, internal_err, EthSigner}; +use frontier_rpc_core::types::{ + Block, BlockNumber, BlockTransactions, Bytes, CallRequest, Filter, FilteredParams, Index, Log, + Receipt, Rich, RichBlock, SyncInfo, SyncStatus, Transaction, TransactionRequest, VariadicValue, + Work, +}; +use frontier_rpc_core::EthApi as EthApiT; +use frontier_rpc_primitives::{ConvertTransaction, EthereumRuntimeRPCApi, TransactionStatus}; use futures::future::TryFutureExt; +use jsonrpc_core::{ + futures::future::{self, Future}, + BoxFuture, Result, +}; +use sc_client_api::backend::{AuxStore, Backend, StateBackend, StorageProvider}; +use sc_network::{ExHashT, NetworkService}; +use sha3::{Digest, Keccak256}; +use sp_api::{BlockId, ProvideRuntimeApi}; +use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_io::hashing::{blake2_128, twox_128}; use sp_runtime::{ - traits::{Block as BlockT, Header as _, UniqueSaturatedInto, Zero, One, Saturating, BlakeTwo256}, - transaction_validity::TransactionSource + traits::{ + BlakeTwo256, Block as BlockT, Header as _, One, Saturating, UniqueSaturatedInto, Zero, + }, + transaction_validity::TransactionSource, }; -use sp_api::{ProvideRuntimeApi, BlockId}; -use sp_transaction_pool::{TransactionPool, InPoolTransaction}; -use sc_client_api::backend::{StorageProvider, Backend, StateBackend, AuxStore}; -use sha3::{Keccak256, Digest}; -use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend}; use sp_storage::StorageKey; -use codec::Decode; -use sp_io::hashing::{twox_128, blake2_128}; -use sc_network::{NetworkService, ExHashT}; -use frontier_rpc_core::EthApi as EthApiT; -use frontier_rpc_core::types::{ - BlockNumber, Bytes, CallRequest, Filter, FilteredParams, Index, Log, Receipt, RichBlock, - SyncStatus, SyncInfo, Transaction, Work, Rich, Block, BlockTransactions, VariadicValue, - TransactionRequest, -}; -use frontier_rpc_primitives::{EthereumRuntimeRPCApi, ConvertTransaction, TransactionStatus}; -use frontier_rpc::{internal_err, error_on_execution_failure, EthSigner}; +use sp_transaction_pool::{InPoolTransaction, TransactionPool}; +use std::collections::BTreeMap; +use std::{marker::PhantomData, sync::Arc}; -pub use frontier_rpc_core::{EthApiServer, NetApiServer}; use codec::{self, Encode}; +pub use frontier_rpc_core::{EthApiServer, NetApiServer}; pub struct EthApi { pool: Arc

, @@ -89,14 +94,12 @@ fn rich_block_build( block: ethereum::Block, statuses: Vec>, hash: Option, - full_transactions: bool + full_transactions: bool, ) -> RichBlock { Rich { inner: Block { hash: Some(hash.unwrap_or_else(|| { - H256::from_slice( - Keccak256::digest(&rlp::encode(&block.header)).as_slice() - ) + H256::from_slice(Keccak256::digest(&rlp::encode(&block.header)).as_slice()) })), parent_hash: block.header.parent_hash, uncles_hash: block.header.ommers_hash, @@ -115,40 +118,50 @@ fn rich_block_build( total_difficulty: None, seal_fields: vec![ Bytes(block.header.mix_hash.as_bytes().to_vec()), - Bytes(block.header.nonce.as_bytes().to_vec()) + Bytes(block.header.nonce.as_bytes().to_vec()), ], uncles: vec![], transactions: { if full_transactions { BlockTransactions::Full( - block.transactions.iter().enumerate().map(|(index, transaction)|{ - transaction_build( - transaction.clone(), - block.clone(), - statuses[index].clone().unwrap_or_default() - ) - }).collect() + block + .transactions + .iter() + .enumerate() + .map(|(index, transaction)| { + transaction_build( + transaction.clone(), + block.clone(), + statuses[index].clone().unwrap_or_default(), + ) + }) + .collect(), ) } else { BlockTransactions::Hashes( - block.transactions.iter().map(|transaction|{ - H256::from_slice( - Keccak256::digest(&rlp::encode(&transaction.clone())).as_slice() - ) - }).collect() + block + .transactions + .iter() + .map(|transaction| { + H256::from_slice( + Keccak256::digest(&rlp::encode(&transaction.clone())) + .as_slice(), + ) + }) + .collect(), ) } }, - size: Some(U256::from(rlp::encode(&block).len() as u32)) + size: Some(U256::from(rlp::encode(&block).len() as u32)), }, - extra_info: BTreeMap::new() + extra_info: BTreeMap::new(), } } fn transaction_build( transaction: EthereumTransaction, block: EthereumBlock, - status: TransactionStatus + status: TransactionStatus, ) -> Transaction { let mut sig = [0u8; 65]; let mut msg = [0u8; 32]; @@ -163,18 +176,14 @@ fn transaction_build( }; Transaction { - hash: H256::from_slice( - Keccak256::digest(&rlp::encode(&transaction)).as_slice() - ), + hash: H256::from_slice(Keccak256::digest(&rlp::encode(&transaction)).as_slice()), nonce: transaction.nonce, block_hash: Some(H256::from_slice( - Keccak256::digest(&rlp::encode(&block.header)).as_slice() + Keccak256::digest(&rlp::encode(&block.header)).as_slice(), )), block_number: Some(block.header.number), transaction_index: Some(U256::from( - UniqueSaturatedInto::::unique_saturated_into( - status.transaction_index - ) + UniqueSaturatedInto::::unique_saturated_into(status.transaction_index), )), from: status.from, to: status.to, @@ -203,115 +212,103 @@ fn blake2_128_extend(bytes: &[u8]) -> Vec { ext } -impl EthApi where +impl EthApi +where C: ProvideRuntimeApi + StorageProvider + AuxStore, - C: HeaderBackend + HeaderMetadata + 'static, + C: HeaderBackend + HeaderMetadata + 'static, C::Api: EthereumRuntimeRPCApi, BE: Backend + 'static, BE::State: StateBackend, - B: BlockT + Send + Sync + 'static, + B: BlockT + Send + Sync + 'static, C: Send + Sync + 'static, - P: TransactionPool + Send + Sync + 'static, + P: TransactionPool + Send + Sync + 'static, CT: ConvertTransaction<::Extrinsic> + Send + Sync + 'static, { fn native_block_id(&self, number: Option) -> Result>> { Ok(match number.unwrap_or(BlockNumber::Latest) { - BlockNumber::Hash { hash, .. } => { - self.load_hash(hash).unwrap_or(None) - }, - BlockNumber::Num(number) => { - Some(BlockId::Number(number.unique_saturated_into())) - }, - BlockNumber::Latest => { - Some(BlockId::Hash( - self.client.info().best_hash - )) - }, - BlockNumber::Earliest => { - Some(BlockId::Number(Zero::zero())) - }, - BlockNumber::Pending => { - None - } + BlockNumber::Hash { hash, .. } => self.load_hash(hash).unwrap_or(None), + BlockNumber::Num(number) => Some(BlockId::Number(number.unique_saturated_into())), + BlockNumber::Latest => Some(BlockId::Hash(self.client.info().best_hash)), + BlockNumber::Earliest => Some(BlockId::Number(Zero::zero())), + BlockNumber::Pending => None, }) } // Asumes there is only one mapped canonical block in the AuxStore, otherwise something is wrong fn load_hash(&self, hash: H256) -> Result>> { let hashes = match frontier_consensus::load_block_hash::(self.client.as_ref(), hash) - .map_err(|err| internal_err(format!("fetch aux store failed: {:?}", err)))? - { + .map_err(|err| { + internal_err(format!("fetch aux store failed: {:?}", err)) + })? { Some(hashes) => hashes, None => return Ok(None), }; - let out: Vec = hashes.into_iter() + let out: Vec = hashes + .into_iter() .filter_map(|h| { if let Ok(Some(_)) = self.client.header(BlockId::Hash(h)) { Some(h) } else { None } - }).collect(); + }) + .collect(); if out.len() == 1 { - return Ok(Some( - BlockId::Hash(out[0]) - )); + return Ok(Some(BlockId::Hash(out[0]))); } Ok(None) } - fn headers(&self, id: &BlockId) -> Result<(u64,u64)> { - match self.client.header(id.clone()) + fn headers(&self, id: &BlockId) -> Result<(u64, u64)> { + match self + .client + .header(id.clone()) .map_err(|_| internal_err(format!("failed to retrieve header at: {:#?}", id)))? { Some(h) => { let best_number: u64 = UniqueSaturatedInto::::unique_saturated_into( - self.client.info().best_number - ); - let header_number: u64 = UniqueSaturatedInto::::unique_saturated_into( - *h.number() + self.client.info().best_number, ); + let header_number: u64 = + UniqueSaturatedInto::::unique_saturated_into(*h.number()); Ok((best_number, header_number)) } - _ => Err(internal_err(format!("failed to retrieve header at: {:#?}", id))) + _ => Err(internal_err(format!( + "failed to retrieve header at: {:#?}", + id + ))), } } fn current_block(&self, id: &BlockId) -> Option { self.query_storage::( id, - &StorageKey( - storage_prefix_build(b"Ethereum", b"CurrentBlock") - ) + &StorageKey(storage_prefix_build(b"Ethereum", b"CurrentBlock")), ) } fn current_statuses(&self, id: &BlockId) -> Option> { self.query_storage::>( id, - &StorageKey( - storage_prefix_build(b"Ethereum", b"CurrentTransactionStatuses") - ) + &StorageKey(storage_prefix_build( + b"Ethereum", + b"CurrentTransactionStatuses", + )), ) } fn current_receipts(&self, id: &BlockId) -> Option> { self.query_storage::>( id, - &StorageKey( - storage_prefix_build(b"Ethereum", b"CurrentReceipts") - ) + &StorageKey(storage_prefix_build(b"Ethereum", b"CurrentReceipts")), ) } fn account_codes(&self, id: &BlockId, address: H160) -> Option> { let mut key: Vec = storage_prefix_build(b"EVM", b"AccountCodes"); key.extend(blake2_128_extend(address.as_bytes())); - self.query_storage::>( - id, - &StorageKey(key) - ) + self.query_storage::>(id, &StorageKey(key)) } fn account_storages(&self, id: &BlockId, address: H160, index: U256) -> Option { @@ -322,17 +319,11 @@ impl EthApi where key.extend(blake2_128_extend(address.as_bytes())); key.extend(blake2_128_extend(tmp)); - self.query_storage::( - id, - &StorageKey(key) - ) + self.query_storage::(id, &StorageKey(key)) } fn query_storage(&self, id: &BlockId, key: &StorageKey) -> Option { - if let Ok(Some(data)) = self.client.storage( - id, - key - ) { + if let Ok(Some(data)) = self.client.storage(id, key) { if let Ok(result) = Decode::decode(&mut &data.0[..]) { return Some(result); } @@ -341,15 +332,16 @@ impl EthApi where } } -impl EthApiT for EthApi where +impl EthApiT for EthApi +where C: ProvideRuntimeApi + StorageProvider + AuxStore, - C: HeaderBackend + HeaderMetadata + 'static, + C: HeaderBackend + HeaderMetadata + 'static, C::Api: EthereumRuntimeRPCApi, BE: Backend + 'static, BE::State: StateBackend, - B: BlockT + Send + Sync + 'static, + B: BlockT + Send + Sync + 'static, C: Send + Sync + 'static, - P: TransactionPool + Send + Sync + 'static, + P: TransactionPool + Send + Sync + 'static, CT: ConvertTransaction<::Extrinsic> + Send + Sync + 'static, { fn protocol_version(&self) -> Result { @@ -359,7 +351,11 @@ impl EthApiT for EthApi where fn syncing(&self) -> Result { if self.network.is_major_syncing() { let block_number = U256::from( - self.client.info().best_number.clone().unique_saturated_into() + self.client + .info() + .best_number + .clone() + .unique_saturated_into(), ); Ok(SyncStatus::Info(SyncInfo { starting_block: U256::zero(), @@ -381,14 +377,13 @@ impl EthApiT for EthApi where } fn author(&self) -> Result { - let block: Option = self.current_block(&BlockId::Hash( - self.client.info().best_hash - )); + let block: Option = + self.current_block(&BlockId::Hash(self.client.info().best_hash)); return if let Some(block) = block { Ok(block.header.beneficiary) } else { Err(internal_err("Failed to retrieve block.")) - } + }; } fn is_mining(&self) -> Result { @@ -397,19 +392,23 @@ impl EthApiT for EthApi where fn chain_id(&self) -> Result> { let hash = self.client.info().best_hash; - Ok(Some(self.client.runtime_api().chain_id(&BlockId::Hash(hash)) - .map_err(|err| internal_err(format!("fetch runtime chain id failed: {:?}", err)))?.into())) - } - - fn gas_price(&self) -> Result { - let hash = self.client.info().best_hash; - Ok( + Ok(Some( self.client .runtime_api() - .gas_price(&BlockId::Hash(hash)) + .chain_id(&BlockId::Hash(hash)) .map_err(|err| internal_err(format!("fetch runtime chain id failed: {:?}", err)))? .into(), - ) + )) + } + + fn gas_price(&self) -> Result { + let hash = self.client.info().best_hash; + Ok(self + .client + .runtime_api() + .gas_price(&BlockId::Hash(hash)) + .map_err(|err| internal_err(format!("fetch runtime chain id failed: {:?}", err)))? + .into()) } fn accounts(&self) -> Result> { @@ -421,18 +420,24 @@ impl EthApiT for EthApi where } fn block_number(&self) -> Result { - Ok(U256::from(self.client.info().best_number.clone().unique_saturated_into())) + Ok(U256::from( + self.client + .info() + .best_number + .clone() + .unique_saturated_into(), + )) } fn balance(&self, address: H160, number: Option) -> Result { if let Ok(Some(id)) = self.native_block_id(number) { - return Ok( - self.client - .runtime_api() - .account_basic(&id, address) - .map_err(|err| internal_err(format!("fetch runtime chain id failed: {:?}", err)))? - .balance.into(), - ); + return Ok(self + .client + .runtime_api() + .account_basic(&id, address) + .map_err(|err| internal_err(format!("fetch runtime chain id failed: {:?}", err)))? + .balance + .into()); } Ok(U256::zero()) } @@ -448,7 +453,8 @@ impl EthApiT for EthApi where } fn block_by_hash(&self, hash: H256, full: bool) -> Result> { - let id = match self.load_hash(hash) + let id = match self + .load_hash(hash) .map_err(|err| internal_err(format!("{:?}", err)))? { Some(hash) => hash, @@ -464,17 +470,13 @@ impl EthApiT for EthApi where let statuses: Option> = self.current_statuses(&id); match (block, statuses) { - (Some(block), Some(statuses)) => { - Ok(Some(rich_block_build( - block, - statuses.into_iter().map(|s| Some(s)).collect(), - Some(hash), - full, - ))) - }, - _ => { - Ok(None) - }, + (Some(block), Some(statuses)) => Ok(Some(rich_block_build( + block, + statuses.into_iter().map(|s| Some(s)).collect(), + Some(hash), + full, + ))), + _ => Ok(None), } } @@ -489,9 +491,8 @@ impl EthApiT for EthApi where match (block, statuses) { (Some(block), Some(statuses)) => { - let hash = H256::from_slice( - Keccak256::digest(&rlp::encode(&block.header)).as_slice(), - ); + let hash = + H256::from_slice(Keccak256::digest(&rlp::encode(&block.header)).as_slice()); Ok(Some(rich_block_build( block, @@ -499,10 +500,8 @@ impl EthApiT for EthApi where Some(hash), full, ))) - }, - _ => { - Ok(None) - }, + } + _ => Ok(None), } } @@ -510,9 +509,13 @@ impl EthApiT for EthApi where if let Some(BlockNumber::Pending) = number { // Find future nonce let id = BlockId::hash(self.client.info().best_hash); - let nonce: U256 = self.client.runtime_api() + let nonce: U256 = self + .client + .runtime_api() .account_basic(&id, address) - .map_err(|err| internal_err(format!("fetch runtime account basic failed: {:?}", err)))? + .map_err(|err| { + internal_err(format!("fetch runtime account basic failed: {:?}", err)) + })? .nonce; let mut current_nonce = nonce; @@ -534,16 +537,20 @@ impl EthApiT for EthApi where None => return Ok(U256::zero()), }; - let nonce = self.client.runtime_api() + let nonce = self + .client + .runtime_api() .account_basic(&id, address) .map_err(|err| internal_err(format!("fetch runtime account basic failed: {:?}", err)))? - .nonce.into(); + .nonce + .into(); Ok(nonce) } fn block_transaction_count_by_hash(&self, hash: H256) -> Result> { - let id = match self.load_hash(hash) + let id = match self + .load_hash(hash) .map_err(|err| internal_err(format!("{:?}", err)))? { Some(hash) => hash, @@ -589,7 +596,7 @@ impl EthApiT for EthApi where fn code_at(&self, address: H160, number: Option) -> Result { let mut out: Bytes = Bytes(Vec::new()); if let Ok(Some(id)) = self.native_block_id(number) { - if let Some(account_codes) = self.account_codes(&id,address) { + if let Some(account_codes) = self.account_codes(&id, address) { out = Bytes(account_codes); } } @@ -607,18 +614,18 @@ impl EthApiT for EthApi where match accounts.get(0) { Some(account) => account.clone(), - None => return Box::new(future::result(Err(internal_err("no signer available")))), + None => { + return Box::new(future::result(Err(internal_err("no signer available")))) + } } - }, + } }; let nonce = match request.nonce { Some(nonce) => nonce, - None => { - match self.transaction_count(from, None) { - Ok(nonce) => nonce, - Err(e) => return Box::new(future::result(Err(e))), - } + None => match self.transaction_count(from, None) { + Ok(nonce) => nonce, + Err(e) => return Box::new(future::result(Err(e))), }, }; @@ -648,7 +655,7 @@ impl EthApiT for EthApi where Ok(t) => transaction = Some(t), Err(e) => return Box::new(future::result(Err(e))), } - break + break; } } @@ -656,9 +663,8 @@ impl EthApiT for EthApi where Some(transaction) => transaction, None => return Box::new(future::result(Err(internal_err("no signer available")))), }; - let transaction_hash = H256::from_slice( - Keccak256::digest(&rlp::encode(&transaction)).as_slice() - ); + let transaction_hash = + H256::from_slice(Keccak256::digest(&rlp::encode(&transaction)).as_slice()); let hash = self.client.info().best_hash; Box::new( self.pool @@ -669,20 +675,23 @@ impl EthApiT for EthApi where ) .compat() .map(move |_| transaction_hash) - .map_err(|err| internal_err(format!("submit transaction to pool failed: {:?}", err))) + .map_err(|err| { + internal_err(format!("submit transaction to pool failed: {:?}", err)) + }), ) } fn send_raw_transaction(&self, bytes: Bytes) -> BoxFuture { let transaction = match rlp::decode::(&bytes.0[..]) { Ok(transaction) => transaction, - Err(_) => return Box::new( - future::result(Err(internal_err("decode transaction failed"))) - ), + Err(_) => { + return Box::new(future::result(Err(internal_err( + "decode transaction failed", + )))) + } }; - let transaction_hash = H256::from_slice( - Keccak256::digest(&rlp::encode(&transaction)).as_slice() - ); + let transaction_hash = + H256::from_slice(Keccak256::digest(&rlp::encode(&transaction)).as_slice()); let hash = self.client.info().best_hash; Box::new( self.pool @@ -693,7 +702,9 @@ impl EthApiT for EthApi where ) .compat() .map(move |_| transaction_hash) - .map_err(|err| internal_err(format!("submit transaction to pool failed: {:?}", err))) + .map_err(|err| { + internal_err(format!("submit transaction to pool failed: {:?}", err)) + }), ) } @@ -707,7 +718,7 @@ impl EthApiT for EthApi where gas, value, data, - nonce + nonce, } = request; let gas_limit = gas.unwrap_or(U256::max_value()); // TODO: set a limit @@ -715,7 +726,9 @@ impl EthApiT for EthApi where match to { Some(to) => { - let info = self.client.runtime_api() + let info = self + .client + .runtime_api() .call( &BlockId::Hash(hash), from.unwrap_or_default(), @@ -733,9 +746,11 @@ impl EthApiT for EthApi where error_on_execution_failure(&info.exit_reason, &info.value)?; Ok(Bytes(info.value)) - }, + } None => { - let info = self.client.runtime_api() + let info = self + .client + .runtime_api() .create( &BlockId::Hash(hash), from.unwrap_or_default(), @@ -752,7 +767,7 @@ impl EthApiT for EthApi where error_on_execution_failure(&info.exit_reason, &[])?; Ok(Bytes(info.value[..].to_vec())) - }, + } } } @@ -766,7 +781,7 @@ impl EthApiT for EthApi where gas, value, data, - nonce + nonce, } = request; let gas_limit = gas.unwrap_or(U256::max_value()); // TODO: set a limit @@ -774,7 +789,9 @@ impl EthApiT for EthApi where let used_gas = match to { Some(to) => { - let info = self.client.runtime_api() + let info = self + .client + .runtime_api() .call( &BlockId::Hash(hash), from.unwrap_or_default(), @@ -792,9 +809,11 @@ impl EthApiT for EthApi where error_on_execution_failure(&info.exit_reason, &info.value)?; info.used_gas - }, + } None => { - let info = self.client.runtime_api() + let info = self + .client + .runtime_api() .create( &BlockId::Hash(hash), from.unwrap_or_default(), @@ -811,22 +830,23 @@ impl EthApiT for EthApi where error_on_execution_failure(&info.exit_reason, &[])?; info.used_gas - }, + } }; Ok(used_gas) } fn transaction_by_hash(&self, hash: H256) -> Result> { - let (hash, index) = match frontier_consensus::load_transaction_metadata( - self.client.as_ref(), - hash, - ).map_err(|err| internal_err(format!("fetch aux store failed: {:?})", err)))? { - Some((hash, index)) => (hash, index as usize), - None => return Ok(None), - }; + let (hash, index) = + match frontier_consensus::load_transaction_metadata(self.client.as_ref(), hash) + .map_err(|err| internal_err(format!("fetch aux store failed: {:?})", err)))? + { + Some((hash, index)) => (hash, index as usize), + None => return Ok(None), + }; - let id = match self.load_hash(hash) + let id = match self + .load_hash(hash) .map_err(|err| internal_err(format!("{:?}", err)))? { Some(hash) => hash, @@ -842,14 +862,12 @@ impl EthApiT for EthApi where let statuses: Option> = self.current_statuses(&id); match (block, statuses) { - (Some(block), Some(statuses)) => { - Ok(Some(transaction_build( - block.transactions[index].clone(), - block, - statuses[index].clone(), - ))) - }, - _ => Ok(None) + (Some(block), Some(statuses)) => Ok(Some(transaction_build( + block.transactions[index].clone(), + block, + statuses[index].clone(), + ))), + _ => Ok(None), } } @@ -858,7 +876,8 @@ impl EthApiT for EthApi where hash: H256, index: Index, ) -> Result> { - let id = match self.load_hash(hash) + let id = match self + .load_hash(hash) .map_err(|err| internal_err(format!("{:?}", err)))? { Some(hash) => hash, @@ -875,14 +894,12 @@ impl EthApiT for EthApi where let statuses: Option> = self.current_statuses(&id); match (block, statuses) { - (Some(block), Some(statuses)) => { - Ok(Some(transaction_build( - block.transactions[index].clone(), - block, - statuses[index].clone(), - ))) - }, - _ => Ok(None) + (Some(block), Some(statuses)) => Ok(Some(transaction_build( + block.transactions[index].clone(), + block, + statuses[index].clone(), + ))), + _ => Ok(None), } } @@ -901,27 +918,26 @@ impl EthApiT for EthApi where let statuses: Option> = self.current_statuses(&id); match (block, statuses) { - (Some(block), Some(statuses)) => { - Ok(Some(transaction_build( - block.transactions[index].clone(), - block, - statuses[index].clone(), - ))) - }, - _ => Ok(None) + (Some(block), Some(statuses)) => Ok(Some(transaction_build( + block.transactions[index].clone(), + block, + statuses[index].clone(), + ))), + _ => Ok(None), } } fn transaction_receipt(&self, hash: H256) -> Result> { - let (hash, index) = match frontier_consensus::load_transaction_metadata( - self.client.as_ref(), - hash, - ).map_err(|err| internal_err(format!("fetch aux store failed : {:?}", err)))? { - Some((hash, index)) => (hash, index as usize), - None => return Ok(None), - }; + let (hash, index) = + match frontier_consensus::load_transaction_metadata(self.client.as_ref(), hash) + .map_err(|err| internal_err(format!("fetch aux store failed : {:?}", err)))? + { + Some((hash, index)) => (hash, index as usize), + None => return Ok(None), + }; - let id = match self.load_hash(hash) + let id = match self + .load_hash(hash) .map_err(|err| internal_err(format!("{:?}", err)))? { Some(hash) => hash, @@ -939,9 +955,8 @@ impl EthApiT for EthApi where match (block, statuses, receipts) { (Some(block), Some(statuses), Some(receipts)) => { - let block_hash = H256::from_slice( - Keccak256::digest(&rlp::encode(&block.header)).as_slice() - ); + let block_hash = + H256::from_slice(Keccak256::digest(&rlp::encode(&block.header)).as_slice()); let receipt = receipts[index].clone(); let status = statuses[index].clone(); let mut cumulative_receipts = receipts.clone(); @@ -955,9 +970,10 @@ impl EthApiT for EthApi where to: status.to, block_number: Some(block.header.number), cumulative_gas_used: { - let cumulative_gas: u32 = cumulative_receipts.iter().map(|r| { - r.used_gas.as_u32() - }).sum(); + let cumulative_gas: u32 = cumulative_receipts + .iter() + .map(|r| r.used_gas.as_u32()) + .sum(); U256::from(cumulative_gas) }, gas_used: Some(receipt.used_gas), @@ -966,12 +982,18 @@ impl EthApiT for EthApi where let mut pre_receipts_log_index = None; if cumulative_receipts.len() > 0 { cumulative_receipts.truncate(cumulative_receipts.len() - 1); - pre_receipts_log_index = Some(cumulative_receipts.iter().map(|r| { - r.logs.len() as u32 - }).sum::()); + pre_receipts_log_index = Some( + cumulative_receipts + .iter() + .map(|r| r.logs.len() as u32) + .sum::(), + ); } - receipt.logs.iter().enumerate().map(|(i, log)| { - Log { + receipt + .logs + .iter() + .enumerate() + .map(|(i, log)| Log { address: log.address, topics: log.topics.clone(), data: Bytes(log.data.clone()), @@ -980,17 +1002,17 @@ impl EthApiT for EthApi where transaction_hash: Some(hash), transaction_index: Some(status.transaction_index.into()), log_index: Some(U256::from( - (pre_receipts_log_index.unwrap_or(0)) + i as u32 + (pre_receipts_log_index.unwrap_or(0)) + i as u32, )), transaction_log_index: Some(U256::from(i)), removed: false, - } - }).collect() + }) + .collect() }, status_code: Some(U64::from(receipt.state_root.to_low_u64_be())), logs_bloom: receipt.logs_bloom, state_root: None, - })) + })); } _ => Ok(None), } @@ -1014,7 +1036,8 @@ impl EthApiT for EthApi where let params = FilteredParams::new(Some(filter.clone())); if let Some(hash) = filter.block_hash { - let id = match self.load_hash(hash) + let id = match self + .load_hash(hash) .map_err(|err| internal_err(format!("{:?}", err)))? { Some(hash) => hash, @@ -1033,19 +1056,17 @@ impl EthApiT for EthApi where blocks_and_statuses.push((block, statuses)); } } else { - let mut current_number = filter.to_block + let mut current_number = filter + .to_block .and_then(|v| v.to_min_block_num()) .map(|s| s.unique_saturated_into()) - .unwrap_or( - self.client.info().best_number - ); + .unwrap_or(self.client.info().best_number); - let from_number = filter.from_block + let from_number = filter + .from_block .and_then(|v| v.to_min_block_num()) .map(|s| s.unique_saturated_into()) - .unwrap_or( - self.client.info().best_number - ); + .unwrap_or(self.client.info().best_number); while current_number >= from_number { let id = BlockId::Number(current_number); @@ -1057,7 +1078,7 @@ impl EthApiT for EthApi where } if current_number == Zero::zero() { - break + break; } else { current_number = current_number.saturating_sub(One::one()); } @@ -1066,9 +1087,8 @@ impl EthApiT for EthApi where for (block, statuses) in blocks_and_statuses { let mut block_log_index: u32 = 0; - let block_hash = H256::from_slice( - Keccak256::digest(&rlp::encode(&block.header)).as_slice() - ); + let block_hash = + H256::from_slice(Keccak256::digest(&rlp::encode(&block.header)).as_slice()); for status in statuses.iter() { let logs = status.logs.clone(); let mut transaction_log_index: u32 = 0; @@ -1087,13 +1107,9 @@ impl EthApiT for EthApi where removed: false, }; let mut add: bool = false; - if let ( - Some(VariadicValue::Single(_)), - Some(VariadicValue::Multiple(_)) - ) = ( - filter.address.clone(), - filter.topics.clone(), - ) { + if let (Some(VariadicValue::Single(_)), Some(VariadicValue::Multiple(_))) = + (filter.address.clone(), filter.topics.clone()) + { if !params.filter_address(&log) && params.filter_topics(&log) { add = true; } diff --git a/pallets/ethereum-chain-id/src/lib.rs b/pallets/ethereum-chain-id/src/lib.rs index 73fce14cb0..be20787a55 100644 --- a/pallets/ethereum-chain-id/src/lib.rs +++ b/pallets/ethereum-chain-id/src/lib.rs @@ -20,11 +20,10 @@ use frame_support::{decl_module, decl_storage, traits::Get}; - /// Configuration trait of this pallet. pub trait Config: frame_system::Config {} -impl Get for Module { +impl Get for Module { fn get() -> u64 { Self::chain_id() } diff --git a/pallets/parachain-info/src/lib.rs b/pallets/parachain-info/src/lib.rs index 7747d31345..4b540a3df5 100644 --- a/pallets/parachain-info/src/lib.rs +++ b/pallets/parachain-info/src/lib.rs @@ -25,7 +25,7 @@ use cumulus_primitives::ParaId; /// Configuration trait of this pallet. pub trait Config: frame_system::Config {} -impl Get for Module { +impl Get for Module { fn get() -> ParaId { Self::parachain_id() } diff --git a/runtime/account/src/signer.rs b/runtime/account/src/signer.rs index d809d929c4..5b54dc6cc2 100644 --- a/runtime/account/src/signer.rs +++ b/runtime/account/src/signer.rs @@ -18,12 +18,12 @@ //! //! It includes the Verify and IdentifyAccount traits for the AccountId20 -use sp_core::{H160, H256, ecdsa, ed25519, sr25519, RuntimeDebug}; use codec::{Decode, Encode}; use sha3::{Digest, Keccak256}; +use sp_core::{ecdsa, ed25519, sr25519, RuntimeDebug, H160, H256}; #[cfg(feature = "std")] -pub use serde::{Serialize, Deserialize, de::DeserializeOwned}; +pub use serde::{de::DeserializeOwned, Deserialize, Serialize}; #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] #[derive(Eq, PartialEq, Clone, Encode, Decode, sp_core::RuntimeDebug)] @@ -51,44 +51,38 @@ impl From for MultiSignature { impl sp_runtime::traits::Verify for MultiSignature { type Signer = EthereumSigner; - fn verify>( - &self, - mut msg: L, - signer: &H160 - ) -> bool { + fn verify>(&self, mut msg: L, signer: &H160) -> bool { match (self, signer) { (MultiSignature::Ecdsa(ref sig), who) => { let mut m = [0u8; 32]; m.copy_from_slice(Keccak256::digest(msg.get()).as_slice()); match sp_io::crypto::secp256k1_ecdsa_recover(sig.0.as_ref(), &m) { Ok(pubkey) => { - H160::from(H256::from_slice(Keccak256::digest(&pubkey).as_slice())) == - *who - }, + H160::from(H256::from_slice(Keccak256::digest(&pubkey).as_slice())) == *who + } Err(sp_io::EcdsaVerifyError::BadRS) => { log::error!(target: "evm", "Error recovering: Incorrect value of R or S"); false - }, + } Err(sp_io::EcdsaVerifyError::BadV) => { log::error!(target: "evm", "Error recovering: Incorrect value of V"); false - }, + } Err(sp_io::EcdsaVerifyError::BadSignature) => { log::error!(target: "evm", "Error recovering: Invalid signature"); false } } - }, - _ => false + } + _ => false, } } } - /// Public key for any known crypto algorithm. #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Encode, Decode, sp_core::RuntimeDebug)] #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] -pub struct EthereumSigner ([u8; 20]); +pub struct EthereumSigner([u8; 20]); impl sp_runtime::traits::IdentifyAccount for EthereumSigner { type AccountId = H160; @@ -103,7 +97,6 @@ impl From<[u8; 20]> for EthereumSigner { } } - impl From for EthereumSigner { fn from(x: ecdsa::Public) -> Self { let mut m = [0u8; 20]; diff --git a/runtime/precompiles/src/lib.rs b/runtime/precompiles/src/lib.rs index 42cbc29a92..83af402111 100644 --- a/runtime/precompiles/src/lib.rs +++ b/runtime/precompiles/src/lib.rs @@ -16,9 +16,9 @@ #![cfg_attr(not(feature = "std"), no_std)] -use sp_std::prelude::*; -use sp_core::H160; use pallet_evm::{Precompile, Precompiles}; +use sp_core::H160; +use sp_std::prelude::*; pub struct ExperimentalMoonbeamPrecompiles; @@ -27,14 +27,17 @@ fn ensure_linear_cost( target_gas: Option, len: usize, base: usize, - word: usize + word: usize, ) -> Result { - let cost = base.checked_add( - word.checked_mul(len.saturating_add(31) / 32).ok_or(pallet_evm::ExitError::OutOfGas)? - ).ok_or(pallet_evm::ExitError::OutOfGas)?; + let cost = base + .checked_add( + word.checked_mul(len.saturating_add(31) / 32) + .ok_or(pallet_evm::ExitError::OutOfGas)?, + ) + .ok_or(pallet_evm::ExitError::OutOfGas)?; if let Some(target_gas) = target_gas { if cost > target_gas { - return Err(pallet_evm::ExitError::OutOfGas) + return Err(pallet_evm::ExitError::OutOfGas); } } Ok(cost) @@ -46,24 +49,28 @@ struct DeadbeefPrecompiled; impl Precompile for DeadbeefPrecompiled { fn execute( input: &[u8], - target_gas: Option + target_gas: Option, ) -> core::result::Result<(pallet_evm::ExitSucceed, Vec, usize), pallet_evm::ExitError> { let cost = ensure_linear_cost(target_gas, input.len(), 15, 3)?; log::info!("Calling deadbeef precompiled contract"); - let mut result_vec: Vec = rustc_hex::FromHex::from_hex("deadbeef") - .map_err(|_| pallet_evm::ExitError::Other( - sp_std::borrow::Cow::Borrowed("unexpected deadbeef conversion") - ))?; + let mut result_vec: Vec = rustc_hex::FromHex::from_hex("deadbeef").map_err(|_| { + pallet_evm::ExitError::Other(sp_std::borrow::Cow::Borrowed( + "unexpected deadbeef conversion", + )) + })?; result_vec.extend(input.to_vec()); Ok((pallet_evm::ExitSucceed::Returned, result_vec, cost)) } } -type PrecompiledCallable = fn(&[u8], Option) - -> core::result::Result<(pallet_evm::ExitSucceed, Vec, usize), pallet_evm::ExitError>; +type PrecompiledCallable = + fn( + &[u8], + Option, + ) -> core::result::Result<(pallet_evm::ExitSucceed, Vec, usize), pallet_evm::ExitError>; fn get_precompiled_func_from_address(address: &H160) -> Option { use core::str::FromStr; @@ -83,31 +90,26 @@ impl Precompiles for ExperimentalMoonbeamPrecompiles { fn execute( address: H160, input: &[u8], - target_gas: Option + target_gas: Option, ) -> Option< - core::result::Result< - (pallet_evm::ExitSucceed, Vec, usize), - pallet_evm::ExitError, - > + core::result::Result<(pallet_evm::ExitSucceed, Vec, usize), pallet_evm::ExitError>, > { match get_precompiled_func_from_address(&address) { Some(func) => return Some(func(input, target_gas)), - _ => {}, + _ => {} }; None } } -pub type MoonbeamPrecompiles = -( +pub type MoonbeamPrecompiles = ( pallet_evm::precompiles::ECRecover, pallet_evm::precompiles::Sha256, pallet_evm::precompiles::Ripemd160, pallet_evm::precompiles::Identity, ); - #[cfg(test)] mod tests { #[test] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8212869a36..bb5bc6a554 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -33,10 +33,10 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -#[cfg(feature = "standalone")] -mod standalone; #[cfg(not(feature = "standalone"))] mod parachain; +#[cfg(feature = "standalone")] +mod standalone; #[cfg(feature = "standalone")] use standalone::*; @@ -44,15 +44,15 @@ use standalone::*; // use parachain::*; use codec::{Decode, Encode}; +use frontier_rpc_primitives::TransactionStatus; use sp_api::impl_runtime_apis; -use sp_core::{OpaqueMetadata, H160, U256, H256}; +use sp_core::{OpaqueMetadata, H160, H256, U256}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{BlakeTwo256, Block as BlockT, IdentityLookup, Saturating, IdentifyAccount, Verify}, + traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, IdentityLookup, Saturating, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; -use frontier_rpc_primitives::TransactionStatus; use sp_std::{marker::PhantomData, prelude::*}; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -61,15 +61,12 @@ use sp_version::RuntimeVersion; pub use frame_support::{ construct_runtime, parameter_types, traits::{FindAuthor, Get, Randomness}, - weights::{ - constants::WEIGHT_PER_SECOND, - IdentityFee, Weight - }, + weights::{constants::WEIGHT_PER_SECOND, IdentityFee, Weight}, ConsensusEngineId, StorageValue, }; use pallet_evm::{ - Account as EVMAccount, IdentityAddressMapping, EnsureAddressSame, - EnsureAddressNever, FeeCalculator, Runner + Account as EVMAccount, EnsureAddressNever, EnsureAddressSame, FeeCalculator, + IdentityAddressMapping, Runner, }; use pallet_transaction_payment::CurrencyAdapter; @@ -262,7 +259,7 @@ pub struct TransactionConverter; impl frontier_rpc_primitives::ConvertTransaction for TransactionConverter { fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic { UncheckedExtrinsic::new_unsigned( - pallet_ethereum::Call::::transact(transaction).into() + pallet_ethereum::Call::::transact(transaction).into(), ) } } diff --git a/runtime/src/parachain.rs b/runtime/src/parachain.rs index cd79ca2afe..d1b018c78c 100644 --- a/runtime/src/parachain.rs +++ b/runtime/src/parachain.rs @@ -17,7 +17,6 @@ #[macro_export] macro_rules! runtime_parachain { () => { - /// This runtime version. pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("moonbase-alphanet"), diff --git a/runtime/src/standalone.rs b/runtime/src/standalone.rs index e717193d36..a9a616504e 100644 --- a/runtime/src/standalone.rs +++ b/runtime/src/standalone.rs @@ -14,15 +14,13 @@ // You should have received a copy of the GNU General Public License // along with Moonbeam. If not, see . +pub use frame_support::traits::KeyOwnerProofSystem; pub use pallet_grandpa::{ - fg_primitives, - AuthorityId as GrandpaId, - AuthorityList as GrandpaAuthorityList + fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList, }; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_core::crypto::{KeyTypeId, Public}; pub use sp_runtime::traits::NumberFor; -pub use frame_support::traits::KeyOwnerProofSystem; #[macro_export] macro_rules! runtime_standalone { From 789a1444b92b9ef91a49986c61618dd5fd4d4c68 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Mon, 21 Dec 2020 11:17:59 -0700 Subject: [PATCH 07/13] Update Cargo.lock --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0843d55087..3d1671b159 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9323,7 +9323,8 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79091baab813855ddf65b191de9fe53e656b6b67c1e9bd23fdcbff8788164684" dependencies = [ "ansi_term 0.12.1", "atty", @@ -9338,8 +9339,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79091baab813855ddf65b191de9fe53e656b6b67c1e9bd23fdcbff8788164684" +source = "git+https://github.com/paritytech/substrate#39278096356942a087213b0f21c976ac100cb8f8" dependencies = [ "ansi_term 0.12.1", "atty", From 99563e37189d1ad465a1bb4b32b9989216e7a65c Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Mon, 21 Dec 2020 13:31:13 -0700 Subject: [PATCH 08/13] Resolve clippy complaints --- node/parachain/src/chain_spec.rs | 4 +++- node/parachain/src/cli.rs | 1 - node/parachain/src/command.rs | 5 +++-- node/parachain/src/service.rs | 7 ++++--- node/rpc/src/lib.rs | 21 +++++++++------------ node/rpc/src/pubsub_hotfixes.rs | 2 ++ node/rpc/src/server_hotfixes.rs | 2 ++ runtime/precompiles/src/lib.rs | 12 ++++++------ runtime/src/lib.rs | 2 ++ 9 files changed, 31 insertions(+), 25 deletions(-) diff --git a/node/parachain/src/chain_spec.rs b/node/parachain/src/chain_spec.rs index c52f099975..015820ec81 100644 --- a/node/parachain/src/chain_spec.rs +++ b/node/parachain/src/chain_spec.rs @@ -40,12 +40,14 @@ pub struct Extensions { impl Extensions { /// Try to get the extension from the given `ChainSpec`. + #[allow(clippy::borrowed_box)] pub fn try_get(chain_spec: &Box) -> Option<&Self> { sc_chain_spec::get_extension(chain_spec.extensions()) } } pub fn get_chain_spec(para_id: ParaId) -> Result { + #[allow(clippy::or_fun_call)] let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?; Ok(ChainSpec::from_genesis( "Moonbase Parachain Local Testnet", @@ -94,7 +96,7 @@ fn testnet_genesis( parachain_info: Some(ParachainInfoConfig { parachain_id: para_id, }), - pallet_ethereum_chain_id: Some(EthereumChainIdConfig { chain_id: chain_id }), + pallet_ethereum_chain_id: Some(EthereumChainIdConfig { chain_id }), pallet_evm: Some(EVMConfig { accounts: BTreeMap::new(), }), diff --git a/node/parachain/src/cli.rs b/node/parachain/src/cli.rs index 6d093d7c0e..0cafcd2ed4 100644 --- a/node/parachain/src/cli.rs +++ b/node/parachain/src/cli.rs @@ -16,7 +16,6 @@ use std::path::PathBuf; -use sc_cli; use structopt::StructOpt; /// Sub-commands supported by the collator. diff --git a/node/parachain/src/command.rs b/node/parachain/src/command.rs index 615932c4db..50fee90a1d 100644 --- a/node/parachain/src/command.rs +++ b/node/parachain/src/command.rs @@ -117,7 +117,7 @@ impl SubstrateCli for RelayChainCli { } fn load_spec(&self, id: &str) -> std::result::Result, String> { - polkadot_cli::Cli::from_iter([RelayChainCli::executable_name().to_string()].iter()) + polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()) .load_spec(id) } @@ -126,6 +126,7 @@ impl SubstrateCli for RelayChainCli { } } +#[allow(clippy::borrowed_box)] fn extract_genesis_wasm(chain_spec: &Box) -> Result> { let mut storage = chain_spec.build_storage()?; @@ -261,7 +262,7 @@ pub fn run() -> Result<()> { let polkadot_cli = RelayChainCli::new( config.base_path.as_ref().map(|x| x.path().join("polkadot")), relay_chain_id, - [RelayChainCli::executable_name().to_string()] + [RelayChainCli::executable_name()] .iter() .chain(cli.relaychain_args.iter()), ); diff --git a/node/parachain/src/service.rs b/node/parachain/src/service.rs index cda54ce192..3ebd88eb1f 100644 --- a/node/parachain/src/service.rs +++ b/node/parachain/src/service.rs @@ -42,6 +42,7 @@ type FullBackend = TFullBackend; /// /// Use this macro if you don't actually need the full service, but just the builder in order to /// be able to perform chain operations. +#[allow(clippy::type_complexity)] pub fn new_partial( config: &Configuration, ) -> Result< @@ -77,7 +78,7 @@ pub fn new_partial( frontier_block_import.clone(), inherent_data_providers.clone(), &task_manager.spawn_handle(), - registry.clone(), + registry, )?; let params = PartialComponents { @@ -179,7 +180,7 @@ where sc_service::spawn_tasks(sc_service::SpawnTasksParams { on_demand: None, remote_blockchain: None, - rpc_extensions_builder: rpc_extensions_builder, + rpc_extensions_builder, client: client.clone(), transaction_pool: transaction_pool.clone(), task_manager: &mut task_manager, @@ -208,7 +209,7 @@ where let params = StartCollatorParams { para_id: id, - block_import: block_import, + block_import, proposer_factory, inherent_data_providers: params.inherent_data_providers, block_status: client.clone(), diff --git a/node/rpc/src/lib.rs b/node/rpc/src/lib.rs index cfa20182f6..2b237f515c 100644 --- a/node/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -129,24 +129,21 @@ where network.clone(), ))); io.extend_with(EthPubSubApiServer::to_delegate(EthPubSubApi::new( - pool.clone(), - client.clone(), - network.clone(), + pool, + client, + network, SubscriptionManager::::with_id_provider( HexEncodedIdProvider::default(), Arc::new(subscription_task_executor), ), ))); - match command_sink { - Some(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)), - ); - } - _ => {} + 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)), + ); } io diff --git a/node/rpc/src/pubsub_hotfixes.rs b/node/rpc/src/pubsub_hotfixes.rs index 738e130465..758a64a5fe 100644 --- a/node/rpc/src/pubsub_hotfixes.rs +++ b/node/rpc/src/pubsub_hotfixes.rs @@ -79,6 +79,7 @@ impl EthPubSubApi { } struct SubscriptionResult {} +#[allow(clippy::all)] impl SubscriptionResult { pub fn new() -> Self { SubscriptionResult {} @@ -209,6 +210,7 @@ macro_rules! stream_build { }}; } +#[allow(clippy::all)] impl EthPubSubApiT for EthPubSubApi where B: BlockT + Send + Sync + 'static, diff --git a/node/rpc/src/server_hotfixes.rs b/node/rpc/src/server_hotfixes.rs index 147920964f..bda83660e7 100644 --- a/node/rpc/src/server_hotfixes.rs +++ b/node/rpc/src/server_hotfixes.rs @@ -212,6 +212,7 @@ fn blake2_128_extend(bytes: &[u8]) -> Vec { ext } +#[allow(clippy::all)] impl EthApi where C: ProvideRuntimeApi + StorageProvider + AuxStore, @@ -332,6 +333,7 @@ where } } +#[allow(clippy::all)] impl EthApiT for EthApi where C: ProvideRuntimeApi + StorageProvider + AuxStore, diff --git a/runtime/precompiles/src/lib.rs b/runtime/precompiles/src/lib.rs index 83af402111..82de080eae 100644 --- a/runtime/precompiles/src/lib.rs +++ b/runtime/precompiles/src/lib.rs @@ -87,6 +87,7 @@ fn get_precompiled_func_from_address(address: &H160) -> Option Option< core::result::Result<(pallet_evm::ExitSucceed, Vec, usize), pallet_evm::ExitError>, > { - match get_precompiled_func_from_address(&address) { - Some(func) => return Some(func(input, target_gas)), - _ => {} - }; - - None + if let Some(func) = get_precompiled_func_from_address(&address) { + Some(func(input, target_gas)) + } else { + None + } } } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index bb5bc6a554..ea3bc30b0f 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -457,6 +457,7 @@ impl_runtime_apis! { None }; + #[allow(clippy::or_fun_call)] // suggestion not helpful here ::Runner::call( from, to, @@ -486,6 +487,7 @@ impl_runtime_apis! { None }; + #[allow(clippy::or_fun_call)] // suggestion not helpful here ::Runner::create( from, data, From b8738085c3035488a039d3caceee471ef97ef9a9 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Mon, 21 Dec 2020 13:36:09 -0700 Subject: [PATCH 09/13] Apply rustfmt --- node/parachain/src/command.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/node/parachain/src/command.rs b/node/parachain/src/command.rs index 50fee90a1d..8421fa2c05 100644 --- a/node/parachain/src/command.rs +++ b/node/parachain/src/command.rs @@ -117,8 +117,7 @@ impl SubstrateCli for RelayChainCli { } fn load_spec(&self, id: &str) -> std::result::Result, String> { - polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()) - .load_spec(id) + polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id) } fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { From d1404db809f07e0a3124396ced0cc0845a43a7a1 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Mon, 28 Dec 2020 15:28:30 -0700 Subject: [PATCH 10/13] Appease clippy @ node/parachain/src/chain_spec.rs Co-authored-by: Joshy Orndorff --- node/parachain/src/chain_spec.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/node/parachain/src/chain_spec.rs b/node/parachain/src/chain_spec.rs index 015820ec81..605c700b3b 100644 --- a/node/parachain/src/chain_spec.rs +++ b/node/parachain/src/chain_spec.rs @@ -47,8 +47,7 @@ impl Extensions { } pub fn get_chain_spec(para_id: ParaId) -> Result { - #[allow(clippy::or_fun_call)] - let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?; + let wasm_binary = WASM_BINARY.ok_or_else(|| "Wasm binary not available".to_string())?; Ok(ChainSpec::from_genesis( "Moonbase Parachain Local Testnet", "local_testnet", From 9b07d2bb513f6cc6cd667db1844cb1735f83e8b0 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Mon, 28 Dec 2020 15:42:07 -0700 Subject: [PATCH 11/13] Prefer unwrap_or_else to unwrap_or --- runtime/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index ea3bc30b0f..2d1bd943e7 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -457,7 +457,6 @@ impl_runtime_apis! { None }; - #[allow(clippy::or_fun_call)] // suggestion not helpful here ::Runner::call( from, to, @@ -466,7 +465,7 @@ impl_runtime_apis! { gas_limit.low_u32(), gas_price, nonce, - config.as_ref().unwrap_or(::config()), + config.as_ref().unwrap_or_else(|| ::config()), ).map_err(|err| err.into()) } From bc65b158c7b4bc54c6d9e4b51e4943808a7c9304 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Mon, 28 Dec 2020 15:50:51 -0700 Subject: [PATCH 12/13] Avoid borrowed-box --- node/parachain/src/chain_spec.rs | 3 +-- node/parachain/src/command.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/node/parachain/src/chain_spec.rs b/node/parachain/src/chain_spec.rs index 605c700b3b..d5da775d92 100644 --- a/node/parachain/src/chain_spec.rs +++ b/node/parachain/src/chain_spec.rs @@ -40,8 +40,7 @@ pub struct Extensions { impl Extensions { /// Try to get the extension from the given `ChainSpec`. - #[allow(clippy::borrowed_box)] - pub fn try_get(chain_spec: &Box) -> Option<&Self> { + pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> { sc_chain_spec::get_extension(chain_spec.extensions()) } } diff --git a/node/parachain/src/command.rs b/node/parachain/src/command.rs index 8421fa2c05..2fd1410530 100644 --- a/node/parachain/src/command.rs +++ b/node/parachain/src/command.rs @@ -254,7 +254,7 @@ pub fn run() -> Result<()> { // TODO let key = sp_core::Pair::generate().0; - let extension = chain_spec::Extensions::try_get(&config.chain_spec); + let extension = chain_spec::Extensions::try_get(&*config.chain_spec); let relay_chain_id = extension.map(|e| e.relay_chain.clone()); let para_id = extension.map(|e| e.para_id); From c9042b3b8ab54cd3dc4c648378a4a6fd6b5ab5ff Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Wed, 30 Dec 2020 14:29:37 -0700 Subject: [PATCH 13/13] Add a pre-commit hook for rustfmt/clippy using rusty-hook --- .rusty-hook.toml | 5 +++++ Cargo.lock | 53 ++++++++++++++++++++++++++++++++++++++++++++++ runtime/Cargo.toml | 3 +++ 3 files changed, 61 insertions(+) create mode 100644 .rusty-hook.toml diff --git a/.rusty-hook.toml b/.rusty-hook.toml new file mode 100644 index 0000000000..6bba3d0029 --- /dev/null +++ b/.rusty-hook.toml @@ -0,0 +1,5 @@ +[hooks] +pre-commit = "cargo fmt -- --check && cargo clippy" + +[logging] +verbose = true diff --git a/Cargo.lock b/Cargo.lock index 9fadd4715d..807174e909 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -720,6 +720,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "ci_info" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24f638c70e8c5753795cc9a8c07c44da91554a09e4cf11a7326e8161b0a3c45e" +dependencies = [ + "envmnt", +] + [[package]] name = "clang-sys" version = "0.29.3" @@ -1442,6 +1451,16 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6576a1755ddffd988788025e75bce9e74b018f7cc226198fe931d077911c6d7e" +[[package]] +name = "envmnt" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059" +dependencies = [ + "fsio", + "indexmap", +] + [[package]] name = "erased-serde" version = "0.3.13" @@ -2014,6 +2033,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "fsio" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3" + [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -2251,6 +2276,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +dependencies = [ + "unicode-width", +] + [[package]] name = "getrandom" version = "0.1.15" @@ -4095,6 +4129,7 @@ dependencies = [ "parachain-info", "parity-scale-codec", "precompiles", + "rusty-hook", "serde", "sp-api", "sp-block-builder", @@ -4212,6 +4247,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "nias" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0" + [[package]] name = "nix" version = "0.10.0" @@ -7220,6 +7261,18 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rusty-hook" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96cee9be61be7e1cbadd851e58ed7449c29c620f00b23df937cb9cbc04ac21a3" +dependencies = [ + "ci_info", + "getopts", + "nias", + "toml", +] + [[package]] name = "rw-stream-sink" version = "0.2.1" diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 1450df0b5f..8ba542afb1 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -7,6 +7,9 @@ version = '0.1.0' authors = ["PureStake"] edition = '2018' +[dev-dependencies] +rusty-hook = "^0.11.2" + [dependencies] serde = { version = "1.0.101", default-features = false, optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }