From f6a606b1e417589b64d02e5954a3fc886acecb80 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 14 Mar 2023 13:47:47 +0100 Subject: [PATCH] Squashed 'bridges/' changes from d05a98473..ce7cf9a49 ce7cf9a49 Removed deprecated `#[pallet::generate_store(pub(super) trait Store)]` according to latest Cumulus (#1964) 897b1c0b2 Bump substrate/polkadot/cumulus (#1962) 7b946da2d Backport xcm bridging extensions to the bridge repo (#1813) 88c1114ec Bump futures from 0.3.26 to 0.3.27 8668f73bf Bump serde from 1.0.152 to 1.0.155 3df8823e1 Bump subxt from `a7b45ef` to `d4545de` ef1b1bcd0 Some error improvements (#1956) 434c5e014 optimize justifications before they're included into complex transaction (#1949) 7bac365a6 Actually clone client data by reference when cloning the client (#1941) 764ddd4a8 remove lock file after checks are done (#1942) c18a758f8 Fix invalid messages relay delivery transactions (#1940) 8ad152b06 fix nightly benchmarks test (#1939) d451b4f84 Bump tokio from 1.25.0 to 1.26.0 8019c50aa Bump async-trait from 0.1.64 to 0.1.66 aa055fcee Bump serde_json from 1.0.93 to 1.0.94 ec2ef31c4 Bump subxt from `1c5faf3` to `a7b45ef` 20026366f Bump sysinfo from 0.28.1 to 0.28.2 fe246d1e3 Bump thiserror from 1.0.38 to 1.0.39 c95e0cf02 Fix deploy step in CI (#1931) 15b41c2dd Improve some relay errors readability (#1930) 792deae5e Added deploy Job (#1929) d86c3ce21 Reconnect on-demand clients from MessagesSource::reconnect and MessagesTarget::reconnect (#1927) 4161b51f0 get rid of obsolete weight functions (#1926) 9b3b00e0f cargo update -p clap@4.1.6 (#1925) 13ab28c37 Bump subxt from `9e2acff` to `1c5faf3` bb6171a05 Remove subxt dependency features (#1924) 66d200abb Verify with-parachain message benchmarks on CI (#1923) b6af2116f Update BHR and BHW spec version (#1922) d464e78d9 Fix benchmarks (#1919) 74574d53e fix master compilation (#1920) 1b373dff9 Fix multiple parachain headers submission for single message delivery (#1916) git-subtree-dir: bridges git-subtree-split: ce7cf9a4977fe614d35b6a7a84d5057e2c4ccaf5 --- .config/lingua.dic | 2 +- .gitlab-ci.yml | 51 +- .maintain/millau-weight-template.hbs | 16 +- Cargo.lock | 3282 +++++++---------- bin/millau/node/Cargo.toml | 15 +- bin/millau/node/src/chain_spec.rs | 4 +- bin/millau/node/src/service.rs | 65 +- bin/millau/runtime/Cargo.toml | 8 +- bin/millau/runtime/src/lib.rs | 116 +- bin/rialto-parachain/node/Cargo.toml | 1 + bin/rialto-parachain/node/src/service.rs | 30 +- bin/rialto-parachain/runtime/Cargo.toml | 2 - bin/rialto-parachain/runtime/src/lib.rs | 3 - bin/rialto/node/Cargo.toml | 6 +- bin/rialto/node/src/chain_spec.rs | 4 +- bin/rialto/runtime/Cargo.toml | 7 +- bin/rialto/runtime/src/lib.rs | 61 +- bin/runtime-common/src/lib.rs | 3 + bin/runtime-common/src/messages.rs | 180 +- .../src/messages_benchmarking.rs | 7 +- bin/runtime-common/src/messages_generation.rs | 52 +- .../src/messages_xcm_extension.rs | 181 + .../src/parachains_benchmarking.rs | 13 +- .../src/refund_relayer_extension.rs | 6 +- ...estend-to-millau-parachains-dashboard.json | 6 +- modules/beefy/Cargo.toml | 2 +- modules/beefy/src/lib.rs | 4 +- modules/beefy/src/mock.rs | 6 +- modules/beefy/src/mock_chain.rs | 4 +- modules/beefy/src/utils.rs | 2 +- modules/grandpa/Cargo.toml | 4 +- modules/grandpa/src/benchmarking.rs | 15 +- modules/grandpa/src/lib.rs | 14 +- modules/grandpa/src/mock.rs | 2 +- modules/grandpa/src/storage_types.rs | 2 +- modules/grandpa/src/weights.rs | 34 +- modules/messages/src/benchmarking.rs | 4 +- modules/messages/src/lib.rs | 1 - modules/messages/src/mock.rs | 6 +- modules/messages/src/weights.rs | 98 +- modules/parachains/src/benchmarking.rs | 4 +- modules/parachains/src/lib.rs | 15 +- modules/parachains/src/mock.rs | 2 +- modules/parachains/src/weights.rs | 94 +- modules/relayers/src/lib.rs | 1 - modules/relayers/src/weights.rs | 12 +- modules/shift-session-manager/src/lib.rs | 3 +- primitives/beefy/Cargo.toml | 4 +- primitives/beefy/src/lib.rs | 14 +- .../chain-bridge-hub-cumulus/src/lib.rs | 6 +- primitives/chain-westend/src/lib.rs | 2 +- primitives/header-chain/Cargo.toml | 4 +- primitives/header-chain/src/justification.rs | 6 +- primitives/header-chain/src/lib.rs | 16 +- .../tests/implementation_match.rs | 2 +- .../header-chain/tests/justification.rs | 2 +- primitives/messages/src/source_chain.rs | 2 +- primitives/messages/src/target_chain.rs | 2 +- primitives/runtime/src/lib.rs | 31 + primitives/runtime/src/storage_proof.rs | 49 +- primitives/test-utils/Cargo.toml | 4 +- primitives/test-utils/src/keyring.rs | 2 +- primitives/test-utils/src/lib.rs | 4 +- relays/bin-substrate/Cargo.toml | 2 +- .../src/chains/rialto_parachains_to_millau.rs | 6 - relays/bin-substrate/src/chains/rococo.rs | 2 +- .../rococo_parachains_to_bridge_hub_wococo.rs | 6 - .../chains/westend_parachains_to_millau.rs | 6 - relays/bin-substrate/src/chains/wococo.rs | 2 +- .../wococo_parachains_to_bridge_hub_rococo.rs | 6 - relays/bin-substrate/src/cli/bridge.rs | 9 +- .../bin-substrate/src/cli/relay_parachains.rs | 19 +- relays/client-bridge-hub-wococo/Cargo.toml | 2 +- .../src/runtime_wrapper.rs | 2 +- relays/client-rialto-parachain/Cargo.toml | 2 +- .../src/codegen_runtime.rs | 4 +- relays/client-substrate/Cargo.toml | 6 +- relays/client-substrate/src/chain.rs | 2 +- relays/client-substrate/src/client.rs | 84 +- relays/client-substrate/src/error.rs | 67 +- relays/client-substrate/src/test_chain.rs | 49 + relays/finality/Cargo.toml | 2 +- relays/lib-substrate-relay/Cargo.toml | 6 +- relays/lib-substrate-relay/src/error.rs | 2 +- .../src/finality/engine.rs | 6 +- .../src/messages_source.rs | 16 +- .../src/messages_target.rs | 16 +- .../src/on_demand/headers.rs | 13 + .../lib-substrate-relay/src/on_demand/mod.rs | 3 + .../src/on_demand/parachains.rs | 65 +- .../lib-substrate-relay/src/parachains/mod.rs | 3 +- .../src/parachains/source.rs | 42 +- .../src/parachains/target.rs | 94 +- relays/messages/Cargo.toml | 2 +- relays/messages/src/message_lane_loop.rs | 4 +- relays/messages/src/message_race_delivery.rs | 126 +- relays/messages/src/message_race_limits.rs | 20 +- relays/messages/src/message_race_strategy.rs | 162 +- relays/parachains/Cargo.toml | 5 +- relays/parachains/src/lib.rs | 6 +- relays/parachains/src/parachains_loop.rs | 870 ++--- .../parachains/src/parachains_loop_metrics.rs | 43 +- relays/utils/Cargo.toml | 6 +- scripts/update-weights.sh | 2 +- scripts/verify-pallets-build.sh | 6 +- 105 files changed, 3011 insertions(+), 3385 deletions(-) create mode 100644 bin/runtime-common/src/messages_xcm_extension.rs diff --git a/.config/lingua.dic b/.config/lingua.dic index 3e2d83b02dd..3fd4698c604 100644 --- a/.config/lingua.dic +++ b/.config/lingua.dic @@ -195,7 +195,7 @@ shouldn source_at_target source_latest_confirmed source_latest_generated -sp_finality_grandpa +sp_consensus_grandpa spawner sr25519 src diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b232f610690..f8f29a9eb61 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ stages: - build - publish - publish-docker-description + - deploy variables: GIT_STRATEGY: fetch @@ -77,6 +78,17 @@ default: # this job runs only on nightly pipeline with the mentioned variable, against `master` branch - if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly" +.deploy-refs: &deploy-refs + rules: + - if: $CI_PIPELINE_SOURCE == "pipeline" + when: never + - if: $SCHEDULED_JOB + when: never + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 + when: manual + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]{4}-[0-9]{2}-[0-9]{2}.*$/ # i.e. v2021-09-27, v2021-09-27-1 + when: manual + .nightly-test: &nightly-test rules: # 2. another is triggered by scripts repo $CI_PIPELINE_SOURCE == "pipeline" it's for the CI image @@ -140,8 +152,9 @@ test: # RUSTFLAGS: "-D warnings" script: &test-script - time cargo fetch - - time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"polkadot-runtime\").manifest_path"` - - time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"kusama-runtime\").manifest_path"` + # Enable this, when you see: "`cargo metadata` can not fail on project `Cargo.toml`" + #- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"polkadot-runtime\").manifest_path"` + #- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"kusama-runtime\").manifest_path"` - CARGO_NET_OFFLINE=true SKIP_POLKADOT_RUNTIME_WASM_BUILD=1 SKIP_KUSAMA_RUNTIME_WASM_BUILD=1 SKIP_POLKADOT_TEST_RUNTIME_WASM_BUILD=1 time cargo test --verbose --workspace test-nightly: @@ -185,7 +198,8 @@ benchmarks-test: <<: *docker-env <<: *nightly-test script: - - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_messages --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096 + - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=RialtoMessages --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096 + - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=RialtoParachainMessages --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096 - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_grandpa --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096 - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_parachains --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096 - time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- benchmark pallet --chain=dev --steps=2 --repeat=1 --pallet=pallet_bridge_relayers --extrinsic=* --execution=wasm --wasm-execution=Compiled --heap-pages=4096 @@ -211,8 +225,9 @@ build: # master script: &build-script - time cargo fetch - - time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"polkadot-runtime\").manifest_path"` - - time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"kusama-runtime\").manifest_path"` + # Enable this, when you see: "`cargo metadata` can not fail on project `Cargo.toml`" + #- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"polkadot-runtime\").manifest_path"` + #- time cargo fetch --manifest-path=`cargo metadata --format-version=1 | jq --compact-output --raw-output ".packages[] | select(.name == \"kusama-runtime\").manifest_path"` - CARGO_NET_OFFLINE=true SKIP_POLKADOT_RUNTIME_WASM_BUILD=1 SKIP_KUSAMA_RUNTIME_WASM_BUILD=1 SKIP_POLKADOT_TEST_RUNTIME_WASM_BUILD=1 time cargo build --release --verbose --workspace after_script: # Prepare artifacts @@ -360,4 +375,28 @@ dockerhub-bridges-common-relay: variables: SHORT_DESCRIPTION: "bridges-common-relay" -# FIXME: publish binaries \ No newline at end of file +# FIXME: publish binaries + +deploy-bridges-common-relay-testnet: + <<: *deploy-refs + <<: *kubernetes-build + needs: + - job: bridges-common-relay + stage: deploy + image: argoproj/argocd:v2.5.5 + environment: parity-testnet + variables: + ARGOCD_OPTS: --grpc-web --grpc-web-root-path /parity-testnet + APP: bridges-common-relay + before_script: + - if [[ "${CI_COMMIT_TAG}" ]]; then + VERSION=${CI_COMMIT_TAG}; + elif [[ "${CI_COMMIT_REF_NAME}" ]]; then + VERSION=$(echo ${CI_COMMIT_REF_NAME} | sed -r 's#/+#-#g'); + fi + script: + - echo "Starting deploy version=${VERSION}" + - argocd app list + - argocd app set $APP --helm-set bridges-common-relay.image.tag=$VERSION + - argocd app sync $APP + - argocd app wait $APP --timeout 120 diff --git a/.maintain/millau-weight-template.hbs b/.maintain/millau-weight-template.hbs index 40a9b17bc13..ff70b55aa2c 100644 --- a/.maintain/millau-weight-template.hbs +++ b/.maintain/millau-weight-template.hbs @@ -69,14 +69,10 @@ impl WeightInfo for BridgeWeight { // Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}` // Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}` // Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds. - {{#if (ne benchmark.base_calculated_proof_size "0")}} Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}}) - {{else}} - Weight::from_ref_time({{underscore benchmark.base_weight}}) - {{/if}} {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) + .saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into())) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64)) @@ -91,7 +87,7 @@ impl WeightInfo for BridgeWeight { .saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) {{/each}} {{#each benchmark.component_calculated_proof_size as |cp|}} - .saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into())) + .saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into())) {{/each}} } {{/each}} @@ -117,14 +113,10 @@ impl WeightInfo for () { // Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}` // Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}` // Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds. - {{#if (ne benchmark.base_calculated_proof_size "0")}} Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}}) - {{else}} - Weight::from_ref_time({{underscore benchmark.base_weight}}) - {{/if}} {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) + .saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into())) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64)) @@ -139,7 +131,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) {{/each}} {{#each benchmark.component_calculated_proof_size as |cp|}} - .saturating_add(Weight::from_proof_size({{cp.slope}}).saturating_mul({{cp.name}}.into())) + .saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into())) {{/each}} } {{/each}} diff --git a/Cargo.lock b/Cargo.lock index c3c8c9eb97a..bd01089a33d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "synstructure", ] @@ -291,7 +291,7 @@ checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "synstructure", ] @@ -303,7 +303,7 @@ checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -325,7 +325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -433,13 +433,13 @@ checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -549,63 +549,10 @@ dependencies = [ "serde", ] -[[package]] -name = "beefy-gadget" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "array-bytes 4.2.0", - "async-trait", - "fnv", - "futures", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-consensus", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-utils", - "sp-api", - "sp-application-crypto 7.0.0", - "sp-arithmetic 6.0.0", - "sp-beefy", - "sp-blockchain", - "sp-consensus", - "sp-core 7.0.0", - "sp-keystore 0.13.0", - "sp-mmr-primitives", - "sp-runtime 7.0.0", - "substrate-prometheus-endpoint", - "thiserror", - "wasm-timer", -] - -[[package]] -name = "beefy-gadget-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "beefy-gadget", - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-rpc", - "serde", - "sp-beefy", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "thiserror", -] - [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "hash-db", "log", @@ -668,13 +615,13 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" +checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq 0.1.5", + "constant_time_eq 0.2.4", ] [[package]] @@ -773,9 +720,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de2aff4807e40f478132150d80b031f2461d88f061851afcab537d7600c24120" +checksum = "a071c348a5ef6da1d3a87166b408170b46002382b1dda83992b5c2208cefb370" dependencies = [ "log", "parity-scale-codec", @@ -785,9 +732,9 @@ dependencies = [ [[package]] name = "bounded-vec" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3372be4090bf9d4da36bd8ba7ce6ca1669503d0cf6e667236c6df7f053153eb6" +checksum = "68534a48cbf63a4b1323c433cf21238c9ec23711e0df13b08c33e5c2082663ce" dependencies = [ "thiserror", ] @@ -804,8 +751,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-beefy", - "sp-runtime 7.0.0", + "sp-consensus-beefy", + "sp-runtime", "sp-std 5.0.0", ] @@ -860,9 +807,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-runtime 7.0.0", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] @@ -888,7 +835,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", + "sp-core", "sp-std 5.0.0", ] @@ -910,11 +857,11 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", ] [[package]] @@ -928,8 +875,8 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] @@ -957,8 +904,8 @@ dependencies = [ "parity-util-mem", "scale-info", "serde", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] @@ -973,7 +920,7 @@ dependencies = [ "hex-literal", "parity-scale-codec", "scale-info", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] @@ -987,8 +934,8 @@ dependencies = [ "frame-support", "frame-system", "sp-api", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] @@ -1002,8 +949,8 @@ dependencies = [ "frame-support", "frame-system", "sp-api", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] @@ -1031,13 +978,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", "sp-std 5.0.0", - "sp-trie 7.0.0", - "trie-db 0.26.0", + "sp-trie", + "trie-db", ] [[package]] @@ -1048,9 +995,9 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto 7.0.0", - "sp-finality-grandpa", - "sp-runtime 7.0.0", + "sp-application-crypto", + "sp-consensus-grandpa", + "sp-runtime", "sp-std 5.0.0", ] @@ -1103,11 +1050,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", "static_assertions", "xcm", "xcm-builder", @@ -1206,15 +1153,16 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.14.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07" dependencies = [ "camino", "cargo-platform", "semver 1.0.16", "serde", "serde_json", + "thiserror", ] [[package]] @@ -1396,9 +1344,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.6" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3" +checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" dependencies = [ "bitflags", "clap_derive", @@ -1411,15 +1359,15 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.0" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" dependencies = [ "heck 0.4.1", "proc-macro-error", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1558,18 +1506,18 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "cranelift-bforest" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd" +checksum = "a7379abaacee0f14abf3204a7606118f0465785252169d186337bcb75030815a" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74" +checksum = "9489fa336927df749631f1008007ced2871068544f40a202ce6d93fbf2366a7b" dependencies = [ "arrayvec 0.7.2", "bumpalo", @@ -1579,6 +1527,7 @@ dependencies = [ "cranelift-entity", "cranelift-isle", "gimli 0.26.2", + "hashbrown 0.12.3", "log", "regalloc2", "smallvec", @@ -1587,33 +1536,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f" +checksum = "05bbb67da91ec721ed57cef2f7c5ef7728e1cd9bde9ffd3ef8601022e73e3239" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc" +checksum = "418ecb2f36032f6665dc1a5e2060a143dbab41d83b784882e97710e890a7a16d" [[package]] name = "cranelift-entity" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" +checksum = "7cf583f7b093f291005f9fb1323e2c37f6ee4c7909e39ce016b2e8360d461705" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a" +checksum = "0b66bf9e916f57fbbd0f7703ec6286f4624866bf45000111627c70d272c8dda1" dependencies = [ "cranelift-codegen", "log", @@ -1623,15 +1572,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470" +checksum = "649782a39ce99798dd6b4029e2bb318a2fbeaade1b4fa25330763c10c65bc358" [[package]] name = "cranelift-native" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318" +checksum = "937e021e089c51f9749d09e7ad1c4f255c2f8686cb8c3df63a34b3ec9921bc41" dependencies = [ "cranelift-codegen", "libc", @@ -1640,9 +1589,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.88.2" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b" +checksum = "d850cf6775477747c9dfda9ae23355dd70512ffebc70cf82b85a5b111ae668b5" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1796,7 +1745,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1820,22 +1769,22 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "parity-scale-codec", "sc-chain-spec", "sc-cli", "sc-service", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "url", ] [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1850,15 +1799,15 @@ dependencies = [ "sc-client-api", "sp-api", "sp-consensus", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "tracing", ] [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1871,15 +1820,15 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sp-api", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "tracing", ] @@ -1887,7 +1836,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1900,17 +1849,18 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus", + "schnellru", "sp-blockchain", "sp-consensus", - "sp-runtime 7.0.0", - "sp-trie 7.0.0", + "sp-runtime", + "sp-trie", "tracing", ] [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1924,17 +1874,18 @@ dependencies = [ "sc-client-api", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-core", + "sp-runtime", + "sp-state-machine", "tracing", ] [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ + "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures", @@ -1949,58 +1900,66 @@ dependencies = [ "sc-consensus", "sp-consensus", "sp-maybe-compressed-blob", - "sp-runtime 7.0.0", + "sp-runtime", "tracing", ] [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-common", + "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-primitives-core", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", "futures", - "parking_lot 0.12.1", "polkadot-primitives", "sc-client-api", "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-network-transactions", + "sc-rpc", "sc-service", "sc-sysinfo", "sc-telemetry", + "sc-transaction-pool", + "sc-utils", "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", + "sp-transaction-pool", ] [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "frame-support", "frame-system", "pallet-aura", "parity-scale-codec", "scale-info", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-consensus-aura", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2008,8 +1967,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", "xcm", ] @@ -2017,7 +1976,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -2031,14 +1990,14 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "scale-info", - "sp-core 7.0.0", - "sp-externalities 0.13.0", + "sp-core", + "sp-externalities", "sp-inherents", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-io", + "sp-runtime", + "sp-state-machine", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", "sp-version", "xcm", ] @@ -2046,26 +2005,26 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", "xcm", ] @@ -2073,7 +2032,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2083,8 +2042,8 @@ dependencies = [ "polkadot-runtime-common", "rand_chacha 0.3.1", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", "xcm", "xcm-executor", @@ -2093,23 +2052,23 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain", "polkadot-primitives", "sp-api", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", "xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2119,20 +2078,20 @@ dependencies = [ "sc-client-api", "scale-info", "sp-api", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-runtime", + "sp-state-machine", "sp-std 5.0.0", - "sp-storage 7.0.0", - "sp-trie 7.0.0", + "sp-storage", + "sp-trie", "tracing", ] [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "cumulus-primitives-core", "futures", @@ -2145,7 +2104,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2162,15 +2121,15 @@ dependencies = [ "sc-tracing", "sp-api", "sp-consensus", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-core", + "sp-runtime", + "sp-state-machine", ] [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2178,19 +2137,17 @@ dependencies = [ "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", - "polkadot-service", "sc-client-api", "sp-api", "sp-blockchain", - "sp-state-machine 0.13.0", + "sp-state-machine", "thiserror", - "tokio", ] [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "array-bytes 6.0.0", "async-trait", @@ -2208,29 +2165,23 @@ dependencies = [ "polkadot-service", "sc-authority-discovery", "sc-client-api", - "sc-consensus", - "sc-keystore", "sc-network", "sc-network-common", "sc-service", - "sc-telemetry", "sc-tracing", - "sc-transaction-pool", - "sc-transaction-pool-api", "sp-api", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-runtime 7.0.0", + "sp-runtime", "tokio", "tracing", - "url", ] [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2240,17 +2191,18 @@ dependencies = [ "jsonrpsee", "lru 0.9.0", "parity-scale-codec", - "polkadot-service", + "polkadot-overseer", "sc-client-api", "sc-rpc-api", + "sc-service", "serde", "serde_json", "sp-api", "sp-authority-discovery", "sp-consensus-babe", - "sp-core 7.0.0", - "sp-state-machine 0.13.0", - "sp-storage 7.0.0", + "sp-core", + "sp-state-machine", + "sp-storage", "tokio", "tracing", "url", @@ -2259,13 +2211,13 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-runtime", + "sp-state-machine", "sp-std 5.0.0", ] @@ -2364,7 +2316,7 @@ dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", "scratch", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2381,14 +2333,14 @@ checksum = "81bbeb29798b407ccd82a3324ade1a7286e0d29851475990b612670f6f5124d2" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "darling" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" dependencies = [ "darling_core", "darling_macro", @@ -2396,27 +2348,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" dependencies = [ "fnv", "ident_case", "proc-macro2 1.0.51", "quote 1.0.23", "strsim 0.10.0", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" dependencies = [ "darling_core", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2442,7 +2394,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2492,7 +2444,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2503,7 +2455,7 @@ checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2524,7 +2476,7 @@ dependencies = [ "darling", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2534,7 +2486,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" dependencies = [ "derive_builder_core", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2546,8 +2498,8 @@ dependencies = [ "convert_case", "proc-macro2 1.0.51", "quote 1.0.23", - "rustc_version 0.4.0", - "syn 1.0.107", + "rustc_version", + "syn 1.0.109", ] [[package]] @@ -2634,7 +2586,7 @@ checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2673,14 +2625,14 @@ checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "dyn-clone" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" +checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecdsa" @@ -2777,7 +2729,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2797,7 +2749,7 @@ checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2808,20 +2760,7 @@ checksum = "e88bcb3a067a6555d577aba299e75eff9942da276e6506fc6274327daa026132" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", + "syn 1.0.109", ] [[package]] @@ -2928,7 +2867,7 @@ dependencies = [ "fs-err", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2973,7 +2912,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "thiserror", ] @@ -3008,7 +2947,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.0", + "env_logger", "log", ] @@ -3102,7 +3041,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", ] @@ -3125,7 +3064,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-support-procedural", @@ -3137,25 +3076,25 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 7.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-runtime-interface 7.0.0", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", "sp-std 5.0.0", - "sp-storage 7.0.0", + "sp-storage", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "Inflector", "array-bytes 4.2.0", "chrono", - "clap 4.1.6", + "clap 4.1.8", "comfy-table", "frame-benchmarking", "frame-support", @@ -3180,16 +3119,16 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core 7.0.0", + "sp-core", "sp-database", - "sp-externalities 0.13.0", + "sp-externalities", "sp-inherents", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-keystore", + "sp-runtime", + "sp-state-machine", "sp-std 5.0.0", - "sp-storage 7.0.0", - "sp-trie 7.0.0", + "sp-storage", + "sp-trie", "thiserror", "thousands", ] @@ -3197,45 +3136,45 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", + "sp-arithmetic", + "sp-core", "sp-npos-elections", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", - "sp-tracing 6.0.0", + "sp-tracing", ] [[package]] @@ -3253,15 +3192,15 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "futures", "log", "parity-scale-codec", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "substrate-rpc-client", "tokio", ] @@ -3269,9 +3208,10 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "bitflags", + "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", @@ -3284,24 +3224,24 @@ dependencies = [ "serde", "smallvec", "sp-api", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", + "sp-arithmetic", + "sp-core", "sp-core-hashing-proc-macro", "sp-inherents", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-staking", - "sp-state-machine 0.13.0", + "sp-state-machine", "sp-std 5.0.0", - "sp-tracing 6.0.0", - "sp-weights 4.0.0", + "sp-tracing", + "sp-weights", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "Inflector", "cfg-expr", @@ -3310,68 +3250,68 @@ dependencies = [ "itertools", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", "sp-version", - "sp-weights 4.0.0", + "sp-weights", ] [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "sp-api", @@ -3380,12 +3320,12 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] @@ -3405,6 +3345,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs4" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea55201cc351fdb478217c0fb641b59813da9b4efe4c414a9d8f989a657d149" +dependencies = [ + "libc", + "rustix 0.35.13", + "winapi", +] + [[package]] name = "funty" version = "2.0.0" @@ -3413,9 +3364,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" dependencies = [ "futures-channel", "futures-core", @@ -3428,9 +3379,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" dependencies = [ "futures-core", "futures-sink", @@ -3438,15 +3389,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" dependencies = [ "futures-core", "futures-task", @@ -3456,9 +3407,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" [[package]] name = "futures-lite" @@ -3477,13 +3428,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -3499,15 +3450,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" [[package]] name = "futures-timer" @@ -3517,9 +3468,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" dependencies = [ "futures-channel", "futures-core", @@ -3859,7 +3810,7 @@ dependencies = [ "arbitrary", "lazy_static", "memmap2", - "rustc_version 0.4.0", + "rustc_version", ] [[package]] @@ -4074,7 +4025,7 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4348,7 +4299,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4420,109 +4371,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kusama-runtime" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" -dependencies = [ - "bitvec", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "kusama-runtime-constants", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-multisig", - "pallet-nis", - "pallet-nomination-pools", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-society", - "pallet-staking", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-arithmetic 6.0.0", - "sp-authority-discovery", - "sp-beefy", - "sp-block-builder", - "sp-consensus-babe", - "sp-core 7.0.0", - "sp-inherents", - "sp-io 7.0.0", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime 7.0.0", - "sp-session", - "sp-staking", - "sp-std 5.0.0", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", -] - -[[package]] -name = "kusama-runtime-constants" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-weights 4.0.0", -] - [[package]] name = "kv-log-macro" version = "1.0.7" @@ -4906,7 +4754,7 @@ checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" dependencies = [ "heck 0.4.1", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -5340,7 +5188,7 @@ dependencies = [ "num-traits", "parking_lot 0.12.1", "relay-utils", - "sp-arithmetic 6.0.0", + "sp-arithmetic", ] [[package]] @@ -5358,9 +5206,7 @@ dependencies = [ name = "millau-bridge-node" version = "0.1.0" dependencies = [ - "beefy-gadget", - "beefy-gadget-rpc", - "clap 4.1.6", + "clap 4.1.8", "frame-benchmarking", "frame-benchmarking-cli", "jsonrpsee", @@ -5373,20 +5219,23 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-aura", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", "sc-executor", - "sc-finality-grandpa", - "sc-finality-grandpa-rpc", "sc-keystore", + "sc-network-common", "sc-rpc", "sc-service", "sc-telemetry", "sc-transaction-pool", "serde_json", - "sp-beefy", "sp-consensus-aura", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-runtime 7.0.0", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", "sp-timestamp", "substrate-build-script-utils", "substrate-frame-rpc-system", @@ -5406,7 +5255,7 @@ dependencies = [ "bp-runtime", "bp-westend", "bridge-runtime-common", - "env_logger 0.10.0", + "env_logger", "frame-benchmarking", "frame-executive", "frame-support", @@ -5423,7 +5272,6 @@ dependencies = [ "pallet-bridge-relayers", "pallet-grandpa", "pallet-mmr", - "pallet-randomness-collective-flip", "pallet-session", "pallet-shift-session-manager", "pallet-sudo", @@ -5435,14 +5283,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-beefy", "sp-block-builder", "sp-consensus-aura", - "sp-core 7.0.0", + "sp-consensus-beefy", + "sp-core", "sp-inherents", - "sp-io 7.0.0", + "sp-io", "sp-offchain", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", "sp-std 5.0.0", "sp-transaction-pool", @@ -5490,7 +5338,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "futures", "log", @@ -5498,18 +5346,18 @@ dependencies = [ "sc-client-api", "sc-offchain", "sp-api", - "sp-beefy", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", + "sp-consensus-beefy", + "sp-core", "sp-mmr-primitives", - "sp-runtime 7.0.0", + "sp-runtime", ] [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "anyhow", "jsonrpsee", @@ -5517,9 +5365,9 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core 7.0.0", + "sp-core", "sp-mmr-primitives", - "sp-runtime 7.0.0", + "sp-runtime", ] [[package]] @@ -5546,7 +5394,7 @@ dependencies = [ "cfg-if 1.0.0", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -5605,7 +5453,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "synstructure", ] @@ -5653,7 +5501,7 @@ checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -5749,34 +5597,20 @@ dependencies = [ "memoffset 0.6.5", ] -[[package]] -name = "nix" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", -] - [[package]] name = "node-inspect" version = "0.9.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "parity-scale-codec", "sc-cli", "sc-client-api", "sc-executor", "sc-service", "sp-blockchain", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "thiserror", ] @@ -5796,15 +5630,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nom8" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" -dependencies = [ - "memchr", -] - [[package]] name = "normalize-line-endings" version = "0.3.0" @@ -6005,7 +5830,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -6058,53 +5883,53 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-consensus-aura", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-authority-discovery", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6115,11 +5940,11 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-consensus-babe", "sp-consensus-vrf", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-session", "sp-staking", "sp-std 5.0.0", @@ -6128,7 +5953,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6138,17 +5963,17 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", - "sp-tracing 6.0.0", + "sp-tracing", ] [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6156,30 +5981,33 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", + "pallet-authorship", "pallet-session", "parity-scale-codec", "scale-info", "serde", - "sp-beefy", - "sp-runtime 7.0.0", + "sp-consensus-beefy", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std 5.0.0", ] [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "binary-merkle-tree", @@ -6193,17 +6021,17 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-beefy", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-consensus-beefy", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6212,9 +6040,9 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] @@ -6235,10 +6063,10 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-beefy", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-consensus-beefy", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] @@ -6256,12 +6084,12 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-consensus-grandpa", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", ] [[package]] @@ -6279,9 +6107,9 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] @@ -6301,11 +6129,11 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", ] [[package]] @@ -6323,17 +6151,17 @@ dependencies = [ "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6343,16 +6171,16 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6360,33 +6188,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", -] - -[[package]] -name = "pallet-conviction-voting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "assert_matches", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6395,16 +6206,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6415,11 +6226,11 @@ dependencies = [ "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", "sp-npos-elections", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", "strum", ] @@ -6427,20 +6238,20 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime 7.0.0", + "sp-runtime", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6448,17 +6259,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", + "sp-core", + "sp-io", "sp-npos-elections", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6467,8 +6278,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-staking", "sp-std 5.0.0", ] @@ -6476,7 +6287,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6486,11 +6297,11 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 7.0.0", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-application-crypto", + "sp-consensus-grandpa", + "sp-core", + "sp-io", + "sp-runtime", "sp-session", "sp-staking", "sp-std 5.0.0", @@ -6499,7 +6310,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6507,15 +6318,15 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6524,10 +6335,10 @@ dependencies = [ "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto 7.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", "sp-staking", "sp-std 5.0.0", ] @@ -6535,24 +6346,24 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", + "sp-core", + "sp-io", "sp-keyring", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6560,33 +6371,33 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", + "sp-core", + "sp-io", "sp-mmr-primitives", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6594,40 +6405,24 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", -] - -[[package]] -name = "pallet-nis" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-staking", "sp-std 5.0.0", ] @@ -6635,8 +6430,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ + "pallet-nomination-pools", "parity-scale-codec", "sp-api", "sp-std 5.0.0", @@ -6645,7 +6441,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", @@ -6654,7 +6450,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime 7.0.0", + "sp-runtime", "sp-staking", "sp-std 5.0.0", ] @@ -6662,7 +6458,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6670,219 +6466,149 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] -name = "pallet-randomness-collective-flip" +name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", - "safe-mix", "scale-info", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", + "sp-weights", ] [[package]] -name = "pallet-ranked-collective" +name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", "sp-std 5.0.0", + "sp-trie", ] [[package]] -name = "pallet-recovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +name = "pallet-shift-session-manager" +version = "0.1.0" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", + "pallet-session", "parity-scale-codec", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", + "sp-staking", "sp-std 5.0.0", ] [[package]] -name = "pallet-referenda" +name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", + "frame-election-provider-support", "frame-support", "frame-system", "log", + "pallet-authorship", + "pallet-session", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 6.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", "sp-std 5.0.0", ] [[package]] -name = "pallet-scheduler" +name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", - "sp-weights 4.0.0", + "proc-macro-crate", + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.109", ] [[package]] -name = "pallet-session" +name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", "log", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-session", - "sp-staking", - "sp-std 5.0.0", - "sp-trie 7.0.0", -] - -[[package]] -name = "pallet-shift-session-manager" -version = "0.1.0" -dependencies = [ - "frame-support", - "frame-system", - "pallet-session", - "parity-scale-codec", - "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-staking", - "sp-std 5.0.0", -] - -[[package]] -name = "pallet-society" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "rand_chacha 0.2.2", - "scale-info", - "sp-runtime 7.0.0", - "sp-std 5.0.0", + "sp-arithmetic", ] [[package]] -name = "pallet-staking" +name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log", - "pallet-authorship", - "pallet-session", "parity-scale-codec", - "scale-info", - "serde", - "sp-application-crypto 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", - "sp-staking", - "sp-std 5.0.0", -] - -[[package]] -name = "pallet-staking-reward-curve" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.107", -] - -[[package]] -name = "pallet-staking-reward-fn" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "log", - "sp-arithmetic 6.0.0", + "sp-api", ] [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6891,8 +6617,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-inherents", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-runtime", "sp-std 5.0.0", "sp-timestamp", ] @@ -6900,7 +6626,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6910,60 +6636,60 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", "sp-blockchain", - "sp-core 7.0.0", + "sp-core", "sp-rpc", - "sp-runtime 7.0.0", - "sp-weights 4.0.0", + "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", - "sp-runtime 7.0.0", - "sp-weights 4.0.0", + "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -6973,30 +6699,30 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-benchmarking", "frame-support", @@ -7004,30 +6730,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 7.0.0", - "sp-std 5.0.0", -] - -[[package]] -name = "pallet-whitelist" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "pallet-xcm" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ + "bounded-collections", "frame-benchmarking", "frame-support", "frame-system", @@ -7035,9 +6747,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", "xcm", "xcm-executor", @@ -7046,7 +6758,7 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=master#445f9277ab55b4d930ced4fbbb38d27c617c6658" +source = "git+https://github.com/paritytech/cumulus?branch=master#836f13e24c74fcc0fe70eeeffd88214c88bf2316" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -7061,21 +6773,20 @@ version = "0.1.0" dependencies = [ "async-std", "async-trait", - "bp-parachains", "bp-polkadot-core", "futures", "log", "parity-scale-codec", "relay-substrate-client", "relay-utils", - "sp-core 7.0.0", + "sp-core", ] [[package]] name = "parity-db" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd684a725651d9588ef21f140a328b6b4f64e646b2e931f3e6f14f75eedf9980" +checksum = "df89dd8311063c54ae4e03d9aeb597b04212a57e82c339344130a9cad9b3e2d9" dependencies = [ "blake2", "crc32fast", @@ -7087,14 +6798,15 @@ dependencies = [ "memmap2", "parking_lot 0.12.1", "rand 0.8.5", + "siphasher", "snap", ] [[package]] name = "parity-scale-codec" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3840933452adf7b3b9145e27086a5a3376c619dca1a21b1e5a5af0d54979bed" +checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -7114,7 +6826,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -7148,7 +6860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ "proc-macro2 1.0.51", - "syn 1.0.107", + "syn 1.0.109", "synstructure", ] @@ -7296,7 +7008,7 @@ dependencies = [ "pest_meta", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -7337,7 +7049,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -7389,7 +7101,7 @@ checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] name = "polkadot-approval-distribution" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "polkadot-node-metrics", @@ -7404,7 +7116,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -7418,7 +7130,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "derive_more", "fatality", @@ -7432,8 +7144,8 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", - "sp-core 7.0.0", - "sp-keystore 0.13.0", + "sp-core", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -7441,7 +7153,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "fatality", "futures", @@ -7462,16 +7174,15 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "frame-benchmarking-cli", "futures", "log", "polkadot-client", "polkadot-node-core-pvf", "polkadot-node-metrics", - "polkadot-performance-test", "polkadot-service", "sc-cli", "sc-executor", @@ -7479,8 +7190,8 @@ dependencies = [ "sc-storage-monitor", "sc-sysinfo", "sc-tracing", - "sp-core 7.0.0", - "sp-io 7.0.0", + "sp-core", + "sp-io", "sp-keyring", "substrate-build-script-utils", "thiserror", @@ -7490,7 +7201,7 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "async-trait", "frame-benchmarking", @@ -7511,20 +7222,20 @@ dependencies = [ "sc-service", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-core 7.0.0", - "sp-finality-grandpa", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", "sp-inherents", "sp-keyring", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", - "sp-storage 7.0.0", + "sp-storage", "sp-timestamp", "sp-transaction-pool", ] @@ -7532,7 +7243,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "always-assert", "bitvec", @@ -7544,9 +7255,9 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core 7.0.0", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-keystore", + "sp-runtime", "thiserror", "tracing-gum", ] @@ -7554,19 +7265,19 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "polkadot-dispute-distribution" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "derive_more", "fatality", @@ -7582,8 +7293,8 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "sc-network", - "sp-application-crypto 7.0.0", - "sp-keystore 0.13.0", + "sp-application-crypto", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -7591,21 +7302,21 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", "polkadot-primitives", "reed-solomon-novelpoly", - "sp-core 7.0.0", - "sp-trie 7.0.0", + "sp-core", + "sp-trie", "thiserror", ] [[package]] name = "polkadot-gossip-support" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "futures-timer", @@ -7616,16 +7327,16 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", - "sp-application-crypto 7.0.0", - "sp-core 7.0.0", - "sp-keystore 0.13.0", + "sp-application-crypto", + "sp-core", + "sp-keystore", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "always-assert", "async-trait", @@ -7649,7 +7360,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "parity-scale-codec", @@ -7658,7 +7369,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core 7.0.0", + "sp-core", "sp-maybe-compressed-blob", "thiserror", "tracing-gum", @@ -7667,7 +7378,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bitvec", "derive_more", @@ -7685,10 +7396,10 @@ dependencies = [ "polkadot-primitives", "sc-keystore", "schnorrkel", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-consensus", "sp-consensus-slots", - "sp-runtime 7.0.0", + "sp-runtime", "thiserror", "tracing-gum", ] @@ -7696,7 +7407,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bitvec", "futures", @@ -7709,6 +7420,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", + "sp-consensus", "thiserror", "tracing-gum", ] @@ -7716,7 +7428,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bitvec", "fatality", @@ -7727,7 +7439,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-statement-table", - "sp-keystore 0.13.0", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -7735,13 +7447,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore 0.13.0", + "sp-keystore", "thiserror", "tracing-gum", "wasm-timer", @@ -7750,7 +7462,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "async-trait", "futures", @@ -7760,6 +7472,7 @@ dependencies = [ "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-util", "polkadot-parachain", "polkadot-primitives", "sp-maybe-compressed-blob", @@ -7769,7 +7482,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "polkadot-node-metrics", @@ -7784,7 +7497,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "futures-timer", @@ -7801,7 +7514,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "fatality", "futures", @@ -7820,7 +7533,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "async-trait", "futures", @@ -7837,7 +7550,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bitvec", "fatality", @@ -7855,7 +7568,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "always-assert", "assert_matches", @@ -7867,19 +7580,21 @@ dependencies = [ "pin-project", "polkadot-core-primitives", "polkadot-node-metrics", + "polkadot-node-primitives", "polkadot-parachain", + "polkadot-primitives", "rand 0.8.5", "rayon", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", "slotmap", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "sp-io 7.0.0", + "sp-core", + "sp-externalities", + "sp-io", "sp-maybe-compressed-blob", - "sp-tracing 6.0.0", - "sp-wasm-interface 7.0.0", + "sp-tracing", + "sp-wasm-interface", "tempfile", "tikv-jemalloc-ctl", "tokio", @@ -7889,7 +7604,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "polkadot-node-primitives", @@ -7897,7 +7612,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "sp-keystore 0.13.0", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -7905,7 +7620,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "futures", "lru 0.9.0", @@ -7920,7 +7635,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "lazy_static", "log", @@ -7930,7 +7645,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "sc-network", - "sp-core 7.0.0", + "sp-core", "thiserror", "tokio", ] @@ -7938,7 +7653,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bs58", "futures", @@ -7957,7 +7672,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "async-trait", "derive_more", @@ -7980,7 +7695,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bounded-vec", "futures", @@ -7989,12 +7704,13 @@ dependencies = [ "polkadot-primitives", "schnorrkel", "serde", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-consensus-babe", "sp-consensus-vrf", - "sp-core 7.0.0", - "sp-keystore 0.13.0", + "sp-core", + "sp-keystore", "sp-maybe-compressed-blob", + "sp-runtime", "thiserror", "zstd", ] @@ -8002,7 +7718,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8012,7 +7728,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "async-trait", "derive_more", @@ -8035,7 +7751,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "async-trait", "derive_more", @@ -8058,9 +7774,9 @@ dependencies = [ "polkadot-primitives", "prioritized-metered-channel", "rand 0.8.5", - "sp-application-crypto 7.0.0", - "sp-core 7.0.0", - "sp-keystore 0.13.0", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror", "tracing-gum", ] @@ -8068,7 +7784,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "async-trait", "futures", @@ -8083,7 +7799,7 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sp-api", - "sp-core 7.0.0", + "sp-core", "tikv-jemalloc-ctl", "tracing-gum", ] @@ -8091,38 +7807,24 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ + "bounded-collections", "derive_more", "frame-support", "parity-scale-codec", "polkadot-core-primitives", "scale-info", "serde", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] -[[package]] -name = "polkadot-performance-test" -version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" -dependencies = [ - "env_logger 0.9.3", - "kusama-runtime", - "log", - "polkadot-erasure-coding", - "polkadot-node-core-pvf", - "polkadot-node-primitives", - "quote 1.0.23", - "thiserror", -] - [[package]] name = "polkadot-primitives" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bitvec", "hex-literal", @@ -8132,15 +7834,15 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 7.0.0", - "sp-arithmetic 6.0.0", + "sp-application-crypto", + "sp-arithmetic", "sp-authority-discovery", "sp-consensus-slots", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-io 7.0.0", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-keystore", + "sp-runtime", "sp-staking", "sp-std 5.0.0", ] @@ -8148,10 +7850,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ - "beefy-gadget", - "beefy-gadget-rpc", "jsonrpsee", "mmr-rpc", "pallet-transaction-payment-rpc", @@ -8160,9 +7860,11 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-babe-rpc", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", "sc-consensus-epochs", - "sc-finality-grandpa", - "sc-finality-grandpa-rpc", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", @@ -8171,8 +7873,8 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-keystore", + "sp-runtime", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] @@ -8180,7 +7882,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bitvec", "frame-election-provider-support", @@ -8217,6 +7919,7 @@ dependencies = [ "pallet-session", "pallet-staking", "pallet-staking-reward-curve", + "pallet-staking-runtime-api", "pallet-timestamp", "pallet-tips", "pallet-transaction-payment", @@ -8237,16 +7940,16 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", - "sp-core 7.0.0", + "sp-consensus-beefy", + "sp-core", "sp-inherents", - "sp-io 7.0.0", + "sp-io", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", "sp-staking", "sp-std 5.0.0", @@ -8262,7 +7965,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bitvec", "frame-election-provider-support", @@ -8272,9 +7975,7 @@ dependencies = [ "libsecp256k1", "log", "pallet-authorship", - "pallet-bags-list", "pallet-balances", - "pallet-beefy-mmr", "pallet-election-provider-multi-phase", "pallet-fast-unstake", "pallet-session", @@ -8293,12 +7994,11 @@ dependencies = [ "serde_derive", "slot-range-helper", "sp-api", - "sp-beefy", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-io 7.0.0", + "sp-io", "sp-npos-elections", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", "sp-staking", "sp-std 5.0.0", @@ -8309,33 +8009,33 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-weights 4.0.0", + "sp-core", + "sp-runtime", + "sp-weights", ] [[package]] name = "polkadot-runtime-metrics" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bs58", "parity-scale-codec", "polkadot-primitives", "sp-std 5.0.0", - "sp-tracing 6.0.0", + "sp-tracing", ] [[package]] name = "polkadot-runtime-parachains" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "bitflags", "bitvec", @@ -8352,6 +8052,7 @@ dependencies = [ "pallet-timestamp", "pallet-vesting", "parity-scale-codec", + "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-metrics", "rand 0.8.5", @@ -8360,11 +8061,11 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-io 7.0.0", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-io", + "sp-keystore", + "sp-runtime", "sp-session", "sp-staking", "sp-std 5.0.0", @@ -8375,10 +8076,9 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "async-trait", - "beefy-gadget", "frame-benchmarking-cli", "frame-support", "frame-system-rpc-runtime-api", @@ -8437,12 +8137,14 @@ dependencies = [ "sc-client-db", "sc-consensus", "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", "sc-consensus-slots", "sc-executor", - "sc-finality-grandpa", "sc-keystore", "sc-network", "sc-network-common", + "sc-network-sync", "sc-offchain", "sc-service", "sc-sync-state-rpc", @@ -8453,25 +8155,25 @@ dependencies = [ "serde_json", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-core 7.0.0", - "sp-finality-grandpa", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", "sp-inherents", - "sp-io 7.0.0", - "sp-keystore 0.13.0", + "sp-io", + "sp-keystore", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", - "sp-state-machine 0.13.0", - "sp-storage 7.0.0", + "sp-state-machine", + "sp-storage", "sp-timestamp", "sp-transaction-pool", - "sp-trie 7.0.0", + "sp-trie", "substrate-prometheus-endpoint", "thiserror", "tracing-gum", @@ -8480,7 +8182,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8492,7 +8194,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-keystore 0.13.0", + "sp-keystore", "sp-staking", "thiserror", "tracing-gum", @@ -8501,11 +8203,11 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "parity-scale-codec", "polkadot-primitives", - "sp-core 7.0.0", + "sp-core", ] [[package]] @@ -8599,7 +8301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" dependencies = [ "proc-macro2 1.0.51", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -8634,9 +8336,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", "toml_edit", @@ -8651,7 +8353,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "version_check", ] @@ -8718,7 +8420,7 @@ checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -8748,7 +8450,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 1.0.107", + "syn 1.0.109", "tempfile", "which", ] @@ -8776,7 +8478,7 @@ dependencies = [ "itertools", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -9060,14 +8762,14 @@ checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "regalloc2" -version = "0.3.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ "fxhash", "log", @@ -9101,6 +8803,18 @@ version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +[[package]] +name = "region" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" +dependencies = [ + "bitflags", + "libc", + "mach", + "winapi", +] + [[package]] name = "relay-bridge-hub-rococo-client" version = "0.1.0" @@ -9116,8 +8830,8 @@ dependencies = [ "parity-scale-codec", "relay-substrate-client", "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", ] [[package]] @@ -9136,9 +8850,9 @@ dependencies = [ "parity-scale-codec", "relay-substrate-client", "scale-info", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-runtime 7.0.0", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", ] [[package]] @@ -9149,7 +8863,7 @@ dependencies = [ "bp-runtime", "relay-substrate-client", "relay-utils", - "sp-core 7.0.0", + "sp-core", ] [[package]] @@ -9166,8 +8880,8 @@ dependencies = [ "parity-scale-codec", "relay-substrate-client", "relay-utils", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", ] [[package]] @@ -9178,7 +8892,7 @@ dependencies = [ "bp-runtime", "relay-substrate-client", "relay-utils", - "sp-core 7.0.0", + "sp-core", ] [[package]] @@ -9195,8 +8909,8 @@ dependencies = [ "relay-substrate-client", "relay-utils", "rialto-runtime", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", ] [[package]] @@ -9213,9 +8927,9 @@ dependencies = [ "parity-scale-codec", "relay-substrate-client", "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-weights 4.0.0", + "sp-core", + "sp-runtime", + "sp-weights", "subxt", ] @@ -9227,7 +8941,7 @@ dependencies = [ "bp-runtime", "relay-substrate-client", "relay-utils", - "sp-core 7.0.0", + "sp-core", ] [[package]] @@ -9259,11 +8973,11 @@ dependencies = [ "sc-rpc-api", "sc-transaction-pool-api", "scale-info", - "sp-core 7.0.0", + "sp-core", "sp-rpc", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", "sp-version", "thiserror", "tokio", @@ -9280,14 +8994,14 @@ dependencies = [ "async-trait", "backoff", "bp-runtime", - "env_logger 0.10.0", + "env_logger", "futures", "isahc", "jsonpath_lib", "log", "num-traits", "serde_json", - "sp-runtime 7.0.0", + "sp-runtime", "substrate-prometheus-endpoint", "sysinfo", "thiserror", @@ -9303,7 +9017,7 @@ dependencies = [ "bp-westend", "relay-substrate-client", "relay-utils", - "sp-core 7.0.0", + "sp-core", ] [[package]] @@ -9314,7 +9028,7 @@ dependencies = [ "bp-wococo", "relay-substrate-client", "relay-utils", - "sp-core 7.0.0", + "sp-core", ] [[package]] @@ -9342,7 +9056,7 @@ dependencies = [ name = "rialto-bridge-node" version = "0.1.0" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "frame-benchmarking", "frame-benchmarking-cli", "frame-support", @@ -9357,11 +9071,11 @@ dependencies = [ "sc-service", "serde_json", "sp-authority-discovery", - "sp-beefy", "sp-consensus-babe", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-runtime 7.0.0", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", "substrate-build-script-utils", ] @@ -9369,7 +9083,7 @@ dependencies = [ name = "rialto-parachain-collator" version = "0.1.0" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", "cumulus-client-cli", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", @@ -9395,6 +9109,7 @@ dependencies = [ "sc-consensus", "sc-executor", "sc-network", + "sc-network-sync", "sc-rpc", "sc-rpc-api", "sc-service", @@ -9405,10 +9120,10 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 7.0.0", - "sp-keystore 0.13.0", + "sp-core", + "sp-keystore", "sp-offchain", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", "sp-timestamp", "sp-transaction-pool", @@ -9446,7 +9161,6 @@ dependencies = [ "pallet-bridge-grandpa", "pallet-bridge-messages", "pallet-bridge-relayers", - "pallet-randomness-collective-flip", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", @@ -9459,11 +9173,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-io 7.0.0", + "sp-io", "sp-offchain", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", "sp-std 5.0.0", "sp-transaction-pool", @@ -9484,7 +9198,7 @@ dependencies = [ "bp-rialto", "bp-runtime", "bridge-runtime-common", - "env_logger 0.10.0", + "env_logger", "frame-benchmarking", "frame-executive", "frame-support", @@ -9515,14 +9229,14 @@ dependencies = [ "scale-info", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", - "sp-core 7.0.0", + "sp-consensus-beefy", + "sp-core", "sp-inherents", - "sp-io 7.0.0", + "sp-io", "sp-offchain", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", "sp-std 5.0.0", "sp-transaction-pool", @@ -9601,7 +9315,7 @@ dependencies = [ "log", "netlink-packet-route", "netlink-proto", - "nix 0.24.3", + "nix", "thiserror", "tokio", ] @@ -9648,15 +9362,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" @@ -9772,15 +9477,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" -[[package]] -name = "safe-mix" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" -dependencies = [ - "rustc_version 0.2.3", -] - [[package]] name = "safe_arch" version = "0.6.0" @@ -9802,18 +9498,18 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "log", - "sp-core 7.0.0", - "sp-wasm-interface 7.0.0", + "sp-core", + "sp-wasm-interface", "thiserror", ] [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures", @@ -9830,9 +9526,9 @@ dependencies = [ "sp-api", "sp-authority-discovery", "sp-blockchain", - "sp-core 7.0.0", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -9840,7 +9536,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "futures", "futures-timer", @@ -9854,62 +9550,65 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-runtime 7.0.0", + "sp-runtime", "substrate-prometheus-endpoint", ] [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-runtime", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "memmap2", "sc-chain-spec-derive", + "sc-client-api", + "sc-executor", "sc-network-common", "sc-telemetry", "serde", "serde_json", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-state-machine", ] [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "chrono", - "clap 4.1.6", + "clap 4.1.8", "fdlimit", "futures", "libp2p", @@ -9931,11 +9630,11 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 7.0.0", + "sp-core", "sp-keyring", - "sp-keystore 0.13.0", - "sp-panic-handler 5.0.0", - "sp-runtime 7.0.0", + "sp-keystore", + "sp-panic-handler", + "sp-runtime", "sp-version", "thiserror", "tiny-bip39", @@ -9945,7 +9644,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "fnv", "futures", @@ -9958,20 +9657,20 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", + "sp-core", "sp-database", - "sp-externalities 0.13.0", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", - "sp-storage 7.0.0", + "sp-externalities", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-storage", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "hash-db", "kvdb", @@ -9985,19 +9684,19 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", - "sp-core 7.0.0", + "sp-core", "sp-database", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", - "sp-trie 7.0.0", + "sp-runtime", + "sp-state-machine", + "sp-trie", ] [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures", @@ -10012,9 +9711,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-core", + "sp-runtime", + "sp-state-machine", "substrate-prometheus-endpoint", "thiserror", ] @@ -10022,7 +9721,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures", @@ -10034,16 +9733,16 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sp-api", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -10051,7 +9750,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "fork-tree", @@ -10072,17 +9771,17 @@ dependencies = [ "scale-info", "schnorrkel", "sp-api", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", "sp-consensus-vrf", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -10090,7 +9789,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "futures", "jsonrpsee", @@ -10099,33 +9798,147 @@ dependencies = [ "sc-rpc-api", "serde", "sp-api", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-core 7.0.0", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-keystore", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "sc-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" +dependencies = [ + "array-bytes 4.2.0", + "async-trait", + "fnv", + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-consensus", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-network-sync", + "sc-utils", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-beefy", + "sp-core", + "sp-keystore", + "sp-mmr-primitives", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", + "wasm-timer", +] + +[[package]] +name = "sc-consensus-beefy-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" +dependencies = [ + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-consensus-beefy", + "sc-rpc", + "serde", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", "thiserror", ] [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" +dependencies = [ + "fork-tree", + "parity-scale-codec", + "sc-client-api", + "sc-consensus", + "sp-blockchain", + "sp-runtime", +] + +[[package]] +name = "sc-consensus-grandpa" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ + "ahash 0.8.3", + "array-bytes 4.2.0", + "async-trait", + "dyn-clone", + "finality-grandpa", "fork-tree", + "futures", + "futures-timer", + "log", "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", "sc-client-api", "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-telemetry", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-grandpa-rpc" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" +dependencies = [ + "finality-grandpa", + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus-grandpa", + "sc-rpc", + "serde", "sp-blockchain", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", + "thiserror", ] [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures", @@ -10135,20 +9948,20 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-runtime", + "sp-state-machine", ] [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -10157,14 +9970,14 @@ dependencies = [ "sc-executor-wasmi", "sc-executor-wasmtime", "sp-api", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "sp-io 7.0.0", - "sp-panic-handler 5.0.0", - "sp-runtime-interface 7.0.0", - "sp-trie 7.0.0", + "sp-core", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", + "sp-trie", "sp-version", - "sp-wasm-interface 7.0.0", + "sp-wasm-interface", "tracing", "wasmi", ] @@ -10172,11 +9985,11 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 7.0.0", + "sp-wasm-interface", "thiserror", "wasm-instrument", "wasmi", @@ -10185,132 +9998,73 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "log", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 7.0.0", - "sp-wasm-interface 7.0.0", + "sp-runtime-interface", + "sp-wasm-interface", "wasmi", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ + "anyhow", "cfg-if 1.0.0", "libc", "log", "once_cell", - "rustix 0.35.13", + "rustix 0.36.8", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 7.0.0", - "sp-wasm-interface 7.0.0", + "sp-runtime-interface", + "sp-wasm-interface", "wasmtime", ] [[package]] -name = "sc-finality-grandpa" +name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "ahash 0.8.3", - "array-bytes 4.2.0", - "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", + "ansi_term", "futures", "futures-timer", "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", "sc-client-api", - "sc-consensus", - "sc-network", "sc-network-common", - "sc-network-gossip", - "sc-telemetry", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto 7.0.0", - "sp-arithmetic 6.0.0", "sp-blockchain", - "sp-consensus", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-finality-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "finality-grandpa", - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-finality-grandpa", - "sc-rpc", - "serde", - "sp-blockchain", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "thiserror", -] - -[[package]] -name = "sc-informant" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "ansi_term", - "futures", - "futures-timer", - "log", - "sc-client-api", - "sc-network-common", - "sp-blockchain", - "sp-runtime 7.0.0", + "sp-runtime", ] [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "async-trait", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto 7.0.0", - "sp-core 7.0.0", - "sp-keystore 0.13.0", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror", ] [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", + "async-channel", "async-trait", "asynchronous-codec", - "backtrace", "bytes", "either", "fnv", @@ -10320,6 +10074,7 @@ dependencies = [ "libp2p", "log", "lru 0.8.1", + "mockall", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", @@ -10333,11 +10088,11 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", @@ -10347,7 +10102,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "cid", "futures", @@ -10358,7 +10113,7 @@ dependencies = [ "sc-client-api", "sc-network-common", "sp-blockchain", - "sp-runtime 7.0.0", + "sp-runtime", "thiserror", "unsigned-varint", ] @@ -10366,8 +10121,9 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ + "array-bytes 4.2.0", "async-trait", "bitflags", "bytes", @@ -10379,20 +10135,22 @@ dependencies = [ "prost-build", "sc-consensus", "sc-peerset", + "sc-utils", "serde", "smallvec", "sp-blockchain", "sp-consensus", - "sp-finality-grandpa", - "sp-runtime 7.0.0", + "sp-consensus-grandpa", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "ahash 0.8.3", "futures", @@ -10402,7 +10160,7 @@ dependencies = [ "lru 0.8.1", "sc-network-common", "sc-peerset", - "sp-runtime 7.0.0", + "sp-runtime", "substrate-prometheus-endpoint", "tracing", ] @@ -10410,7 +10168,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10423,20 +10181,21 @@ dependencies = [ "sc-network-common", "sc-peerset", "sp-blockchain", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "thiserror", ] [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "async-trait", "fork-tree", "futures", + "futures-timer", "libp2p", "log", "lru 0.8.1", @@ -10450,12 +10209,12 @@ dependencies = [ "sc-peerset", "sc-utils", "smallvec", - "sp-arithmetic 6.0.0", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-runtime 7.0.0", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -10463,7 +10222,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10475,14 +10234,14 @@ dependencies = [ "sc-peerset", "sc-utils", "sp-consensus", - "sp-runtime 7.0.0", + "sp-runtime", "substrate-prometheus-endpoint", ] [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10502,9 +10261,9 @@ dependencies = [ "sc-peerset", "sc-utils", "sp-api", - "sp-core 7.0.0", + "sp-core", "sp-offchain", - "sp-runtime 7.0.0", + "sp-runtime", "threadpool", "tracing", ] @@ -10512,7 +10271,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "futures", "libp2p", @@ -10525,7 +10284,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10534,7 +10293,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "futures", "jsonrpsee", @@ -10551,11 +10310,11 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core 7.0.0", - "sp-keystore 0.13.0", + "sp-core", + "sp-keystore", "sp-offchain", "sp-rpc", - "sp-runtime 7.0.0", + "sp-runtime", "sp-session", "sp-version", "tokio", @@ -10564,7 +10323,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10573,9 +10332,9 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 7.0.0", + "sp-core", "sp-rpc", - "sp-runtime 7.0.0", + "sp-runtime", "sp-version", "thiserror", ] @@ -10583,7 +10342,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "http", "jsonrpsee", @@ -10598,7 +10357,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10614,8 +10373,8 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-version", "thiserror", "tokio-stream", @@ -10624,7 +10383,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "directories", @@ -10667,16 +10426,16 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime", "sp-session", - "sp-state-machine 0.13.0", - "sp-storage 7.0.0", + "sp-state-machine", + "sp-storage", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 7.0.0", + "sp-trie", "sp-version", "static_init 1.0.3", "substrate-prometheus-endpoint", @@ -10690,26 +10449,26 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 7.0.0", + "sp-core", ] [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "clap 4.1.6", + "clap 4.1.8", + "fs4", "futures", "log", - "nix 0.26.2", "sc-client-db", "sc-utils", - "sp-core 7.0.0", + "sp-core", "thiserror", "tokio", ] @@ -10717,7 +10476,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10725,18 +10484,18 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", - "sc-finality-grandpa", + "sc-consensus-grandpa", "serde", "serde_json", "sp-blockchain", - "sp-runtime 7.0.0", + "sp-runtime", "thiserror", ] [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "futures", "libc", @@ -10747,15 +10506,15 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core 7.0.0", - "sp-io 7.0.0", + "sp-core", + "sp-io", "sp-std 5.0.0", ] [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "chrono", "futures", @@ -10774,7 +10533,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "ansi_term", "atty", @@ -10792,10 +10551,10 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core 7.0.0", + "sp-core", "sp-rpc", - "sp-runtime 7.0.0", - "sp-tracing 6.0.0", + "sp-runtime", + "sp-tracing", "thiserror", "tracing", "tracing-log", @@ -10805,18 +10564,18 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures", @@ -10832,9 +10591,9 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-tracing 6.0.0", + "sp-core", + "sp-runtime", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -10843,29 +10602,30 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures", "log", "serde", "sp-blockchain", - "sp-runtime 7.0.0", + "sp-runtime", "thiserror", ] [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "backtrace", + "async-channel", "futures", "futures-timer", "lazy_static", "log", "parking_lot 0.12.1", "prometheus", + "sp-arithmetic", ] [[package]] @@ -10914,7 +10674,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -11089,15 +10849,6 @@ dependencies = [ "semver-parser", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.16" @@ -11115,29 +10866,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ "indexmap", "itoa", @@ -11273,6 +11024,12 @@ dependencies = [ "wide", ] +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + [[package]] name = "slab" version = "0.4.7" @@ -11291,12 +11048,12 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] @@ -11344,7 +11101,7 @@ dependencies = [ "curve25519-dalek 4.0.0-rc.0", "rand_core 0.6.4", "ring", - "rustc_version 0.4.0", + "rustc_version", "sha2 0.10.6", "subtle", ] @@ -11379,17 +11136,17 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "hash-db", "log", "parity-scale-codec", "sp-api-proc-macro", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-core", + "sp-runtime", + "sp-state-machine", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", "sp-version", "thiserror", ] @@ -11397,46 +11154,32 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "blake2", "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-io 7.0.0", + "sp-core", + "sp-io", "sp-std 5.0.0", ] -[[package]] -name = "sp-application-crypto" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a72575f160b1b134ee277a2ab46af4361c072a3fe661c48e474255406cb01c97" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 11.0.0", - "sp-io 12.0.0", - "sp-std 6.0.0", -] - [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "integer-sqrt", "num-traits", @@ -11447,69 +11190,35 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-arithmetic" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2038010f7514d50775dcbd3edb569e17fa9bda63128580a9e172abb1795f2c1d" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-std 6.0.0", - "static_assertions", -] - [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-application-crypto 7.0.0", - "sp-runtime 7.0.0", - "sp-std 5.0.0", -] - -[[package]] -name = "sp-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "lazy_static", "parity-scale-codec", "scale-info", - "serde", "sp-api", - "sp-application-crypto 7.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-mmr-primitives", - "sp-runtime 7.0.0", + "sp-application-crypto", + "sp-runtime", "sp-std 5.0.0", - "strum", ] [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "sp-api", "sp-inherents", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "futures", "log", @@ -11519,43 +11228,40 @@ dependencies = [ "sp-api", "sp-consensus", "sp-database", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-runtime", + "sp-state-machine", "thiserror", ] [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", - "sp-std 5.0.0", - "sp-version", + "sp-runtime", + "sp-state-machine", "thiserror", ] [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-consensus", "sp-consensus-slots", "sp-inherents", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", "sp-timestamp", ] @@ -11563,7 +11269,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "merlin", @@ -11571,22 +11277,59 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 7.0.0", + "sp-application-crypto", "sp-consensus", "sp-consensus-slots", "sp-consensus-vrf", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", + "sp-keystore", + "sp-runtime", "sp-std 5.0.0", "sp-timestamp", ] +[[package]] +name = "sp-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" +dependencies = [ + "lazy_static", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std 5.0.0", + "strum", +] + +[[package]] +name = "sp-consensus-grandpa" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" +dependencies = [ + "finality-grandpa", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-std 5.0.0", +] + [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "scale-info", @@ -11598,20 +11341,20 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "scale-info", "schnorrkel", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "array-bytes 4.2.0", "base58", @@ -11639,54 +11382,11 @@ dependencies = [ "secrecy", "serde", "sp-core-hashing 5.0.0", - "sp-debug-derive 5.0.0", - "sp-externalities 0.13.0", - "sp-runtime-interface 7.0.0", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", "sp-std 5.0.0", - "sp-storage 7.0.0", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tiny-bip39", - "zeroize", -] - -[[package]] -name = "sp-core" -version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d99984f57c9eb858d29fbe0e4cf44092eec484b2ff72176d5afa4ab7bf1dc8b1" -dependencies = [ - "array-bytes 4.2.0", - "base58", - "bitflags", - "blake2", - "dyn-clonable", - "ed25519-zebra", - "futures", - "hash-db", - "hash256-std-hasher", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log", - "merlin", - "parity-scale-codec", - "parking_lot 0.12.1", - "primitive-types", - "rand 0.8.5", - "regex", - "scale-info", - "schnorrkel", - "secp256k1", - "secrecy", - "serde", - "sp-core-hashing 6.0.0", - "sp-debug-derive 6.0.0", - "sp-externalities 0.15.0", - "sp-runtime-interface 10.0.0", - "sp-std 6.0.0", - "sp-storage 9.0.0", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -11697,9 +11397,9 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.6", "sha2 0.10.6", @@ -11710,34 +11410,34 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc2d1947252b7a4e403b0a260f596920443742791765ec111daa2bbf98eff25" +checksum = "d607f7209b1b9571177fc3722a03312df03606bb65f89317ba686d5fa59d438f" dependencies = [ "blake2", "byteorder", "digest 0.10.6", "sha2 0.10.6", "sha3", - "sp-std 6.0.0", + "sp-std 7.0.0", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", "sp-core-hashing 5.0.0", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11746,76 +11446,35 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", -] - -[[package]] -name = "sp-debug-derive" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fb9dc63d54de7d7bed62a505b6e0bd66c122525ea1abb348f6564717c3df2d" -dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std 5.0.0", - "sp-storage 7.0.0", -] - -[[package]] -name = "sp-externalities" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc754e1cec66b93df0b48a8986d019c1a2a90431c42cf2614cc35a291597c329" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 6.0.0", - "sp-storage 9.0.0", -] - -[[package]] -name = "sp-finality-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "finality-grandpa", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto 7.0.0", - "sp-core 7.0.0", - "sp-keystore 0.13.0", - "sp-runtime 7.0.0", "sp-std 5.0.0", + "sp-storage", ] [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", "thiserror", ] @@ -11823,7 +11482,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "bytes", "ed25519", @@ -11833,40 +11492,14 @@ dependencies = [ "log", "parity-scale-codec", "secp256k1", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "sp-keystore 0.13.0", - "sp-runtime-interface 7.0.0", - "sp-state-machine 0.13.0", - "sp-std 5.0.0", - "sp-tracing 6.0.0", - "sp-trie 7.0.0", - "tracing", - "tracing-core", -] - -[[package]] -name = "sp-io" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ac917b37c7733e3778e7ffc3958f1181a151ac3b14116d65fb10fe7b08db10e" -dependencies = [ - "bytes", - "ed25519", - "ed25519-dalek", - "futures", - "libsecp256k1", - "log", - "parity-scale-codec", - "secp256k1", - "sp-core 11.0.0", - "sp-externalities 0.15.0", - "sp-keystore 0.17.0", - "sp-runtime-interface 10.0.0", - "sp-state-machine 0.17.0", - "sp-std 6.0.0", - "sp-tracing 7.0.0", - "sp-trie 11.0.0", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std 5.0.0", + "sp-tracing", + "sp-trie", "tracing", "tracing-core", ] @@ -11874,18 +11507,18 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "lazy_static", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "strum", ] [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures", @@ -11894,32 +11527,15 @@ dependencies = [ "parking_lot 0.12.1", "schnorrkel", "serde", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "thiserror", -] - -[[package]] -name = "sp-keystore" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ada8b7a72404bda58b3353830bc42f027ec764e13a28b4cd4386cf34fb1ae7c" -dependencies = [ - "async-trait", - "futures", - "merlin", - "parity-scale-codec", - "parking_lot 0.12.1", - "schnorrkel", - "sp-core 11.0.0", - "sp-externalities 0.15.0", + "sp-core", + "sp-externalities", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "thiserror", "zstd", @@ -11928,7 +11544,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "ckb-merkle-mountain-range 0.5.2", "log", @@ -11936,9 +11552,9 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-core 7.0.0", - "sp-debug-derive 5.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-debug-derive", + "sp-runtime", "sp-std 5.0.0", "thiserror", ] @@ -11946,42 +11562,31 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-arithmetic", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "sp-api", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", ] [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" -dependencies = [ - "backtrace", - "lazy_static", - "regex", -] - -[[package]] -name = "sp-panic-handler" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4abed79c3d5b3622f65ab065676addd9923b9b122cd257df23e2757ce487c6d2" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "backtrace", "lazy_static", @@ -11991,17 +11596,17 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "rustc-hash", "serde", - "sp-core 7.0.0", + "sp-core", ] [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "either", "hash256-std-hasher", @@ -12012,109 +11617,54 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto 7.0.0", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", "sp-std 5.0.0", - "sp-weights 4.0.0", -] - -[[package]] -name = "sp-runtime" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86578c67b060a6ecab52af64f1cf18b3892fca7fba5ffc5c49934b2e76b1929" -dependencies = [ - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "paste", - "rand 0.8.5", - "scale-info", - "serde", - "sp-application-crypto 12.0.0", - "sp-arithmetic 9.0.0", - "sp-core 11.0.0", - "sp-io 12.0.0", - "sp-std 6.0.0", - "sp-weights 8.0.0", + "sp-weights", ] [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.13.0", - "sp-runtime-interface-proc-macro 6.0.0", + "sp-externalities", + "sp-runtime-interface-proc-macro", "sp-std 5.0.0", - "sp-storage 7.0.0", - "sp-tracing 6.0.0", - "sp-wasm-interface 7.0.0", - "static_assertions", -] - -[[package]] -name = "sp-runtime-interface" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3858935567385728ea45f6d159f9970b0b278eb22a8e77625bbf4a63e43a85a" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.15.0", - "sp-runtime-interface-proc-macro 7.0.0", - "sp-std 6.0.0", - "sp-storage 9.0.0", - "sp-tracing 7.0.0", - "sp-wasm-interface 8.0.0", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", -] - -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00083a77e938c4f35d0bde7ca0b6e5f616158ebe11af6063795aa664d92a238b" -dependencies = [ - "Inflector", - "proc-macro-crate", - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-staking", "sp-std 5.0.0", ] @@ -12122,19 +11672,19 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", "sp-std 5.0.0", ] [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "hash-db", "log", @@ -12142,32 +11692,11 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core 7.0.0", - "sp-externalities 0.13.0", - "sp-panic-handler 5.0.0", + "sp-core", + "sp-externalities", + "sp-panic-handler", "sp-std 5.0.0", - "sp-trie 7.0.0", - "thiserror", - "tracing", -] - -[[package]] -name = "sp-state-machine" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fd4c600df0b5abf26c19b6c61d928b64e0c2b8a709a3dbef872be0507cd1ca" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "sp-core 11.0.0", - "sp-externalities 0.15.0", - "sp-panic-handler 6.0.0", - "sp-std 6.0.0", - "sp-trie 11.0.0", + "sp-trie", "thiserror", "tracing", ] @@ -12175,52 +11704,38 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" [[package]] name = "sp-std" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af0ee286f98455272f64ac5bb1384ff21ac029fbb669afbaf48477faff12760e" +checksum = "1de8eef39962b5b97478719c493bed2926cf70cb621005bbf68ebe58252ff986" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 5.0.0", + "sp-debug-derive", "sp-std 5.0.0", ] -[[package]] -name = "sp-storage" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9acb4059eb0ae4fa8cf9ca9119b0178ad312a592d4c6054bd17b411034f233e9" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 6.0.0", - "sp-std 6.0.0", -] - [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "futures-timer", "log", "parity-scale-codec", "sp-inherents", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", "thiserror", ] @@ -12228,7 +11743,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "sp-std 5.0.0", @@ -12237,48 +11752,35 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "sp-tracing" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22d28a0bc2365dfb86644d14f2682a79da35891d4656d4896fb09fb05ff1e6c" -dependencies = [ - "parity-scale-codec", - "sp-std 6.0.0", - "tracing", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "sp-api", - "sp-runtime 7.0.0", + "sp-runtime", ] [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "log", "parity-scale-codec", "scale-info", - "sp-core 7.0.0", + "sp-core", "sp-inherents", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", ] [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "ahash 0.8.3", "hash-db", @@ -12290,42 +11792,18 @@ dependencies = [ "parking_lot 0.12.1", "scale-info", "schnellru", - "sp-core 7.0.0", + "sp-core", "sp-std 5.0.0", "thiserror", "tracing", - "trie-db 0.24.0", - "trie-root", -] - -[[package]] -name = "sp-trie" -version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db085f134cb444e52ca569a442d12c84bd17667532613d78dd6f568942632da4" -dependencies = [ - "ahash 0.7.6", - "hash-db", - "hashbrown 0.12.3", - "lazy_static", - "lru 0.8.1", - "memory-db", - "nohash-hasher", - "parity-scale-codec", - "parking_lot 0.12.1", - "scale-info", - "sp-core 11.0.0", - "sp-std 6.0.0", - "thiserror", - "tracing", - "trie-db 0.24.0", + "trie-db", "trie-root", ] [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12333,7 +11811,7 @@ dependencies = [ "scale-info", "serde", "sp-core-hashing-proc-macro", - "sp-runtime 7.0.0", + "sp-runtime", "sp-std 5.0.0", "sp-version-proc-macro", "thiserror", @@ -12342,19 +11820,20 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ + "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -12363,51 +11842,21 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "sp-wasm-interface" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ebc377987d42f8fc20e3f4ec4fd1147dd098fe90bcb4269e1eddb04e920f889" -dependencies = [ - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-std 6.0.0", - "wasmi", - "wasmtime", -] - [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-debug-derive 5.0.0", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", "sp-std 5.0.0", ] -[[package]] -name = "sp-weights" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eca2a19f48978e9cd605e23905d0602419f7880a9360ac717b03412e9c7916" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic 9.0.0", - "sp-core 11.0.0", - "sp-debug-derive 6.0.0", - "sp-std 6.0.0", -] - [[package]] name = "spin" version = "0.5.2" @@ -12488,7 +11937,7 @@ dependencies = [ "memchr", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -12501,7 +11950,7 @@ dependencies = [ "memchr", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -12509,14 +11958,14 @@ name = "storage-proof-fuzzer" version = "0.1.0" dependencies = [ "bp-runtime", - "env_logger 0.10.0", + "env_logger", "honggfuzz", "log", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-core", + "sp-runtime", + "sp-state-machine", "sp-std 5.0.0", - "sp-trie 7.0.0", + "sp-trie", ] [[package]] @@ -12552,7 +12001,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -12574,7 +12023,7 @@ dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", "rustversion", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -12612,7 +12061,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "platforms 2.0.0", ] @@ -12620,7 +12069,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12632,14 +12081,14 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 7.0.0", - "sp-runtime 7.0.0", + "sp-core", + "sp-runtime", ] [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "hyper", "log", @@ -12695,9 +12144,9 @@ dependencies = [ "rialto-runtime", "signal-hook", "signal-hook-async-std", - "sp-core 7.0.0", + "sp-core", "sp-keyring", - "sp-runtime 7.0.0", + "sp-runtime", "structopt", "strum", "substrate-relay-helper", @@ -12745,29 +12194,29 @@ dependencies = [ "relay-utils", "relay-wococo-client", "rialto-runtime", - "sp-core 7.0.0", - "sp-finality-grandpa", - "sp-runtime 7.0.0", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", "thiserror", ] [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "async-trait", "jsonrpsee", "log", "sc-rpc-api", "serde", - "sp-runtime 7.0.0", + "sp-runtime", ] [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "jsonrpsee", "log", @@ -12776,17 +12225,17 @@ dependencies = [ "sc-rpc-api", "scale-info", "serde", - "sp-core 7.0.0", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", - "sp-trie 7.0.0", - "trie-db 0.24.0", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-trie", + "trie-db", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ "ansi_term", "build-helper", @@ -12817,8 +12266,8 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" -version = "0.26.0" -source = "git+https://github.com/paritytech/subxt?branch=master#9e2acff5b2838a59205fac1cedbf2c404f5eb9b7" +version = "0.27.1" +source = "git+https://github.com/paritytech/subxt?branch=master#d4545de8cf426db57a498c14ec28b8e2efc008df" dependencies = [ "base58", "blake2", @@ -12828,7 +12277,6 @@ dependencies = [ "getrandom 0.2.8", "hex", "impl-serde", - "jsonrpsee", "parity-scale-codec", "parking_lot 0.12.1", "primitive-types", @@ -12838,9 +12286,7 @@ dependencies = [ "scale-value", "serde", "serde_json", - "sp-core 11.0.0", - "sp-core-hashing 6.0.0", - "sp-runtime 12.0.0", + "sp-core-hashing 7.0.0", "subxt-macro", "subxt-metadata", "thiserror", @@ -12849,8 +12295,8 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.26.0" -source = "git+https://github.com/paritytech/subxt?branch=master#9e2acff5b2838a59205fac1cedbf2c404f5eb9b7" +version = "0.27.1" +source = "git+https://github.com/paritytech/subxt?branch=master#d4545de8cf426db57a498c14ec28b8e2efc008df" dependencies = [ "darling", "frame-metadata", @@ -12858,35 +12304,35 @@ dependencies = [ "hex", "jsonrpsee", "parity-scale-codec", - "proc-macro-error", "proc-macro2 1.0.51", "quote 1.0.23", "scale-info", "subxt-metadata", - "syn 1.0.107", + "syn 1.0.109", + "thiserror", "tokio", ] [[package]] name = "subxt-macro" -version = "0.26.0" -source = "git+https://github.com/paritytech/subxt?branch=master#9e2acff5b2838a59205fac1cedbf2c404f5eb9b7" +version = "0.27.1" +source = "git+https://github.com/paritytech/subxt?branch=master#d4545de8cf426db57a498c14ec28b8e2efc008df" dependencies = [ "darling", "proc-macro-error", "subxt-codegen", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "subxt-metadata" -version = "0.26.0" -source = "git+https://github.com/paritytech/subxt?branch=master#9e2acff5b2838a59205fac1cedbf2c404f5eb9b7" +version = "0.27.1" +source = "git+https://github.com/paritytech/subxt?branch=master#d4545de8cf426db57a498c14ec28b8e2efc008df" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-core-hashing 6.0.0", + "sp-core-hashing 7.0.0", ] [[package]] @@ -12902,9 +12348,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", @@ -12919,15 +12365,15 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "unicode-xid 0.2.4", ] [[package]] name = "sysinfo" -version = "0.28.1" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a81bbc26c485910df47772df6bbcdb417036132caa9e51e29d2e39c4636d4e" +checksum = "d3e847e2de7a137c8c2cede5095872dbb00f4f9bf34d061347e36b43322acd56" dependencies = [ "cfg-if 1.0.0", "core-foundation-sys", @@ -13010,22 +12456,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -13181,9 +12627,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", "bytes", @@ -13196,7 +12642,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -13207,7 +12653,7 @@ checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -13259,19 +12705,19 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" [[package]] name = "toml_edit" -version = "0.18.1" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" +checksum = "7082a95d48029677a28f181e5f6422d0c8339ad8396a39d3f33d62a90c1f6c30" dependencies = [ "indexmap", - "nom8", "toml_datetime", + "winnow", ] [[package]] @@ -13336,7 +12782,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -13362,7 +12808,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -13373,13 +12819,13 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "expander 0.0.6", "proc-macro-crate", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -13426,19 +12872,6 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "trie-db" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" -dependencies = [ - "hash-db", - "hashbrown 0.12.3", - "log", - "rustc-hex", - "smallvec", -] - [[package]] name = "trie-db" version = "0.26.0" @@ -13516,9 +12949,10 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#51cf2e790f118f6cfe8d94fb9ca96bc580bd7c98" +source = "git+https://github.com/paritytech/substrate?branch=master#f5c2cecd7efe6dcbc828906794f3c4c41f23c791" dependencies = [ - "clap 4.1.6", + "async-trait", + "clap 4.1.8", "frame-remote-externalities", "hex", "log", @@ -13529,16 +12963,21 @@ dependencies = [ "serde", "serde_json", "sp-api", - "sp-core 7.0.0", - "sp-debug-derive 5.0.0", - "sp-externalities 0.13.0", - "sp-io 7.0.0", - "sp-keystore 0.13.0", + "sp-consensus-aura", + "sp-consensus-babe", + "sp-core", + "sp-debug-derive", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-keystore", "sp-rpc", - "sp-runtime 7.0.0", - "sp-state-machine 0.13.0", + "sp-runtime", + "sp-state-machine", + "sp-timestamp", + "sp-transaction-storage-proof", "sp-version", - "sp-weights 4.0.0", + "sp-weights", "substrate-rpc-client", "zstd", ] @@ -13574,9 +13013,9 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "digest 0.10.6", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -13812,7 +13251,7 @@ dependencies = [ "once_cell", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -13846,7 +13285,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -13953,22 +13392,24 @@ dependencies = [ "memory_units", "num-rational", "num-traits", + "region", ] [[package]] name = "wasmparser" -version = "0.89.1" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ "indexmap", + "url", ] [[package]] name = "wasmtime" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" +checksum = "f6e89f9819523447330ffd70367ef4a18d8c832e24e8150fe054d1d912841632" dependencies = [ "anyhow", "bincode", @@ -13989,23 +13430,23 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-asm-macros" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +checksum = "9bd3a5e46c198032da934469f3a6e48649d1f9142438e4fd4617b68a35644b8a" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "wasmtime-cache" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882" +checksum = "b389ae9b678b9c3851091a4804f4182d688d27aff7abc9aa37fa7be37d8ecffa" dependencies = [ "anyhow", "base64 0.13.1", @@ -14013,19 +13454,19 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.35.13", + "rustix 0.36.8", "serde", - "sha2 0.9.9", + "sha2 0.10.6", "toml", - "windows-sys 0.36.1", + "windows-sys 0.42.0", "zstd", ] [[package]] name = "wasmtime-cranelift" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6" +checksum = "59b2c92a08c0db6efffd88fdc97d7aa9c7c63b03edb0971dbca745469f820e8c" dependencies = [ "anyhow", "cranelift-codegen", @@ -14044,9 +13485,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" +checksum = "9a6db9fc52985ba06ca601f2ff0ff1f526c5d724c7ac267b47326304b0c97883" dependencies = [ "anyhow", "cranelift-entity", @@ -14063,9 +13504,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" +checksum = "b77e3a52cd84d0f7f18554afa8060cfe564ccac61e3b0802d3fd4084772fa5f6" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -14076,32 +13517,42 @@ dependencies = [ "log", "object 0.29.0", "rustc-demangle", - "rustix 0.35.13", "serde", "target-lexicon", - "thiserror", "wasmtime-environ", "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-jit-debug" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" +checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.35.13", + "rustix 0.36.8", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67d412e9340ab1c83867051d8d1d7c90aa8c9afc91da086088068e2734e25064" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-runtime" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" +checksum = "d594e791b5fdd4dbaf8cf7ae62f2e4ff85018ce90f483ca6f42947688e48827d" dependencies = [ "anyhow", "cc", @@ -14114,19 +13565,18 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.35.13", - "thiserror", + "rustix 0.36.8", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-types" -version = "1.0.2" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" +checksum = "a6688d6f96d4dbc1f89fab626c56c1778936d122b5f4ae7a57c2eb42b8d982e2" dependencies = [ "cranelift-entity", "serde", @@ -14378,7 +13828,7 @@ dependencies = [ "lazy_static", "libc", "log", - "nix 0.24.3", + "nix", "rand 0.8.5", "thiserror", "tokio", @@ -14465,19 +13915,6 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -14529,12 +13966,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.42.1" @@ -14547,12 +13978,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.42.1" @@ -14565,12 +13990,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.42.1" @@ -14583,12 +14002,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.42.1" @@ -14609,15 +14022,18 @@ checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" +name = "winnow" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "ee7b2c67f962bf5042bfd8b6a916178df33a26eec343ae064cb8e069f638fa6f" +dependencies = [ + "memchr", +] [[package]] name = "winreg" @@ -14699,23 +14115,23 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ + "bounded-collections", "derivative", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0", - "sp-weights 4.0.0", + "sp-weights", "xcm-procedural", ] [[package]] name = "xcm-builder" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "frame-support", "frame-system", @@ -14725,9 +14141,9 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "scale-info", - "sp-arithmetic 6.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-arithmetic", + "sp-io", + "sp-runtime", "sp-std 5.0.0", "xcm", "xcm-executor", @@ -14736,31 +14152,31 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "environmental", "frame-support", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-arithmetic 6.0.0", - "sp-core 7.0.0", - "sp-io 7.0.0", - "sp-runtime 7.0.0", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", "sp-std 5.0.0", - "sp-weights 4.0.0", + "sp-weights", "xcm", ] [[package]] name = "xcm-procedural" version = "0.9.37" -source = "git+https://github.com/paritytech/polkadot?branch=master#4f331d74c3004d9765b735ec66acc92edea62c7f" +source = "git+https://github.com/paritytech/polkadot?branch=master#c02f9adb6e31357a21fb0d07005441db71ddc9d6" dependencies = [ "Inflector", "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -14809,7 +14225,7 @@ checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ "proc-macro2 1.0.51", "quote 1.0.23", - "syn 1.0.107", + "syn 1.0.109", "synstructure", ] diff --git a/bin/millau/node/Cargo.toml b/bin/millau/node/Cargo.toml index 3d3d238943d..cca94bbe7b1 100644 --- a/bin/millau/node/Cargo.toml +++ b/bin/millau/node/Cargo.toml @@ -11,7 +11,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] clap = { version = "4.1.6", features = ["derive"] } jsonrpsee = { version = "0.16.2", features = ["server"] } -serde_json = "1.0.93" +serde_json = "1.0.94" # Bridge dependencies @@ -19,9 +19,9 @@ millau-runtime = { path = "../runtime" } # Substrate Dependencies -beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" } -beefy-gadget-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-beefy-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } node-inspect = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -33,8 +33,8 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -42,10 +42,11 @@ sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "mast sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } [build-dependencies] substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/bin/millau/node/src/chain_spec.rs b/bin/millau/node/src/chain_spec.rs index d18634eb983..8669ca92cc8 100644 --- a/bin/millau/node/src/chain_spec.rs +++ b/bin/millau/node/src/chain_spec.rs @@ -19,10 +19,10 @@ use millau_runtime::{ BridgeRialtoParachainMessagesConfig, BridgeWestendGrandpaConfig, GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY, }; -use sp_beefy::crypto::AuthorityId as BeefyId; use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_consensus_beefy::crypto::AuthorityId as BeefyId; +use sp_consensus_grandpa::AuthorityId as GrandpaId; use sp_core::{sr25519, Pair, Public}; -use sp_finality_grandpa::AuthorityId as GrandpaId; use sp_runtime::traits::{IdentifyAccount, Verify}; /// "Names" of the authorities accounts at local testnet. diff --git a/bin/millau/node/src/service.rs b/bin/millau/node/src/service.rs index 8b0bc828957..f8e6d34933d 100644 --- a/bin/millau/node/src/service.rs +++ b/bin/millau/node/src/service.rs @@ -20,8 +20,8 @@ use jsonrpsee::RpcModule; use millau_runtime::{self, opaque::Block, RuntimeApi}; use sc_client_api::BlockBackend; use sc_consensus_aura::{CompatibilityMode, ImportQueueParams, SlotProportion, StartAuraParams}; +use sc_consensus_grandpa::SharedVoterState; pub use sc_executor::NativeElseWasmExecutor; -use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; use sc_telemetry::{Telemetry, TelemetryWorker}; @@ -64,15 +64,15 @@ pub fn new_partial( sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool, ( - sc_finality_grandpa::GrandpaBlockImport< + sc_consensus_grandpa::GrandpaBlockImport< FullBackend, Block, FullClient, FullSelectChain, >, - sc_finality_grandpa::LinkHalf, - beefy_gadget::BeefyVoterLinks, - beefy_gadget::BeefyRPCLinks, + sc_consensus_grandpa::LinkHalf, + sc_consensus_beefy::BeefyVoterLinks, + sc_consensus_beefy::BeefyRPCLinks, Option, ), >, @@ -123,7 +123,7 @@ pub fn new_partial( client.clone(), ); - let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( + let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), &client, select_chain.clone(), @@ -131,10 +131,11 @@ pub fn new_partial( )?; let (beefy_block_import, beefy_voter_links, beefy_rpc_links) = - beefy_gadget::beefy_block_import_and_links( + sc_consensus_beefy::beefy_block_import_and_links( grandpa_block_import.clone(), backend.clone(), client.clone(), + config.prometheus_registry().cloned(), ); let slot_duration = sc_consensus_aura::slot_duration(&*client)?; @@ -183,6 +184,8 @@ fn remote_keystore(_url: &str) -> Result, &'static str> { /// Builds a new service for a full client. pub fn new_full(mut config: Configuration) -> Result { + use sc_network_common::sync::warp::WarpSyncParams; + let sc_service::PartialComponents { client, backend, @@ -209,38 +212,41 @@ pub fn new_full(mut config: Configuration) -> Result // Note: GrandPa is pushed before the Polkadot-specific protocols. This doesn't change // anything in terms of behaviour, but makes the logs more consistent with the other // Substrate nodes. - let grandpa_protocol_name = sc_finality_grandpa::protocol_standard_name( + let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), &config.chain_spec, ); config .network .extra_sets - .push(sc_finality_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); + .push(sc_consensus_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); let beefy_gossip_proto_name = - beefy_gadget::gossip_protocol_name(genesis_hash, config.chain_spec.fork_id()); + sc_consensus_beefy::gossip_protocol_name(genesis_hash, config.chain_spec.fork_id()); // `beefy_on_demand_justifications_handler` is given to `beefy-gadget` task to be run, // while `beefy_req_resp_cfg` is added to `config.network.request_response_protocols`. let (beefy_on_demand_justifications_handler, beefy_req_resp_cfg) = - beefy_gadget::communication::request_response::BeefyJustifsRequestHandler::new( + sc_consensus_beefy::communication::request_response::BeefyJustifsRequestHandler::new( genesis_hash, config.chain_spec.fork_id(), client.clone(), + config.prometheus_registry().cloned(), ); config .network .extra_sets - .push(beefy_gadget::communication::beefy_peers_set_config(beefy_gossip_proto_name.clone())); + .push(sc_consensus_beefy::communication::beefy_peers_set_config( + beefy_gossip_proto_name.clone(), + )); config.network.request_response_protocols.push(beefy_req_resp_cfg); - let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( + let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( backend.clone(), grandpa_link.shared_authority_set().clone(), Vec::default(), )); - let (network, system_rpc_tx, tx_handler_controller, network_starter) = + let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, client: client.clone(), @@ -248,7 +254,7 @@ pub fn new_full(mut config: Configuration) -> Result spawn_handle: task_manager.spawn_handle(), import_queue, block_announce_validator_builder: None, - warp_sync: Some(warp_sync), + warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)), })?; if config.offchain_worker.enabled { @@ -269,12 +275,12 @@ pub fn new_full(mut config: Configuration) -> Result let shared_voter_state = SharedVoterState::empty(); let rpc_extensions_builder = { - use sc_finality_grandpa::FinalityProofProvider as GrandpaFinalityProofProvider; + use sc_consensus_grandpa::FinalityProofProvider as GrandpaFinalityProofProvider; - use beefy_gadget_rpc::{Beefy, BeefyApiServer}; use mmr_rpc::{Mmr, MmrApiServer}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; - use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer}; + use sc_consensus_beefy_rpc::{Beefy, BeefyApiServer}; + use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer}; use sc_rpc::DenyUnsafe; use substrate_frame_rpc_system::{System, SystemApiServer}; @@ -329,6 +335,7 @@ pub fn new_full(mut config: Configuration) -> Result keystore: keystore_container.sync_keystore(), task_manager: &mut task_manager, transaction_pool: transaction_pool.clone(), + sync_service: sync_service.clone(), rpc_builder: rpc_extensions_builder, backend: backend.clone(), system_rpc_tx, @@ -369,8 +376,8 @@ pub fn new_full(mut config: Configuration) -> Result force_authoring, backoff_authoring_blocks, keystore: keystore_container.sync_keystore(), - sync_oracle: network.clone(), - justification_sync_link: network.clone(), + sync_oracle: sync_service.clone(), + justification_sync_link: sync_service.clone(), block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), max_block_proposal_slot_portion: None, telemetry: telemetry.as_ref().map(|x| x.handle()), @@ -391,15 +398,16 @@ pub fn new_full(mut config: Configuration) -> Result if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None }; let justifications_protocol_name = beefy_on_demand_justifications_handler.protocol_name(); - let payload_provider = sp_beefy::mmr::MmrRootProvider::new(client.clone()); - let beefy_params = beefy_gadget::BeefyParams { + let payload_provider = sp_consensus_beefy::mmr::MmrRootProvider::new(client.clone()); + let beefy_params = sc_consensus_beefy::BeefyParams { client: client.clone(), backend, payload_provider, runtime: client, key_store: keystore.clone(), - network_params: beefy_gadget::BeefyNetworkParams { + network_params: sc_consensus_beefy::BeefyNetworkParams { network: network.clone(), + sync: sync_service.clone(), gossip_protocol_name: beefy_gossip_proto_name, justifications_protocol_name, _phantom: core::marker::PhantomData::, @@ -414,10 +422,10 @@ pub fn new_full(mut config: Configuration) -> Result task_manager.spawn_essential_handle().spawn_blocking( "beefy-gadget", None, - beefy_gadget::start_beefy_gadget::<_, _, _, _, _, _>(beefy_params), + sc_consensus_beefy::start_beefy_gadget::<_, _, _, _, _, _, _>(beefy_params), ); - let grandpa_config = sc_finality_grandpa::Config { + let grandpa_config = sc_consensus_grandpa::Config { // FIXME #1578 make this available through chainspec gossip_duration: Duration::from_millis(333), justification_period: 512, @@ -436,11 +444,12 @@ pub fn new_full(mut config: Configuration) -> Result // and vote data availability than the observer. The observer has not // been tested extensively yet and having most nodes in a network run it // could lead to finality stalls. - let grandpa_config = sc_finality_grandpa::GrandpaParams { + let grandpa_config = sc_consensus_grandpa::GrandpaParams { config: grandpa_config, link: grandpa_link, network, - voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), + sync: sync_service, + voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(), prometheus_registry, shared_voter_state, telemetry: telemetry.as_ref().map(|x| x.handle()), @@ -451,7 +460,7 @@ pub fn new_full(mut config: Configuration) -> Result task_manager.spawn_essential_handle().spawn_blocking( "grandpa-voter", None, - sc_finality_grandpa::run_grandpa_voter(grandpa_config)?, + sc_consensus_grandpa::run_grandpa_voter(grandpa_config)?, ); } diff --git a/bin/millau/runtime/Cargo.toml b/bin/millau/runtime/Cargo.toml index 07e3e135aca..2f828393336 100644 --- a/bin/millau/runtime/Cargo.toml +++ b/bin/millau/runtime/Cargo.toml @@ -31,7 +31,7 @@ pallet-shift-session-manager = { path = "../../../modules/shift-session-manager" # Substrate Dependencies -sp-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -43,8 +43,7 @@ pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "mast pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["historical"]} pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -80,7 +79,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran [features] default = ["std"] std = [ - "sp-beefy/std", + "sp-consensus-beefy/std", "bp-messages/std", "bp-millau/std", "bp-parachains/std", @@ -106,7 +105,6 @@ std = [ "pallet-bridge-relayers/std", "pallet-grandpa/std", "pallet-mmr/std", - "pallet-randomness-collective-flip/std", "pallet-session/std", "pallet-shift-session-manager/std", "pallet-sudo/std", diff --git a/bin/millau/runtime/src/lib.rs b/bin/millau/runtime/src/lib.rs index 3e46d6ba15a..21fff0e564e 100644 --- a/bin/millau/runtime/src/lib.rs +++ b/bin/millau/runtime/src/lib.rs @@ -41,9 +41,9 @@ use pallet_grandpa::{ }; use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo}; use sp_api::impl_runtime_apis; -use sp_beefy::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet}; use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_consensus_beefy::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet}; +use sp_core::OpaqueMetadata; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{Block as BlockT, IdentityLookup, Keccak256, NumberFor, OpaqueKeys}, @@ -223,8 +223,6 @@ impl frame_system::Config for Runtime { type MaxConsumers = frame_support::traits::ConstU32<16>; } -impl pallet_randomness_collective_flip::Config for Runtime {} - impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type MaxAuthorities = ConstU32<10>; @@ -234,23 +232,21 @@ impl pallet_aura::Config for Runtime { impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; type MaxAuthorities = ConstU32<10>; + type MaxSetIdSessionEntries = ConstU64<0>; type OnNewValidatorSet = MmrLeaf; + type WeightInfo = (); + type KeyOwnerProof = sp_core::Void; + type EquivocationReportSystem = (); } impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type KeyOwnerProofSystem = (); - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = (); // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) type WeightInfo = (); type MaxAuthorities = ConstU32<10>; type MaxSetIdSessionEntries = ConstU64<0>; + type KeyOwnerProof = sp_core::Void; + type EquivocationReportSystem = (); } /// MMR helper types. @@ -292,7 +288,7 @@ parameter_types! { pub struct BeefyDummyDataProvider; -impl sp_beefy::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider { +impl sp_consensus_beefy::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider { fn extra_data() {} } @@ -555,7 +551,6 @@ construct_runtime!( Session: pallet_session::{Pallet, Call, Storage, Event, Config}, Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, ShiftSessionManager: pallet_shift_session_manager::{Pallet}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, // BEEFY Bridges support. Beefy: pallet_beefy::{Pallet, Storage, Config}, @@ -743,7 +738,7 @@ impl_runtime_apis! { } } - impl sp_beefy::BeefyApi for Runtime { + impl sp_consensus_beefy::BeefyApi for Runtime { fn beefy_genesis() -> Option { Beefy::genesis_block() } @@ -751,6 +746,20 @@ impl_runtime_apis! { fn validator_set() -> Option> { Beefy::validator_set() } + + fn submit_report_equivocation_unsigned_extrinsic( + _equivocation_proof: sp_consensus_beefy::EquivocationProof< + NumberFor, + sp_consensus_beefy::crypto::AuthorityId, + sp_consensus_beefy::crypto::Signature + >, + _key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof, + ) -> Option<()> { None } + + fn generate_key_ownership_proof( + _set_id: sp_consensus_beefy::ValidatorSetId, + _authority_id: sp_consensus_beefy::crypto::AuthorityId, + ) -> Option { None } } impl pallet_mmr::primitives::MmrApi< @@ -933,9 +942,10 @@ impl_runtime_apis! { let mut list = Vec::::new(); - list_benchmark!(list, extra, pallet_bridge_messages, MessagesBench::); + list_benchmark!(list, extra, RialtoParachainMessages, MessagesBench::); + list_benchmark!(list, extra, RialtoMessages, MessagesBench::); list_benchmark!(list, extra, pallet_bridge_grandpa, BridgeRialtoGrandpa); - list_benchmark!(list, extra, pallet_bridge_parachains, ParachainsBench::); + list_benchmark!(list, extra, pallet_bridge_parachains, ParachainsBench::); list_benchmark!(list, extra, pallet_bridge_relayers, RelayersBench::); let storage_info = AllPalletsWithSystem::storage_info(); @@ -964,7 +974,12 @@ impl_runtime_apis! { let mut batches = Vec::::new(); let params = (&config, &whitelist); - use bridge_runtime_common::messages_benchmarking::{prepare_message_delivery_proof_from_grandpa_chain, prepare_message_proof_from_grandpa_chain}; + use bridge_runtime_common::messages_benchmarking::{ + prepare_message_delivery_proof_from_grandpa_chain, + prepare_message_delivery_proof_from_parachain, + prepare_message_proof_from_grandpa_chain, + prepare_message_proof_from_parachain, + }; use pallet_bridge_messages::benchmarking::{ Pallet as MessagesBench, Config as MessagesConfig, @@ -980,28 +995,66 @@ impl_runtime_apis! { Config as RelayersConfig, }; use rialto_messages::WithRialtoMessageBridge; + use rialto_parachain_messages::WithRialtoParachainMessageBridge; + + impl MessagesConfig for Runtime { + fn prepare_message_proof( + params: MessageProofParams, + ) -> (rialto_messages::FromRialtoMessagesProof, Weight) { + prepare_message_proof_from_parachain::< + Runtime, + WithRialtoParachainsInstance, + WithRialtoParachainMessageBridge, + >(params) + } + + fn prepare_message_delivery_proof( + params: MessageDeliveryProofParams, + ) -> rialto_messages::ToRialtoMessagesDeliveryProof { + prepare_message_delivery_proof_from_parachain::< + Runtime, + WithRialtoParachainsInstance, + WithRialtoParachainMessageBridge, + >(params) + } + + fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { + use bridge_runtime_common::messages::MessageBridge; + + let lane = >::bench_lane_id(); + let bridged_chain_id = WithRialtoParachainMessageBridge::BRIDGED_CHAIN_ID; + pallet_bridge_relayers::Pallet::::relayer_reward( + relayer, + RewardsAccountParams::new(lane, bridged_chain_id, RewardsAccountOwner::BridgedChain) + ).is_some() + } + } impl MessagesConfig for Runtime { fn prepare_message_proof( params: MessageProofParams, ) -> (rialto_messages::FromRialtoMessagesProof, Weight) { - prepare_message_proof_from_grandpa_chain::( - params, - ) + prepare_message_proof_from_grandpa_chain::< + Runtime, + RialtoGrandpaInstance, + WithRialtoMessageBridge, + >(params) } fn prepare_message_delivery_proof( params: MessageDeliveryProofParams, ) -> rialto_messages::ToRialtoMessagesDeliveryProof { - prepare_message_delivery_proof_from_grandpa_chain::( - params, - ) + prepare_message_delivery_proof_from_grandpa_chain::< + Runtime, + RialtoGrandpaInstance, + WithRialtoMessageBridge, + >(params) } fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { use bridge_runtime_common::messages::MessageBridge; - let lane = Self::bench_lane_id(); + let lane = >::bench_lane_id(); let bridged_chain_id = WithRialtoMessageBridge::BRIDGED_CHAIN_ID; pallet_bridge_relayers::Pallet::::relayer_reward( relayer, @@ -1026,7 +1079,10 @@ impl_runtime_apis! { bp_polkadot_core::parachains::ParaHeadsProof, Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>, ) { - bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof::( + bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof::< + Runtime, + WithRialtoParachainsInstance, + >( parachains, parachain_head_size, proof_size, @@ -1051,7 +1107,13 @@ impl_runtime_apis! { add_benchmark!( params, batches, - pallet_bridge_messages, + RialtoParachainMessages, + MessagesBench:: + ); + add_benchmark!( + params, + batches, + RialtoMessages, MessagesBench:: ); add_benchmark!(params, batches, pallet_bridge_grandpa, BridgeRialtoGrandpa); diff --git a/bin/rialto-parachain/node/Cargo.toml b/bin/rialto-parachain/node/Cargo.toml index c20b7f248cc..4cdaa93bad0 100644 --- a/bin/rialto-parachain/node/Cargo.toml +++ b/bin/rialto-parachain/node/Cargo.toml @@ -45,6 +45,7 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master"} diff --git a/bin/rialto-parachain/node/src/service.rs b/bin/rialto-parachain/node/src/service.rs index 254340a8ad4..7e7fa2ed09b 100644 --- a/bin/rialto-parachain/node/src/service.rs +++ b/bin/rialto-parachain/node/src/service.rs @@ -38,11 +38,12 @@ use cumulus_client_service::{ prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams, }; use cumulus_primitives_core::ParaId; -use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface}; +use cumulus_relay_chain_interface::RelayChainInterface; use sc_consensus::ImportQueue; // Substrate Imports use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; -use sc_network::{NetworkBlock, NetworkService}; +use sc_network::NetworkBlock; +use sc_network_sync::SyncingService; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_api::ConstructRuntimeApi; @@ -54,7 +55,6 @@ use substrate_prometheus_endpoint::Registry; type BlockNumber = u32; type Header = sp_runtime::generic::Header; pub type Block = sp_runtime::generic::Block; -type Hash = sp_core::H256; type ParachainClient = TFullClient>; @@ -236,7 +236,7 @@ where &TaskManager, Arc, Arc>>, - Arc>, + Arc>, SyncCryptoStorePtr, bool, ) -> Result>, sc_service::Error>, @@ -257,10 +257,7 @@ where None, ) .await - .map_err(|e| match e { - RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x, - s => s.to_string().into(), - })?; + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; let client = params.client.clone(); let backend = params.backend.clone(); @@ -272,7 +269,7 @@ where let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); - let (network, system_rpc_tx, tx_handler_controller, start_network) = + let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: ¶chain_config, client: client.clone(), @@ -282,7 +279,7 @@ where block_announce_validator_builder: Some(Box::new(|_| { Box::new(block_announce_validator) })), - warp_sync: None, + warp_sync_params: None, })?; let rpc_client = client.clone(); @@ -300,18 +297,23 @@ where keystore: params.keystore_container.sync_keystore(), backend: backend.clone(), network: network.clone(), + sync_service: sync_service.clone(), system_rpc_tx, tx_handler_controller, telemetry: telemetry.as_mut(), })?; let announce_block = { - let network = network.clone(); - Arc::new(move |hash, data| network.announce_block(hash, data)) + let sync_service = sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) }; let relay_chain_slot_duration = Duration::from_secs(6); + let overseer_handle = relay_chain_interface + .overseer_handle() + .map_err(|e| sc_service::Error::Application(Box::new(e)))?; + if validator { let parachain_consensus = build_consensus( client.clone(), @@ -321,7 +323,7 @@ where &task_manager, relay_chain_interface.clone(), transaction_pool, - network, + sync_service, params.keystore_container.sync_keystore(), force_authoring, )?; @@ -340,6 +342,7 @@ where import_queue: import_queue_service, collator_key: collator_key.expect("Command line arguments do not allow this. qed"), relay_chain_slot_duration, + recovery_handle: Box::new(overseer_handle), }; start_collator(params).await?; @@ -352,6 +355,7 @@ where relay_chain_interface, relay_chain_slot_duration, import_queue: import_queue_service, + recovery_handle: Box::new(overseer_handle), }; start_full_node(params)?; diff --git a/bin/rialto-parachain/runtime/Cargo.toml b/bin/rialto-parachain/runtime/Cargo.toml index b91e1cd2751..ec8955e7fd1 100644 --- a/bin/rialto-parachain/runtime/Cargo.toml +++ b/bin/rialto-parachain/runtime/Cargo.toml @@ -52,7 +52,6 @@ frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate" ## Substrate Pallet Dependencies pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -116,7 +115,6 @@ std = [ "pallet-bridge-grandpa/std", "pallet-bridge-messages/std", "pallet-bridge-relayers/std", - "pallet-randomness-collective-flip/std", "pallet-timestamp/std", "pallet-sudo/std", "pallet-transaction-payment/std", diff --git a/bin/rialto-parachain/runtime/src/lib.rs b/bin/rialto-parachain/runtime/src/lib.rs index 593c7b21228..d8e087c5a6a 100644 --- a/bin/rialto-parachain/runtime/src/lib.rs +++ b/bin/rialto-parachain/runtime/src/lib.rs @@ -302,8 +302,6 @@ impl parachain_info::Config for Runtime {} impl cumulus_pallet_aura_ext::Config for Runtime {} -impl pallet_randomness_collective_flip::Config for Runtime {} - parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = CustomNetworkId::Rialto.as_network_id(); @@ -588,7 +586,6 @@ construct_runtime!( System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Event} = 20, diff --git a/bin/rialto/node/Cargo.toml b/bin/rialto/node/Cargo.toml index 556088498f7..be83e02424a 100644 --- a/bin/rialto/node/Cargo.toml +++ b/bin/rialto/node/Cargo.toml @@ -10,7 +10,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] clap = { version = "4.1.6", features = ["derive"] } -serde_json = "1.0.93" +serde_json = "1.0.94" # Bridge dependencies @@ -18,7 +18,7 @@ rialto-runtime = { path = "../runtime" } # Substrate Dependencies -sp-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -29,7 +29,7 @@ sc-service = { git = "https://github.com/paritytech/substrate", branch = "master sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot Dependencies diff --git a/bin/rialto/node/src/chain_spec.rs b/bin/rialto/node/src/chain_spec.rs index cfc0ed62e10..c51ca1197f6 100644 --- a/bin/rialto/node/src/chain_spec.rs +++ b/bin/rialto/node/src/chain_spec.rs @@ -23,10 +23,10 @@ use rialto_runtime::{ }; use serde_json::json; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; -use sp_beefy::crypto::AuthorityId as BeefyId; use sp_consensus_babe::AuthorityId as BabeId; +use sp_consensus_beefy::crypto::AuthorityId as BeefyId; +use sp_consensus_grandpa::AuthorityId as GrandpaId; use sp_core::{sr25519, Pair, Public}; -use sp_finality_grandpa::AuthorityId as GrandpaId; use sp_runtime::traits::{IdentifyAccount, Verify}; /// "Names" of the authorities accounts at local testnet. diff --git a/bin/rialto/runtime/Cargo.toml b/bin/rialto/runtime/Cargo.toml index d5d018fb864..4f0f64cbc95 100644 --- a/bin/rialto/runtime/Cargo.toml +++ b/bin/rialto/runtime/Cargo.toml @@ -26,7 +26,7 @@ pallet-shift-session-manager = { path = "../../../modules/shift-session-manager" # Substrate Dependencies -sp-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -39,7 +39,7 @@ pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "mast pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["historical"]} pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -78,7 +78,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran [features] default = ["std"] std = [ - "sp-beefy/std", + "sp-consensus-beefy/std", "bp-messages/std", "bp-millau/std", "bp-relayers/std", @@ -103,6 +103,7 @@ std = [ "pallet-grandpa/std", "pallet-mmr/std", "pallet-xcm/std", + "pallet-session/std", "pallet-shift-session-manager/std", "pallet-sudo/std", "pallet-timestamp/std", diff --git a/bin/rialto/runtime/src/lib.rs b/bin/rialto/runtime/src/lib.rs index 9873a6fd855..9db181e2840 100644 --- a/bin/rialto/runtime/src/lib.rs +++ b/bin/rialto/runtime/src/lib.rs @@ -39,8 +39,8 @@ use pallet_grandpa::{ use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo}; use sp_api::impl_runtime_apis; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; -use sp_beefy::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet}; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_consensus_beefy::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet}; +use sp_core::OpaqueMetadata; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdLookup, Block as BlockT, Keccak256, NumberFor, OpaqueKeys}, @@ -225,56 +225,47 @@ parameter_types! { impl pallet_babe::Config for Runtime { type EpochDuration = EpochDuration; type ExpectedBlockTime = ExpectedBlockTime; - type MaxAuthorities = ConstU32<10>; - // session module is the trigger type EpochChangeTrigger = pallet_babe::ExternalTrigger; - // equivocation related configuration - we don't expect any equivocations in our testnets - type KeyOwnerProofSystem = (); - type KeyOwnerProof = >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = (); - type DisabledValidators = (); + type WeightInfo = (); + + type MaxAuthorities = ConstU32<10>; + + // equivocation related configuration - we don't expect any equivocations in our testnets + type KeyOwnerProof = sp_core::Void; + type EquivocationReportSystem = (); } impl pallet_beefy::Config for Runtime { type BeefyId = BeefyId; type MaxAuthorities = ConstU32<10>; + type MaxSetIdSessionEntries = ConstU64<0>; type OnNewValidatorSet = MmrLeaf; + type WeightInfo = (); + type KeyOwnerProof = sp_core::Void; + type EquivocationReportSystem = (); } impl pallet_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type MaxAuthorities = ConstU32<10>; - type KeyOwnerProofSystem = (); - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = (); // TODO: update me (https://github.com/paritytech/parity-bridges-common/issues/78) type WeightInfo = (); + type MaxAuthorities = ConstU32<10>; type MaxSetIdSessionEntries = ConstU64<0>; + type KeyOwnerProof = sp_core::Void; + type EquivocationReportSystem = (); } impl pallet_mmr::Config for Runtime { const INDEXING_PREFIX: &'static [u8] = b"mmr"; type Hashing = Keccak256; type Hash = ::Output; + type LeafData = pallet_beefy_mmr::Pallet; type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; type WeightInfo = (); - type LeafData = pallet_beefy_mmr::Pallet; } parameter_types! { @@ -296,7 +287,7 @@ parameter_types! { pub struct BeefyDummyDataProvider; -impl sp_beefy::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider { +impl sp_consensus_beefy::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider { fn extra_data() {} } @@ -616,7 +607,7 @@ impl_runtime_apis! { } } - impl sp_beefy::BeefyApi for Runtime { + impl sp_consensus_beefy::BeefyApi for Runtime { fn beefy_genesis() -> Option { Beefy::genesis_block() } @@ -624,6 +615,20 @@ impl_runtime_apis! { fn validator_set() -> Option> { Beefy::validator_set() } + + fn submit_report_equivocation_unsigned_extrinsic( + _equivocation_proof: sp_consensus_beefy::EquivocationProof< + NumberFor, + sp_consensus_beefy::crypto::AuthorityId, + sp_consensus_beefy::crypto::Signature + >, + _key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof, + ) -> Option<()> { None } + + fn generate_key_ownership_proof( + _set_id: sp_consensus_beefy::ValidatorSetId, + _authority_id: sp_consensus_beefy::crypto::AuthorityId, + ) -> Option { None } } impl pallet_mmr::primitives::MmrApi< diff --git a/bin/runtime-common/src/lib.rs b/bin/runtime-common/src/lib.rs index d9c87049077..ed486c04abc 100644 --- a/bin/runtime-common/src/lib.rs +++ b/bin/runtime-common/src/lib.rs @@ -28,6 +28,7 @@ pub mod messages; pub mod messages_api; pub mod messages_benchmarking; pub mod messages_call_ext; +pub mod messages_xcm_extension; pub mod parachains_benchmarking; pub mod refund_relayer_extension; @@ -37,6 +38,8 @@ mod mock; #[cfg(feature = "integrity-test")] pub mod integrity; +const LOG_TARGET_BRIDGE_DISPATCH: &str = "runtime::bridge-dispatch"; + /// A duplication of the `FilterCall` trait. /// /// We need this trait in order to be able to implement it for the messages pallet, diff --git a/bin/runtime-common/src/messages.rs b/bin/runtime-common/src/messages.rs index ceedee12afa..4493ac66742 100644 --- a/bin/runtime-common/src/messages.rs +++ b/bin/runtime-common/src/messages.rs @@ -100,6 +100,29 @@ pub type OriginOf = ::RuntimeOrigin; /// Type of call that is used on this chain. pub type CallOf = ::RuntimeCall; +/// Error that happens during message verification. +#[derive(Debug, PartialEq, Eq)] +pub enum Error { + /// The message proof is empty. + EmptyMessageProof, + /// Error returned by the bridged header chain. + HeaderChain(HeaderChainError), + /// Error returned while reading/decoding inbound lane data from the storage proof. + InboundLaneStorage(StorageProofError), + /// The declared message weight is incorrect. + InvalidMessageWeight, + /// Declared messages count doesn't match actual value. + MessagesCountMismatch, + /// Error returned while reading/decoding message data from the storage proof. + MessageStorage(StorageProofError), + /// The message is too large. + MessageTooLarge, + /// Error returned while reading/decoding outbound lane data from the storage proof. + OutboundLaneStorage(StorageProofError), + /// Storage proof related error. + StorageProof(StorageProofError), +} + /// Sub-module that is declaring types required for processing This -> Bridged chain messages. pub mod source { use super::*; @@ -169,8 +192,6 @@ pub mod source { /// The error message returned from `LaneMessageVerifier` when too many pending messages at the /// lane. pub const TOO_MANY_PENDING_MESSAGES: &str = "Too many pending messages at the lane."; - /// The error message returned from `LaneMessageVerifier` when call origin is mismatch. - pub const BAD_ORIGIN: &str = "Unable to match the source origin to expected target origin."; impl LaneMessageVerifier>, FromThisChainMessagePayload> for FromThisChainMessageVerifier @@ -220,7 +241,7 @@ pub mod source { impl TargetHeaderChain>> for TargetHeaderChainAdapter { - type Error = &'static str; + type Error = Error; type MessagesDeliveryProof = FromBridgedChainMessagesDeliveryProof>>; fn verify_message(payload: &FromThisChainMessagePayload) -> Result<(), Self::Error> { @@ -241,9 +262,9 @@ pub mod source { /// check) that would reject message (see `FromThisChainMessageVerifier`). pub fn verify_chain_message( payload: &FromThisChainMessagePayload, - ) -> Result<(), &'static str> { + ) -> Result<(), Error> { if !BridgedChain::::verify_dispatch_weight(payload) { - return Err("Incorrect message weight declared") + return Err(Error::InvalidMessageWeight) } // The maximal size of extrinsic at Substrate-based chain depends on the @@ -257,7 +278,7 @@ pub mod source { // transaction also contains signatures and signed extensions. Because of this, we reserve // 1/3 of the the maximal extrinsic weight for this data. if payload.len() > maximal_message_size::() as usize { - return Err("The message is too large to be sent over the lane") + return Err(Error::MessageTooLarge) } Ok(()) @@ -269,7 +290,7 @@ pub mod source { /// parachains, please use the `verify_messages_delivery_proof_from_parachain`. pub fn verify_messages_delivery_proof( proof: FromBridgedChainMessagesDeliveryProof>>, - ) -> Result, &'static str> { + ) -> Result, Error> { let FromBridgedChainMessagesDeliveryProof { bridged_header_hash, storage_proof, lane } = proof; B::BridgedHeaderChain::parse_finalized_storage_proof( @@ -283,22 +304,17 @@ pub mod source { B::BRIDGED_MESSAGES_PALLET_NAME, &lane, ); - let raw_inbound_lane_data = storage - .read_value(storage_inbound_lane_data_key.0.as_ref()) - .map_err(|_| "Failed to read inbound lane state from storage proof")? - .ok_or("Inbound lane state is missing from the messages proof")?; - let inbound_lane_data = InboundLaneData::decode(&mut &raw_inbound_lane_data[..]) - .map_err(|_| "Failed to decode inbound lane state from the proof")?; + let inbound_lane_data = storage + .read_and_decode_mandatory_value(storage_inbound_lane_data_key.0.as_ref()) + .map_err(Error::InboundLaneStorage)?; // check that the storage proof doesn't have any untouched trie nodes - storage - .ensure_no_unused_nodes() - .map_err(|_| "Messages delivery proof has unused trie nodes")?; + storage.ensure_no_unused_nodes().map_err(Error::StorageProof)?; Ok((lane, inbound_lane_data)) }, ) - .map_err(<&'static str>::from)? + .map_err(Error::HeaderChain)? } /// XCM bridge. @@ -481,7 +497,7 @@ pub mod target { let weight = XcmWeigher::weight(&mut payload.xcm.1); let weight = weight.unwrap_or_else(|e| { log::debug!( - target: "runtime::bridge-dispatch", + target: crate::LOG_TARGET_BRIDGE_DISPATCH, "Failed to compute dispatch weight of incoming XCM message {:?}/{}: {:?}", message.key.lane_id, message.key.nonce, @@ -509,7 +525,7 @@ pub mod target { let FromBridgedChainMessagePayload { xcm: (location, xcm), weight: weight_limit } = message.data.payload?; log::trace!( - target: "runtime::bridge-dispatch", + target: crate::LOG_TARGET_BRIDGE_DISPATCH, "Going to execute message {:?} (weight limit: {:?}): {:?} {:?}", message_id, weight_limit, @@ -535,7 +551,7 @@ pub mod target { match xcm_outcome { Ok(outcome) => { log::trace!( - target: "runtime::bridge-dispatch", + target: crate::LOG_TARGET_BRIDGE_DISPATCH, "Incoming message {:?} dispatched with result: {:?}", message_id, outcome, @@ -544,7 +560,7 @@ pub mod target { Ok(_weight) => (), Err(e) => { log::error!( - target: "runtime::bridge-dispatch", + target: crate::LOG_TARGET_BRIDGE_DISPATCH, "Incoming message {:?} was not dispatched, error: {:?}", message_id, e, @@ -554,7 +570,7 @@ pub mod target { }, Err(e) => { log::error!( - target: "runtime::bridge-dispatch", + target: crate::LOG_TARGET_BRIDGE_DISPATCH, "Incoming message {:?} was not dispatched, codec error: {:?}", message_id, e, @@ -580,14 +596,14 @@ pub mod target { pub struct SourceHeaderChainAdapter(PhantomData); impl SourceHeaderChain for SourceHeaderChainAdapter { - type Error = &'static str; + type Error = Error; type MessagesProof = FromBridgedChainMessagesProof>>; fn verify_messages_proof( proof: Self::MessagesProof, messages_count: u32, ) -> Result, Self::Error> { - verify_messages_proof::(proof, messages_count).map_err(Into::into) + verify_messages_proof::(proof, messages_count) } } @@ -602,7 +618,7 @@ pub mod target { pub fn verify_messages_proof( proof: FromBridgedChainMessagesProof>>, messages_count: u32, - ) -> Result, MessageProofError> { + ) -> Result, Error> { let FromBridgedChainMessagesProof { bridged_header_hash, storage_proof, @@ -625,7 +641,7 @@ pub mod target { // (this bounds maximal capacity of messages vec below) let messages_in_the_proof = nonces_difference.saturating_add(1); if messages_in_the_proof != MessageNonce::from(messages_count) { - return Err(MessageProofError::MessagesCountMismatch) + return Err(Error::MessagesCountMismatch) } messages_in_the_proof @@ -640,37 +656,26 @@ pub mod target { let mut messages = Vec::with_capacity(messages_in_the_proof as _); for nonce in nonces_start..=nonces_end { let message_key = MessageKey { lane_id: lane, nonce }; - let raw_message_data = parser - .read_raw_message(&message_key) - .ok_or(MessageProofError::MissingRequiredMessage)?; - let payload = MessagePayload::decode(&mut &raw_message_data[..]) - .map_err(|_| MessageProofError::FailedToDecodeMessage)?; - messages.push(Message { key: message_key, payload }); + let message_payload = parser.read_and_decode_message_payload(&message_key)?; + messages.push(Message { key: message_key, payload: message_payload }); } // Now let's check if proof contains outbound lane state proof. It is optional, so // we simply ignore `read_value` errors and missing value. - let mut proved_lane_messages = ProvedLaneMessages { lane_state: None, messages }; - let raw_outbound_lane_data = parser.read_raw_outbound_lane_data(&lane); - if let Some(raw_outbound_lane_data) = raw_outbound_lane_data { - proved_lane_messages.lane_state = Some( - OutboundLaneData::decode(&mut &raw_outbound_lane_data[..]) - .map_err(|_| MessageProofError::FailedToDecodeOutboundLaneState)?, - ); - } + let proved_lane_messages = ProvedLaneMessages { + lane_state: parser.read_and_decode_outbound_lane_data(&lane)?, + messages, + }; // Now we may actually check if the proof is empty or not. if proved_lane_messages.lane_state.is_none() && proved_lane_messages.messages.is_empty() { - return Err(MessageProofError::Empty) + return Err(Error::EmptyMessageProof) } // check that the storage proof doesn't have any untouched trie nodes - parser - .storage - .ensure_no_unused_nodes() - .map_err(MessageProofError::StorageProof)?; + parser.storage.ensure_no_unused_nodes().map_err(Error::StorageProof)?; // We only support single lane messages in this generated_schema let mut proved_messages = ProvedMessages::new(); @@ -679,43 +684,7 @@ pub mod target { Ok(proved_messages) }, ) - .map_err(MessageProofError::HeaderChain)? - } - - /// Error that happens during message proof verification. - #[derive(Debug, PartialEq, Eq)] - pub enum MessageProofError { - /// Error returned by the bridged header chain. - HeaderChain(HeaderChainError), - /// The message proof is empty. - Empty, - /// Declared messages count doesn't match actual value. - MessagesCountMismatch, - /// Message is missing from the proof. - MissingRequiredMessage, - /// Failed to decode message from the proof. - FailedToDecodeMessage, - /// Failed to decode outbound lane data from the proof. - FailedToDecodeOutboundLaneState, - /// Storage proof related error. - StorageProof(StorageProofError), - } - - impl From for &'static str { - fn from(err: MessageProofError) -> &'static str { - match err { - MessageProofError::HeaderChain(err) => err.into(), - MessageProofError::Empty => "Messages proof is empty", - MessageProofError::MessagesCountMismatch => - "Declared messages count doesn't match actual value", - MessageProofError::MissingRequiredMessage => "Message is missing from the proof", - MessageProofError::FailedToDecodeMessage => - "Failed to decode message from the proof", - MessageProofError::FailedToDecodeOutboundLaneState => - "Failed to decode outbound lane data from the proof", - MessageProofError::StorageProof(_) => "Invalid storage proof", - } - } + .map_err(Error::HeaderChain)? } struct StorageProofCheckerAdapter { @@ -724,21 +693,32 @@ pub mod target { } impl StorageProofCheckerAdapter { - fn read_raw_outbound_lane_data(&mut self, lane_id: &LaneId) -> Option> { + fn read_and_decode_outbound_lane_data( + &mut self, + lane_id: &LaneId, + ) -> Result, Error> { let storage_outbound_lane_data_key = bp_messages::storage_keys::outbound_lane_data_key( B::BRIDGED_MESSAGES_PALLET_NAME, lane_id, ); - self.storage.read_value(storage_outbound_lane_data_key.0.as_ref()).ok()? + + self.storage + .read_and_decode_opt_value(storage_outbound_lane_data_key.0.as_ref()) + .map_err(Error::OutboundLaneStorage) } - fn read_raw_message(&mut self, message_key: &MessageKey) -> Option> { + fn read_and_decode_message_payload( + &mut self, + message_key: &MessageKey, + ) -> Result { let storage_message_key = bp_messages::storage_keys::message_key( B::BRIDGED_MESSAGES_PALLET_NAME, &message_key.lane_id, message_key.nonce, ); - self.storage.read_value(storage_message_key.0.as_ref()).ok()? + self.storage + .read_and_decode_mandatory_value(storage_message_key.0.as_ref()) + .map_err(Error::MessageStorage) } } } @@ -896,7 +876,7 @@ mod tests { using_messages_proof(10, None, encode_all_messages, encode_lane_data, |proof| { target::verify_messages_proof::(proof, 5) }), - Err(target::MessageProofError::MessagesCountMismatch), + Err(Error::MessagesCountMismatch), ); } @@ -906,7 +886,7 @@ mod tests { using_messages_proof(10, None, encode_all_messages, encode_lane_data, |proof| { target::verify_messages_proof::(proof, 15) }), - Err(target::MessageProofError::MessagesCountMismatch), + Err(Error::MessagesCountMismatch), ); } @@ -919,7 +899,7 @@ mod tests { pallet_bridge_grandpa::ImportedHeaders::::remove(bridged_header_hash); target::verify_messages_proof::(proof, 10) }), - Err(target::MessageProofError::HeaderChain(HeaderChainError::UnknownHeader)), + Err(Error::HeaderChain(HeaderChainError::UnknownHeader)), ); } @@ -942,7 +922,7 @@ mod tests { ); target::verify_messages_proof::(proof, 10) }), - Err(target::MessageProofError::HeaderChain(HeaderChainError::StorageProof( + Err(Error::HeaderChain(HeaderChainError::StorageProof( StorageProofError::StorageRootMismatch ))), ); @@ -957,7 +937,7 @@ mod tests { proof.storage_proof.push(node); target::verify_messages_proof::(proof, 10) },), - Err(target::MessageProofError::HeaderChain(HeaderChainError::StorageProof( + Err(Error::HeaderChain(HeaderChainError::StorageProof( StorageProofError::DuplicateNodesInProof ))), ); @@ -970,13 +950,13 @@ mod tests { proof.storage_proof.push(vec![42]); target::verify_messages_proof::(proof, 10) },), - Err(target::MessageProofError::StorageProof(StorageProofError::UnusedNodesInTheProof)), + Err(Error::StorageProof(StorageProofError::UnusedNodesInTheProof)), ); } #[test] fn message_proof_is_rejected_if_required_message_is_missing() { - assert_eq!( + matches!( using_messages_proof( 10, None, @@ -984,13 +964,13 @@ mod tests { encode_lane_data, |proof| target::verify_messages_proof::(proof, 10) ), - Err(target::MessageProofError::MissingRequiredMessage), + Err(Error::MessageStorage(StorageProofError::StorageValueEmpty)), ); } #[test] fn message_proof_is_rejected_if_message_decode_fails() { - assert_eq!( + matches!( using_messages_proof( 10, None, @@ -1004,13 +984,13 @@ mod tests { encode_lane_data, |proof| target::verify_messages_proof::(proof, 10), ), - Err(target::MessageProofError::FailedToDecodeMessage), + Err(Error::MessageStorage(StorageProofError::StorageValueDecodeFailed(_))), ); } #[test] fn message_proof_is_rejected_if_outbound_lane_state_decode_fails() { - assert_eq!( + matches!( using_messages_proof( 10, Some(OutboundLaneData { @@ -1026,7 +1006,7 @@ mod tests { }, |proof| target::verify_messages_proof::(proof, 10), ), - Err(target::MessageProofError::FailedToDecodeOutboundLaneState), + Err(Error::OutboundLaneStorage(StorageProofError::StorageValueDecodeFailed(_))), ); } @@ -1036,7 +1016,7 @@ mod tests { using_messages_proof(0, None, encode_all_messages, encode_lane_data, |proof| { target::verify_messages_proof::(proof, 0) },), - Err(target::MessageProofError::Empty), + Err(Error::EmptyMessageProof), ); } @@ -1110,7 +1090,7 @@ mod tests { proof.nonces_end = u64::MAX; target::verify_messages_proof::(proof, u32::MAX) },), - Err(target::MessageProofError::MessagesCountMismatch), + Err(Error::MessagesCountMismatch), ); } } diff --git a/bin/runtime-common/src/messages_benchmarking.rs b/bin/runtime-common/src/messages_benchmarking.rs index 1588c77633e..028172e7ab4 100644 --- a/bin/runtime-common/src/messages_benchmarking.rs +++ b/bin/runtime-common/src/messages_benchmarking.rs @@ -25,7 +25,7 @@ use crate::{ AccountIdOf, BridgedChain, HashOf, HasherOf, MessageBridge, ThisChain, }, messages_generation::{ - encode_all_messages, encode_lane_data, grow_trie, prepare_messages_storage_proof, + encode_all_messages, encode_lane_data, grow_trie_leaf_value, prepare_messages_storage_proof, }, }; @@ -204,11 +204,12 @@ where { let mut trie = TrieDBMutBuilderV1::>>::new(&mut mdb, &mut root).build(); - trie.insert(&storage_key, ¶ms.inbound_lane_data.encode()) + let inbound_lane_data = + grow_trie_leaf_value(params.inbound_lane_data.encode(), params.size); + trie.insert(&storage_key, &inbound_lane_data) .map_err(|_| "TrieMut::insert has failed") .expect("TrieMut::insert should not fail in benchmarks"); } - root = grow_trie(root, &mut mdb, params.size); // generate storage proof to be delivered to This chain let storage_proof = record_all_trie_keys::>>, _>(&mdb, &root) diff --git a/bin/runtime-common/src/messages_generation.rs b/bin/runtime-common/src/messages_generation.rs index aec97c22800..29a869a5c87 100644 --- a/bin/runtime-common/src/messages_generation.rs +++ b/bin/runtime-common/src/messages_generation.rs @@ -25,7 +25,6 @@ use bp_messages::{ }; use bp_runtime::{record_all_trie_keys, RawStorageProof, StorageProofSize}; use codec::Encode; -use sp_core::Hasher; use sp_std::{ops::RangeInclusive, prelude::*}; use sp_trie::{trie_types::TrieDBMutBuilderV1, LayoutV1, MemoryDB, TrieMut}; @@ -65,10 +64,15 @@ where TrieDBMutBuilderV1::>>::new(&mut mdb, &mut root).build(); // insert messages - for nonce in message_nonces { + for (i, nonce) in message_nonces.into_iter().enumerate() { let message_key = MessageKey { lane_id: lane, nonce }; let message_payload = match encode_message(nonce, &message_payload) { - Some(message_payload) => message_payload, + Some(message_payload) => + if i == 0 { + grow_trie_leaf_value(message_payload, size) + } else { + message_payload + }, None => continue, }; let storage_key = storage_keys::message_key( @@ -94,46 +98,22 @@ where storage_keys.push(storage_key); } } - root = grow_trie(root, &mut mdb, size); // generate storage proof to be delivered to This chain let storage_proof = record_all_trie_keys::>>, _>(&mdb, &root) .map_err(|_| "record_all_trie_keys has failed") .expect("record_all_trie_keys should not fail in benchmarks"); - (root, storage_proof) } -/// Populate trie with dummy keys+values until trie has at least given size. -pub fn grow_trie( - mut root: H::Out, - mdb: &mut MemoryDB, - trie_size: StorageProofSize, -) -> H::Out { - let (iterations, leaf_size, minimal_trie_size) = match trie_size { - StorageProofSize::Minimal(_) => return root, - StorageProofSize::HasLargeLeaf(size) => (1, size, size), - StorageProofSize::HasExtraNodes(size) => (8, 1, size), - }; - - let mut key_index = 0; - loop { - // generate storage proof to be delivered to This chain - let storage_proof = record_all_trie_keys::, _>(mdb, &root) - .map_err(|_| "record_all_trie_keys has failed") - .expect("record_all_trie_keys should not fail in benchmarks"); - let size: usize = storage_proof.iter().map(|n| n.len()).sum(); - if size > minimal_trie_size as _ { - return root - } - - let mut trie = TrieDBMutBuilderV1::::from_existing(mdb, &mut root).build(); - for _ in 0..iterations { - trie.insert(&key_index.encode(), &vec![42u8; leaf_size as _]) - .map_err(|_| "TrieMut::insert has failed") - .expect("TrieMut::insert should not fail in benchmarks"); - key_index += 1; - } - trie.commit(); +/// Add extra data to the trie leaf value so that it'll be of given size. +pub fn grow_trie_leaf_value(mut value: Vec, size: StorageProofSize) -> Vec { + match size { + StorageProofSize::Minimal(_) => (), + StorageProofSize::HasLargeLeaf(size) if size as usize > value.len() => { + value.extend(sp_std::iter::repeat(42u8).take(size as usize - value.len())); + }, + StorageProofSize::HasLargeLeaf(_) => (), } + value } diff --git a/bin/runtime-common/src/messages_xcm_extension.rs b/bin/runtime-common/src/messages_xcm_extension.rs new file mode 100644 index 00000000000..7163d8a5357 --- /dev/null +++ b/bin/runtime-common/src/messages_xcm_extension.rs @@ -0,0 +1,181 @@ +// Copyright 2023 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Module provides utilities for easier XCM handling, e.g: +//! [`XcmExecutor`] -> [`MessageSender`] -> +//! | +//! +//! | +//! [`XcmRouter`] <- [`MessageDispatch`] <- + +use bp_messages::{ + source_chain::MessagesBridge, + target_chain::{DispatchMessage, MessageDispatch}, + LaneId, +}; +use bp_runtime::{messages::MessageDispatchResult, AccountIdOf, Chain}; +use codec::{Decode, Encode}; +use frame_support::{dispatch::Weight, traits::Get, CloneNoBound, EqNoBound, PartialEqNoBound}; +use scale_info::TypeInfo; +use xcm_builder::{DispatchBlob, DispatchBlobError, HaulBlob, HaulBlobError}; + +/// Plain "XCM" payload, which we transfer through bridge +pub type XcmAsPlainPayload = sp_std::prelude::Vec; + +/// Message dispatch result type for single message +#[derive(CloneNoBound, EqNoBound, PartialEqNoBound, Encode, Decode, Debug, TypeInfo)] +pub enum XcmBlobMessageDispatchResult { + InvalidPayload, + Dispatched, + NotDispatched(#[codec(skip)] &'static str), +} + +/// [`XcmBlobMessageDispatch`] is responsible for dispatching received messages +pub struct XcmBlobMessageDispatch< + SourceBridgeHubChain, + TargetBridgeHubChain, + DispatchBlob, + DispatchBlobWeigher, +> { + _marker: sp_std::marker::PhantomData<( + SourceBridgeHubChain, + TargetBridgeHubChain, + DispatchBlob, + DispatchBlobWeigher, + )>, +} + +impl< + SourceBridgeHubChain: Chain, + TargetBridgeHubChain: Chain, + BlobDispatcher: DispatchBlob, + DispatchBlobWeigher: Get, + > MessageDispatch> + for XcmBlobMessageDispatch< + SourceBridgeHubChain, + TargetBridgeHubChain, + BlobDispatcher, + DispatchBlobWeigher, + > +{ + type DispatchPayload = XcmAsPlainPayload; + type DispatchLevelResult = XcmBlobMessageDispatchResult; + + fn dispatch_weight(_message: &mut DispatchMessage) -> Weight { + DispatchBlobWeigher::get() + } + + fn dispatch( + _relayer_account: &AccountIdOf, + message: DispatchMessage, + ) -> MessageDispatchResult { + let payload = match message.data.payload { + Ok(payload) => payload, + Err(e) => { + log::error!( + target: crate::LOG_TARGET_BRIDGE_DISPATCH, + "[XcmBlobMessageDispatch] payload error: {:?} - message_nonce: {:?}", + e, + message.key.nonce + ); + return MessageDispatchResult { + // TODO:check-parameter - setup uspent_weight? https://github.com/paritytech/polkadot/issues/6629 + unspent_weight: Weight::zero(), + dispatch_level_result: XcmBlobMessageDispatchResult::InvalidPayload, + } + }, + }; + let dispatch_level_result = match BlobDispatcher::dispatch_blob(payload) { + Ok(_) => { + log::debug!( + target: crate::LOG_TARGET_BRIDGE_DISPATCH, + "[XcmBlobMessageDispatch] DispatchBlob::dispatch_blob was ok - message_nonce: {:?}", + message.key.nonce + ); + XcmBlobMessageDispatchResult::Dispatched + }, + Err(e) => { + let e = match e { + DispatchBlobError::Unbridgable => "DispatchBlobError::Unbridgable", + DispatchBlobError::InvalidEncoding => "DispatchBlobError::InvalidEncoding", + DispatchBlobError::UnsupportedLocationVersion => + "DispatchBlobError::UnsupportedLocationVersion", + DispatchBlobError::UnsupportedXcmVersion => + "DispatchBlobError::UnsupportedXcmVersion", + DispatchBlobError::RoutingError => "DispatchBlobError::RoutingError", + DispatchBlobError::NonUniversalDestination => + "DispatchBlobError::NonUniversalDestination", + DispatchBlobError::WrongGlobal => "DispatchBlobError::WrongGlobal", + }; + log::error!( + target: crate::LOG_TARGET_BRIDGE_DISPATCH, + "[XcmBlobMessageDispatch] DispatchBlob::dispatch_blob failed, error: {:?} - message_nonce: {:?}", + e, message.key.nonce + ); + XcmBlobMessageDispatchResult::NotDispatched(e) + }, + }; + MessageDispatchResult { + // TODO:check-parameter - setup uspent_weight? https://github.com/paritytech/polkadot/issues/6629 + unspent_weight: Weight::zero(), + dispatch_level_result, + } + } +} + +/// [`XcmBlobHauler`] is responsible for sending messages to the bridge "point-to-point link" from +/// one side, where on the other it can be dispatched by [`XcmBlobMessageDispatch`]. +pub trait XcmBlobHauler { + /// Runtime message sender adapter. + type MessageSender: MessagesBridge; + + /// Runtime message sender origin, which is used by [`MessageSender`]. + type MessageSenderOrigin; + /// Our location within the Consensus Universe. + fn message_sender_origin() -> Self::MessageSenderOrigin; + + /// Return message lane (as "point-to-point link") used to deliver XCM messages. + fn xcm_lane() -> LaneId; +} + +/// XCM bridge adapter which connects [`XcmBlobHauler`] with [`MessageSender`] and makes sure that +/// XCM blob is sent to the [`pallet_bridge_messages`] queue to be relayed. +pub struct XcmBlobHaulerAdapter(sp_std::marker::PhantomData); +impl> HaulBlob + for XcmBlobHaulerAdapter +{ + fn haul_blob(blob: sp_std::prelude::Vec) -> Result<(), HaulBlobError> { + let lane = H::xcm_lane(); + let result = H::MessageSender::send_message(H::message_sender_origin(), lane, blob); + let result = result + .map(|artifacts| (lane, artifacts.nonce).using_encoded(sp_io::hashing::blake2_256)); + match &result { + Ok(result) => log::info!( + target: crate::LOG_TARGET_BRIDGE_DISPATCH, + "haul_blob result - ok: {:?} on lane: {:?}", + result, + lane + ), + Err(error) => log::error!( + target: crate::LOG_TARGET_BRIDGE_DISPATCH, + "haul_blob result - error: {:?} on lane: {:?}", + error, + lane + ), + }; + result.map(|_| ()).map_err(|_| HaulBlobError::Transport("MessageSenderError")) + } +} diff --git a/bin/runtime-common/src/parachains_benchmarking.rs b/bin/runtime-common/src/parachains_benchmarking.rs index e549e4f79b9..aad53673c3a 100644 --- a/bin/runtime-common/src/parachains_benchmarking.rs +++ b/bin/runtime-common/src/parachains_benchmarking.rs @@ -19,7 +19,8 @@ #![cfg(feature = "runtime-benchmarks")] use crate::{ - messages_benchmarking::insert_header_to_grandpa_pallet, messages_generation::grow_trie, + messages_benchmarking::insert_header_to_grandpa_pallet, + messages_generation::grow_trie_leaf_value, }; use bp_parachains::parachain_head_storage_key_at_source; @@ -59,17 +60,21 @@ where TrieDBMutBuilderV1::::new(&mut mdb, &mut state_root).build(); // insert parachain heads - for parachain in parachains { + for (i, parachain) in parachains.into_iter().enumerate() { let storage_key = parachain_head_storage_key_at_source(R::ParasPalletName::get(), *parachain); - trie.insert(&storage_key.0, ¶chain_head.encode()) + let leaf_data = if i == 0 { + grow_trie_leaf_value(parachain_head.encode(), size) + } else { + parachain_head.encode() + }; + trie.insert(&storage_key.0, &leaf_data) .map_err(|_| "TrieMut::insert has failed") .expect("TrieMut::insert should not fail in benchmarks"); storage_keys.push(storage_key); parachain_heads.push((*parachain, parachain_head.hash())) } } - state_root = grow_trie(state_root, &mut mdb, size); // generate heads storage proof let proof = record_all_trie_keys::, _>(&mdb, &state_root) diff --git a/bin/runtime-common/src/refund_relayer_extension.rs b/bin/runtime-common/src/refund_relayer_extension.rs index 0a61f4fdd02..7be97f19ad2 100644 --- a/bin/runtime-common/src/refund_relayer_extension.rs +++ b/bin/runtime-common/src/refund_relayer_extension.rs @@ -746,8 +746,9 @@ mod tests { fn dispatch_info() -> DispatchInfo { DispatchInfo { - weight: Weight::from_ref_time( + weight: Weight::from_parts( frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND, + 0, ), class: frame_support::dispatch::DispatchClass::Normal, pays_fee: frame_support::dispatch::Pays::Yes, @@ -1037,8 +1038,9 @@ mod tests { initialize_environment(200, 200, [1u8; 32].into(), 200); let mut dispatch_info = dispatch_info(); - dispatch_info.weight = Weight::from_ref_time( + dispatch_info.weight = Weight::from_parts( frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND * 2, + 0, ); // without any size/weight refund: we expect regular reward diff --git a/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-parachains-dashboard.json b/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-parachains-dashboard.json index 007b6ef9325..31a7cca5229 100644 --- a/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-parachains-dashboard.json +++ b/deployments/bridges/westend-millau/dashboard/grafana/relay-westend-to-millau-parachains-dashboard.json @@ -98,19 +98,19 @@ "steppedLine": false, "targets": [ { - "expr": "Westend_to_Millau_Parachains_best_parachain_block_number_at_source{parachain='para_2000'}", + "expr": "Westend_to_Millau_Parachains_1000_best_parachain_block_number_at_source", "interval": "", "legendFormat": "At Westend", "refId": "A" }, { - "expr": "Westend_to_Millau_Parachains_best_parachain_block_number_at_target{parachain='para_2000'}", + "expr": "Westend_to_Millau_Parachains_1000_best_parachain_block_number_at_target", "interval": "", "legendFormat": "At Millau", "refId": "B" }, { - "expr": "Westend_to_Millau_Parachains_best_parachain_block_number_at_source{parachain='para_2000'} - Westend_to_Millau_Parachains_best_parachain_block_number_at_target{parachain='para_2000'}", + "expr": "Westend_to_Millau_Parachains_1000_best_parachain_block_number_at_source - Westend_to_Millau_Parachains_1000_best_parachain_block_number_at_target", "hide": true, "interval": "", "legendFormat": "Missing Westmint headers at Millau", diff --git a/modules/beefy/Cargo.toml b/modules/beefy/Cargo.toml index 1908bd50c8a..b50ac723db2 100644 --- a/modules/beefy/Cargo.toml +++ b/modules/beefy/Cargo.toml @@ -25,7 +25,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [dev-dependencies] -sp-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" } mmr-lib = { package = "ckb-merkle-mountain-range", version = "0.3.2" } pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/modules/beefy/src/lib.rs b/modules/beefy/src/lib.rs index e05a4119463..a3a68928bc5 100644 --- a/modules/beefy/src/lib.rs +++ b/modules/beefy/src/lib.rs @@ -133,7 +133,7 @@ pub mod pallet { fn on_initialize(_n: T::BlockNumber) -> frame_support::weights::Weight { >::mutate(|count| *count = count.saturating_sub(1)); - Weight::from_ref_time(0) + Weight::from_parts(0, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -419,7 +419,7 @@ mod tests { use frame_support::{assert_noop, assert_ok, traits::Get}; use mock::*; use mock_chain::*; - use sp_beefy::mmr::BeefyAuthoritySet; + use sp_consensus_beefy::mmr::BeefyAuthoritySet; use sp_runtime::DispatchError; fn next_block() { diff --git a/modules/beefy/src/mock.rs b/modules/beefy/src/mock.rs index 212c6c5d434..1ffccc5dfbc 100644 --- a/modules/beefy/src/mock.rs +++ b/modules/beefy/src/mock.rs @@ -32,7 +32,7 @@ use sp_runtime::{ Perbill, }; -pub use sp_beefy::crypto::{AuthorityId as BeefyId, Pair as BeefyPair}; +pub use sp_consensus_beefy::crypto::{AuthorityId as BeefyId, Pair as BeefyPair}; use sp_core::crypto::Wraps; use sp_runtime::traits::Keccak256; @@ -49,7 +49,7 @@ pub type TestBridgedMmrHashing = BridgedMmrHashing; pub type TestBridgedMmrHash = BridgedMmrHash; pub type TestBridgedBeefyMmrLeafExtra = BridgedBeefyMmrLeafExtra; pub type TestBridgedMmrProof = BridgedMmrProof; -pub type TestBridgedRawMmrLeaf = sp_beefy::mmr::MmrLeaf< +pub type TestBridgedRawMmrLeaf = sp_consensus_beefy::mmr::MmrLeaf< TestBridgedBlockNumber, TestBridgedBlockHash, TestBridgedMmrHash, @@ -72,7 +72,7 @@ construct_runtime! { } parameter_types! { - pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); + pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } diff --git a/modules/beefy/src/mock_chain.rs b/modules/beefy/src/mock_chain.rs index ca7e84b121a..c736aed0742 100644 --- a/modules/beefy/src/mock_chain.rs +++ b/modules/beefy/src/mock_chain.rs @@ -30,7 +30,7 @@ use bp_beefy::{BeefyPayload, Commitment, ValidatorSetId, MMR_ROOT_PAYLOAD_ID}; use codec::Encode; use pallet_mmr::NodeIndex; use rand::Rng; -use sp_beefy::mmr::{BeefyNextAuthoritySet, MmrLeafVersion}; +use sp_consensus_beefy::mmr::{BeefyNextAuthoritySet, MmrLeafVersion}; use sp_core::Pair; use sp_runtime::traits::{Hash, Header as HeaderT}; use std::collections::HashMap; @@ -188,7 +188,7 @@ impl HeaderBuilder { next_validator_keys.iter().map(|pair| pair.public()).collect::>(); let next_validators_mmr_root = get_authorities_mmr_root::(next_validators.iter()); - let leaf = sp_beefy::mmr::MmrLeaf { + let leaf = sp_consensus_beefy::mmr::MmrLeaf { version: MmrLeafVersion::new(1, 0), parent_number_and_hash: (header.number().saturating_sub(1), *header.parent_hash()), beefy_next_authority_set: BeefyNextAuthoritySet { diff --git a/modules/beefy/src/utils.rs b/modules/beefy/src/utils.rs index fac9a2c92e6..45e14ecbfe0 100644 --- a/modules/beefy/src/utils.rs +++ b/modules/beefy/src/utils.rs @@ -163,7 +163,7 @@ mod tests { use crate::{mock::*, mock_chain::*, *}; use bp_beefy::{BeefyPayload, MMR_ROOT_PAYLOAD_ID}; use frame_support::{assert_noop, assert_ok}; - use sp_beefy::ValidatorSet; + use sp_consensus_beefy::ValidatorSet; #[test] fn submit_commitment_checks_metadata() { diff --git a/modules/grandpa/Cargo.toml b/modules/grandpa/Cargo.toml index 9e260a33537..095c1d9f4e4 100644 --- a/modules/grandpa/Cargo.toml +++ b/modules/grandpa/Cargo.toml @@ -22,7 +22,7 @@ bp-header-chain = { path = "../../primitives/header-chain", default-features = f frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -48,7 +48,7 @@ std = [ "frame-benchmarking/std", "log/std", "scale-info/std", - "sp-finality-grandpa/std", + "sp-consensus-grandpa/std", "sp-runtime/std", "sp-std/std", "sp-trie/std", diff --git a/modules/grandpa/src/benchmarking.rs b/modules/grandpa/src/benchmarking.rs index 337943bee4e..5b9faea2a99 100644 --- a/modules/grandpa/src/benchmarking.rs +++ b/modules/grandpa/src/benchmarking.rs @@ -41,6 +41,7 @@ use crate::*; +use bp_header_chain::justification::required_justification_precommits; use bp_runtime::BasicOperatingMode; use bp_test_utils::{ accounts, make_justification_for_header, JustificationGeneratorParams, TEST_GRANDPA_ROUND, @@ -48,7 +49,7 @@ use bp_test_utils::{ }; use frame_benchmarking::{benchmarks_instance_pallet, whitelisted_caller}; use frame_system::RawOrigin; -use sp_finality_grandpa::AuthorityId; +use sp_consensus_grandpa::AuthorityId; use sp_runtime::traits::{One, Zero}; use sp_std::vec::Vec; @@ -66,13 +67,14 @@ const MAX_VOTE_ANCESTRIES_RANGE_END: u32 = MAX_VOTE_ANCESTRIES_RANGE_BEGIN + MAX_VOTE_ANCESTRIES_RANGE_BEGIN; // the same with validators - if there are too much validators, let's run benchmarks on subrange -fn validator_set_range_end, I: 'static>() -> u32 { +fn precommits_range_end, I: 'static>() -> u32 { let max_bridged_authorities = T::BridgedChain::MAX_AUTHORITIES_COUNT; if max_bridged_authorities > 128 { sp_std::cmp::max(128, max_bridged_authorities / 5) } else { max_bridged_authorities - } + }; + required_justification_precommits(max_bridged_authorities) } /// Prepare header and its justification to submit using `submit_finality_proof`. @@ -80,7 +82,10 @@ fn prepare_benchmark_data, I: 'static>( precommits: u32, ancestors: u32, ) -> (BridgedHeader, GrandpaJustification>) { - let authority_list = accounts(precommits as u16) + // going from precommits to total authorities count + let total_authorities_count = (3 * precommits - 1) / 2; + + let authority_list = accounts(total_authorities_count as u16) .iter() .map(|id| (AuthorityId::from(*id), 1)) .collect::>(); @@ -114,7 +119,7 @@ benchmarks_instance_pallet! { // This is the "gold standard" benchmark for this extrinsic, and it's what should be used to // annotate the weight in the pallet. submit_finality_proof { - let p in 1 .. validator_set_range_end::(); + let p in 1 .. precommits_range_end::(); let v in MAX_VOTE_ANCESTRIES_RANGE_BEGIN..MAX_VOTE_ANCESTRIES_RANGE_END; let caller: T::AccountId = whitelisted_caller(); let (header, justification) = prepare_benchmark_data::(p, v); diff --git a/modules/grandpa/src/lib.rs b/modules/grandpa/src/lib.rs index 4304e82eeb1..2b9e49d4c95 100644 --- a/modules/grandpa/src/lib.rs +++ b/modules/grandpa/src/lib.rs @@ -45,7 +45,7 @@ use bp_header_chain::{ use bp_runtime::{BlockNumberOf, HashOf, HasherOf, HeaderId, HeaderOf, OwnedBridgeModule}; use finality_grandpa::voter_set::VoterSet; use frame_support::{dispatch::PostDispatchInfo, ensure}; -use sp_finality_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID}; +use sp_consensus_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID}; use sp_runtime::{ traits::{Header as HeaderT, Zero}, SaturatedConversion, @@ -403,7 +403,7 @@ pub mod pallet { /// Returned value will indicate if a change was enacted or not. pub(crate) fn try_enact_authority_change, I: 'static>( header: &BridgedHeader, - current_set_id: sp_finality_grandpa::SetId, + current_set_id: sp_consensus_grandpa::SetId, ) -> Result { let mut change_enacted = false; @@ -584,7 +584,7 @@ impl, I: 'static> HeaderChain> for GrandpaChainH pub(crate) fn find_scheduled_change( header: &H, -) -> Option> { +) -> Option> { use sp_runtime::generic::OpaqueDigestItemId; let id = OpaqueDigestItemId::Consensus(&GRANDPA_ENGINE_ID); @@ -603,7 +603,7 @@ pub(crate) fn find_scheduled_change( /// extracts it. pub(crate) fn find_forced_change( header: &H, -) -> Option<(H::Number, sp_finality_grandpa::ScheduledChange)> { +) -> Option<(H::Number, sp_consensus_grandpa::ScheduledChange)> { use sp_runtime::generic::OpaqueDigestItemId; let id = OpaqueDigestItemId::Consensus(&GRANDPA_ENGINE_ID); @@ -695,7 +695,7 @@ mod tests { fn change_log(delay: u64) -> Digest { let consensus_log = - ConsensusLog::::ScheduledChange(sp_finality_grandpa::ScheduledChange { + ConsensusLog::::ScheduledChange(sp_consensus_grandpa::ScheduledChange { next_authorities: vec![(ALICE.into(), 1), (BOB.into(), 1)], delay, }); @@ -706,7 +706,7 @@ mod tests { fn forced_change_log(delay: u64) -> Digest { let consensus_log = ConsensusLog::::ForcedChange( delay, - sp_finality_grandpa::ScheduledChange { + sp_consensus_grandpa::ScheduledChange { next_authorities: vec![(ALICE.into(), 1), (BOB.into(), 1)], delay, }, @@ -717,7 +717,7 @@ mod tests { fn many_authorities_log() -> Digest { let consensus_log = - ConsensusLog::::ScheduledChange(sp_finality_grandpa::ScheduledChange { + ConsensusLog::::ScheduledChange(sp_consensus_grandpa::ScheduledChange { next_authorities: std::iter::repeat((ALICE.into(), 1)) .take(MAX_BRIDGED_AUTHORITIES as usize + 1) .collect(), diff --git a/modules/grandpa/src/mock.rs b/modules/grandpa/src/mock.rs index f0ae2583529..acedfc3582c 100644 --- a/modules/grandpa/src/mock.rs +++ b/modules/grandpa/src/mock.rs @@ -54,7 +54,7 @@ construct_runtime! { } parameter_types! { - pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); + pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } diff --git a/modules/grandpa/src/storage_types.rs b/modules/grandpa/src/storage_types.rs index d674f1a7b0a..70448286335 100644 --- a/modules/grandpa/src/storage_types.rs +++ b/modules/grandpa/src/storage_types.rs @@ -22,7 +22,7 @@ use bp_header_chain::{AuthoritySet, ChainWithGrandpa}; use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{traits::Get, BoundedVec, RuntimeDebugNoBound}; use scale_info::TypeInfo; -use sp_finality_grandpa::{AuthorityId, AuthorityList, AuthorityWeight, SetId}; +use sp_consensus_grandpa::{AuthorityId, AuthorityList, AuthorityWeight, SetId}; use sp_std::marker::PhantomData; /// A bounded list of Grandpa authorities with associated weights. diff --git a/modules/grandpa/src/weights.rs b/modules/grandpa/src/weights.rs index 44b4ebd37fb..089aee8b569 100644 --- a/modules/grandpa/src/weights.rs +++ b/modules/grandpa/src/weights.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_bridge_grandpa //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-02-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `covid`, CPU: `11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -93,19 +93,19 @@ impl WeightInfo for BridgeWeight { /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// The range of component `p` is `[1, 5]`. + /// The range of component `p` is `[1, 4]`. /// /// The range of component `v` is `[50, 100]`. fn submit_finality_proof(p: u32, v: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `416 + p * (40 ±0)` + // Measured: `394 + p * (60 ±0)` // Estimated: `4745` - // Minimum execution time: 221_703 nanoseconds. - Weight::from_parts(39_358_497, 4745) - // Standard Error: 85_573 - .saturating_add(Weight::from_ref_time(40_593_280).saturating_mul(p.into())) - // Standard Error: 7_808 - .saturating_add(Weight::from_ref_time(1_529_400).saturating_mul(v.into())) + // Minimum execution time: 228_072 nanoseconds. + Weight::from_parts(57_853_228, 4745) + // Standard Error: 149_421 + .saturating_add(Weight::from_parts(36_708_702, 0).saturating_mul(p.into())) + // Standard Error: 10_625 + .saturating_add(Weight::from_parts(1_469_032, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -148,19 +148,19 @@ impl WeightInfo for () { /// Proof: BridgeRialtoGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68), /// added: 2048, mode: MaxEncodedLen) /// - /// The range of component `p` is `[1, 5]`. + /// The range of component `p` is `[1, 4]`. /// /// The range of component `v` is `[50, 100]`. fn submit_finality_proof(p: u32, v: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `416 + p * (40 ±0)` + // Measured: `394 + p * (60 ±0)` // Estimated: `4745` - // Minimum execution time: 221_703 nanoseconds. - Weight::from_parts(39_358_497, 4745) - // Standard Error: 85_573 - .saturating_add(Weight::from_ref_time(40_593_280).saturating_mul(p.into())) - // Standard Error: 7_808 - .saturating_add(Weight::from_ref_time(1_529_400).saturating_mul(v.into())) + // Minimum execution time: 228_072 nanoseconds. + Weight::from_parts(57_853_228, 4745) + // Standard Error: 149_421 + .saturating_add(Weight::from_parts(36_708_702, 0).saturating_mul(p.into())) + // Standard Error: 10_625 + .saturating_add(Weight::from_parts(1_469_032, 0).saturating_mul(v.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } diff --git a/modules/messages/src/benchmarking.rs b/modules/messages/src/benchmarking.rs index a89cb3a8ef0..955dd3da2c5 100644 --- a/modules/messages/src/benchmarking.rs +++ b/modules/messages/src/benchmarking.rs @@ -238,7 +238,7 @@ benchmarks_instance_pallet! { lane: T::bench_lane_id(), message_nonces: 21..=21, outbound_lane_data: None, - size: StorageProofSize::HasExtraNodes(1024), + size: StorageProofSize::HasLargeLeaf(1024), }); }: receive_messages_proof(RawOrigin::Signed(relayer_id_on_target), relayer_id_on_source, proof, 1, dispatch_weight) verify { @@ -272,7 +272,7 @@ benchmarks_instance_pallet! { lane: T::bench_lane_id(), message_nonces: 21..=21, outbound_lane_data: None, - size: StorageProofSize::HasExtraNodes(16 * 1024), + size: StorageProofSize::HasLargeLeaf(16 * 1024), }); }: receive_messages_proof(RawOrigin::Signed(relayer_id_on_target), relayer_id_on_source, proof, 1, dispatch_weight) verify { diff --git a/modules/messages/src/lib.rs b/modules/messages/src/lib.rs index 68af3024445..a9a25fb9622 100644 --- a/modules/messages/src/lib.rs +++ b/modules/messages/src/lib.rs @@ -178,7 +178,6 @@ pub mod pallet { >>::MessagesDeliveryProof; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(PhantomData<(T, I)>); impl, I: 'static> OwnedBridgeModule for Pallet { diff --git a/modules/messages/src/mock.rs b/modules/messages/src/mock.rs index 084262c7905..a31ee2b9401 100644 --- a/modules/messages/src/mock.rs +++ b/modules/messages/src/mock.rs @@ -89,7 +89,7 @@ frame_support::construct_runtime! { parameter_types! { pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); + pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } @@ -410,7 +410,7 @@ pub const fn message_payload(id: u64, declared_weight: u64) -> TestPayload { TestPayload { id, reject_by_lane_verifier: false, - declared_weight: Weight::from_ref_time(declared_weight), + declared_weight: Weight::from_parts(declared_weight, 0), dispatch_result: dispatch_result(0), extra: Vec::new(), } @@ -421,7 +421,7 @@ pub const fn dispatch_result( unspent_weight: u64, ) -> MessageDispatchResult { MessageDispatchResult { - unspent_weight: Weight::from_ref_time(unspent_weight), + unspent_weight: Weight::from_parts(unspent_weight, 0), dispatch_level_result: (), } } diff --git a/modules/messages/src/weights.rs b/modules/messages/src/weights.rs index f18285f3dfe..4b2e5b48ee2 100644 --- a/modules/messages/src/weights.rs +++ b/modules/messages/src/weights.rs @@ -14,10 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Parity Bridges Common. If not, see . -//! Autogenerated weights for pallet_bridge_messages +//! Autogenerated weights for RialtoMessages //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-02-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `covid`, CPU: `11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -29,7 +29,7 @@ // --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_bridge_messages +// --pallet=RialtoMessages // --extrinsic=* // --execution=wasm // --wasm-execution=Compiled @@ -48,7 +48,7 @@ use frame_support::{ }; use sp_std::marker::PhantomData; -/// Weight functions needed for pallet_bridge_messages. +/// Weight functions needed for RialtoMessages. pub trait WeightInfo { fn receive_single_message_proof() -> Weight; fn receive_two_messages_proof() -> Weight; @@ -60,7 +60,7 @@ pub trait WeightInfo { fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight; } -/// Weights for `pallet_bridge_messages` that are generated using one of the Bridge testnets. +/// Weights for `RialtoMessages` that are generated using one of the Bridge testnets. /// /// Those weights are test only and must never be used in production. pub struct BridgeWeight(PhantomData); @@ -88,8 +88,8 @@ impl WeightInfo for BridgeWeight { // Proof Size summary in bytes: // Measured: `693` // Estimated: `54703` - // Minimum execution time: 50_655 nanoseconds. - Weight::from_parts(60_502_000, 54703) + // Minimum execution time: 48_058 nanoseconds. + Weight::from_parts(50_422_000, 54703) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -116,8 +116,8 @@ impl WeightInfo for BridgeWeight { // Proof Size summary in bytes: // Measured: `693` // Estimated: `54703` - // Minimum execution time: 58_861 nanoseconds. - Weight::from_parts(60_288_000, 54703) + // Minimum execution time: 59_371 nanoseconds. + Weight::from_parts(61_726_000, 54703) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -144,8 +144,8 @@ impl WeightInfo for BridgeWeight { // Proof Size summary in bytes: // Measured: `693` // Estimated: `54703` - // Minimum execution time: 53_459 nanoseconds. - Weight::from_parts(54_577_000, 54703) + // Minimum execution time: 53_398 nanoseconds. + Weight::from_parts(54_351_000, 54703) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -167,8 +167,8 @@ impl WeightInfo for BridgeWeight { // Proof Size summary in bytes: // Measured: `618` // Estimated: `54200` - // Minimum execution time: 54_011 nanoseconds. - Weight::from_parts(55_573_000, 54200) + // Minimum execution time: 50_064 nanoseconds. + Weight::from_parts(51_306_000, 54200) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -190,8 +190,8 @@ impl WeightInfo for BridgeWeight { // Proof Size summary in bytes: // Measured: `618` // Estimated: `54200` - // Minimum execution time: 105_856 nanoseconds. - Weight::from_parts(109_112_000, 54200) + // Minimum execution time: 75_403 nanoseconds. + Weight::from_parts(77_006_000, 54200) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -212,14 +212,14 @@ impl WeightInfo for BridgeWeight { /// /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) /// - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(60), added: 2535, + /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(65), added: 2540, /// mode: MaxEncodedLen) fn receive_delivery_proof_for_single_message() -> Weight { // Proof Size summary in bytes: // Measured: `579` - // Estimated: `5619` - // Minimum execution time: 40_894 nanoseconds. - Weight::from_parts(41_766_000, 5619) + // Estimated: `5624` + // Minimum execution time: 41_670 nanoseconds. + Weight::from_parts(42_863_000, 5624) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -240,14 +240,14 @@ impl WeightInfo for BridgeWeight { /// /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) /// - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(60), added: 2535, + /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(65), added: 2540, /// mode: MaxEncodedLen) fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { // Proof Size summary in bytes: // Measured: `596` - // Estimated: `5619` - // Minimum execution time: 39_996 nanoseconds. - Weight::from_parts(41_452_000, 5619) + // Estimated: `5624` + // Minimum execution time: 40_928 nanoseconds. + Weight::from_parts(42_165_000, 5624) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -268,14 +268,14 @@ impl WeightInfo for BridgeWeight { /// /// Storage: BridgeRelayers RelayerRewards (r:2 w:2) /// - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(60), added: 2535, + /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(65), added: 2540, /// mode: MaxEncodedLen) fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { // Proof Size summary in bytes: // Measured: `596` - // Estimated: `8154` - // Minimum execution time: 42_281 nanoseconds. - Weight::from_parts(43_593_000, 8154) + // Estimated: `8164` + // Minimum execution time: 44_022 nanoseconds. + Weight::from_parts(44_657_000, 8164) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -306,8 +306,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `693` // Estimated: `54703` - // Minimum execution time: 50_655 nanoseconds. - Weight::from_parts(60_502_000, 54703) + // Minimum execution time: 48_058 nanoseconds. + Weight::from_parts(50_422_000, 54703) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -334,8 +334,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `693` // Estimated: `54703` - // Minimum execution time: 58_861 nanoseconds. - Weight::from_parts(60_288_000, 54703) + // Minimum execution time: 59_371 nanoseconds. + Weight::from_parts(61_726_000, 54703) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -362,8 +362,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `693` // Estimated: `54703` - // Minimum execution time: 53_459 nanoseconds. - Weight::from_parts(54_577_000, 54703) + // Minimum execution time: 53_398 nanoseconds. + Weight::from_parts(54_351_000, 54703) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -385,8 +385,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `618` // Estimated: `54200` - // Minimum execution time: 54_011 nanoseconds. - Weight::from_parts(55_573_000, 54200) + // Minimum execution time: 50_064 nanoseconds. + Weight::from_parts(51_306_000, 54200) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -408,8 +408,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `618` // Estimated: `54200` - // Minimum execution time: 105_856 nanoseconds. - Weight::from_parts(109_112_000, 54200) + // Minimum execution time: 75_403 nanoseconds. + Weight::from_parts(77_006_000, 54200) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -430,14 +430,14 @@ impl WeightInfo for () { /// /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) /// - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(60), added: 2535, + /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(65), added: 2540, /// mode: MaxEncodedLen) fn receive_delivery_proof_for_single_message() -> Weight { // Proof Size summary in bytes: // Measured: `579` - // Estimated: `5619` - // Minimum execution time: 40_894 nanoseconds. - Weight::from_parts(41_766_000, 5619) + // Estimated: `5624` + // Minimum execution time: 41_670 nanoseconds. + Weight::from_parts(42_863_000, 5624) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -458,14 +458,14 @@ impl WeightInfo for () { /// /// Storage: BridgeRelayers RelayerRewards (r:1 w:1) /// - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(60), added: 2535, + /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(65), added: 2540, /// mode: MaxEncodedLen) fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { // Proof Size summary in bytes: // Measured: `596` - // Estimated: `5619` - // Minimum execution time: 39_996 nanoseconds. - Weight::from_parts(41_452_000, 5619) + // Estimated: `5624` + // Minimum execution time: 40_928 nanoseconds. + Weight::from_parts(42_165_000, 5624) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -486,14 +486,14 @@ impl WeightInfo for () { /// /// Storage: BridgeRelayers RelayerRewards (r:2 w:2) /// - /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(60), added: 2535, + /// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(65), added: 2540, /// mode: MaxEncodedLen) fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { // Proof Size summary in bytes: // Measured: `596` - // Estimated: `8154` - // Minimum execution time: 42_281 nanoseconds. - Weight::from_parts(43_593_000, 8154) + // Estimated: `8164` + // Minimum execution time: 44_022 nanoseconds. + Weight::from_parts(44_657_000, 8164) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/modules/parachains/src/benchmarking.rs b/modules/parachains/src/benchmarking.rs index b156b724afe..83cfba0b8c6 100644 --- a/modules/parachains/src/benchmarking.rs +++ b/modules/parachains/src/benchmarking.rs @@ -85,7 +85,7 @@ benchmarks_instance_pallet! { let (relay_block_number, relay_block_hash, parachain_heads_proof, parachains_heads) = T::prepare_parachain_heads_proof( ¶chains, DEFAULT_PARACHAIN_HEAD_SIZE, - StorageProofSize::HasExtraNodes(1024), + StorageProofSize::HasLargeLeaf(1024), ); let at_relay_block = (relay_block_number, relay_block_hash); }: submit_parachain_heads(RawOrigin::Signed(sender), at_relay_block, parachains_heads, parachain_heads_proof) @@ -102,7 +102,7 @@ benchmarks_instance_pallet! { let (relay_block_number, relay_block_hash, parachain_heads_proof, parachains_heads) = T::prepare_parachain_heads_proof( ¶chains, DEFAULT_PARACHAIN_HEAD_SIZE, - StorageProofSize::HasExtraNodes(16 * 1024), + StorageProofSize::HasLargeLeaf(16 * 1024), ); let at_relay_block = (relay_block_number, relay_block_hash); }: submit_parachain_heads(RawOrigin::Signed(sender), at_relay_block, parachains_heads, parachain_heads_proof) diff --git a/modules/parachains/src/lib.rs b/modules/parachains/src/lib.rs index b9bbaac7ca3..20a9ef9b95b 100644 --- a/modules/parachains/src/lib.rs +++ b/modules/parachains/src/lib.rs @@ -26,7 +26,7 @@ pub use weights::WeightInfo; pub use weights_ext::WeightInfoExt; -use bp_header_chain::HeaderChain; +use bp_header_chain::{HeaderChain, HeaderChainError}; use bp_parachains::{parachain_head_storage_key_at_source, ParaInfo, ParaStoredHeaderData}; use bp_polkadot_core::parachains::{ParaHash, ParaHead, ParaHeadsProof, ParaId}; use bp_runtime::{Chain, HashOf, HeaderId, HeaderIdOf, Parachain, StorageProofError}; @@ -125,8 +125,8 @@ pub mod pallet { UnknownRelayChainBlock, /// The number of stored relay block is different from what the relayer has provided. InvalidRelayChainBlockNumber, - /// Invalid storage proof has been passed. - InvalidStorageProof, + /// Error generated by a method defined in `bp-header-chain`. + HeaderChain(HeaderChainError), /// Given parachain head is unknown. UnknownParaHead, /// The storage proof doesn't contains storage root. So it is invalid for given header. @@ -277,7 +277,6 @@ pub mod pallet { >; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(PhantomData<(T, I)>); impl, I: 'static> OwnedBridgeModule for Pallet { @@ -430,10 +429,10 @@ pub mod pallet { storage.ensure_no_unused_nodes() }, ) - .and_then(|r| r.map_err(bp_header_chain::HeaderChainError::StorageProof)) + .and_then(|r| r.map_err(HeaderChainError::StorageProof)) .map_err(|e| { log::trace!(target: LOG_TARGET, "Parachain heads storage proof is invalid: {:?}", e); - Error::::InvalidStorageProof + Error::::HeaderChain(e) })?; Ok(PostDispatchInfo { actual_weight: Some(actual_weight), pays_fee: Pays::Yes }) @@ -1379,7 +1378,9 @@ mod tests { // try to import head#5 of parachain#1 at relay chain block #0 assert_noop!( import_parachain_1_head(0, Default::default(), parachains, proof), - Error::::InvalidStorageProof + Error::::HeaderChain(HeaderChainError::StorageProof( + StorageProofError::StorageRootMismatch + )) ); }); } diff --git a/modules/parachains/src/mock.rs b/modules/parachains/src/mock.rs index aabcdcdd364..83d347018e4 100644 --- a/modules/parachains/src/mock.rs +++ b/modules/parachains/src/mock.rs @@ -158,7 +158,7 @@ construct_runtime! { parameter_types! { pub const BlockHashCount: TestNumber = 250; - pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); + pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } diff --git a/modules/parachains/src/weights.rs b/modules/parachains/src/weights.rs index 5ee1e4d3621..54a835cbc87 100644 --- a/modules/parachains/src/weights.rs +++ b/modules/parachains/src/weights.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_bridge_parachains //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-02-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `covid`, CPU: `11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -77,23 +77,23 @@ impl WeightInfo for BridgeWeight { /// /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(14400), max_size: - /// Some(64), added: 2044, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Some(64), added: 1549, mode: MaxEncodedLen) /// /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(14400), max_size: - /// Some(196), added: 2176, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Some(196), added: 1681, mode: MaxEncodedLen) /// /// The range of component `p` is `[1, 2]`. fn submit_parachain_heads_with_n_parachains(p: u32) -> Weight { // Proof Size summary in bytes: // Measured: `366` - // Estimated: `5143` - // Minimum execution time: 35_160 nanoseconds. - Weight::from_parts(36_951_585, 5143) - // Standard Error: 336_932 - .saturating_add(Weight::from_ref_time(407_557).saturating_mul(p.into())) + // Estimated: `4648` + // Minimum execution time: 36_701 nanoseconds. + Weight::from_parts(38_597_828, 4648) + // Standard Error: 190_859 + .saturating_add(Weight::from_parts(60_685, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -114,19 +114,19 @@ impl WeightInfo for BridgeWeight { /// /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(14400), max_size: - /// Some(64), added: 2044, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Some(64), added: 1549, mode: MaxEncodedLen) /// /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(14400), max_size: - /// Some(196), added: 2176, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Some(196), added: 1681, mode: MaxEncodedLen) fn submit_parachain_heads_with_1kb_proof() -> Weight { // Proof Size summary in bytes: // Measured: `366` - // Estimated: `5143` - // Minimum execution time: 42_276 nanoseconds. - Weight::from_parts(43_525_000, 5143) + // Estimated: `4648` + // Minimum execution time: 38_189 nanoseconds. + Weight::from_parts(39_252_000, 4648) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -147,19 +147,19 @@ impl WeightInfo for BridgeWeight { /// /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(14400), max_size: - /// Some(64), added: 2044, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Some(64), added: 1549, mode: MaxEncodedLen) /// /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(14400), max_size: - /// Some(196), added: 2176, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Some(196), added: 1681, mode: MaxEncodedLen) fn submit_parachain_heads_with_16kb_proof() -> Weight { // Proof Size summary in bytes: // Measured: `366` - // Estimated: `5143` - // Minimum execution time: 85_824 nanoseconds. - Weight::from_parts(87_335_000, 5143) + // Estimated: `4648` + // Minimum execution time: 62_868 nanoseconds. + Weight::from_parts(63_581_000, 4648) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -184,23 +184,23 @@ impl WeightInfo for () { /// /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(14400), max_size: - /// Some(64), added: 2044, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Some(64), added: 1549, mode: MaxEncodedLen) /// /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(14400), max_size: - /// Some(196), added: 2176, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Some(196), added: 1681, mode: MaxEncodedLen) /// /// The range of component `p` is `[1, 2]`. fn submit_parachain_heads_with_n_parachains(p: u32) -> Weight { // Proof Size summary in bytes: // Measured: `366` - // Estimated: `5143` - // Minimum execution time: 35_160 nanoseconds. - Weight::from_parts(36_951_585, 5143) - // Standard Error: 336_932 - .saturating_add(Weight::from_ref_time(407_557).saturating_mul(p.into())) + // Estimated: `4648` + // Minimum execution time: 36_701 nanoseconds. + Weight::from_parts(38_597_828, 4648) + // Standard Error: 190_859 + .saturating_add(Weight::from_parts(60_685, 0).saturating_mul(p.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -221,19 +221,19 @@ impl WeightInfo for () { /// /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(14400), max_size: - /// Some(64), added: 2044, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Some(64), added: 1549, mode: MaxEncodedLen) /// /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(14400), max_size: - /// Some(196), added: 2176, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Some(196), added: 1681, mode: MaxEncodedLen) fn submit_parachain_heads_with_1kb_proof() -> Weight { // Proof Size summary in bytes: // Measured: `366` - // Estimated: `5143` - // Minimum execution time: 42_276 nanoseconds. - Weight::from_parts(43_525_000, 5143) + // Estimated: `4648` + // Minimum execution time: 38_189 nanoseconds. + Weight::from_parts(39_252_000, 4648) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -254,19 +254,19 @@ impl WeightInfo for () { /// /// Storage: BridgeRialtoParachains ImportedParaHashes (r:1 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(14400), max_size: - /// Some(64), added: 2044, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHashes (max_values: Some(1024), max_size: + /// Some(64), added: 1549, mode: MaxEncodedLen) /// /// Storage: BridgeRialtoParachains ImportedParaHeads (r:0 w:1) /// - /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(14400), max_size: - /// Some(196), added: 2176, mode: MaxEncodedLen) + /// Proof: BridgeRialtoParachains ImportedParaHeads (max_values: Some(1024), max_size: + /// Some(196), added: 1681, mode: MaxEncodedLen) fn submit_parachain_heads_with_16kb_proof() -> Weight { // Proof Size summary in bytes: // Measured: `366` - // Estimated: `5143` - // Minimum execution time: 85_824 nanoseconds. - Weight::from_parts(87_335_000, 5143) + // Estimated: `4648` + // Minimum execution time: 62_868 nanoseconds. + Weight::from_parts(63_581_000, 4648) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/modules/relayers/src/lib.rs b/modules/relayers/src/lib.rs index 3d32e3c7a14..bd33b811b30 100644 --- a/modules/relayers/src/lib.rs +++ b/modules/relayers/src/lib.rs @@ -63,7 +63,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(PhantomData); #[pallet::call] diff --git a/modules/relayers/src/weights.rs b/modules/relayers/src/weights.rs index 572935f6302..1f111aaf136 100644 --- a/modules/relayers/src/weights.rs +++ b/modules/relayers/src/weights.rs @@ -17,9 +17,9 @@ //! Autogenerated weights for pallet_bridge_relayers //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-02-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `serban-ROG-Zephyrus`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H` +//! HOSTNAME: `covid`, CPU: `11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -71,8 +71,8 @@ impl WeightInfo for BridgeWeight { // Proof Size summary in bytes: // Measured: `275` // Estimated: `5111` - // Minimum execution time: 43_031 nanoseconds. - Weight::from_parts(44_527_000, 5111) + // Minimum execution time: 48_639 nanoseconds. + Weight::from_parts(49_600_000, 5111) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -93,8 +93,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `275` // Estimated: `5111` - // Minimum execution time: 43_031 nanoseconds. - Weight::from_parts(44_527_000, 5111) + // Minimum execution time: 48_639 nanoseconds. + Weight::from_parts(49_600_000, 5111) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } diff --git a/modules/shift-session-manager/src/lib.rs b/modules/shift-session-manager/src/lib.rs index dce6005ab54..1c38a52b0c2 100644 --- a/modules/shift-session-manager/src/lib.rs +++ b/modules/shift-session-manager/src/lib.rs @@ -35,7 +35,6 @@ pub mod pallet { pub trait Config: pallet_session::Config {} #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] pub struct Pallet(PhantomData); @@ -152,7 +151,7 @@ mod tests { } parameter_types! { - pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024); + pub const MaximumBlockWeight: Weight = Weight::from_parts(1024, 0); pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); } diff --git a/primitives/beefy/Cargo.toml b/primitives/beefy/Cargo.toml index 58cc268e698..4b4044252ca 100644 --- a/primitives/beefy/Cargo.toml +++ b/primitives/beefy/Cargo.toml @@ -18,7 +18,7 @@ bp-runtime = { path = "../runtime", default-features = false } # Substrate Dependencies binary-merkle-tree = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -35,7 +35,7 @@ std = [ "pallet-mmr/std", "scale-info/std", "serde", - "sp-beefy/std", + "sp-consensus-beefy/std", "sp-runtime/std", "sp-std/std" ] diff --git a/primitives/beefy/src/lib.rs b/primitives/beefy/src/lib.rs index 042d1d0e661..de260d45eca 100644 --- a/primitives/beefy/src/lib.rs +++ b/primitives/beefy/src/lib.rs @@ -25,7 +25,7 @@ pub use pallet_mmr::{ primitives::{DataOrHash as MmrDataOrHash, Proof as MmrProof}, verify_leaves_proof as verify_mmr_leaves_proof, }; -pub use sp_beefy::{ +pub use sp_consensus_beefy::{ crypto::{AuthorityId as EcdsaValidatorId, AuthoritySignature as EcdsaValidatorSignature}, known_payloads::MMR_ROOT_ID as MMR_ROOT_PAYLOAD_ID, mmr::{BeefyAuthoritySet, MmrLeafVersion}, @@ -51,7 +51,7 @@ use sp_std::prelude::*; pub trait ChainWithBeefy: Chain { /// The hashing algorithm used to compute the digest of the BEEFY commitment. /// - /// Corresponds to the hashing algorithm, used by `beefy_gadget::BeefyKeystore`. + /// Corresponds to the hashing algorithm, used by `sc_consensus_beefy::BeefyKeystore`. type CommitmentHasher: sp_runtime::traits::Hash; /// The hashing algorithm used to build the MMR. @@ -95,7 +95,7 @@ pub type BeefyAuthorityIdOf = ::AuthorityId; /// BEEFY validator set, containing both validator identifiers and the numeric set id. pub type BeefyAuthoritySetOf = ValidatorSet>; /// BEEFY authority set, containing both validator identifiers and the numeric set id. -pub type BeefyAuthoritySetInfoOf = sp_beefy::mmr::BeefyAuthoritySet>; +pub type BeefyAuthoritySetInfoOf = sp_consensus_beefy::mmr::BeefyAuthoritySet>; /// BEEFY validator signature used by given Substrate chain. pub type BeefyValidatorSignatureOf = <::AuthorityId as RuntimeAppPublic>::Signature; @@ -116,8 +116,12 @@ pub type BeefyMmrLeafExtraOf = ::BeefyMmrLeafExtra; /// the given Substrate chain. pub type BeefyAuthorityIdToMerkleLeafOf = ::AuthorityIdToMerkleLeaf; /// Actual type of leafs in the BEEFY MMR. -pub type BeefyMmrLeafOf = - sp_beefy::mmr::MmrLeaf, HashOf, MmrHashOf, BeefyMmrLeafExtraOf>; +pub type BeefyMmrLeafOf = sp_consensus_beefy::mmr::MmrLeaf< + BlockNumberOf, + HashOf, + MmrHashOf, + BeefyMmrLeafExtraOf, +>; /// Data required for initializing the BEEFY pallet. /// diff --git a/primitives/chain-bridge-hub-cumulus/src/lib.rs b/primitives/chain-bridge-hub-cumulus/src/lib.rs index 3a05cb48b3b..cbdd36c2e4a 100644 --- a/primitives/chain-bridge-hub-cumulus/src/lib.rs +++ b/primitives/chain-bridge-hub-cumulus/src/lib.rs @@ -45,7 +45,7 @@ pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// time. /// /// This is a copy-paste from the cumulus repo's `parachains-common` crate. -const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_SECOND) +const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(constants::WEIGHT_REF_TIME_PER_SECOND, 0) .saturating_div(2) .set_proof_size(polkadot_primitives::v2::MAX_POV_SIZE as u64); @@ -62,10 +62,10 @@ parameter_types! { ); /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS) + pub const BlockExecutionWeight: Weight = Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS, 0) .saturating_mul(5_000_000); /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS) + pub const ExtrinsicBaseWeight: Weight = Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS, 0) .saturating_mul(125_000); pub BlockWeights: limits::BlockWeights = limits::BlockWeights::builder() diff --git a/primitives/chain-westend/src/lib.rs b/primitives/chain-westend/src/lib.rs index b6d41ece286..74e8895aff9 100644 --- a/primitives/chain-westend/src/lib.rs +++ b/primitives/chain-westend/src/lib.rs @@ -101,7 +101,7 @@ pub const WITH_WESTEND_BRIDGE_PARAS_PALLET_NAME: &str = "BridgeWestendParachains pub const MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE: u32 = 128; /// Identifier of Westmint parachain at the Westend relay chain. -pub const WESTMINT_PARACHAIN_ID: u32 = 2000; +pub const WESTMINT_PARACHAIN_ID: u32 = 1000; decl_bridge_finality_runtime_apis!(westend); diff --git a/primitives/header-chain/Cargo.toml b/primitives/header-chain/Cargo.toml index be87cce460e..0335836e328 100644 --- a/primitives/header-chain/Cargo.toml +++ b/primitives/header-chain/Cargo.toml @@ -20,7 +20,7 @@ bp-runtime = { path = "../runtime", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -39,7 +39,7 @@ std = [ "frame-support/std", "scale-info/std", "sp-core/std", - "sp-finality-grandpa/std", + "sp-consensus-grandpa/std", "sp-runtime/std", "sp-std/std", ] diff --git a/primitives/header-chain/src/justification.rs b/primitives/header-chain/src/justification.rs index 88dac0acf9f..06ed782763d 100644 --- a/primitives/header-chain/src/justification.rs +++ b/primitives/header-chain/src/justification.rs @@ -17,7 +17,7 @@ //! Pallet for checking GRANDPA Finality Proofs. //! //! Adapted copy of substrate/client/finality-grandpa/src/justification.rs. If origin -//! will ever be moved to the sp_finality_grandpa, we should reuse that implementation. +//! will ever be moved to the sp_consensus_grandpa, we should reuse that implementation. use crate::ChainWithGrandpa; @@ -26,7 +26,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use finality_grandpa::voter_set::VoterSet; use frame_support::RuntimeDebug; use scale_info::TypeInfo; -use sp_finality_grandpa::{AuthorityId, AuthoritySignature, SetId}; +use sp_consensus_grandpa::{AuthorityId, AuthoritySignature, SetId}; use sp_runtime::{traits::Header as HeaderT, SaturatedConversion}; use sp_std::{ collections::{btree_map::BTreeMap, btree_set::BTreeSet}, @@ -307,7 +307,7 @@ where ); // verify authority signature - if !sp_finality_grandpa::check_message_signature_with_buffer( + if !sp_consensus_grandpa::check_message_signature_with_buffer( &finality_grandpa::Message::Precommit(signed.precommit.clone()), &signed.id, &signed.signature, diff --git a/primitives/header-chain/src/lib.rs b/primitives/header-chain/src/lib.rs index cafb8e7a3c8..5e2bbad242e 100644 --- a/primitives/header-chain/src/lib.rs +++ b/primitives/header-chain/src/lib.rs @@ -25,10 +25,11 @@ use bp_runtime::{ }; use codec::{Codec, Decode, Encode, EncodeLike, MaxEncodedLen}; use core::{clone::Clone, cmp::Eq, default::Default, fmt::Debug}; +use frame_support::PalletError; use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; -use sp_finality_grandpa::{AuthorityList, ConsensusLog, SetId, GRANDPA_ENGINE_ID}; +use sp_consensus_grandpa::{AuthorityList, ConsensusLog, SetId, GRANDPA_ENGINE_ID}; use sp_runtime::{traits::Header as HeaderT, Digest, RuntimeDebug}; use sp_std::boxed::Box; @@ -36,7 +37,7 @@ pub mod justification; pub mod storage_keys; /// Header chain error. -#[derive(Clone, Eq, PartialEq, RuntimeDebug)] +#[derive(Clone, Decode, Encode, Eq, PartialEq, PalletError, Debug, TypeInfo)] pub enum HeaderChainError { /// Header with given hash is missing from the chain. UnknownHeader, @@ -44,15 +45,6 @@ pub enum HeaderChainError { StorageProof(StorageProofError), } -impl From for &'static str { - fn from(err: HeaderChainError) -> &'static str { - match err { - HeaderChainError::UnknownHeader => "UnknownHeader", - HeaderChainError::StorageProof(e) => e.into(), - } - } -} - /// Header data that we're storing on-chain. /// /// Even though we may store full header, our applications (XCM) only use couple of header @@ -153,7 +145,7 @@ pub struct GrandpaConsensusLogReader(sp_std::marker::PhantomData impl GrandpaConsensusLogReader { pub fn find_authorities_change( digest: &Digest, - ) -> Option> { + ) -> Option> { // find the first consensus digest with the right ID which converts to // the right kind of consensus log. digest diff --git a/primitives/header-chain/tests/implementation_match.rs b/primitives/header-chain/tests/implementation_match.rs index 5d0fa35c376..c70683b173d 100644 --- a/primitives/header-chain/tests/implementation_match.rs +++ b/primitives/header-chain/tests/implementation_match.rs @@ -27,7 +27,7 @@ use bp_test_utils::{ JustificationGeneratorParams, ALICE, BOB, CHARLIE, DAVE, EVE, FERDIE, TEST_GRANDPA_SET_ID, }; use finality_grandpa::voter_set::VoterSet; -use sp_finality_grandpa::{AuthorityId, AuthorityWeight}; +use sp_consensus_grandpa::{AuthorityId, AuthorityWeight}; use sp_runtime::traits::Header as HeaderT; type TestHeader = sp_runtime::testing::Header; diff --git a/primitives/header-chain/tests/justification.rs b/primitives/header-chain/tests/justification.rs index 52fa33ae974..3cd63b935d0 100644 --- a/primitives/header-chain/tests/justification.rs +++ b/primitives/header-chain/tests/justification.rs @@ -76,7 +76,7 @@ fn valid_justification_accepted_with_single_fork() { #[test] fn valid_justification_accepted_with_arbitrary_number_of_authorities() { use finality_grandpa::voter_set::VoterSet; - use sp_finality_grandpa::AuthorityId; + use sp_consensus_grandpa::AuthorityId; let n = 15; let required_signatures = required_justification_precommits(n as _); diff --git a/primitives/messages/src/source_chain.rs b/primitives/messages/src/source_chain.rs index d5d7549099c..881bd92f5f9 100644 --- a/primitives/messages/src/source_chain.rs +++ b/primitives/messages/src/source_chain.rs @@ -41,7 +41,7 @@ pub type RelayersRewards = BTreeMap; /// type used by the source chain. pub trait TargetHeaderChain { /// Error type. - type Error: Debug + Into<&'static str>; + type Error: Debug; /// Proof that messages have been received by target chain. type MessagesDeliveryProof: Parameter + Size; diff --git a/primitives/messages/src/target_chain.rs b/primitives/messages/src/target_chain.rs index 6604d425cfc..8496b90214c 100644 --- a/primitives/messages/src/target_chain.rs +++ b/primitives/messages/src/target_chain.rs @@ -59,7 +59,7 @@ pub struct DispatchMessage { /// that's stuck) and/or processing messages without paying fees. pub trait SourceHeaderChain { /// Error type. - type Error: Debug + Into<&'static str>; + type Error: Debug; /// Proof that messages are sent from source chain. This may also include proof /// of corresponding outbound lane states. diff --git a/primitives/runtime/src/lib.rs b/primitives/runtime/src/lib.rs index 2d29b5aff0a..ece925d7952 100644 --- a/primitives/runtime/src/lib.rs +++ b/primitives/runtime/src/lib.rs @@ -531,6 +531,37 @@ macro_rules! generate_static_str_provider { }; } +#[derive(Encode, Decode, Clone, Eq, PartialEq, PalletError, TypeInfo)] +#[scale_info(skip_type_params(T))] +pub struct StrippableError { + _phantom_data: sp_std::marker::PhantomData, + #[codec(skip)] + #[cfg(feature = "std")] + message: String, +} + +impl From for StrippableError { + fn from(err: T) -> Self { + Self { + _phantom_data: Default::default(), + #[cfg(feature = "std")] + message: format!("{:?}", err), + } + } +} + +impl Debug for StrippableError { + #[cfg(feature = "std")] + fn fmt(&self, f: &mut sp_std::fmt::Formatter<'_>) -> sp_std::fmt::Result { + f.write_str(&self.message) + } + + #[cfg(not(feature = "std"))] + fn fmt(&self, f: &mut sp_std::fmt::Formatter<'_>) -> sp_std::fmt::Result { + f.write_str("Stripped error") + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/primitives/runtime/src/storage_proof.rs b/primitives/runtime/src/storage_proof.rs index 133a51ce6e7..09641376666 100644 --- a/primitives/runtime/src/storage_proof.rs +++ b/primitives/runtime/src/storage_proof.rs @@ -16,9 +16,11 @@ //! Logic for checking Substrate storage proofs. +use crate::StrippableError; use codec::{Decode, Encode}; +use frame_support::PalletError; use hash_db::{HashDB, Hasher, EMPTY_PREFIX}; -use sp_runtime::RuntimeDebug; +use scale_info::TypeInfo; use sp_std::{boxed::Box, collections::btree_set::BTreeSet, vec::Vec}; use sp_trie::{ read_trie_value, LayoutV1, MemoryDB, Recorder, StorageProof, Trie, TrieConfiguration, @@ -36,9 +38,6 @@ pub enum ProofSize { /// The proof is expected to be minimal. If value size may be changed, then it is expected to /// have given size. Minimal(u32), - /// The proof is expected to have at least given size and grow by increasing number of trie - /// nodes included in the proof. - HasExtraNodes(u32), /// The proof is expected to have at least given size and grow by increasing value that is /// stored in the trie. HasLargeLeaf(u32), @@ -46,7 +45,8 @@ pub enum ProofSize { /// This struct is used to read storage values from a subset of a Merklized database. The "proof" /// is a subset of the nodes in the Merkle structure of the database, so that it provides -/// authentication against a known Merkle root as well as the values in the database themselves. +/// authentication against a known Merkle root as well as the values in the +/// database themselves. pub struct StorageProofChecker where H: Hasher, @@ -118,14 +118,32 @@ where /// read, but decoding fails, this function returns an error. pub fn read_and_decode_value(&mut self, key: &[u8]) -> Result, Error> { self.read_value(key).and_then(|v| { - v.map(|v| T::decode(&mut &v[..]).map_err(Error::StorageValueDecodeFailed)) + v.map(|v| T::decode(&mut &v[..]).map_err(|e| Error::StorageValueDecodeFailed(e.into()))) .transpose() }) } + + /// Reads and decodes a value from the available subset of storage. If the value cannot be read + /// due to an incomplete or otherwise invalid proof, or if the value is `None`, this function + /// returns an error. If value is read, but decoding fails, this function returns an error. + pub fn read_and_decode_mandatory_value(&mut self, key: &[u8]) -> Result { + self.read_and_decode_value(key)?.ok_or(Error::StorageValueEmpty) + } + + /// Reads and decodes a value from the available subset of storage. If the value cannot be read + /// due to an incomplete or otherwise invalid proof, this function returns `Ok(None)`. + /// If value is read, but decoding fails, this function returns an error. + pub fn read_and_decode_opt_value(&mut self, key: &[u8]) -> Result, Error> { + match self.read_and_decode_value(key) { + Ok(outbound_lane_data) => Ok(outbound_lane_data), + Err(Error::StorageValueUnavailable) => Ok(None), + Err(e) => Err(e), + } + } } /// Storage proof related errors. -#[derive(Clone, Eq, PartialEq, RuntimeDebug)] +#[derive(Encode, Decode, Clone, Eq, PartialEq, PalletError, Debug, TypeInfo)] pub enum Error { /// Duplicate trie nodes are found in the proof. DuplicateNodesInProof, @@ -135,21 +153,10 @@ pub enum Error { StorageRootMismatch, /// Unable to reach expected storage value using provided trie nodes. StorageValueUnavailable, + /// The storage value is `None`. + StorageValueEmpty, /// Failed to decode storage value. - StorageValueDecodeFailed(codec::Error), -} - -impl From for &'static str { - fn from(err: Error) -> &'static str { - match err { - Error::DuplicateNodesInProof => "Storage proof contains duplicate nodes", - Error::UnusedNodesInTheProof => "Storage proof contains unused nodes", - Error::StorageRootMismatch => "Storage root is missing from the storage proof", - Error::StorageValueUnavailable => "Storage value is missing from the storage proof", - Error::StorageValueDecodeFailed(_) => - "Failed to decode storage value from the storage proof", - } - } + StorageValueDecodeFailed(StrippableError), } /// Return valid storage proof and state root. diff --git a/primitives/test-utils/Cargo.toml b/primitives/test-utils/Cargo.toml index 0a591334577..8307534093f 100644 --- a/primitives/test-utils/Cargo.toml +++ b/primitives/test-utils/Cargo.toml @@ -11,7 +11,7 @@ codec = { package = "parity-scale-codec", version = "3.1.5", default-features = ed25519-dalek = { version = "1.0", default-features = false, features = ["u64_backend"] } finality-grandpa = { version = "0.16.0", default-features = false } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -23,7 +23,7 @@ std = [ "ed25519-dalek/std", "finality-grandpa/std", "sp-application-crypto/std", - "sp-finality-grandpa/std", + "sp-consensus-grandpa/std", "sp-runtime/std", "sp-std/std", ] diff --git a/primitives/test-utils/src/keyring.rs b/primitives/test-utils/src/keyring.rs index 8b7a2b39258..b1782109668 100644 --- a/primitives/test-utils/src/keyring.rs +++ b/primitives/test-utils/src/keyring.rs @@ -19,7 +19,7 @@ use codec::Encode; use ed25519_dalek::{Keypair, PublicKey, SecretKey, Signature}; use finality_grandpa::voter_set::VoterSet; -use sp_finality_grandpa::{AuthorityId, AuthorityList, AuthorityWeight}; +use sp_consensus_grandpa::{AuthorityId, AuthorityList, AuthorityWeight}; use sp_runtime::RuntimeDebug; use sp_std::prelude::*; diff --git a/primitives/test-utils/src/lib.rs b/primitives/test-utils/src/lib.rs index a6bb3d9b8fe..6bb4adbf450 100644 --- a/primitives/test-utils/src/lib.rs +++ b/primitives/test-utils/src/lib.rs @@ -20,7 +20,7 @@ use bp_header_chain::justification::{required_justification_precommits, GrandpaJustification}; use codec::Encode; -use sp_finality_grandpa::{AuthorityId, AuthoritySignature, AuthorityWeight, SetId}; +use sp_consensus_grandpa::{AuthorityId, AuthoritySignature, AuthorityWeight, SetId}; use sp_runtime::traits::{Header as HeaderT, One, Zero}; use sp_std::prelude::*; @@ -170,7 +170,7 @@ pub fn signed_precommit( ) -> finality_grandpa::SignedPrecommit { let precommit = finality_grandpa::Precommit { target_hash: target.0, target_number: target.1 }; - let encoded = sp_finality_grandpa::localized_payload( + let encoded = sp_consensus_grandpa::localized_payload( round, set_id, &finality_grandpa::Message::Precommit(precommit.clone()), diff --git a/relays/bin-substrate/Cargo.toml b/relays/bin-substrate/Cargo.toml index 9db0e30c52d..86974b282d9 100644 --- a/relays/bin-substrate/Cargo.toml +++ b/relays/bin-substrate/Cargo.toml @@ -10,7 +10,7 @@ anyhow = "1.0" async-std = "1.9.0" async-trait = "0.1" codec = { package = "parity-scale-codec", version = "3.1.5" } -futures = "0.3.26" +futures = "0.3.27" hex = "0.4" log = "0.4.17" num-format = "0.4" diff --git a/relays/bin-substrate/src/chains/rialto_parachains_to_millau.rs b/relays/bin-substrate/src/chains/rialto_parachains_to_millau.rs index b3471ad1a38..37eb848fe5f 100644 --- a/relays/bin-substrate/src/chains/rialto_parachains_to_millau.rs +++ b/relays/bin-substrate/src/chains/rialto_parachains_to_millau.rs @@ -17,7 +17,6 @@ //! Rialto-to-Millau parachains sync entrypoint. use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; -use parachains_relay::ParachainsPipeline; use relay_millau_client::Millau; use relay_rialto_client::Rialto; use relay_rialto_parachain_client::RialtoParachain; @@ -29,11 +28,6 @@ use substrate_relay_helper::parachains::{ #[derive(Clone, Debug)] pub struct RialtoParachainsToMillau; -impl ParachainsPipeline for RialtoParachainsToMillau { - type SourceChain = Rialto; - type TargetChain = Millau; -} - impl SubstrateParachainsPipeline for RialtoParachainsToMillau { type SourceParachain = RialtoParachain; type SourceRelayChain = Rialto; diff --git a/relays/bin-substrate/src/chains/rococo.rs b/relays/bin-substrate/src/chains/rococo.rs index b1e8d1bef85..166e6edbad3 100644 --- a/relays/bin-substrate/src/chains/rococo.rs +++ b/relays/bin-substrate/src/chains/rococo.rs @@ -27,5 +27,5 @@ impl CliChain for Rococo { impl CliChain for BridgeHubRococo { const RUNTIME_VERSION: Option = - Some(SimpleRuntimeVersion { spec_version: 9371, transaction_version: 1 }); + Some(SimpleRuntimeVersion { spec_version: 9372, transaction_version: 1 }); } diff --git a/relays/bin-substrate/src/chains/rococo_parachains_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/chains/rococo_parachains_to_bridge_hub_wococo.rs index 098aed417c6..ba0c10beae4 100644 --- a/relays/bin-substrate/src/chains/rococo_parachains_to_bridge_hub_wococo.rs +++ b/relays/bin-substrate/src/chains/rococo_parachains_to_bridge_hub_wococo.rs @@ -18,7 +18,6 @@ use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; -use parachains_relay::ParachainsPipeline; use relay_substrate_client::{CallOf, HeaderIdOf}; use substrate_relay_helper::parachains::{ SubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, @@ -28,11 +27,6 @@ use substrate_relay_helper::parachains::{ #[derive(Clone, Debug)] pub struct BridgeHubRococoToBridgeHubWococo; -impl ParachainsPipeline for BridgeHubRococoToBridgeHubWococo { - type SourceChain = relay_rococo_client::Rococo; - type TargetChain = relay_bridge_hub_wococo_client::BridgeHubWococo; -} - impl SubstrateParachainsPipeline for BridgeHubRococoToBridgeHubWococo { type SourceParachain = relay_bridge_hub_rococo_client::BridgeHubRococo; type SourceRelayChain = relay_rococo_client::Rococo; diff --git a/relays/bin-substrate/src/chains/westend_parachains_to_millau.rs b/relays/bin-substrate/src/chains/westend_parachains_to_millau.rs index f025f48dcb6..abd9e6137bb 100644 --- a/relays/bin-substrate/src/chains/westend_parachains_to_millau.rs +++ b/relays/bin-substrate/src/chains/westend_parachains_to_millau.rs @@ -17,7 +17,6 @@ //! Westend-to-Millau parachains sync entrypoint. use crate::cli::bridge::{CliBridgeBase, ParachainToRelayHeadersCliBridge}; -use parachains_relay::ParachainsPipeline; use relay_millau_client::Millau; use relay_westend_client::{Westend, Westmint}; use substrate_relay_helper::parachains::{ @@ -28,11 +27,6 @@ use substrate_relay_helper::parachains::{ #[derive(Clone, Debug)] pub struct WestendParachainsToMillau; -impl ParachainsPipeline for WestendParachainsToMillau { - type SourceChain = Westend; - type TargetChain = Millau; -} - impl SubstrateParachainsPipeline for WestendParachainsToMillau { type SourceParachain = Westmint; type SourceRelayChain = Westend; diff --git a/relays/bin-substrate/src/chains/wococo.rs b/relays/bin-substrate/src/chains/wococo.rs index cb8dff620a5..b6eceb8614e 100644 --- a/relays/bin-substrate/src/chains/wococo.rs +++ b/relays/bin-substrate/src/chains/wococo.rs @@ -27,5 +27,5 @@ impl CliChain for Wococo { impl CliChain for BridgeHubWococo { const RUNTIME_VERSION: Option = - Some(SimpleRuntimeVersion { spec_version: 9371, transaction_version: 1 }); + Some(SimpleRuntimeVersion { spec_version: 9372, transaction_version: 1 }); } diff --git a/relays/bin-substrate/src/chains/wococo_parachains_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/chains/wococo_parachains_to_bridge_hub_rococo.rs index 683e7705dd6..028d8c9e17d 100644 --- a/relays/bin-substrate/src/chains/wococo_parachains_to_bridge_hub_rococo.rs +++ b/relays/bin-substrate/src/chains/wococo_parachains_to_bridge_hub_rococo.rs @@ -18,7 +18,6 @@ use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; -use parachains_relay::ParachainsPipeline; use relay_substrate_client::{CallOf, HeaderIdOf}; use substrate_relay_helper::parachains::{ SubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, @@ -28,11 +27,6 @@ use substrate_relay_helper::parachains::{ #[derive(Clone, Debug)] pub struct BridgeHubWococoToBridgeHubRococo; -impl ParachainsPipeline for BridgeHubWococoToBridgeHubRococo { - type SourceChain = relay_wococo_client::Wococo; - type TargetChain = relay_bridge_hub_rococo_client::BridgeHubRococo; -} - impl SubstrateParachainsPipeline for BridgeHubWococoToBridgeHubRococo { type SourceParachain = relay_bridge_hub_wococo_client::BridgeHubWococo; type SourceRelayChain = relay_wococo_client::Wococo; diff --git a/relays/bin-substrate/src/cli/bridge.rs b/relays/bin-substrate/src/cli/bridge.rs index 330b498f19c..208f67c527b 100644 --- a/relays/bin-substrate/src/cli/bridge.rs +++ b/relays/bin-substrate/src/cli/bridge.rs @@ -16,7 +16,6 @@ use crate::cli::CliChain; use pallet_bridge_parachains::{RelayBlockHash, RelayBlockHasher, RelayBlockNumber}; -use parachains_relay::ParachainsPipeline; use relay_substrate_client::{Chain, ChainWithTransactions, Parachain, RelayChain}; use strum::{EnumString, EnumVariantNames}; use substrate_relay_helper::{ @@ -87,10 +86,10 @@ where + RelayChain; /// Finality proofs synchronization pipeline (source parachain -> target). type ParachainFinality: SubstrateParachainsPipeline< - SourceRelayChain = Self::SourceRelay, - SourceParachain = Self::Source, - TargetChain = Self::Target, - > + ParachainsPipeline; + SourceRelayChain = Self::SourceRelay, + SourceParachain = Self::Source, + TargetChain = Self::Target, + >; /// Finality proofs synchronization pipeline (source relay chain -> target). type RelayFinality: SubstrateFinalitySyncPipeline< SourceChain = Self::SourceRelay, diff --git a/relays/bin-substrate/src/cli/relay_parachains.rs b/relays/bin-substrate/src/cli/relay_parachains.rs index 1234b3a3309..4e59dc14733 100644 --- a/relays/bin-substrate/src/cli/relay_parachains.rs +++ b/relays/bin-substrate/src/cli/relay_parachains.rs @@ -22,20 +22,14 @@ use crate::chains::{ }; use async_std::sync::Mutex; use async_trait::async_trait; -use bp_polkadot_core::parachains::ParaId; -use parachains_relay::parachains_loop::{ - AvailableHeader, ParachainSyncParams, SourceClient, TargetClient, -}; -use relay_substrate_client::{Parachain, ParachainBase}; +use parachains_relay::parachains_loop::{AvailableHeader, SourceClient, TargetClient}; +use relay_substrate_client::Parachain; use relay_utils::metrics::{GlobalMetrics, StandaloneMetric}; use std::sync::Arc; use structopt::StructOpt; use strum::{EnumString, EnumVariantNames, VariantNames}; use substrate_relay_helper::{ - parachains::{ - source::ParachainsSource, target::ParachainsTarget, ParachainsPipelineAdapter, - SubstrateParachainsPipeline, - }, + parachains::{source::ParachainsSource, target::ParachainsTarget, ParachainsPipelineAdapter}, TransactionParams, }; @@ -105,13 +99,6 @@ where parachains_relay::parachains_loop::run( source_client, target_client, - ParachainSyncParams { - parachains: vec![ - ParaId(::SourceParachain::PARACHAIN_ID) - ], - stall_timeout: std::time::Duration::from_secs(60), - strategy: parachains_relay::parachains_loop::ParachainSyncStrategy::Any, - }, metrics_params, futures::future::pending(), ) diff --git a/relays/client-bridge-hub-wococo/Cargo.toml b/relays/client-bridge-hub-wococo/Cargo.toml index 7c9b90975d6..8164ae5afed 100644 --- a/relays/client-bridge-hub-wococo/Cargo.toml +++ b/relays/client-bridge-hub-wococo/Cargo.toml @@ -29,4 +29,4 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master [dev-dependencies] bp-polkadot-core = { path = "../../primitives/polkadot-core" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/relays/client-bridge-hub-wococo/src/runtime_wrapper.rs b/relays/client-bridge-hub-wococo/src/runtime_wrapper.rs index 13fb1a7e6ab..374dd5b44ce 100644 --- a/relays/client-bridge-hub-wococo/src/runtime_wrapper.rs +++ b/relays/client-bridge-hub-wococo/src/runtime_wrapper.rs @@ -75,8 +75,8 @@ impl From> for Call { mod tests { use super::*; use bp_runtime::BasicOperatingMode; + use sp_consensus_grandpa::AuthorityList; use sp_core::hexdisplay::HexDisplay; - use sp_finality_grandpa::AuthorityList; use sp_runtime::traits::Header; use std::str::FromStr; diff --git a/relays/client-rialto-parachain/Cargo.toml b/relays/client-rialto-parachain/Cargo.toml index c1a6b5d69aa..807da290d24 100644 --- a/relays/client-rialto-parachain/Cargo.toml +++ b/relays/client-rialto-parachain/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5" } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -subxt = { git = "https://github.com/paritytech/subxt", branch = "master" } +subxt = { git = "https://github.com/paritytech/subxt", branch = "master", default-features = false, features = [] } # Bridge dependencies diff --git a/relays/client-rialto-parachain/src/codegen_runtime.rs b/relays/client-rialto-parachain/src/codegen_runtime.rs index 16a539f2843..d725aafd415 100644 --- a/relays/client-rialto-parachain/src/codegen_runtime.rs +++ b/relays/client-rialto-parachain/src/codegen_runtime.rs @@ -7034,7 +7034,7 @@ pub mod api { )] pub struct StoredAuthoritySet { pub authorities: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - runtime_types::sp_finality_grandpa::app::Public, + runtime_types::sp_consensus_grandpa::app::Public, ::core::primitive::u64, )>, pub set_id: ::core::primitive::u64, @@ -8115,7 +8115,7 @@ pub mod api { pub struct Signature(pub [::core::primitive::u8; 64usize]); } } - pub mod sp_finality_grandpa { + pub mod sp_consensus_grandpa { use super::runtime_types; pub mod app { use super::runtime_types; diff --git a/relays/client-substrate/Cargo.toml b/relays/client-substrate/Cargo.toml index 7e7eba5ec2b..1a80a54f965 100644 --- a/relays/client-substrate/Cargo.toml +++ b/relays/client-substrate/Cargo.toml @@ -9,14 +9,14 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" async-std = { version = "1.6.5", features = ["attributes"] } async-trait = "0.1" codec = { package = "parity-scale-codec", version = "3.1.5" } -futures = "0.3.26" +futures = "0.3.27" jsonrpsee = { version = "0.16", features = ["macros", "ws-client"] } log = "0.4.17" num-traits = "0.2" rand = "0.8" scale-info = { version = "2.1.1", features = ["derive"] } -tokio = { version = "1.25", features = ["rt-multi-thread"] } -thiserror = "1.0.26" +tokio = { version = "1.26", features = ["rt-multi-thread"] } +thiserror = "1.0.39" # Bridge dependencies diff --git a/relays/client-substrate/src/chain.rs b/relays/client-substrate/src/chain.rs index bc38d1ec932..6ab353921ef 100644 --- a/relays/client-substrate/src/chain.rs +++ b/relays/client-substrate/src/chain.rs @@ -72,7 +72,7 @@ pub trait RelayChain: Chain { /// Name of the bridge parachains pallet (used in `construct_runtime` macro call) that is /// deployed at the **bridged** chain. /// - /// We assume that all chains that are bridging with this `ChainWithGrandpa` are using + /// We assume that all chains that are bridging with this `RelayChain` are using /// the same name. const PARACHAINS_FINALITY_PALLET_NAME: &'static str; } diff --git a/relays/client-substrate/src/client.rs b/relays/client-substrate/src/client.rs index bddd53b39f8..6a381c4e977 100644 --- a/relays/client-substrate/src/client.rs +++ b/relays/client-substrate/src/client.rs @@ -26,7 +26,7 @@ use crate::{ Result, SignParam, TransactionTracker, UnsignedTransaction, }; -use async_std::sync::{Arc, Mutex}; +use async_std::sync::{Arc, Mutex, RwLock}; use async_trait::async_trait; use bp_runtime::{HeaderIdProvider, StorageDoubleMapKeyProvider, StorageMapKeyProvider}; use codec::{Decode, Encode}; @@ -111,23 +111,31 @@ pub enum ChainRuntimeVersion { /// Substrate client type. /// -/// Cloning `Client` is a cheap operation. +/// Cloning `Client` is a cheap operation that only clones internal references. Different +/// clones of the same client are guaranteed to use the same references. pub struct Client { - /// Tokio runtime handle. - tokio: Arc, + // Lock order: `submit_signed_extrinsic_lock`, `data` /// Client connection params. params: Arc, - /// Substrate RPC client. - client: Arc, - /// Genesis block hash. - genesis_hash: HashOf, + /// Saved chain runtime version. + chain_runtime_version: ChainRuntimeVersion, /// If several tasks are submitting their transactions simultaneously using /// `submit_signed_extrinsic` method, they may get the same transaction nonce. So one of /// transactions will be rejected from the pool. This lock is here to prevent situations like /// that. submit_signed_extrinsic_lock: Arc>, - /// Saved chain runtime version - chain_runtime_version: ChainRuntimeVersion, + /// Genesis block hash. + genesis_hash: HashOf, + /// Shared dynamic data. + data: Arc>, +} + +/// Client data, shared by all `Client` clones. +struct ClientData { + /// Tokio runtime handle. + tokio: Arc, + /// Substrate RPC client. + client: Arc, } #[async_trait] @@ -135,9 +143,10 @@ impl relay_utils::relay_loop::Client for Client { type Error = Error; async fn reconnect(&mut self) -> Result<()> { + let mut data = self.data.write().await; let (tokio, client) = Self::build_client(&self.params).await?; - self.tokio = tokio; - self.client = client; + data.tokio = tokio; + data.client = client; Ok(()) } } @@ -145,12 +154,11 @@ impl relay_utils::relay_loop::Client for Client { impl Clone for Client { fn clone(&self) -> Self { Client { - tokio: self.tokio.clone(), params: self.params.clone(), - client: self.client.clone(), - genesis_hash: self.genesis_hash, - submit_signed_extrinsic_lock: self.submit_signed_extrinsic_lock.clone(), chain_runtime_version: self.chain_runtime_version.clone(), + submit_signed_extrinsic_lock: self.submit_signed_extrinsic_lock.clone(), + genesis_hash: self.genesis_hash, + data: self.data.clone(), } } } @@ -199,12 +207,11 @@ impl Client { let chain_runtime_version = params.chain_runtime_version.clone(); Ok(Self { - tokio, params, - client, - genesis_hash, - submit_signed_extrinsic_lock: Arc::new(Mutex::new(())), chain_runtime_version, + submit_signed_extrinsic_lock: Arc::new(Mutex::new(())), + genesis_hash, + data: Arc::new(RwLock::new(ClientData { tokio, client })), }) } @@ -271,6 +278,10 @@ impl Client { Ok(SubstrateChainClient::::finalized_head(&*client).await?) }) .await + .map_err(|e| Error::FailedToReadBestFinalizedHeaderHash { + chain: C::NAME.into(), + error: e.boxed(), + }) } /// Return number of the best finalized block. @@ -292,6 +303,7 @@ impl Client { Ok(SubstrateChainClient::::header(&*client, None).await?) }) .await + .map_err(|e| Error::FailedToReadBestHeader { chain: C::NAME.into(), error: e.boxed() }) } /// Get a Substrate block from its hash. @@ -311,6 +323,11 @@ impl Client { Ok(SubstrateChainClient::::header(&*client, Some(block_hash)).await?) }) .await + .map_err(|e| Error::FailedToReadHeaderByHash { + chain: C::NAME.into(), + hash: format!("{block_hash}"), + error: e.boxed(), + }) } /// Get a Substrate block hash by its number. @@ -394,10 +411,17 @@ impl Client { storage_key: StorageKey, block_hash: Option, ) -> Result> { + let cloned_storage_key = storage_key.clone(); self.jsonrpsee_execute(move |client| async move { - Ok(SubstrateStateClient::::storage(&*client, storage_key, block_hash).await?) + Ok(SubstrateStateClient::::storage(&*client, storage_key.clone(), block_hash) + .await?) }) .await + .map_err(|e| Error::FailedToReadRuntimeStorageValue { + chain: C::NAME.into(), + key: cloned_storage_key, + error: e.boxed(), + }) } /// Return native tokens balance of the account. @@ -555,7 +579,7 @@ impl Client { Ok((tracker, subscription)) }) .await?; - self.tokio.spawn(Subscription::background_worker( + self.data.read().await.tokio.spawn(Subscription::background_worker( C::NAME.into(), "extrinsic".into(), subscription, @@ -640,7 +664,14 @@ impl Client { input: Input, at_block: Option, ) -> Result { - let encoded_output = self.state_call(method_name, Bytes(input.encode()), at_block).await?; + let encoded_output = self + .state_call(method_name.clone(), Bytes(input.encode()), at_block) + .await + .map_err(|e| Error::ErrorExecutingRuntimeCall { + chain: C::NAME.into(), + method: method_name, + error: e.boxed(), + })?; Output::decode(&mut &encoded_output.0[..]).map_err(Error::ResponseParseFailed) } @@ -695,7 +726,7 @@ impl Client { }) .await?; let (sender, receiver) = futures::channel::mpsc::channel(MAX_SUBSCRIPTION_CAPACITY); - self.tokio.spawn(Subscription::background_worker( + self.data.read().await.tokio.spawn(Subscription::background_worker( C::NAME.into(), "justification".into(), subscription, @@ -711,8 +742,9 @@ impl Client { F: Future> + Send, T: Send + 'static, { - let client = self.client.clone(); - self.tokio.spawn(async move { make_jsonrpsee_future(client).await }).await? + let data = self.data.read().await; + let client = data.client.clone(); + data.tokio.spawn(async move { make_jsonrpsee_future(client).await }).await? } /// Returns `true` if version guard can be started. diff --git a/relays/client-substrate/src/error.rs b/relays/client-substrate/src/error.rs index 3b83f917bf8..54247c5dc17 100644 --- a/relays/client-substrate/src/error.rs +++ b/relays/client-substrate/src/error.rs @@ -20,6 +20,7 @@ use bp_polkadot_core::parachains::ParaId; use jsonrpsee::core::Error as RpcError; use relay_utils::MaybeConnectionError; use sc_rpc_api::system::Health; +use sp_core::storage::StorageKey; use sp_runtime::transaction_validity::TransactionValidityError; use thiserror::Error; @@ -55,6 +56,52 @@ pub enum Error { /// The client we're connected to is not synced, so we can't rely on its state. #[error("Substrate client is not synced {0}.")] ClientNotSynced(Health), + /// Failed to read best finalized header hash from given chain. + #[error("Failed to read best finalized header hash of {chain}: {error:?}.")] + FailedToReadBestFinalizedHeaderHash { + /// Name of the chain where the error has happened. + chain: String, + /// Underlying error. + error: Box, + }, + /// Failed to read best finalized header from given chain. + #[error("Failed to read best header of {chain}: {error:?}.")] + FailedToReadBestHeader { + /// Name of the chain where the error has happened. + chain: String, + /// Underlying error. + error: Box, + }, + /// Failed to read header by hash from given chain. + #[error("Failed to read header {hash} of {chain}: {error:?}.")] + FailedToReadHeaderByHash { + /// Name of the chain where the error has happened. + chain: String, + /// Hash of the header we've tried to read. + hash: String, + /// Underlying error. + error: Box, + }, + /// Failed to execute runtime call at given chain. + #[error("Failed to execute runtime call {method} at {chain}: {error:?}.")] + ErrorExecutingRuntimeCall { + /// Name of the chain where the error has happened. + chain: String, + /// Runtime method name. + method: String, + /// Underlying error. + error: Box, + }, + /// Failed to read sotrage value at given chain. + #[error("Failed to read storage value {key:?} at {chain}: {error:?}.")] + FailedToReadRuntimeStorageValue { + /// Name of the chain where the error has happened. + chain: String, + /// Runtime storage key + key: StorageKey, + /// Underlying error. + error: Box, + }, /// The bridge pallet is halted and all transactions will be rejected. #[error("Bridge pallet is halted.")] BridgePalletIsHalted, @@ -81,16 +128,28 @@ impl From for Error { } } +impl Error { + /// Box the error. + pub fn boxed(self) -> Box { + Box::new(self) + } +} + impl MaybeConnectionError for Error { fn is_connection_error(&self) -> bool { - matches!( - *self, + match *self { Error::RpcError(RpcError::Transport(_)) // right now if connection to the ws server is dropped (after it is already established), // we're getting this error | Error::RpcError(RpcError::Internal(_)) | Error::RpcError(RpcError::RestartNeeded(_)) - | Error::ClientNotSynced(_), - ) + | Error::ClientNotSynced(_) => true, + Error::FailedToReadBestFinalizedHeaderHash { ref error, .. } => error.is_connection_error(), + Error::FailedToReadBestHeader { ref error, .. } => error.is_connection_error(), + Error::FailedToReadHeaderByHash { ref error, .. } => error.is_connection_error(), + Error::ErrorExecutingRuntimeCall { ref error, .. } => error.is_connection_error(), + Error::FailedToReadRuntimeStorageValue { ref error, .. } => error.is_connection_error(), + _ => false, + } } } diff --git a/relays/client-substrate/src/test_chain.rs b/relays/client-substrate/src/test_chain.rs index 9bc6c5ae15c..d33cb1de681 100644 --- a/relays/client-substrate/src/test_chain.rs +++ b/relays/client-substrate/src/test_chain.rs @@ -68,3 +68,52 @@ impl ChainWithBalances for TestChain { unreachable!() } } + +/// Primitives-level parachain that may be used in tests. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct TestParachainBase; + +impl bp_runtime::Chain for TestParachainBase { + type BlockNumber = u32; + type Hash = sp_core::H256; + type Hasher = sp_runtime::traits::BlakeTwo256; + type Header = sp_runtime::generic::Header; + + type AccountId = u32; + type Balance = u32; + type Index = u32; + type Signature = sp_runtime::testing::TestSignature; + + fn max_extrinsic_size() -> u32 { + unreachable!() + } + + fn max_extrinsic_weight() -> Weight { + unreachable!() + } +} + +impl bp_runtime::Parachain for TestParachainBase { + const PARACHAIN_ID: u32 = 1000; +} + +/// Parachain that may be used in tests. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct TestParachain; + +impl bp_runtime::UnderlyingChainProvider for TestParachain { + type Chain = TestParachainBase; +} + +impl Chain for TestParachain { + const ID: ChainId = *b"test"; + const NAME: &'static str = "TestParachain"; + const TOKEN_ID: Option<&'static str> = None; + const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = "TestParachainMethod"; + const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_millis(0); + + type SignedBlock = sp_runtime::generic::SignedBlock< + sp_runtime::generic::Block, + >; + type Call = (); +} diff --git a/relays/finality/Cargo.toml b/relays/finality/Cargo.toml index c3e32eb59b2..287798431fe 100644 --- a/relays/finality/Cargo.toml +++ b/relays/finality/Cargo.toml @@ -11,7 +11,7 @@ async-std = "1.6.5" async-trait = "0.1" backoff = "0.4" bp-header-chain = { path = "../../primitives/header-chain" } -futures = "0.3.26" +futures = "0.3.27" log = "0.4.17" num-traits = "0.2" relay-utils = { path = "../utils" } diff --git a/relays/lib-substrate-relay/Cargo.toml b/relays/lib-substrate-relay/Cargo.toml index 96fe9356fa0..9c336056dc6 100644 --- a/relays/lib-substrate-relay/Cargo.toml +++ b/relays/lib-substrate-relay/Cargo.toml @@ -7,11 +7,11 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] anyhow = "1.0" -thiserror = "1.0.26" +thiserror = "1.0.39" async-std = "1.9.0" async-trait = "0.1" codec = { package = "parity-scale-codec", version = "3.1.5" } -futures = "0.3.26" +futures = "0.3.27" hex = "0.4" num-traits = "0.2" log = "0.4.17" @@ -44,7 +44,7 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "mas frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] diff --git a/relays/lib-substrate-relay/src/error.rs b/relays/lib-substrate-relay/src/error.rs index b41870a181d..2ebd9130f39 100644 --- a/relays/lib-substrate-relay/src/error.rs +++ b/relays/lib-substrate-relay/src/error.rs @@ -17,7 +17,7 @@ //! Relay errors. use relay_substrate_client as client; -use sp_finality_grandpa::AuthorityList; +use sp_consensus_grandpa::AuthorityList; use sp_runtime::traits::MaybeDisplay; use std::fmt::Debug; use thiserror::Error; diff --git a/relays/lib-substrate-relay/src/finality/engine.rs b/relays/lib-substrate-relay/src/finality/engine.rs index 4fc503011bb..f2ddd32db86 100644 --- a/relays/lib-substrate-relay/src/finality/engine.rs +++ b/relays/lib-substrate-relay/src/finality/engine.rs @@ -30,8 +30,8 @@ use relay_substrate_client::{ BlockNumberOf, Chain, ChainWithGrandpa, Client, Error as SubstrateError, HashOf, HeaderOf, Subscription, SubstrateFinalityClient, SubstrateGrandpaFinalityClient, }; +use sp_consensus_grandpa::{AuthorityList as GrandpaAuthoritiesSet, GRANDPA_ENGINE_ID}; use sp_core::{storage::StorageKey, Bytes}; -use sp_finality_grandpa::{AuthorityList as GrandpaAuthoritiesSet, GRANDPA_ENGINE_ID}; use sp_runtime::{traits::Header, ConsensusEngineId}; use std::marker::PhantomData; @@ -155,8 +155,8 @@ impl Engine for Grandpa { C::WITH_CHAIN_GRANDPA_PALLET_NAME, ); let (authority_set, authority_set_id): ( - sp_finality_grandpa::AuthorityList, - sp_finality_grandpa::SetId, + sp_consensus_grandpa::AuthorityList, + sp_consensus_grandpa::SetId, ) = target_client .storage_value(current_authority_set_key, None) .await? diff --git a/relays/lib-substrate-relay/src/messages_source.rs b/relays/lib-substrate-relay/src/messages_source.rs index 8d2ac5874fe..a151af8ee82 100644 --- a/relays/lib-substrate-relay/src/messages_source.rs +++ b/relays/lib-substrate-relay/src/messages_source.rs @@ -129,8 +129,22 @@ impl RelayClient for SubstrateMessagesSource

{ type Error = SubstrateError; async fn reconnect(&mut self) -> Result<(), SubstrateError> { + // since the client calls RPC methods on both sides, we need to reconnect both self.source_client.reconnect().await?; - self.target_client.reconnect().await + self.target_client.reconnect().await?; + + // call reconnect on on-demand headers relay, because we may use different chains there + // and the error that has lead to reconnect may have came from those other chains + // (see `require_target_header_on_source`) + // + // this may lead to multiple reconnects to the same node during the same call and it + // needs to be addressed in the future + // TODO: https://github.com/paritytech/parity-bridges-common/issues/1928 + if let Some(ref mut target_to_source_headers_relay) = self.target_to_source_headers_relay { + target_to_source_headers_relay.reconnect().await?; + } + + Ok(()) } } diff --git a/relays/lib-substrate-relay/src/messages_target.rs b/relays/lib-substrate-relay/src/messages_target.rs index 75119a1de97..7b0d9d63fb7 100644 --- a/relays/lib-substrate-relay/src/messages_target.rs +++ b/relays/lib-substrate-relay/src/messages_target.rs @@ -123,8 +123,22 @@ impl RelayClient for SubstrateMessagesTarget

{ type Error = SubstrateError; async fn reconnect(&mut self) -> Result<(), SubstrateError> { + // since the client calls RPC methods on both sides, we need to reconnect both self.target_client.reconnect().await?; - self.source_client.reconnect().await + self.source_client.reconnect().await?; + + // call reconnect on on-demand headers relay, because we may use different chains there + // and the error that has lead to reconnect may have came from those other chains + // (see `require_source_header_on_target`) + // + // this may lead to multiple reconnects to the same node during the same call and it + // needs to be addressed in the future + // TODO: https://github.com/paritytech/parity-bridges-common/issues/1928 + if let Some(ref mut source_to_target_headers_relay) = self.source_to_target_headers_relay { + source_to_target_headers_relay.reconnect().await?; + } + + Ok(()) } } diff --git a/relays/lib-substrate-relay/src/on_demand/headers.rs b/relays/lib-substrate-relay/src/on_demand/headers.rs index 75b402aff87..aded79a857a 100644 --- a/relays/lib-substrate-relay/src/on_demand/headers.rs +++ b/relays/lib-substrate-relay/src/on_demand/headers.rs @@ -60,6 +60,8 @@ pub struct OnDemandHeadersRelay { required_header_number: RequiredHeaderNumberRef, /// Client of the source chain. source_client: Client, + /// Client of the target chain. + target_client: Client, } impl OnDemandHeadersRelay

{ @@ -83,6 +85,7 @@ impl OnDemandHeadersRelay

{ relay_task_name: on_demand_headers_relay_name::(), required_header_number: required_header_number.clone(), source_client: source_client.clone(), + target_client: target_client.clone(), }; async_std::task::spawn(async move { background_task::

( @@ -104,6 +107,13 @@ impl OnDemandHeadersRelay

{ impl OnDemandRelay for OnDemandHeadersRelay

{ + async fn reconnect(&self) -> Result<(), SubstrateError> { + // using clone is fine here (to avoid mut requirement), because clone on Client clones + // internal references + self.source_client.clone().reconnect().await?; + self.target_client.clone().reconnect().await + } + async fn require_more_headers(&self, required_header: BlockNumberOf) { let mut required_header_number = self.required_header_number.lock().await; if required_header > *required_header_number { @@ -128,6 +138,9 @@ impl OnDemandRelay: Send + Sync { + /// Reconnect to source and target nodes. + async fn reconnect(&self) -> Result<(), SubstrateError>; + /// Ask relay to relay source header with given number to the target chain. /// /// Depending on implementation, on-demand relay may also relay `required_header` ancestors diff --git a/relays/lib-substrate-relay/src/on_demand/parachains.rs b/relays/lib-substrate-relay/src/on_demand/parachains.rs index b1270108c80..4c205770d4a 100644 --- a/relays/lib-substrate-relay/src/on_demand/parachains.rs +++ b/relays/lib-substrate-relay/src/on_demand/parachains.rs @@ -36,9 +36,7 @@ use bp_runtime::HeaderIdProvider; use futures::{select, FutureExt}; use num_traits::Zero; use pallet_bridge_parachains::{RelayBlockHash, RelayBlockHasher, RelayBlockNumber}; -use parachains_relay::parachains_loop::{ - AvailableHeader, ParachainSyncParams, SourceClient, TargetClient, -}; +use parachains_relay::parachains_loop::{AvailableHeader, SourceClient, TargetClient}; use relay_substrate_client::{ is_ancient_block, AccountIdOf, AccountKeyPairOf, BlockNumberOf, CallOf, Chain, Client, Error as SubstrateError, HashOf, HeaderIdOf, ParachainBase, @@ -121,6 +119,15 @@ impl OnDemandRelay, { + async fn reconnect(&self) -> Result<(), SubstrateError> { + // using clone is fine here (to avoid mut requirement), because clone on Client clones + // internal references + self.source_relay_client.clone().reconnect().await?; + self.target_client.clone().reconnect().await?; + // we'll probably need to reconnect relay chain relayer clients also + self.on_demand_source_relay_to_target_headers.reconnect().await + } + async fn require_more_headers(&self, required_header: BlockNumberOf) { if let Err(e) = self.required_header_number_sender.send(required_header).await { log::trace!( @@ -183,7 +190,7 @@ where let mut proved_parachain_block = selected_parachain_block; if proved_relay_block != selected_relay_block { proved_parachain_block = parachains_source - .on_chain_para_head_id(proved_relay_block, para_id) + .on_chain_para_head_id(proved_relay_block) .await? // this could happen e.g. if parachain has been offboarded? .ok_or_else(|| { @@ -209,11 +216,11 @@ where } // and finally - prove parachain head - let (para_proof, para_hashes) = - parachains_source.prove_parachain_heads(proved_relay_block, &[para_id]).await?; + let (para_proof, para_hash) = + parachains_source.prove_parachain_head(proved_relay_block).await?; calls.push(P::SubmitParachainHeadsCallBuilder::build_submit_parachain_heads_call( proved_relay_block, - para_hashes.into_iter().map(|h| (para_id, h)).collect(), + vec![(para_id, para_hash)], para_proof, )); @@ -241,16 +248,14 @@ async fn background_task( let mut relay_state = RelayState::Idle; let mut required_parachain_header_number = Zero::zero(); - let required_para_header_number_ref = Arc::new(Mutex::new(AvailableHeader::Unavailable)); + let required_para_header_ref = Arc::new(Mutex::new(AvailableHeader::Unavailable)); let mut restart_relay = true; let parachains_relay_task = futures::future::Fuse::terminated(); futures::pin_mut!(parachains_relay_task); - let mut parachains_source = ParachainsSource::

::new( - source_relay_client.clone(), - required_para_header_number_ref.clone(), - ); + let mut parachains_source = + ParachainsSource::

::new(source_relay_client.clone(), required_para_header_ref.clone()); let mut parachains_target = ParachainsTarget::

::new(target_client.clone(), target_transaction_params.clone()); @@ -271,13 +276,20 @@ async fn background_task( }, }; - // keep in mind that we are not updating `required_para_header_number_ref` here, because + // keep in mind that we are not updating `required_para_header_ref` here, because // then we'll be submitting all previous headers as well (while required relay headers are // delivered) and we want to avoid that (to reduce cost) - required_parachain_header_number = std::cmp::max( - required_parachain_header_number, - new_required_parachain_header_number, - ); + if new_required_parachain_header_number > required_parachain_header_number { + log::trace!( + target: "bridge", + "[{}] More {} headers required. Going to sync up to the {}", + relay_task_name, + P::SourceParachain::NAME, + new_required_parachain_header_number, + ); + + required_parachain_header_number = new_required_parachain_header_number; + } }, _ = async_std::task::sleep(P::TargetChain::AVERAGE_BLOCK_INTERVAL).fuse() => {}, _ = parachains_relay_task => { @@ -351,7 +363,7 @@ async fn background_task( .await; }, RelayState::RelayingParaHeader(required_para_header) => { - *required_para_header_number_ref.lock().await = + *required_para_header_ref.lock().await = AvailableHeader::Available(required_para_header); }, } @@ -379,11 +391,6 @@ async fn background_task( parachains_relay::parachains_loop::run( parachains_source.clone(), parachains_target.clone(), - ParachainSyncParams { - parachains: vec![P::SourceParachain::PARACHAIN_ID.into()], - stall_timeout: std::time::Duration::from_secs(60), - strategy: parachains_relay::parachains_loop::ParachainSyncStrategy::Any, - }, MetricsParams::disabled(), futures::future::pending(), ) @@ -489,10 +496,7 @@ where source.client().best_finalized_header().await.map_err(map_source_err)?; let best_finalized_relay_block_id = best_finalized_relay_header.id(); let para_header_at_source = source - .on_chain_para_head_id( - best_finalized_relay_block_id, - P::SourceParachain::PARACHAIN_ID.into(), - ) + .on_chain_para_head_id(best_finalized_relay_block_id) .await .map_err(map_source_err)?; @@ -515,10 +519,7 @@ where let para_header_at_relay_header_at_target = if let Some(available_relay_header_at_target) = available_relay_header_at_target { source - .on_chain_para_head_id( - available_relay_header_at_target, - P::SourceParachain::PARACHAIN_ID.into(), - ) + .on_chain_para_head_id(available_relay_header_at_target) .await .map_err(map_source_err)? } else { @@ -669,7 +670,7 @@ impl<'a, P: SubstrateParachainsPipeline> &self, at_relay_block: HeaderIdOf, ) -> Result>, SubstrateError> { - self.1.on_chain_para_head_id(at_relay_block, self.parachain_id()).await + self.1.on_chain_para_head_id(at_relay_block).await } } diff --git a/relays/lib-substrate-relay/src/parachains/mod.rs b/relays/lib-substrate-relay/src/parachains/mod.rs index 9852e512f7e..722f9b61f9f 100644 --- a/relays/lib-substrate-relay/src/parachains/mod.rs +++ b/relays/lib-substrate-relay/src/parachains/mod.rs @@ -56,7 +56,8 @@ pub struct ParachainsPipelineAdapter { } impl ParachainsPipeline for ParachainsPipelineAdapter

{ - type SourceChain = P::SourceRelayChain; + type SourceParachain = P::SourceParachain; + type SourceRelayChain = P::SourceRelayChain; type TargetChain = P::TargetChain; } diff --git a/relays/lib-substrate-relay/src/parachains/source.rs b/relays/lib-substrate-relay/src/parachains/source.rs index 90776902dd6..146c5840cd5 100644 --- a/relays/lib-substrate-relay/src/parachains/source.rs +++ b/relays/lib-substrate-relay/src/parachains/source.rs @@ -24,10 +24,7 @@ use bp_parachains::parachain_head_storage_key_at_source; use bp_polkadot_core::parachains::{ParaHash, ParaHead, ParaHeadsProof, ParaId}; use bp_runtime::HeaderIdProvider; use codec::Decode; -use parachains_relay::{ - parachains_loop::{AvailableHeader, SourceClient}, - parachains_loop_metrics::ParachainsLoopMetrics, -}; +use parachains_relay::parachains_loop::{AvailableHeader, SourceClient}; use relay_substrate_client::{ is_ancient_block, Chain, Client, Error as SubstrateError, HeaderIdOf, HeaderOf, ParachainBase, RelayChain, @@ -63,8 +60,8 @@ impl ParachainsSource

{ pub async fn on_chain_para_head_id( &self, at_block: HeaderIdOf, - para_id: ParaId, ) -> Result>, SubstrateError> { + let para_id = ParaId(P::SourceParachain::PARACHAIN_ID); let storage_key = parachain_head_storage_key_at_source(P::SourceRelayChain::PARAS_PALLET_NAME, para_id); let para_head = self.client.raw_storage_value(storage_key, Some(at_block.1)).await?; @@ -104,18 +101,7 @@ where async fn parachain_head( &self, at_block: HeaderIdOf, - metrics: Option<&ParachainsLoopMetrics>, - para_id: ParaId, - ) -> Result, Self::Error> { - // we don't need to support many parachains now - if para_id.0 != P::SourceParachain::PARACHAIN_ID { - return Err(SubstrateError::Custom(format!( - "Parachain id {} is not matching expected {}", - para_id.0, - P::SourceParachain::PARACHAIN_ID, - ))) - } - + ) -> Result>, Self::Error> { // if requested relay header is ancient, then we don't even want to try to read the // parachain head - we simply return `Unavailable` let best_block_number = self.client.best_finalized_header_number().await?; @@ -125,7 +111,7 @@ where // else - try to read head from the source client let mut para_head_id = AvailableHeader::Missing; - if let Some(on_chain_para_head_id) = self.on_chain_para_head_id(at_block, para_id).await? { + if let Some(on_chain_para_head_id) = self.on_chain_para_head_id(at_block).await? { // Never return head that is larger than requested. This way we'll never sync // headers past `max_header_id`. para_head_id = match *self.max_head_id.lock().await { @@ -141,26 +127,14 @@ where } } - if let (Some(metrics), AvailableHeader::Available(para_head_id)) = (metrics, para_head_id) { - metrics.update_best_parachain_block_at_source(para_id, para_head_id.0); - } - - Ok(para_head_id.map(|para_head_id| para_head_id.1)) + Ok(para_head_id) } - async fn prove_parachain_heads( + async fn prove_parachain_head( &self, at_block: HeaderIdOf, - parachains: &[ParaId], - ) -> Result<(ParaHeadsProof, Vec), Self::Error> { + ) -> Result<(ParaHeadsProof, ParaHash), Self::Error> { let parachain = ParaId(P::SourceParachain::PARACHAIN_ID); - if parachains != [parachain] { - return Err(SubstrateError::Custom(format!( - "Trying to prove unexpected parachains {parachains:?}. Expected {parachain:?}", - ))) - } - - let parachain = parachains[0]; let storage_key = parachain_head_storage_key_at_source(P::SourceRelayChain::PARAS_PALLET_NAME, parachain); let parachain_heads_proof = self @@ -190,6 +164,6 @@ where })?; let parachain_head_hash = parachain_head.hash(); - Ok((ParaHeadsProof(parachain_heads_proof), vec![parachain_head_hash])) + Ok((ParaHeadsProof(parachain_heads_proof), parachain_head_hash)) } } diff --git a/relays/lib-substrate-relay/src/parachains/target.rs b/relays/lib-substrate-relay/src/parachains/target.rs index 7f6cdf8f925..6df7bc0a742 100644 --- a/relays/lib-substrate-relay/src/parachains/target.rs +++ b/relays/lib-substrate-relay/src/parachains/target.rs @@ -24,18 +24,15 @@ use crate::{ }; use async_trait::async_trait; -use bp_parachains::{BestParaHeadHash, ImportedParaHeadsKeyProvider, ParasInfoKeyProvider}; use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; use bp_runtime::HeaderIdProvider; use codec::Decode; -use parachains_relay::{ - parachains_loop::TargetClient, parachains_loop_metrics::ParachainsLoopMetrics, -}; +use parachains_relay::parachains_loop::TargetClient; use relay_substrate_client::{ - AccountIdOf, AccountKeyPairOf, BlockNumberOf, Chain, Client, Error as SubstrateError, HashOf, - HeaderIdOf, ParachainBase, RelayChain, TransactionEra, TransactionTracker, UnsignedTransaction, + AccountIdOf, AccountKeyPairOf, Chain, Client, Error as SubstrateError, HeaderIdOf, + ParachainBase, TransactionEra, TransactionTracker, UnsignedTransaction, }; -use relay_utils::{relay_loop::Client as RelayClient, HeaderId}; +use relay_utils::relay_loop::Client as RelayClient; use sp_core::{Bytes, Pair}; /// Substrate client as parachain heads source. @@ -92,93 +89,50 @@ where Ok(best_id) } - async fn best_finalized_source_block( + async fn best_finalized_source_relay_chain_block( &self, at_block: &HeaderIdOf, ) -> Result, Self::Error> { - let encoded_best_finalized_source_block = self - .client - .state_call( + self.client + .typed_state_call::<_, Option>>( P::SourceRelayChain::BEST_FINALIZED_HEADER_ID_METHOD.into(), - Bytes(Vec::new()), + (), Some(at_block.1), ) - .await?; - - Option::, BlockNumberOf>>::decode( - &mut &encoded_best_finalized_source_block.0[..], - ) - .map_err(SubstrateError::ResponseParseFailed)? - .map(Ok) - .unwrap_or(Err(SubstrateError::NoParachainHeadAtTarget( - P::SourceParachain::PARACHAIN_ID, - P::TargetChain::NAME.into(), - ))) + .await? + .map(Ok) + .unwrap_or(Err(SubstrateError::BridgePalletIsNotInitialized)) } async fn parachain_head( &self, at_block: HeaderIdOf, - metrics: Option<&ParachainsLoopMetrics>, - para_id: ParaId, - ) -> Result, Self::Error> { - let best_para_head_hash: Option = self + ) -> Result>, Self::Error> { + let encoded_best_finalized_source_para_block = self .client - .storage_map_value::( - P::SourceRelayChain::PARACHAINS_FINALITY_PALLET_NAME, - ¶_id, + .state_call( + P::SourceParachain::BEST_FINALIZED_HEADER_ID_METHOD.into(), + Bytes(Vec::new()), Some(at_block.1), ) - .await? - .map(|para_info| para_info.best_head_hash); - - if let (Some(metrics), Some(best_para_head_hash)) = (metrics, &best_para_head_hash) { - let imported_para_head_number = self - .client - .storage_double_map_value::( - P::SourceRelayChain::PARACHAINS_FINALITY_PALLET_NAME, - ¶_id, - &best_para_head_hash.head_hash, - Some(at_block.1), - ) - .await - .and_then(|maybe_encoded_head| match maybe_encoded_head { - Some(encoded_head) => encoded_head - .decode_parachain_head_data::() - .map(|head| head.number) - .map(Some) - .map_err(Self::Error::ResponseParseFailed), - None => Ok(None), - }) - .map_err(|e| { - log::error!( - target: "bridge-metrics", - "Failed to read or decode {} parachain header at {}: {:?}. Metric will have obsolete value", - P::SourceParachain::NAME, - P::TargetChain::NAME, - e, - ); - e - }) - .unwrap_or(None); - if let Some(imported_para_head_number) = imported_para_head_number { - metrics.update_best_parachain_block_at_target(para_id, imported_para_head_number); - } - } + .await?; - Ok(best_para_head_hash) + Ok(Option::>::decode( + &mut &encoded_best_finalized_source_para_block.0[..], + ) + .map_err(SubstrateError::ResponseParseFailed)?) } - async fn submit_parachain_heads_proof( + async fn submit_parachain_head_proof( &self, at_relay_block: HeaderIdOf, - updated_parachains: Vec<(ParaId, ParaHash)>, + updated_head_hash: ParaHash, proof: ParaHeadsProof, ) -> Result { let transaction_params = self.transaction_params.clone(); let call = P::SubmitParachainHeadsCallBuilder::build_submit_parachain_heads_call( at_relay_block, - updated_parachains, + vec![(ParaId(P::SourceParachain::PARACHAIN_ID), updated_head_hash)], proof, ); self.client diff --git a/relays/messages/Cargo.toml b/relays/messages/Cargo.toml index c4d2459e5ca..efb6c6c8585 100644 --- a/relays/messages/Cargo.toml +++ b/relays/messages/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] async-std = { version = "1.6.5", features = ["attributes"] } async-trait = "0.1" -futures = "0.3.26" +futures = "0.3.27" hex = "0.4" log = "0.4.17" num-traits = "0.2" diff --git a/relays/messages/src/message_lane_loop.rs b/relays/messages/src/message_lane_loop.rs index 2903435dda5..0533e51d5db 100644 --- a/relays/messages/src/message_lane_loop.rs +++ b/relays/messages/src/message_lane_loop.rs @@ -723,7 +723,7 @@ pub(crate) mod tests { ( nonce, MessageDetails { - dispatch_weight: Weight::from_ref_time(1), + dispatch_weight: Weight::from_parts(1, 0), size: 1, reward: 1, }, @@ -949,7 +949,7 @@ pub(crate) mod tests { max_unrewarded_relayer_entries_at_target: 4, max_unconfirmed_nonces_at_target: 4, max_messages_in_single_batch: 4, - max_messages_weight_in_single_batch: Weight::from_ref_time(4), + max_messages_weight_in_single_batch: Weight::from_parts(4, 0), max_messages_size_in_single_batch: 4, }, }, diff --git a/relays/messages/src/message_race_delivery.rs b/relays/messages/src/message_race_delivery.rs index 8b8e690ec4a..b50e6c0841e 100644 --- a/relays/messages/src/message_race_delivery.rs +++ b/relays/messages/src/message_race_delivery.rs @@ -255,7 +255,7 @@ struct MessageDeliveryStrategy { /// Latest confirmed nonces at the source client + the header id where we have first met this /// nonce. latest_confirmed_nonces_at_source: VecDeque<(SourceHeaderIdOf

, MessageNonce)>, - /// Target nonces from the source client. + /// Target nonces available at the **best** block of the target chain. target_nonces: Option>, /// Basic delivery strategy. strategy: MessageDeliveryStrategyBase

, @@ -387,13 +387,11 @@ where race_state: &mut RaceState, TargetHeaderIdOf

, P::MessagesProof>, ) { // best target nonces must always be ge than finalized target nonces - let mut target_nonces = self.target_nonces.take().unwrap_or_else(|| nonces.clone()); - target_nonces.nonces_data = nonces.nonces_data.clone(); - target_nonces.latest_nonce = std::cmp::max(target_nonces.latest_nonce, nonces.latest_nonce); - self.target_nonces = Some(target_nonces); + let latest_nonce = nonces.latest_nonce; + self.target_nonces = Some(nonces); self.strategy.best_target_nonces_updated( - TargetClientNonces { latest_nonce: nonces.latest_nonce, nonces_data: () }, + TargetClientNonces { latest_nonce, nonces_data: () }, race_state, ) } @@ -432,6 +430,7 @@ where &self, race_state: RaceState, TargetHeaderIdOf

, P::MessagesProof>, ) -> Option<(RangeInclusive, Self::ProofParameters)> { + let best_target_nonce = self.strategy.best_at_target()?; let best_finalized_source_header_id_at_best_target = race_state.best_finalized_source_header_id_at_best_target.clone()?; let latest_confirmed_nonce_at_source = self @@ -439,7 +438,8 @@ where .iter() .take_while(|(id, _)| id.0 <= best_finalized_source_header_id_at_best_target.0) .last() - .map(|(_, nonce)| *nonce)?; + .map(|(_, nonce)| *nonce) + .unwrap_or(best_target_nonce); let target_nonces = self.target_nonces.as_ref()?; // There's additional condition in the message delivery race: target would reject messages @@ -529,8 +529,8 @@ where let lane_source_client = self.lane_source_client.clone(); let lane_target_client = self.lane_target_client.clone(); - let maximal_source_queue_index = - self.strategy.maximal_available_source_queue_index(race_state)?; + let available_source_queue_indices = + self.strategy.available_source_queue_indices(race_state)?; let source_queue = self.strategy.source_queue(); let reference = RelayMessagesBatchReference { @@ -539,15 +539,13 @@ where max_messages_size_in_single_batch, lane_source_client: lane_source_client.clone(), lane_target_client: lane_target_client.clone(), + best_target_nonce, nonces_queue: source_queue.clone(), - nonces_queue_range: 0..maximal_source_queue_index + 1, + nonces_queue_range: available_source_queue_indices, metrics: self.metrics_msg.clone(), }; - let range_end = MessageRaceLimits::decide(reference).await?; - - let range_begin = source_queue[0].1.begin(); - let selected_nonces = range_begin..=range_end; + let selected_nonces = MessageRaceLimits::decide(reference).await?; let dispatch_weight = self.dispatch_weight_for_range(&selected_nonces); Some(( @@ -588,7 +586,7 @@ mod tests { use super::*; - const DEFAULT_DISPATCH_WEIGHT: Weight = Weight::from_ref_time(1); + const DEFAULT_DISPATCH_WEIGHT: Weight = Weight::from_parts(1, 0); const DEFAULT_SIZE: u32 = 1; type TestRaceState = RaceState; @@ -632,7 +630,7 @@ mod tests { max_unrewarded_relayer_entries_at_target: 4, max_unconfirmed_nonces_at_target: 4, max_messages_in_single_batch: 4, - max_messages_weight_in_single_batch: Weight::from_ref_time(4), + max_messages_weight_in_single_batch: Weight::from_parts(4, 0), max_messages_size_in_single_batch: 4, latest_confirmed_nonces_at_source: vec![(header_id(1), 19)].into_iter().collect(), lane_source_client: TestSourceClient::default(), @@ -671,7 +669,7 @@ mod tests { fn proof_parameters(state_required: bool, weight: u32) -> MessageProofParameters { MessageProofParameters { outbound_state_proof_required: state_required, - dispatch_weight: Weight::from_ref_time(weight as u64), + dispatch_weight: Weight::from_parts(weight as u64, 0), } } @@ -685,7 +683,7 @@ mod tests { ( idx, MessageDetails { - dispatch_weight: Weight::from_ref_time(idx), + dispatch_weight: Weight::from_parts(idx, 0), size: idx as _, reward: idx as _, }, @@ -813,7 +811,7 @@ mod tests { let (state, mut strategy) = prepare_strategy(); // not all queued messages may fit in the batch, because batch has max weight - strategy.max_messages_weight_in_single_batch = Weight::from_ref_time(3); + strategy.max_messages_weight_in_single_batch = Weight::from_parts(3, 0); assert_eq!( strategy.select_nonces_to_deliver(state).await, Some(((20..=22), proof_parameters(false, 3))) @@ -828,7 +826,7 @@ mod tests { // first message doesn't fit in the batch, because it has weight (10) that overflows max // weight (4) strategy.strategy.source_queue_mut()[0].1.get_mut(&20).unwrap().dispatch_weight = - Weight::from_ref_time(10); + Weight::from_parts(10, 0); assert_eq!( strategy.select_nonces_to_deliver(state).await, Some(((20..=20), proof_parameters(false, 10))) @@ -1014,7 +1012,7 @@ mod tests { strategy.max_unrewarded_relayer_entries_at_target = 100; strategy.max_unconfirmed_nonces_at_target = 100; strategy.max_messages_in_single_batch = 5; - strategy.max_messages_weight_in_single_batch = Weight::from_ref_time(100); + strategy.max_messages_weight_in_single_batch = Weight::from_parts(100, 0); strategy.max_messages_size_in_single_batch = 100; state.best_finalized_source_header_id_at_best_target = Some(header_id(2)); @@ -1031,7 +1029,7 @@ mod tests { max_unrewarded_relayer_entries_at_target: 4, max_unconfirmed_nonces_at_target: 4, max_messages_in_single_batch: 4, - max_messages_weight_in_single_batch: Weight::from_ref_time(4), + max_messages_weight_in_single_batch: Weight::from_parts(4, 0), max_messages_size_in_single_batch: 4, latest_confirmed_nonces_at_source: VecDeque::new(), lane_source_client: TestSourceClient::default(), @@ -1057,4 +1055,88 @@ mod tests { ); assert_eq!(strategy.required_source_header_at_target(&source_header_id), None); } + + #[async_std::test] + async fn previous_nonces_are_selected_if_reorg_happens_at_target_chain() { + // this is the copy of the similar test in the `mesage_race_strategy.rs`, but it also tests + // that the `MessageDeliveryStrategy` acts properly in the similar scenario + + // tune parameters to allow 5 nonces per delivery transaction + let (mut state, mut strategy) = prepare_strategy(); + strategy.max_unrewarded_relayer_entries_at_target = 5; + strategy.max_unconfirmed_nonces_at_target = 5; + strategy.max_messages_in_single_batch = 5; + strategy.max_messages_weight_in_single_batch = Weight::from_parts(5, 0); + strategy.max_messages_size_in_single_batch = 5; + + // in this state we have 4 available nonces for delivery + assert_eq!( + strategy.select_nonces_to_deliver(state.clone()).await, + Some(( + 20..=23, + MessageProofParameters { + outbound_state_proof_required: false, + dispatch_weight: Weight::from_parts(4, 0), + } + )), + ); + + // let's say we have submitted 20..=23 + state.nonces_submitted = Some(20..=23); + + // then new nonce 24 appear at the source block 2 + let new_nonce_24 = vec![( + 24, + MessageDetails { dispatch_weight: Weight::from_parts(1, 0), size: 0, reward: 0 }, + )] + .into_iter() + .collect(); + let source_header_2 = header_id(2); + state.best_finalized_source_header_id_at_source = Some(source_header_2); + strategy.source_nonces_updated( + source_header_2, + SourceClientNonces { new_nonces: new_nonce_24, confirmed_nonce: None }, + ); + // and nonce 23 appear at the best block of the target node (best finalized still has 0 + // nonces) + let target_nonces_data = DeliveryRaceTargetNoncesData { + confirmed_nonce: 19, + unrewarded_relayers: UnrewardedRelayersState::default(), + }; + let target_header_2 = header_id(2); + state.best_target_header_id = Some(target_header_2); + strategy.best_target_nonces_updated( + TargetClientNonces { latest_nonce: 23, nonces_data: target_nonces_data.clone() }, + &mut state, + ); + + // then best target header is retracted + strategy.best_target_nonces_updated( + TargetClientNonces { latest_nonce: 19, nonces_data: target_nonces_data.clone() }, + &mut state, + ); + + // ... and some fork with 19 delivered nonces is finalized + let target_header_2_fork = header_id(2_1); + state.best_finalized_source_header_id_at_source = Some(source_header_2); + state.best_finalized_source_header_id_at_best_target = Some(source_header_2); + state.best_target_header_id = Some(target_header_2_fork); + state.best_finalized_target_header_id = Some(target_header_2_fork); + strategy.finalized_target_nonces_updated( + TargetClientNonces { latest_nonce: 19, nonces_data: target_nonces_data.clone() }, + &mut state, + ); + + // now we have to select nonces 20..=23 for delivery again + assert_eq!( + strategy.select_nonces_to_deliver(state.clone()).await, + Some(( + 20..=24, + MessageProofParameters { + outbound_state_proof_required: false, + dispatch_weight: Weight::from_parts(5, 0), + } + )), + ); + } } diff --git a/relays/messages/src/message_race_limits.rs b/relays/messages/src/message_race_limits.rs index a28d9ba63da..873bb6aad04 100644 --- a/relays/messages/src/message_race_limits.rs +++ b/relays/messages/src/message_race_limits.rs @@ -17,7 +17,7 @@ //! enforcement strategy use num_traits::Zero; -use std::ops::Range; +use std::ops::RangeInclusive; use bp_messages::{MessageNonce, Weight}; @@ -76,14 +76,17 @@ pub struct RelayMessagesBatchReference< pub lane_target_client: TargetClient, /// Metrics reference. pub metrics: Option, + /// Best available nonce at the **best** target block. We do not want to deliver nonces + /// less than this nonce, even though the block may be retracted. + pub best_target_nonce: MessageNonce, /// Source queue. pub nonces_queue: SourceRangesQueue< P::SourceHeaderHash, P::SourceHeaderNumber, MessageDetailsMap, >, - /// Source queue range - pub nonces_queue_range: Range, + /// Range of indices within the `nonces_queue` that are available for selection. + pub nonces_queue_range: RangeInclusive, } /// Limits of the message race transactions. @@ -97,14 +100,16 @@ impl MessageRaceLimits { TargetClient: MessageLaneTargetClient

, >( reference: RelayMessagesBatchReference, - ) -> Option { + ) -> Option> { let mut hard_selected_count = 0; let mut selected_weight = Weight::zero(); let mut selected_count: MessageNonce = 0; - let hard_selected_begin_nonce = - reference.nonces_queue[reference.nonces_queue_range.start].1.begin(); + let hard_selected_begin_nonce = std::cmp::max( + reference.best_target_nonce + 1, + reference.nonces_queue[*reference.nonces_queue_range.start()].1.begin(), + ); // relay reference let mut relay_reference = RelayReference { @@ -129,6 +134,7 @@ impl MessageRaceLimits { .nonces_queue .range(reference.nonces_queue_range.clone()) .flat_map(|(_, ready_nonces)| ready_nonces.iter()) + .filter(|(nonce, _)| **nonce >= hard_selected_begin_nonce) .enumerate(); for (index, (nonce, details)) in all_ready_nonces { relay_reference.index = index; @@ -192,7 +198,7 @@ impl MessageRaceLimits { if hard_selected_count != 0 { let selected_max_nonce = hard_selected_begin_nonce + hard_selected_count as MessageNonce - 1; - Some(selected_max_nonce) + Some(hard_selected_begin_nonce..=selected_max_nonce) } else { None } diff --git a/relays/messages/src/message_race_strategy.rs b/relays/messages/src/message_race_strategy.rs index 9a53a487d94..479ffe51329 100644 --- a/relays/messages/src/message_race_strategy.rs +++ b/relays/messages/src/message_race_strategy.rs @@ -41,8 +41,11 @@ pub struct BasicStrategy< Proof, > { /// All queued nonces. + /// + /// The queue may contain already delivered nonces. We only remove entries from this + /// queue after corresponding nonces are finalized by the target chain. source_queue: SourceRangesQueue, - /// The best nonce known to target node (at its best block). `None` if it has not been received + /// The best nonce known to target node at its best block. `None` if it has not been received /// yet. best_target_nonce: Option, /// Unused generic types dump. @@ -93,21 +96,26 @@ impl< &mut self.source_queue } - /// Returns index of the latest source queue entry, that may be delivered to the target node. + /// Returns indices of source queue entries, which may be delivered to the target node. + /// + /// The function may skip some nonces from the queue front if nonces from this entry are + /// already available at the **best** target block. After this block is finalized, the entry + /// will be removed from the queue. /// - /// Returns `None` if no entries may be delivered. All entries before and including the - /// `Some(_)` index are guaranteed to be witnessed at source blocks that are known to be - /// finalized at the target node. - pub fn maximal_available_source_queue_index( + /// All entries before and including the range end index, are guaranteed to be witnessed + /// at source blocks that are known to be finalized at the target node. + /// + /// Returns `None` if no entries may be delivered. + pub fn available_source_queue_indices( &self, race_state: RaceState< HeaderId, HeaderId, Proof, >, - ) -> Option { + ) -> Option> { // if we do not know best nonce at target node, we can't select anything - let _ = self.best_target_nonce?; + let best_target_nonce = self.best_target_nonce?; // if we have already selected nonces that we want to submit, do nothing if race_state.nonces_to_submit.is_some() { @@ -119,6 +127,15 @@ impl< return None } + // find first entry that may be delivered to the target node + let begin_index = self + .source_queue + .iter() + .enumerate() + .skip_while(|(_, (_, nonces))| nonces.end() <= best_target_nonce) + .map(|(index, _)| index) + .next()?; + // 1) we want to deliver all nonces, starting from `target_nonce + 1` // 2) we can't deliver new nonce until header, that has emitted this nonce, is finalized // by target client @@ -127,12 +144,16 @@ impl< // => let's first select range of entries inside deque that are already finalized at // the target client and pass this range to the selector let best_header_at_target = race_state.best_finalized_source_header_id_at_best_target?; - self.source_queue + let end_index = self + .source_queue .iter() .enumerate() + .skip(begin_index) .take_while(|(_, (queued_at, _))| queued_at.0 <= best_header_at_target.0) .map(|(index, _)| index) - .last() + .last()?; + + Some(begin_index..=end_index) } /// Remove all nonces that are less than or equal to given nonce from the source queue. @@ -237,22 +258,6 @@ impl< ) { let nonce = nonces.latest_nonce; - if let Some(best_target_nonce) = self.best_target_nonce { - if nonce < best_target_nonce { - return - } - } - - while let Some(true) = self.source_queue.front().map(|(_, range)| range.begin() <= nonce) { - let maybe_subrange = self.source_queue.pop_front().and_then(|(at_block, range)| { - range.greater_than(nonce).map(|subrange| (at_block, subrange)) - }); - if let Some((at_block, subrange)) = maybe_subrange { - self.source_queue.push_front((at_block, subrange)); - break - } - } - let need_to_select_new_nonces = race_state .nonces_to_submit .as_ref() @@ -271,8 +276,7 @@ impl< race_state.nonces_submitted = None; } - self.best_target_nonce = - Some(std::cmp::max(self.best_target_nonce.unwrap_or(nonces.latest_nonce), nonce)); + self.best_target_nonce = Some(nonce); } fn finalized_target_nonces_updated( @@ -284,7 +288,7 @@ impl< Proof, >, ) { - self.remove_le_nonces_from_source_queue(nonces.latest_nonce); // TODO: does it means that we'll try to submit old nonces in next tx??? + self.remove_le_nonces_from_source_queue(nonces.latest_nonce); self.best_target_nonce = Some(std::cmp::max( self.best_target_nonce.unwrap_or(nonces.latest_nonce), nonces.latest_nonce, @@ -299,9 +303,12 @@ impl< Proof, >, ) -> Option<(RangeInclusive, Self::ProofParameters)> { - let maximal_source_queue_index = self.maximal_available_source_queue_index(race_state)?; - let range_begin = self.source_queue[0].1.begin(); - let range_end = self.source_queue[maximal_source_queue_index].1.end(); + let available_indices = self.available_source_queue_indices(race_state)?; + let range_begin = std::cmp::max( + self.best_target_nonce? + 1, + self.source_queue[*available_indices.start()].1.begin(), + ); + let range_end = self.source_queue[*available_indices.end()].1.end(); Some((range_begin..=range_end, ())) } } @@ -351,7 +358,7 @@ mod tests { strategy.source_nonces_updated(header_id(1), source_nonces(1..=5)); assert_eq!(strategy.best_at_source(), None); strategy.best_target_nonces_updated(target_nonces(10), &mut Default::default()); - assert_eq!(strategy.source_queue, vec![]); + assert_eq!(strategy.source_queue, vec![(header_id(1), 1..=5)]); assert_eq!(strategy.best_at_source(), Some(10)); } @@ -372,16 +379,6 @@ mod tests { assert_eq!(strategy.source_queue, vec![(header_id(1), 1..=5)]); } - #[test] - fn target_nonce_is_never_lower_than_latest_known_target_nonce() { - let mut strategy = BasicStrategy::::new(); - assert_eq!(strategy.best_target_nonce, None); - strategy.best_target_nonces_updated(target_nonces(10), &mut Default::default()); - assert_eq!(strategy.best_target_nonce, Some(10)); - strategy.best_target_nonces_updated(target_nonces(5), &mut Default::default()); - assert_eq!(strategy.best_target_nonce, Some(10)); - } - #[test] fn updated_target_nonce_removes_queued_entries() { let mut strategy = BasicStrategy::::new(); @@ -389,9 +386,9 @@ mod tests { strategy.source_nonces_updated(header_id(2), source_nonces(6..=10)); strategy.source_nonces_updated(header_id(3), source_nonces(11..=15)); strategy.source_nonces_updated(header_id(4), source_nonces(16..=20)); - strategy.best_target_nonces_updated(target_nonces(15), &mut Default::default()); + strategy.finalized_target_nonces_updated(target_nonces(15), &mut Default::default()); assert_eq!(strategy.source_queue, vec![(header_id(4), 16..=20)]); - strategy.best_target_nonces_updated(target_nonces(17), &mut Default::default()); + strategy.finalized_target_nonces_updated(target_nonces(17), &mut Default::default()); assert_eq!(strategy.source_queue, vec![(header_id(4), 18..=20)]); } @@ -459,7 +456,7 @@ mod tests { } #[test] - fn maximal_available_source_queue_index_works() { + fn available_source_queue_indices_works() { let mut state = RaceState::<_, _, TestMessagesProof>::default(); let mut strategy = BasicStrategy::::new(); strategy.best_target_nonces_updated(target_nonces(0), &mut state); @@ -468,19 +465,19 @@ mod tests { strategy.source_nonces_updated(header_id(3), source_nonces(7..=9)); state.best_finalized_source_header_id_at_best_target = Some(header_id(0)); - assert_eq!(strategy.maximal_available_source_queue_index(state.clone()), None); + assert_eq!(strategy.available_source_queue_indices(state.clone()), None); state.best_finalized_source_header_id_at_best_target = Some(header_id(1)); - assert_eq!(strategy.maximal_available_source_queue_index(state.clone()), Some(0)); + assert_eq!(strategy.available_source_queue_indices(state.clone()), Some(0..=0)); state.best_finalized_source_header_id_at_best_target = Some(header_id(2)); - assert_eq!(strategy.maximal_available_source_queue_index(state.clone()), Some(1)); + assert_eq!(strategy.available_source_queue_indices(state.clone()), Some(0..=1)); state.best_finalized_source_header_id_at_best_target = Some(header_id(3)); - assert_eq!(strategy.maximal_available_source_queue_index(state.clone()), Some(2)); + assert_eq!(strategy.available_source_queue_indices(state.clone()), Some(0..=2)); state.best_finalized_source_header_id_at_best_target = Some(header_id(4)); - assert_eq!(strategy.maximal_available_source_queue_index(state), Some(2)); + assert_eq!(strategy.available_source_queue_indices(state), Some(0..=2)); } #[test] @@ -514,4 +511,67 @@ mod tests { strategy.remove_le_nonces_from_source_queue(100); assert_eq!(source_queue_nonces(&strategy.source_queue), Vec::::new(),); } + + #[async_std::test] + async fn previous_nonces_are_selected_if_reorg_happens_at_target_chain() { + let source_header_1 = header_id(1); + let target_header_1 = header_id(1); + + // we start in perfec sync state - all headers are synced and finalized on both ends + let mut state = RaceState::<_, _, TestMessagesProof> { + best_finalized_source_header_id_at_source: Some(source_header_1), + best_finalized_source_header_id_at_best_target: Some(source_header_1), + best_target_header_id: Some(target_header_1), + best_finalized_target_header_id: Some(target_header_1), + nonces_to_submit: None, + nonces_submitted: None, + }; + + // in this state we have 1 available nonce for delivery + let mut strategy = BasicStrategy:: { + source_queue: vec![(header_id(1), 1..=1)].into_iter().collect(), + best_target_nonce: Some(0), + _phantom: PhantomData, + }; + assert_eq!(strategy.select_nonces_to_deliver(state.clone()).await, Some((1..=1, ())),); + + // let's say we have submitted 1..=1 + state.nonces_submitted = Some(1..=1); + + // then new nonce 2 appear at the source block 2 + let source_header_2 = header_id(2); + state.best_finalized_source_header_id_at_source = Some(source_header_2); + strategy.source_nonces_updated( + source_header_2, + SourceClientNonces { new_nonces: 2..=2, confirmed_nonce: None }, + ); + // and nonce 1 appear at the best block of the target node (best finalized still has 0 + // nonces) + let target_header_2 = header_id(2); + state.best_target_header_id = Some(target_header_2); + strategy.best_target_nonces_updated( + TargetClientNonces { latest_nonce: 1, nonces_data: () }, + &mut state, + ); + + // then best target header is retracted + strategy.best_target_nonces_updated( + TargetClientNonces { latest_nonce: 0, nonces_data: () }, + &mut state, + ); + + // ... and some fork with zero delivered nonces is finalized + let target_header_2_fork = header_id(2_1); + state.best_finalized_source_header_id_at_source = Some(source_header_2); + state.best_finalized_source_header_id_at_best_target = Some(source_header_2); + state.best_target_header_id = Some(target_header_2_fork); + state.best_finalized_target_header_id = Some(target_header_2_fork); + strategy.finalized_target_nonces_updated( + TargetClientNonces { latest_nonce: 0, nonces_data: () }, + &mut state, + ); + + // now we have to select nonce 1 for delivery again + assert_eq!(strategy.select_nonces_to_deliver(state.clone()).await, Some((1..=2, ())),); + } } diff --git a/relays/parachains/Cargo.toml b/relays/parachains/Cargo.toml index 093fc0b94e3..5481ce7edf8 100644 --- a/relays/parachains/Cargo.toml +++ b/relays/parachains/Cargo.toml @@ -7,14 +7,13 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] async-std = "1.6.5" -async-trait = "0.1.64" -futures = "0.3.26" +async-trait = "0.1.66" +futures = "0.3.27" log = "0.4.17" relay-utils = { path = "../utils" } # Bridge dependencies -bp-parachains = { path = "../../primitives/parachains" } bp-polkadot-core = { path = "../../primitives/polkadot-core" } relay-substrate-client = { path = "../client-substrate" } diff --git a/relays/parachains/src/lib.rs b/relays/parachains/src/lib.rs index 94b3ce3ec76..81ea983a6f7 100644 --- a/relays/parachains/src/lib.rs +++ b/relays/parachains/src/lib.rs @@ -16,7 +16,7 @@ use std::fmt::Debug; -use relay_substrate_client::Chain; +use relay_substrate_client::{Chain, Parachain}; pub mod parachains_loop; pub mod parachains_loop_metrics; @@ -24,7 +24,9 @@ pub mod parachains_loop_metrics; /// Finality proofs synchronization pipeline. pub trait ParachainsPipeline: 'static + Clone + Debug + Send + Sync { /// Relay chain which is storing parachain heads in its `paras` module. - type SourceChain: Chain; + type SourceRelayChain: Chain; + /// Parachain which headers we are syncing here. + type SourceParachain: Parachain; /// Target chain (either relay or para) which wants to know about new parachain heads. type TargetChain: Chain; } diff --git a/relays/parachains/src/parachains_loop.rs b/relays/parachains/src/parachains_loop.rs index 7b62e72ca29..9b9038fd976 100644 --- a/relays/parachains/src/parachains_loop.rs +++ b/relays/parachains/src/parachains_loop.rs @@ -17,7 +17,6 @@ use crate::{parachains_loop_metrics::ParachainsLoopMetrics, ParachainsPipeline}; use async_trait::async_trait; -use bp_parachains::BestParaHeadHash; use bp_polkadot_core::{ parachains::{ParaHash, ParaHeadsProof, ParaId}, BlockNumber as RelayBlockNumber, @@ -26,44 +25,17 @@ use futures::{ future::{FutureExt, Shared}, poll, select_biased, }; -use relay_substrate_client::{BlockNumberOf, Chain, HeaderIdOf}; +use relay_substrate_client::{Chain, HeaderIdOf, ParachainBase}; use relay_utils::{ metrics::MetricsParams, relay_loop::Client as RelayClient, FailedClient, TrackedTransactionStatus, TransactionTracker, }; -use std::{ - collections::{BTreeMap, BTreeSet}, - future::Future, - pin::Pin, - task::Poll, - time::Duration, -}; - -/// Parachain heads synchronization params. -#[derive(Clone, Debug)] -pub struct ParachainSyncParams { - /// Parachains that we're relaying here. - pub parachains: Vec, - /// Parachain heads update strategy. - pub strategy: ParachainSyncStrategy, - /// Stall timeout. If we have submitted transaction and we see no state updates for this - /// period, we consider our transaction lost. - pub stall_timeout: Duration, -} - -/// Parachain heads update strategy. -#[derive(Clone, Copy, Debug)] -pub enum ParachainSyncStrategy { - /// Update whenever any parachain head is updated. - Any, - /// Wait till all parachain heads are updated. - All, -} +use std::{future::Future, pin::Pin, task::Poll}; /// Parachain header availability at a certain chain. #[derive(Clone, Copy, Debug)] pub enum AvailableHeader { - /// The client refuses to report parachain head at this moment. + /// The client can not report actual parachain head at this moment. /// /// It is a "mild" error, which may appear when e.g. on-demand parachains relay is used. /// This variant must be treated as "we don't want to update parachain head value at the @@ -78,15 +50,20 @@ pub enum AvailableHeader { } impl AvailableHeader { - /// Transform contained value. - pub fn map(self, f: F) -> AvailableHeader - where - F: FnOnce(T) -> U, - { - match self { - AvailableHeader::Unavailable => AvailableHeader::Unavailable, - AvailableHeader::Missing => AvailableHeader::Missing, - AvailableHeader::Available(val) => AvailableHeader::Available(f(val)), + /// Return available header. + pub fn as_available(&self) -> Option<&T> { + match *self { + AvailableHeader::Available(ref header) => Some(header), + _ => None, + } + } +} + +impl From> for AvailableHeader { + fn from(maybe_header: Option) -> AvailableHeader { + match maybe_header { + Some(header) => AvailableHeader::Available(header), + None => AvailableHeader::Missing, } } } @@ -97,27 +74,17 @@ pub trait SourceClient: RelayClient { /// Returns `Ok(true)` if client is in synced state. async fn ensure_synced(&self) -> Result; - /// Get parachain head hash at given block. - /// - /// The implementation may call `ParachainsLoopMetrics::update_best_parachain_block_at_source` - /// on provided `metrics` object to update corresponding metric value. + /// Get parachain head id at given block. async fn parachain_head( &self, - at_block: HeaderIdOf, - metrics: Option<&ParachainsLoopMetrics>, - para_id: ParaId, - ) -> Result, Self::Error>; + at_block: HeaderIdOf, + ) -> Result>, Self::Error>; - /// Get parachain heads proof. - /// - /// The number and order of entries in the resulting parachain head hashes vector must match the - /// number and order of parachains in the `parachains` vector. The incorrect implementation will - /// result in panic. - async fn prove_parachain_heads( + /// Get parachain head proof at given block. + async fn prove_parachain_head( &self, - at_block: HeaderIdOf, - parachains: &[ParaId], - ) -> Result<(ParaHeadsProof, Vec), Self::Error>; + at_block: HeaderIdOf, + ) -> Result<(ParaHeadsProof, ParaHash), Self::Error>; } /// Target client used in parachain heads synchronization loop. @@ -129,28 +96,23 @@ pub trait TargetClient: RelayClient { /// Get best block id. async fn best_block(&self) -> Result, Self::Error>; - /// Get best finalized source block id. - async fn best_finalized_source_block( + /// Get best finalized source relay chain block id. + async fn best_finalized_source_relay_chain_block( &self, at_block: &HeaderIdOf, - ) -> Result, Self::Error>; + ) -> Result, Self::Error>; - /// Get parachain head hash at given block. - /// - /// The implementation may call `ParachainsLoopMetrics::update_best_parachain_block_at_target` - /// on provided `metrics` object to update corresponding metric value. + /// Get parachain head id at given block. async fn parachain_head( &self, at_block: HeaderIdOf, - metrics: Option<&ParachainsLoopMetrics>, - para_id: ParaId, - ) -> Result, Self::Error>; + ) -> Result>, Self::Error>; /// Submit parachain heads proof. - async fn submit_parachain_heads_proof( + async fn submit_parachain_head_proof( &self, - at_source_block: HeaderIdOf, - updated_parachains: Vec<(ParaId, ParaHash)>, + at_source_block: HeaderIdOf, + para_head_hash: ParaHash, proof: ParaHeadsProof, ) -> Result; } @@ -158,19 +120,23 @@ pub trait TargetClient: RelayClient { /// Return prefix that will be used by default to expose Prometheus metrics of the parachains /// sync loop. pub fn metrics_prefix() -> String { - format!("{}_to_{}_Parachains", P::SourceChain::NAME, P::TargetChain::NAME) + format!( + "{}_to_{}_Parachains_{}", + P::SourceRelayChain::NAME, + P::TargetChain::NAME, + P::SourceParachain::PARACHAIN_ID + ) } /// Run parachain heads synchronization. pub async fn run( source_client: impl SourceClient

, target_client: impl TargetClient

, - sync_params: ParachainSyncParams, metrics_params: MetricsParams, exit_signal: impl Future + 'static + Send, ) -> Result<(), relay_utils::Error> where - P::SourceChain: Chain, + P::SourceRelayChain: Chain, { let exit_signal = exit_signal.shared(); relay_utils::relay_loop(source_client, target_client) @@ -179,13 +145,7 @@ where .expose() .await? .run(metrics_prefix::

(), move |source_client, target_client, metrics| { - run_until_connection_lost( - source_client, - target_client, - sync_params.clone(), - metrics, - exit_signal.clone(), - ) + run_until_connection_lost(source_client, target_client, metrics, exit_signal.clone()) }) .await } @@ -194,16 +154,15 @@ where async fn run_until_connection_lost( source_client: impl SourceClient

, target_client: impl TargetClient

, - sync_params: ParachainSyncParams, metrics: Option, exit_signal: impl Future + Send, ) -> Result<(), FailedClient> where - P::SourceChain: Chain, + P::SourceRelayChain: Chain, { let exit_signal = exit_signal.fuse(); let min_block_interval = std::cmp::min( - P::SourceChain::AVERAGE_BLOCK_INTERVAL, + P::SourceRelayChain::AVERAGE_BLOCK_INTERVAL, P::TargetChain::AVERAGE_BLOCK_INTERVAL, ); @@ -232,7 +191,7 @@ where log::warn!( target: "bridge", "{} client is syncing. Won't do anything until it is synced", - P::SourceChain::NAME, + P::SourceRelayChain::NAME, ); continue }, @@ -240,7 +199,7 @@ where log::warn!( target: "bridge", "{} client has failed to return its sync status: {:?}", - P::SourceChain::NAME, + P::SourceRelayChain::NAME, e, ); return Err(FailedClient::Source) @@ -249,33 +208,28 @@ where // if we have active transaction, we'll need to wait until it is mined or dropped let best_target_block = target_client.best_block().await.map_err(|e| { - log::warn!(target: "bridge", "Failed to read best {} block: {:?}", P::SourceChain::NAME, e); + log::warn!(target: "bridge", "Failed to read best {} block: {:?}", P::SourceRelayChain::NAME, e); FailedClient::Target })?; - let heads_at_target = read_heads_at_target( - &target_client, - metrics.as_ref(), - &best_target_block, - &sync_params.parachains, - ) - .await?; + let head_at_target = + read_head_at_target(&target_client, metrics.as_ref(), &best_target_block).await?; // check if our transaction has been mined if let Some(tracker) = submitted_heads_tracker.take() { - match tracker.update(&best_target_block, &heads_at_target).await { - SubmittedHeadsStatus::Waiting(tracker) => { + match tracker.update(&best_target_block, &head_at_target).await { + SubmittedHeadStatus::Waiting(tracker) => { // no news about our transaction and we shall keep waiting submitted_heads_tracker = Some(tracker); continue }, - SubmittedHeadsStatus::Final(TrackedTransactionStatus::Finalized(_)) => { + SubmittedHeadStatus::Final(TrackedTransactionStatus::Finalized(_)) => { // all heads have been updated, we don't need this tracker anymore }, - SubmittedHeadsStatus::Final(TrackedTransactionStatus::Lost) => { + SubmittedHeadStatus::Final(TrackedTransactionStatus::Lost) => { log::warn!( target: "bridge", "Parachains synchronization from {} to {} has stalled. Going to restart", - P::SourceChain::NAME, + P::SourceRelayChain::NAME, P::TargetChain::NAME, ); @@ -287,247 +241,201 @@ where // we have no active transaction and may need to update heads, but do we have something for // update? let best_finalized_relay_block = target_client - .best_finalized_source_block(&best_target_block) + .best_finalized_source_relay_chain_block(&best_target_block) .await .map_err(|e| { log::warn!( target: "bridge", "Failed to read best finalized {} block from {}: {:?}", - P::SourceChain::NAME, + P::SourceRelayChain::NAME, P::TargetChain::NAME, e, ); FailedClient::Target })?; - let heads_at_source = read_heads_at_source( - &source_client, - metrics.as_ref(), - &best_finalized_relay_block, - &sync_params.parachains, - ) - .await?; - let updated_ids = select_parachains_to_update::

( - heads_at_source, - heads_at_target, - best_finalized_relay_block, - ); - let is_update_required = is_update_required(&sync_params, &updated_ids); - - log::info!( - target: "bridge", - "Total {} parachains: {}. Up-to-date at {}: {}. Needs update at {}: {}.", - P::SourceChain::NAME, - sync_params.parachains.len(), - P::TargetChain::NAME, - sync_params.parachains.len() - updated_ids.len(), - P::TargetChain::NAME, - updated_ids.len(), - ); + let head_at_source = + read_head_at_source(&source_client, metrics.as_ref(), &best_finalized_relay_block) + .await?; + let is_update_required = is_update_required::

(head_at_source, head_at_target); if is_update_required { - let (heads_proofs, head_hashes) = source_client - .prove_parachain_heads(best_finalized_relay_block, &updated_ids) + let (head_proof, head_hash) = source_client + .prove_parachain_head(best_finalized_relay_block) .await .map_err(|e| { log::warn!( target: "bridge", - "Failed to prove {} parachain heads: {:?}", - P::SourceChain::NAME, + "Failed to prove {} parachain ParaId({}) heads: {:?}", + P::SourceRelayChain::NAME, + P::SourceParachain::PARACHAIN_ID, e, ); FailedClient::Source })?; log::info!( target: "bridge", - "Submitting {} parachain heads update transaction to {}", - P::SourceChain::NAME, + "Submitting {} parachain ParaId({}) head update transaction to {}", + P::SourceRelayChain::NAME, + P::SourceParachain::PARACHAIN_ID, P::TargetChain::NAME, ); - assert_eq!( - head_hashes.len(), - updated_ids.len(), - "Incorrect parachains SourceClient implementation" - ); - let transaction_tracker = target_client - .submit_parachain_heads_proof( - best_finalized_relay_block, - updated_ids.iter().cloned().zip(head_hashes).collect(), - heads_proofs, - ) + .submit_parachain_head_proof(best_finalized_relay_block, head_hash, head_proof) .await .map_err(|e| { log::warn!( target: "bridge", - "Failed to submit {} parachain heads proof to {}: {:?}", - P::SourceChain::NAME, + "Failed to submit {} parachain ParaId({}) heads proof to {}: {:?}", + P::SourceRelayChain::NAME, + P::SourceParachain::PARACHAIN_ID, P::TargetChain::NAME, e, ); FailedClient::Target })?; - submitted_heads_tracker = Some(SubmittedHeadsTracker::

::new( - updated_ids, - best_finalized_relay_block.0, - transaction_tracker, - )); + submitted_heads_tracker = + Some(SubmittedHeadsTracker::

::new(head_at_source, transaction_tracker)); } } } -/// Given heads at source and target clients, returns set of heads that are out of sync. -fn select_parachains_to_update( - heads_at_source: BTreeMap>, - heads_at_target: BTreeMap>, - best_finalized_relay_block: HeaderIdOf, -) -> Vec +/// Returns `true` if we need to submit parachain-head-update transaction. +fn is_update_required( + head_at_source: AvailableHeader>, + head_at_target: Option>, +) -> bool where - P::SourceChain: Chain, + P::SourceRelayChain: Chain, { log::trace!( target: "bridge", - "Selecting {} parachains to update at {} (relay block: {:?}):\n\t\ + "Checking if {} parachain ParaId({}) needs update at {}:\n\t\ At {}: {:?}\n\t\ At {}: {:?}", - P::SourceChain::NAME, + P::SourceRelayChain::NAME, + P::SourceParachain::PARACHAIN_ID, P::TargetChain::NAME, - best_finalized_relay_block, - P::SourceChain::NAME, - heads_at_source, + P::SourceRelayChain::NAME, + head_at_source, P::TargetChain::NAME, - heads_at_target, + head_at_target, ); - heads_at_source - .into_iter() - .zip(heads_at_target.into_iter()) - .filter(|((para, head_at_source), (_, head_at_target))| { - let needs_update = match (head_at_source, head_at_target) { - (AvailableHeader::Unavailable, _) => { - // source client has politely asked us not to update current parachain head - // at the target chain - false - }, - (AvailableHeader::Available(head_at_source), Some(head_at_target)) - if head_at_target.at_relay_block_number < best_finalized_relay_block.0 && - head_at_target.head_hash != *head_at_source => - { - // source client knows head that is better than the head known to the target - // client - true - }, - (AvailableHeader::Available(_), Some(_)) => { - // this is normal case when relay has recently updated heads, when parachain is - // not progressing, or when our source client is still syncing - false - }, - (AvailableHeader::Available(_), None) => { - // parachain is not yet known to the target client. This is true when parachain - // or bridge has been just onboarded/started - true - }, - (AvailableHeader::Missing, Some(_)) => { - // parachain/parathread has been offboarded removed from the system. It needs to - // be propageted to the target client - true - }, - (AvailableHeader::Missing, None) => { - // all's good - parachain is unknown to both clients - false - }, - }; - if needs_update { - log::trace!( - target: "bridge", - "{} parachain {:?} needs update at {}: {:?} vs {:?}", - P::SourceChain::NAME, - para, - P::TargetChain::NAME, - head_at_source, - head_at_target, - ); - } - - needs_update - }) - .map(|((para, _), _)| para) - .collect() -} + let needs_update = match (head_at_source, head_at_target) { + (AvailableHeader::Unavailable, _) => { + // source client has politely asked us not to update current parachain head + // at the target chain + false + }, + (AvailableHeader::Available(head_at_source), Some(head_at_target)) + if head_at_source.number() > head_at_target.number() => + { + // source client knows head that is better than the head known to the target + // client + true + }, + (AvailableHeader::Available(_), Some(_)) => { + // this is normal case when relay has recently updated heads, when parachain is + // not progressing, or when our source client is still syncing + false + }, + (AvailableHeader::Available(_), None) => { + // parachain is not yet known to the target client. This is true when parachain + // or bridge has been just onboarded/started + true + }, + (AvailableHeader::Missing, Some(_)) => { + // parachain/parathread has been offboarded removed from the system. It needs to + // be propageted to the target client + true + }, + (AvailableHeader::Missing, None) => { + // all's good - parachain is unknown to both clients + false + }, + }; -/// Returns true if we need to submit update transactions to the target node. -fn is_update_required(sync_params: &ParachainSyncParams, updated_ids: &[ParaId]) -> bool { - match sync_params.strategy { - ParachainSyncStrategy::All => updated_ids.len() == sync_params.parachains.len(), - ParachainSyncStrategy::Any => !updated_ids.is_empty(), + if needs_update { + log::trace!( + target: "bridge", + "{} parachain ParaId({}) needs update at {}: {:?} vs {:?}", + P::SourceRelayChain::NAME, + P::SourceParachain::PARACHAIN_ID, + P::TargetChain::NAME, + head_at_source, + head_at_target, + ); } + + needs_update } -/// Reads given parachains heads from the source client. -/// -/// Guarantees that the returning map will have an entry for every parachain from `parachains`. -async fn read_heads_at_source( +/// Reads parachain head from the source client. +async fn read_head_at_source( source_client: &impl SourceClient

, metrics: Option<&ParachainsLoopMetrics>, - at_relay_block: &HeaderIdOf, - parachains: &[ParaId], -) -> Result>, FailedClient> { - let mut para_head_hashes = BTreeMap::new(); - for para in parachains { - let para_head = source_client.parachain_head(*at_relay_block, metrics, *para).await; - match para_head { - Ok(para_head) => { - para_head_hashes.insert(*para, para_head); - }, - Err(e) => { - log::warn!( - target: "bridge", - "Failed to read head of {} parachain {:?}: {:?}", - P::SourceChain::NAME, - para, - e, + at_relay_block: &HeaderIdOf, +) -> Result>, FailedClient> { + let para_head = source_client.parachain_head(*at_relay_block).await; + match para_head { + Ok(AvailableHeader::Available(para_head)) => { + if let Some(metrics) = metrics { + metrics.update_best_parachain_block_at_source( + ParaId(P::SourceParachain::PARACHAIN_ID), + para_head.number(), ); - return Err(FailedClient::Source) - }, - } + } + Ok(AvailableHeader::Available(para_head)) + }, + Ok(r) => Ok(r), + Err(e) => { + log::warn!( + target: "bridge", + "Failed to read head of {} parachain ParaId({:?}): {:?}", + P::SourceRelayChain::NAME, + P::SourceParachain::PARACHAIN_ID, + e, + ); + Err(FailedClient::Source) + }, } - Ok(para_head_hashes) } -/// Reads given parachains heads from the source client. -/// -/// Guarantees that the returning map will have an entry for every parachain from `parachains`. -async fn read_heads_at_target( +/// Reads parachain head from the target client. +async fn read_head_at_target( target_client: &impl TargetClient

, metrics: Option<&ParachainsLoopMetrics>, at_block: &HeaderIdOf, - parachains: &[ParaId], -) -> Result>, FailedClient> { - let mut para_best_head_hashes = BTreeMap::new(); - for para in parachains { - let para_best_head = target_client.parachain_head(*at_block, metrics, *para).await; - match para_best_head { - Ok(para_best_head) => { - para_best_head_hashes.insert(*para, para_best_head); - }, - Err(e) => { - log::warn!( - target: "bridge", - "Failed to read head of {} parachain {:?} at {}: {:?}", - P::SourceChain::NAME, - para, - P::TargetChain::NAME, - e, +) -> Result>, FailedClient> { + let para_head_id = target_client.parachain_head(*at_block).await; + match para_head_id { + Ok(Some(para_head_id)) => { + if let Some(metrics) = metrics { + metrics.update_best_parachain_block_at_target( + ParaId(P::SourceParachain::PARACHAIN_ID), + para_head_id.number(), ); - return Err(FailedClient::Target) - }, - } + } + Ok(Some(para_head_id)) + }, + Ok(None) => Ok(None), + Err(e) => { + log::warn!( + target: "bridge", + "Failed to read head of {} parachain ParaId({}) at {}: {:?}", + P::SourceRelayChain::NAME, + P::SourceParachain::PARACHAIN_ID, + P::TargetChain::NAME, + e, + ); + Err(FailedClient::Target) + }, } - Ok(para_best_head_hashes) } /// Submitted heads status. -enum SubmittedHeadsStatus { +enum SubmittedHeadStatus { /// Heads are not yet updated. Waiting(SubmittedHeadsTracker

), /// Heads transaction has either been finalized or lost (i.e. received its "final" status). @@ -551,66 +459,50 @@ type SharedTransactionTracker

= Shared< /// Submitted parachain heads transaction. struct SubmittedHeadsTracker { - /// Ids of parachains which heads were updated in the tracked transaction. - awaiting_update: BTreeSet, - /// Number of relay chain block that has been used to craft parachain heads proof. - relay_block_number: BlockNumberOf, + /// Parachain header id that we have submitted. + submitted_head: AvailableHeader>, /// Future that waits for submitted transaction finality or loss. /// /// It needs to be shared because of `poll` macro and our consuming `update` method. transaction_tracker: SharedTransactionTracker

, } -impl SubmittedHeadsTracker

-where - P::SourceChain: Chain, -{ +impl SubmittedHeadsTracker

{ /// Creates new parachain heads transaction tracker. pub fn new( - awaiting_update: impl IntoIterator, - relay_block_number: BlockNumberOf, + submitted_head: AvailableHeader>, transaction_tracker: impl TransactionTracker> + 'static, ) -> Self { SubmittedHeadsTracker { - awaiting_update: awaiting_update.into_iter().collect(), - relay_block_number, + submitted_head, transaction_tracker: transaction_tracker.wait().fuse().boxed().shared(), } } /// Returns `None` if all submitted parachain heads have been updated. pub async fn update( - mut self, + self, at_target_block: &HeaderIdOf, - heads_at_target: &BTreeMap>, - ) -> SubmittedHeadsStatus

{ - // remove all pending heads that were synced - for (para, best_para_head) in heads_at_target { - if best_para_head - .as_ref() - .map(|best_para_head| { - best_para_head.at_relay_block_number >= self.relay_block_number - }) - .unwrap_or(false) - { - self.awaiting_update.remove(para); - - log::trace!( - target: "bridge", - "Head of parachain {:?} has been updated at {}: {:?}. Outdated parachains remaining: {}", - para, - P::TargetChain::NAME, - best_para_head, - self.awaiting_update.len(), - ); - } - } + head_at_target: &Option>, + ) -> SubmittedHeadStatus

{ + // check if our head has been updated + let is_head_updated = match (self.submitted_head, head_at_target) { + (AvailableHeader::Available(submitted_head), Some(head_at_target)) + if head_at_target.number() >= submitted_head.number() => + true, + (AvailableHeader::Missing, None) => true, + _ => false, + }; + if is_head_updated { + log::trace!( + target: "bridge", + "Head of parachain ParaId({}) has been updated at {}: {:?}", + P::SourceParachain::PARACHAIN_ID, + P::TargetChain::NAME, + head_at_target, + ); - // if we have synced all required heads, we are done - if self.awaiting_update.is_empty() { - return SubmittedHeadsStatus::Final(TrackedTransactionStatus::Finalized( - *at_target_block, - )) + return SubmittedHeadStatus::Final(TrackedTransactionStatus::Finalized(*at_target_block)) } // if underlying transaction tracker has reported that the transaction is lost, we may @@ -618,16 +510,16 @@ where let transaction_tracker = self.transaction_tracker.clone(); match poll!(transaction_tracker) { Poll::Ready(TrackedTransactionStatus::Lost) => - return SubmittedHeadsStatus::Final(TrackedTransactionStatus::Lost), + return SubmittedHeadStatus::Final(TrackedTransactionStatus::Lost), Poll::Ready(TrackedTransactionStatus::Finalized(_)) => { // so we are here and our transaction is mined+finalized, but some of heads were not // updated => we're considering our loop as stalled - return SubmittedHeadsStatus::Final(TrackedTransactionStatus::Lost) + return SubmittedHeadStatus::Final(TrackedTransactionStatus::Lost) }, _ => (), } - SubmittedHeadsStatus::Waiting(self) + SubmittedHeadStatus::Waiting(self) } } @@ -637,18 +529,16 @@ mod tests { use async_std::sync::{Arc, Mutex}; use codec::Encode; use futures::{SinkExt, StreamExt}; - use relay_substrate_client::test_chain::TestChain; + use relay_substrate_client::test_chain::{TestChain, TestParachain}; use relay_utils::{HeaderId, MaybeConnectionError}; use sp_core::H256; - const PARA_ID: u32 = 0; - const PARA_0_HASH: ParaHash = H256([1u8; 32]); - const PARA_1_HASH: ParaHash = H256([2u8; 32]); + const PARA_10_HASH: ParaHash = H256([10u8; 32]); + const PARA_20_HASH: ParaHash = H256([20u8; 32]); #[derive(Clone, Debug)] enum TestError { Error, - MissingParachainHeadProof, } impl MaybeConnectionError for TestError { @@ -661,7 +551,8 @@ mod tests { struct TestParachainsPipeline; impl ParachainsPipeline for TestParachainsPipeline { - type SourceChain = TestChain; + type SourceRelayChain = TestChain; + type SourceParachain = TestParachain; type TargetChain = TestChain; } @@ -688,12 +579,12 @@ mod tests { #[derive(Clone, Debug)] struct TestClientData { source_sync_status: Result, - source_heads: BTreeMap, TestError>>, - source_proofs: BTreeMap, TestError>>, + source_head: Result>, TestError>, + source_proof: Result<(), TestError>, target_best_block: Result, TestError>, target_best_finalized_source_block: Result, TestError>, - target_heads: BTreeMap>, + target_head: Result>, TestError>, target_submit_result: Result<(), TestError>, exit_signal_sender: Option>>, @@ -703,14 +594,12 @@ mod tests { pub fn minimal() -> Self { TestClientData { source_sync_status: Ok(true), - source_heads: vec![(PARA_ID, Ok(AvailableHeader::Available(PARA_0_HASH)))] - .into_iter() - .collect(), - source_proofs: vec![(PARA_ID, Ok(PARA_0_HASH.encode()))].into_iter().collect(), + source_head: Ok(AvailableHeader::Available(HeaderId(0, PARA_20_HASH))), + source_proof: Ok(()), target_best_block: Ok(HeaderId(0, Default::default())), target_best_finalized_source_block: Ok(HeaderId(0, Default::default())), - target_heads: BTreeMap::new(), + target_head: Ok(None), target_submit_result: Ok(()), exit_signal_sender: None, @@ -750,34 +639,17 @@ mod tests { async fn parachain_head( &self, _at_block: HeaderIdOf, - _metrics: Option<&ParachainsLoopMetrics>, - para_id: ParaId, - ) -> Result, TestError> { - match self.data.lock().await.source_heads.get(¶_id.0).cloned() { - Some(result) => result, - None => Ok(AvailableHeader::Missing), - } + ) -> Result>, TestError> { + self.data.lock().await.source_head.clone() } - async fn prove_parachain_heads( + async fn prove_parachain_head( &self, _at_block: HeaderIdOf, - parachains: &[ParaId], - ) -> Result<(ParaHeadsProof, Vec), TestError> { - let mut proofs = Vec::new(); - for para_id in parachains { - proofs.push( - self.data - .lock() - .await - .source_proofs - .get(¶_id.0) - .cloned() - .transpose()? - .ok_or(TestError::MissingParachainHeadProof)?, - ); - } - Ok((ParaHeadsProof(proofs), vec![Default::default(); parachains.len()])) + ) -> Result<(ParaHeadsProof, ParaHash), TestError> { + let head = *self.data.lock().await.source_head.clone()?.as_available().unwrap(); + let proof = (ParaHeadsProof(vec![head.hash().encode()]), head.hash()); + self.data.lock().await.source_proof.clone().map(|_| proof) } } @@ -789,7 +661,7 @@ mod tests { self.data.lock().await.target_best_block.clone() } - async fn best_finalized_source_block( + async fn best_finalized_source_relay_chain_block( &self, _at_block: &HeaderIdOf, ) -> Result, TestError> { @@ -799,16 +671,14 @@ mod tests { async fn parachain_head( &self, _at_block: HeaderIdOf, - _metrics: Option<&ParachainsLoopMetrics>, - para_id: ParaId, - ) -> Result, TestError> { - self.data.lock().await.target_heads.get(¶_id.0).cloned().transpose() + ) -> Result>, TestError> { + self.data.lock().await.target_head.clone() } - async fn submit_parachain_heads_proof( + async fn submit_parachain_head_proof( &self, _at_source_block: HeaderIdOf, - _updated_parachains: Vec<(ParaId, ParaHash)>, + _updated_parachain_head: ParaHash, _proof: ParaHeadsProof, ) -> Result { let mut data = self.data.lock().await; @@ -823,14 +693,6 @@ mod tests { } } - fn default_sync_params() -> ParachainSyncParams { - ParachainSyncParams { - parachains: vec![ParaId(PARA_ID)], - strategy: ParachainSyncStrategy::Any, - stall_timeout: Duration::from_secs(60), - } - } - #[test] fn when_source_client_fails_to_return_sync_state() { let mut test_source_client = TestClientData::minimal(); @@ -840,7 +702,6 @@ mod tests { async_std::task::block_on(run_until_connection_lost( TestClient::from(test_source_client), TestClient::from(TestClientData::minimal()), - default_sync_params(), None, futures::future::pending(), )), @@ -857,7 +718,6 @@ mod tests { async_std::task::block_on(run_until_connection_lost( TestClient::from(TestClientData::minimal()), TestClient::from(test_target_client), - default_sync_params(), None, futures::future::pending(), )), @@ -868,13 +728,12 @@ mod tests { #[test] fn when_target_client_fails_to_read_heads() { let mut test_target_client = TestClientData::minimal(); - test_target_client.target_heads.insert(PARA_ID, Err(TestError::Error)); + test_target_client.target_head = Err(TestError::Error); assert_eq!( async_std::task::block_on(run_until_connection_lost( TestClient::from(TestClientData::minimal()), TestClient::from(test_target_client), - default_sync_params(), None, futures::future::pending(), )), @@ -891,7 +750,6 @@ mod tests { async_std::task::block_on(run_until_connection_lost( TestClient::from(TestClientData::minimal()), TestClient::from(test_target_client), - default_sync_params(), None, futures::future::pending(), )), @@ -902,13 +760,12 @@ mod tests { #[test] fn when_source_client_fails_to_read_heads() { let mut test_source_client = TestClientData::minimal(); - test_source_client.source_heads.insert(PARA_ID, Err(TestError::Error)); + test_source_client.source_head = Err(TestError::Error); assert_eq!( async_std::task::block_on(run_until_connection_lost( TestClient::from(test_source_client), TestClient::from(TestClientData::minimal()), - default_sync_params(), None, futures::future::pending(), )), @@ -919,13 +776,12 @@ mod tests { #[test] fn when_source_client_fails_to_prove_heads() { let mut test_source_client = TestClientData::minimal(); - test_source_client.source_proofs.insert(PARA_ID, Err(TestError::Error)); + test_source_client.source_proof = Err(TestError::Error); assert_eq!( async_std::task::block_on(run_until_connection_lost( TestClient::from(test_source_client), TestClient::from(TestClientData::minimal()), - default_sync_params(), None, futures::future::pending(), )), @@ -942,7 +798,6 @@ mod tests { async_std::task::block_on(run_until_connection_lost( TestClient::from(TestClientData::minimal()), TestClient::from(test_target_client), - default_sync_params(), None, futures::future::pending(), )), @@ -957,7 +812,6 @@ mod tests { async_std::task::block_on(run_until_connection_lost( TestClient::from(TestClientData::minimal()), TestClient::from(TestClientData::with_exit_signal_sender(exit_signal_sender)), - default_sync_params(), None, exit_signal.into_future().map(|(_, _)| ()), )), @@ -965,111 +819,62 @@ mod tests { ); } - const PARA_1_ID: u32 = PARA_ID + 1; - const SOURCE_BLOCK_NUMBER: u32 = 100; - fn test_tx_tracker() -> SubmittedHeadsTracker { SubmittedHeadsTracker::new( - vec![ParaId(PARA_ID), ParaId(PARA_1_ID)], - SOURCE_BLOCK_NUMBER, + AvailableHeader::Available(HeaderId(20, PARA_20_HASH)), TestTransactionTracker(None), ) } - fn all_expected_tracker_heads() -> BTreeMap> { - vec![ - ( - ParaId(PARA_ID), - Some(BestParaHeadHash { - at_relay_block_number: SOURCE_BLOCK_NUMBER, - head_hash: PARA_0_HASH, - }), - ), - ( - ParaId(PARA_1_ID), - Some(BestParaHeadHash { - at_relay_block_number: SOURCE_BLOCK_NUMBER, - head_hash: PARA_0_HASH, - }), - ), - ] - .into_iter() - .collect() - } - - impl From> for Option> { - fn from(status: SubmittedHeadsStatus) -> Option> { + impl From> for Option<()> { + fn from(status: SubmittedHeadStatus) -> Option<()> { match status { - SubmittedHeadsStatus::Waiting(tracker) => Some(tracker.awaiting_update), + SubmittedHeadStatus::Waiting(_) => Some(()), _ => None, } } } #[async_std::test] - async fn tx_tracker_update_when_nothing_is_updated() { + async fn tx_tracker_update_when_head_at_target_has_none_value() { assert_eq!( - Some(test_tx_tracker().awaiting_update), + Some(()), test_tx_tracker() - .update(&HeaderId(0, Default::default()), &vec![].into_iter().collect()) + .update(&HeaderId(0, Default::default()), &Some(HeaderId(10, PARA_10_HASH))) .await .into(), ); } #[async_std::test] - async fn tx_tracker_update_when_one_of_heads_is_updated_to_previous_value() { + async fn tx_tracker_update_when_head_at_target_has_old_value() { assert_eq!( - Some(test_tx_tracker().awaiting_update), + Some(()), test_tx_tracker() - .update( - &HeaderId(0, Default::default()), - &vec![( - ParaId(PARA_ID), - Some(BestParaHeadHash { - at_relay_block_number: SOURCE_BLOCK_NUMBER - 1, - head_hash: PARA_0_HASH, - }) - )] - .into_iter() - .collect() - ) + .update(&HeaderId(0, Default::default()), &Some(HeaderId(10, PARA_10_HASH))) .await .into(), ); } #[async_std::test] - async fn tx_tracker_update_when_one_of_heads_is_updated() { - assert_eq!( - Some(vec![ParaId(PARA_1_ID)].into_iter().collect::>()), + async fn tx_tracker_update_when_head_at_target_has_same_value() { + assert!(matches!( test_tx_tracker() - .update( - &HeaderId(0, Default::default()), - &vec![( - ParaId(PARA_ID), - Some(BestParaHeadHash { - at_relay_block_number: SOURCE_BLOCK_NUMBER, - head_hash: PARA_0_HASH, - }) - )] - .into_iter() - .collect() - ) - .await - .into(), - ); + .update(&HeaderId(0, Default::default()), &Some(HeaderId(20, PARA_20_HASH))) + .await, + SubmittedHeadStatus::Final(TrackedTransactionStatus::Finalized(_)), + )); } #[async_std::test] - async fn tx_tracker_update_when_all_heads_are_updated() { - assert_eq!( - Option::>::None, + async fn tx_tracker_update_when_head_at_target_has_better_value() { + assert!(matches!( test_tx_tracker() - .update(&HeaderId(0, Default::default()), &all_expected_tracker_heads()) - .await - .into(), - ); + .update(&HeaderId(0, Default::default()), &Some(HeaderId(30, PARA_20_HASH))) + .await, + SubmittedHeadStatus::Final(TrackedTransactionStatus::Finalized(_)), + )); } #[async_std::test] @@ -1079,9 +884,9 @@ mod tests { futures::future::ready(TrackedTransactionStatus::Lost).boxed().shared(); assert!(matches!( tx_tracker - .update(&HeaderId(0, Default::default()), &vec![].into_iter().collect()) + .update(&HeaderId(0, Default::default()), &Some(HeaderId(10, PARA_10_HASH))) .await, - SubmittedHeadsStatus::Final(TrackedTransactionStatus::Lost), + SubmittedHeadStatus::Final(TrackedTransactionStatus::Lost), )); } @@ -1094,162 +899,55 @@ mod tests { .shared(); assert!(matches!( tx_tracker - .update(&HeaderId(0, Default::default()), &vec![].into_iter().collect()) + .update(&HeaderId(0, Default::default()), &Some(HeaderId(10, PARA_10_HASH))) .await, - SubmittedHeadsStatus::Final(TrackedTransactionStatus::Lost), + SubmittedHeadStatus::Final(TrackedTransactionStatus::Lost), )); } - #[async_std::test] - async fn tx_tracker_update_when_tx_is_finalized_and_heads_are_updated() { - let mut tx_tracker = test_tx_tracker(); - tx_tracker.transaction_tracker = - futures::future::ready(TrackedTransactionStatus::Finalized(Default::default())) - .boxed() - .shared(); - assert!(matches!( - tx_tracker - .update(&HeaderId(0, Default::default()), &all_expected_tracker_heads()) - .await, - SubmittedHeadsStatus::Final(TrackedTransactionStatus::Finalized(_)), + #[test] + fn parachain_is_not_updated_if_it_is_unavailable() { + assert!(!is_update_required::(AvailableHeader::Unavailable, None)); + assert!(!is_update_required::( + AvailableHeader::Unavailable, + Some(HeaderId(10, PARA_10_HASH)) )); } #[test] fn parachain_is_not_updated_if_it_is_unknown_to_both_clients() { - assert_eq!( - select_parachains_to_update::( - vec![(ParaId(PARA_ID), AvailableHeader::Missing)].into_iter().collect(), - vec![(ParaId(PARA_ID), None)].into_iter().collect(), - HeaderId(10, Default::default()), - ), - Vec::::new(), - ); - } - - #[test] - fn parachain_is_not_updated_if_it_has_been_updated_at_better_relay_block() { - assert_eq!( - select_parachains_to_update::( - vec![(ParaId(PARA_ID), AvailableHeader::Available(PARA_0_HASH))] - .into_iter() - .collect(), - vec![( - ParaId(PARA_ID), - Some(BestParaHeadHash { at_relay_block_number: 20, head_hash: PARA_1_HASH }) - )] - .into_iter() - .collect(), - HeaderId(10, Default::default()), - ), - Vec::::new(), - ); + assert!(!is_update_required::(AvailableHeader::Missing, None),); } #[test] - fn parachain_is_not_updated_if_hash_is_the_same_at_next_relay_block() { - assert_eq!( - select_parachains_to_update::( - vec![(ParaId(PARA_ID), AvailableHeader::Available(PARA_0_HASH))] - .into_iter() - .collect(), - vec![( - ParaId(PARA_ID), - Some(BestParaHeadHash { at_relay_block_number: 0, head_hash: PARA_0_HASH }) - )] - .into_iter() - .collect(), - HeaderId(10, Default::default()), - ), - Vec::::new(), - ); + fn parachain_is_not_updated_if_target_has_better_head() { + assert!(!is_update_required::( + AvailableHeader::Available(HeaderId(10, Default::default())), + Some(HeaderId(20, Default::default())), + ),); } #[test] fn parachain_is_updated_after_offboarding() { - assert_eq!( - select_parachains_to_update::( - vec![(ParaId(PARA_ID), AvailableHeader::Missing)].into_iter().collect(), - vec![( - ParaId(PARA_ID), - Some(BestParaHeadHash { - at_relay_block_number: 0, - head_hash: Default::default(), - }) - )] - .into_iter() - .collect(), - HeaderId(10, Default::default()), - ), - vec![ParaId(PARA_ID)], - ); + assert!(is_update_required::( + AvailableHeader::Missing, + Some(HeaderId(20, Default::default())), + ),); } #[test] fn parachain_is_updated_after_onboarding() { - assert_eq!( - select_parachains_to_update::( - vec![(ParaId(PARA_ID), AvailableHeader::Available(PARA_0_HASH))] - .into_iter() - .collect(), - vec![(ParaId(PARA_ID), None)].into_iter().collect(), - HeaderId(10, Default::default()), - ), - vec![ParaId(PARA_ID)], - ); + assert!(is_update_required::( + AvailableHeader::Available(HeaderId(30, Default::default())), + None, + ),); } #[test] fn parachain_is_updated_if_newer_head_is_known() { - assert_eq!( - select_parachains_to_update::( - vec![(ParaId(PARA_ID), AvailableHeader::Available(PARA_1_HASH))] - .into_iter() - .collect(), - vec![( - ParaId(PARA_ID), - Some(BestParaHeadHash { at_relay_block_number: 0, head_hash: PARA_0_HASH }) - )] - .into_iter() - .collect(), - HeaderId(10, Default::default()), - ), - vec![ParaId(PARA_ID)], - ); - } - - #[test] - fn parachain_is_not_updated_if_source_head_is_unavailable() { - assert_eq!( - select_parachains_to_update::( - vec![(ParaId(PARA_ID), AvailableHeader::Unavailable)].into_iter().collect(), - vec![( - ParaId(PARA_ID), - Some(BestParaHeadHash { at_relay_block_number: 0, head_hash: PARA_0_HASH }) - )] - .into_iter() - .collect(), - HeaderId(10, Default::default()), - ), - vec![], - ); - } - - #[test] - fn is_update_required_works() { - let mut sync_params = ParachainSyncParams { - parachains: vec![ParaId(PARA_ID), ParaId(PARA_1_ID)], - strategy: ParachainSyncStrategy::Any, - stall_timeout: Duration::from_secs(60), - }; - - assert!(!is_update_required(&sync_params, &[])); - assert!(is_update_required(&sync_params, &[ParaId(PARA_ID)])); - assert!(is_update_required(&sync_params, &[ParaId(PARA_ID), ParaId(PARA_1_ID)])); - - sync_params.strategy = ParachainSyncStrategy::All; - assert!(!is_update_required(&sync_params, &[])); - assert!(!is_update_required(&sync_params, &[ParaId(PARA_ID)])); - assert!(is_update_required(&sync_params, &[ParaId(PARA_ID), ParaId(PARA_1_ID)])); + assert!(is_update_required::( + AvailableHeader::Available(HeaderId(40, Default::default())), + Some(HeaderId(30, Default::default())), + ),); } } diff --git a/relays/parachains/src/parachains_loop_metrics.rs b/relays/parachains/src/parachains_loop_metrics.rs index 5df996b4ddd..8138a43b3b3 100644 --- a/relays/parachains/src/parachains_loop_metrics.rs +++ b/relays/parachains/src/parachains_loop_metrics.rs @@ -16,7 +16,7 @@ use bp_polkadot_core::parachains::ParaId; use relay_utils::{ - metrics::{metric_name, register, GaugeVec, Metric, Opts, PrometheusError, Registry, U64}, + metrics::{metric_name, register, Gauge, Metric, PrometheusError, Registry, U64}, UniqueSaturatedInto, }; @@ -24,28 +24,22 @@ use relay_utils::{ #[derive(Clone)] pub struct ParachainsLoopMetrics { /// Best parachains header numbers at the source. - best_source_block_numbers: GaugeVec, + best_source_block_numbers: Gauge, /// Best parachains header numbers at the target. - best_target_block_numbers: GaugeVec, + best_target_block_numbers: Gauge, } impl ParachainsLoopMetrics { /// Create and register parachains loop metrics. pub fn new(prefix: Option<&str>) -> Result { Ok(ParachainsLoopMetrics { - best_source_block_numbers: GaugeVec::new( - Opts::new( - metric_name(prefix, "best_parachain_block_number_at_source"), - "Best parachain block numbers at the source relay chain".to_string(), - ), - &["parachain"], + best_source_block_numbers: Gauge::new( + metric_name(prefix, "best_parachain_block_number_at_source"), + "Best parachain block numbers at the source relay chain".to_string(), )?, - best_target_block_numbers: GaugeVec::new( - Opts::new( - metric_name(prefix, "best_parachain_block_number_at_target"), - "Best parachain block numbers at the target chain".to_string(), - ), - &["parachain"], + best_target_block_numbers: Gauge::new( + metric_name(prefix, "best_parachain_block_number_at_target"), + "Best parachain block numbers at the target chain".to_string(), )?, }) } @@ -57,14 +51,13 @@ impl ParachainsLoopMetrics { block_number: Number, ) { let block_number = block_number.unique_saturated_into(); - let label = parachain_label(¶chain); log::trace!( target: "bridge-metrics", - "Updated value of metric 'best_parachain_block_number_at_source[{}]': {:?}", - label, + "Updated value of metric 'best_parachain_block_number_at_source[{:?}]': {:?}", + parachain, block_number, ); - self.best_source_block_numbers.with_label_values(&[&label]).set(block_number); + self.best_source_block_numbers.set(block_number); } /// Update best block number at target. @@ -74,14 +67,13 @@ impl ParachainsLoopMetrics { block_number: Number, ) { let block_number = block_number.unique_saturated_into(); - let label = parachain_label(¶chain); log::trace!( target: "bridge-metrics", - "Updated value of metric 'best_parachain_block_number_at_target[{}]': {:?}", - label, + "Updated value of metric 'best_parachain_block_number_at_target[{:?}]': {:?}", + parachain, block_number, ); - self.best_target_block_numbers.with_label_values(&[&label]).set(block_number); + self.best_target_block_numbers.set(block_number); } } @@ -92,8 +84,3 @@ impl Metric for ParachainsLoopMetrics { Ok(()) } } - -/// Return metric label for the parachain. -fn parachain_label(parachain: &ParaId) -> String { - format!("para_{}", parachain.0) -} diff --git a/relays/utils/Cargo.toml b/relays/utils/Cargo.toml index 1d7422d5a8c..d8b66db2abc 100644 --- a/relays/utils/Cargo.toml +++ b/relays/utils/Cargo.toml @@ -13,15 +13,15 @@ async-trait = "0.1" backoff = "0.4" isahc = "1.2" env_logger = "0.10.0" -futures = "0.3.26" +futures = "0.3.27" jsonpath_lib = "0.3" log = "0.4.17" num-traits = "0.2" serde_json = "1.0" sysinfo = "0.28" time = { version = "0.3", features = ["formatting", "local-offset", "std"] } -tokio = { version = "1.25", features = ["rt"] } -thiserror = "1.0.26" +tokio = { version = "1.26", features = ["rt"] } +thiserror = "1.0.39" # Bridge dependencies diff --git a/scripts/update-weights.sh b/scripts/update-weights.sh index ac24da62b3c..84ddf0cdaae 100755 --- a/scripts/update-weights.sh +++ b/scripts/update-weights.sh @@ -10,7 +10,7 @@ time cargo run --release -p millau-bridge-node --features=runtime-benchmarks -- --chain=dev \ --steps=50 \ --repeat=20 \ - --pallet=pallet_bridge_messages \ + --pallet=RialtoMessages \ --extrinsic=* \ --execution=wasm \ --wasm-execution=Compiled \ diff --git a/scripts/verify-pallets-build.sh b/scripts/verify-pallets-build.sh index 1f45eb51bd5..98dbe02b4b0 100755 --- a/scripts/verify-pallets-build.sh +++ b/scripts/verify-pallets-build.sh @@ -66,6 +66,7 @@ rm -rf $BRIDGES_FOLDER/bin/rialto rm -rf $BRIDGES_FOLDER/bin/rialto-parachain rm -rf $BRIDGES_FOLDER/bin/.keep rm -rf $BRIDGES_FOLDER/deployments +rm -f $BRIDGES_FOLDER/docs/dockerhub-* rm -rf $BRIDGES_FOLDER/fuzz rm -rf $BRIDGES_FOLDER/modules/beefy rm -rf $BRIDGES_FOLDER/modules/shift-session-manager @@ -88,7 +89,6 @@ rm -rf $BRIDGES_FOLDER/scripts/update_substrate.sh rm -rf $BRIDGES_FOLDER/tools rm -f $BRIDGES_FOLDER/.dockerignore rm -f $BRIDGES_FOLDER/.gitlab-ci.yml -rm -f $BRIDGES_FOLDER/Cargo.lock rm -f $BRIDGES_FOLDER/Cargo.toml rm -f $BRIDGES_FOLDER/ci.Dockerfile rm -f $BRIDGES_FOLDER/Dockerfile @@ -124,4 +124,8 @@ cargo check -p pallet-bridge-relayers --features try-runtime cargo check -p bridge-runtime-common cargo check -p bridge-runtime-common --features runtime-benchmarks +# we're removing lock file after all chechs are done. Otherwise we may use different +# Substrate/Polkadot/Cumulus commits and our checks will fail +rm -f $BRIDGES_FOLDER/Cargo.lock + echo "OK"