From 9c5701c8ccafd307cae9abff43e8a3f86e855f47 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 27 Apr 2023 10:22:46 +0200 Subject: [PATCH] Squashed 'bridges/' changes from 2180797fbf..4850aac8ce 4850aac8ce Removed relayer_account: &AccountId from MessageDispatch (#2080) 8c8adafd54 Revert "Fix max-size messages at test chains (#2064)" (#2077) c01a63efd8 Fixed off-by-one when confirming rewards in messages pallet (#2075) a298be96aa Update subxt dependencies (#2072) c0eef51eab Fix max-size messages at test chains (#2064) 3a658e3697 Messages relay fixes (#2073) 0022b5ab22 Slash relayers for invalid transactions (#2025) 198104007f Bump enumflags2 from 0.7.5 to 0.7.7 9229b257e5 [ci] Fix rules for docker build (#2069) 660d791390 [ci] Update buildah command and version (#2058) e4535c0ca4 fix the way latest_confirmed_nonce_at_source is "calculated" (#2067) dbc2d37590 select nothing if we have already selected nonces to submit or have submitted something (#2065) a7eedd21fe [relay-substrate-client] Bump jsonrpsee (#2066) 8875d5aeae Bump clap from 4.2.2 to 4.2.4 25f9cf55e2 Another use of RangeInclusiveExt::checked_len() (#2060) 4942c12a5f submit lane unblock transactions from relay (#2030) c0325d3c9c Test deployments fixes (#2057) fc7b9b7ed7 Use the new matrix server (#2056) 63bcb5c10b Fixed delivery alert rule (#2052) git-subtree-dir: bridges git-subtree-split: 4850aac8ce6c34e5ca6246b88cd14c873a879cba --- .gitlab-ci.yml | 131 +- Cargo.lock | 331 +- bin/millau/node/Cargo.toml | 2 +- bin/millau/runtime/src/lib.rs | 9 + bin/millau/runtime/src/rialto_messages.rs | 2 - .../runtime/src/rialto_parachain_messages.rs | 2 - bin/millau/runtime/src/xcm_config.rs | 6 +- bin/rialto-parachain/node/Cargo.toml | 2 +- bin/rialto-parachain/runtime/src/lib.rs | 4 +- .../runtime/src/millau_messages.rs | 2 - bin/rialto/node/Cargo.toml | 2 +- bin/rialto/node/src/cli.rs | 10 +- bin/rialto/node/src/command.rs | 10 +- bin/rialto/runtime/src/lib.rs | 3 +- bin/rialto/runtime/src/millau_messages.rs | 2 - bin/rialto/runtime/src/xcm_config.rs | 3 +- bin/runtime-common/Cargo.toml | 2 + bin/runtime-common/src/messages.rs | 22 +- bin/runtime-common/src/messages_call_ext.rs | 10 + .../src/messages_xcm_extension.rs | 22 +- bin/runtime-common/src/mock.rs | 24 +- .../src/refund_relayer_extension.rs | 694 +- .../bridges/rialto-millau/docker-compose.yml | 1 + .../dashboard/grafana/bridges-alerts.json | 4083 +++++---- ...y-rococo-to-wococo-messages-dashboard.json | 1798 ++-- ...y-wococo-to-rococo-messages-dashboard.json | 1788 ++-- .../monitoring/grafana-matrix/config.yml | 4 +- .../dashboard/prometheus/rialto-targets.yml | 1 + deployments/networks/rialto.yml | 19 + modules/grandpa/src/lib.rs | 6 +- modules/messages/src/inbound_lane.rs | 90 +- modules/messages/src/lib.rs | 43 +- modules/messages/src/mock.rs | 25 +- modules/relayers/src/lib.rs | 581 +- modules/relayers/src/mock.rs | 45 +- modules/relayers/src/stake_adapter.rs | 186 + primitives/messages/src/target_chain.rs | 9 +- primitives/relayers/src/lib.rs | 4 + primitives/relayers/src/registration.rs | 121 + relays/client-rialto-parachain/Cargo.toml | 2 +- .../src/codegen_runtime.rs | 7715 +---------------- relays/client-rialto-parachain/src/lib.rs | 3 +- relays/client-substrate/Cargo.toml | 2 +- relays/client-substrate/src/chain.rs | 2 +- relays/client-substrate/src/client.rs | 2 +- relays/client-substrate/src/error.rs | 12 +- relays/client-substrate/src/rpc.rs | 6 +- relays/lib-substrate-relay/src/lib.rs | 2 +- relays/messages/Cargo.toml | 1 + relays/messages/src/message_lane_loop.rs | 30 +- relays/messages/src/message_race_delivery.rs | 611 +- relays/messages/src/message_race_loop.rs | 57 +- relays/messages/src/message_race_strategy.rs | 54 +- tools/runtime-codegen/Cargo.lock | 893 +- tools/runtime-codegen/Cargo.toml | 4 +- tools/runtime-codegen/src/main.rs | 31 +- 56 files changed, 7290 insertions(+), 12236 deletions(-) create mode 100644 modules/relayers/src/stake_adapter.rs create mode 100644 primitives/relayers/src/registration.rs diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb88001b50c..9217a422908 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,4 @@ stages: - - lint - - check - test - build - publish @@ -13,8 +11,9 @@ variables: CARGO_INCREMENTAL: 0 ARCH: "x86_64" CI_IMAGE: "paritytech/bridges-ci:production" - BUILDAH_IMAGE: "quay.io/buildah/stable:v1.27" RUST_BACKTRACE: full + BUILDAH_IMAGE: "quay.io/buildah/stable:v1.29" + BUILDAH_COMMAND: "buildah --storage-driver overlay2" default: cache: {} @@ -50,15 +49,6 @@ default: .test-refs: &test-refs rules: - # FIXME: This is the cause why pipelines wouldn't start. The problem might be in our custom - # mirroring. This should be investigated further, but for now let's have the working - # pipeline. - # - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH - # changes: - # - '**.md' - # - diagrams/* - # - docs/* - # when: never - if: $CI_PIPELINE_SOURCE == "pipeline" - if: $CI_PIPELINE_SOURCE == "web" - if: $CI_PIPELINE_SOURCE == "schedule" @@ -66,7 +56,11 @@ default: - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 -.build-refs: &build-refs +.test-only-refs: &test-only-refs + rules: + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + +.publish-refs: &publish-refs rules: # won't run on the CI image update pipeline - if: $CI_PIPELINE_SOURCE == "pipeline" @@ -78,6 +72,12 @@ default: # this job runs only on nightly pipeline with the mentioned variable, against `master` branch - if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly" +.nightly-test: &nightly-test + rules: + # 2. another is triggered by scripts repo $CI_PIPELINE_SOURCE == "pipeline" it's for the CI image + # update, it also runs all the nightly checks. + - if: $CI_PIPELINE_SOURCE == "pipeline" + .deploy-refs: &deploy-refs rules: - if: $CI_PIPELINE_SOURCE == "pipeline" @@ -89,16 +89,12 @@ default: - 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 - # update, it also runs all the nightly checks. - - if: $CI_PIPELINE_SOURCE == "pipeline" -#### stage: lint + +#### stage: test clippy-nightly: - stage: lint + stage: test <<: *docker-env <<: *test-refs variables: @@ -108,23 +104,21 @@ clippy-nightly: - SKIP_WASM_BUILD=1 cargo +nightly clippy --all-targets -- -A clippy::redundant_closure -A clippy::derive-partial-eq-without-eq -A clippy::or_fun_call fmt: - stage: lint + stage: test <<: *docker-env <<: *test-refs script: - cargo +nightly fmt --all -- --check spellcheck: - stage: lint + stage: test <<: *docker-env <<: *test-refs script: - cargo spellcheck check --cfg=.config/spellcheck.toml --checkers hunspell -m 1 $(find . -type f -name '*.rs' ! -path "./target/*" ! -name 'codegen_runtime.rs' ! -name 'weights.rs') -#### stage: check - check: - stage: check + stage: test <<: *docker-env <<: *test-refs script: &check-script @@ -135,15 +129,13 @@ check: - SKIP_WASM_BUILD=1 time cargo check -p millau-runtime --locked --features runtime-benchmarks --verbose check-nightly: - stage: check + stage: test <<: *docker-env <<: *nightly-test script: - rustup default nightly - *check-script -#### stage: test - test: stage: test <<: *docker-env @@ -225,12 +217,17 @@ partial-repo-pallets-build-test: # we may live with failing partial repo build, it is just a signal for us allow_failure: true -#### stage: build - build: - stage: build + stage: test + rules: + # won't run on the CI image update pipeline + - if: $CI_PIPELINE_SOURCE == "pipeline" + when: never + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]{4}-[0-9]{2}-[0-9]{2}.*$/ # i.e. v2021-09-27, v2021-09-27-1 + - if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly" + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs <<: *docker-env - <<: *build-refs <<: *collect-artifacts # master script: &build-script @@ -264,10 +261,66 @@ build-nightly: #### stage: publish +# check that images can be built +.build-image: &build-image + <<: *kubernetes-build + image: $BUILDAH_IMAGE + <<: *test-only-refs + variables: &build-image-variables + GIT_STRATEGY: none + DOCKERFILE: ci.Dockerfile + needs: + - job: build + artifacts: true + script: + # trim "-build-docker" from job name + - export DOCKER_IMAGE_NAME="${CI_JOB_NAME::-13}" + - if [[ "${CI_JOB_NAME::-13}" == "bridges-common-relay" ]]; then + export BRIDGES_PROJECT="substrate-relay"; + else + export BRIDGES_PROJECT="${CI_JOB_NAME::-13}"; + fi + - export IMAGE_NAME=docker.io/paritytech/${DOCKER_IMAGE_NAME} + - echo "Building ${IMAGE_NAME}" + - cd ./artifacts + - $BUILDAH_COMMAND build + --format=docker + --build-arg VCS_REF="${CI_COMMIT_SHORT_SHA}" + --build-arg BUILD_DATE="$(date +%d-%m-%Y)" + --build-arg PROJECT="${BRIDGES_PROJECT}" + --build-arg VERSION="${VERSION}" + --tag "${IMAGE_NAME}:latest" + --file "${DOCKERFILE}" . + +rialto-bridge-node-build-docker: + stage: publish + <<: *build-image + +rialto-parachain-collator-build-docker: + stage: publish + <<: *build-image + +millau-bridge-node-build-docker: + stage: publish + <<: *build-image + +substrate-relay-build-docker: + stage: publish + <<: *build-image + +bridges-common-relay-build-docker: + stage: publish + <<: *build-image + variables: + <<: *build-image-variables + BRIDGES_PROJECT: substrate-relay + DOCKER_IMAGE_NAME: bridges-common-relay + +# build and publish images .build-push-image: &build-push-image <<: *kubernetes-build image: $BUILDAH_IMAGE - <<: *build-refs + <<: *publish-refs variables: &image-variables GIT_STRATEGY: none DOCKERFILE: ci.Dockerfile @@ -297,7 +350,7 @@ build-nightly: - test "${Docker_Hub_User_Parity}" -a "${Docker_Hub_Pass_Parity}" || ( echo "no docker credentials provided"; exit 1 ) - cd ./artifacts - - buildah bud + - $BUILDAH_COMMAND build --format=docker --build-arg VCS_REF="${CI_COMMIT_SHORT_SHA}" --build-arg BUILD_DATE="$(date +%d-%m-%Y)" @@ -310,10 +363,10 @@ build-nightly: # The job will success only on the protected branch - echo "${Docker_Hub_Pass_Parity}" | buildah login --username "${Docker_Hub_User_Parity}" --password-stdin docker.io - - buildah info - - buildah push --format=v2s2 "${IMAGE_NAME}:${VERSION}" - - buildah push --format=v2s2 "${IMAGE_NAME}:sha-${CI_COMMIT_SHORT_SHA}" - - buildah push --format=v2s2 "${IMAGE_NAME}:${FLOATING_TAG}" + - $BUILDAH_COMMAND info + - $BUILDAH_COMMAND push --format=v2s2 "${IMAGE_NAME}:${VERSION}" + - $BUILDAH_COMMAND push --format=v2s2 "${IMAGE_NAME}:sha-${CI_COMMIT_SHORT_SHA}" + - $BUILDAH_COMMAND push --format=v2s2 "${IMAGE_NAME}:${FLOATING_TAG}" after_script: - env REGISTRY_AUTH_FILE= buildah logout --all @@ -343,7 +396,7 @@ bridges-common-relay: # Publish Docker images description to hub.docker.com -.publish-docker-image-description: &publish-docker-image-description +.publish-docker-image-description: stage: publish-docker-description image: paritytech/dockerhub-description variables: diff --git a/Cargo.lock b/Cargo.lock index f4b78e93bca..4c126a2ef9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1455,9 +1455,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.2.2" +version = "4.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b802d85aaf3a1cdb02b224ba472ebdea62014fccfcb269b95a4d76443b5ee5a" +checksum = "956ac1f6381d8d82ab4684768f89c0ea3afe66925ceadb4eeb3fc452ffc55d62" dependencies = [ "clap_builder", "clap_derive", @@ -1466,9 +1466,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.2" +version = "4.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14a1a858f532119338887a4b8e1af9c60de8249cd7bafd68036a489e261e37b6" +checksum = "84080e799e54cff944f4b4a4b0e71630b0e0443b25b985175c7dddc1a859b749" dependencies = [ "anstream", "anstyle", @@ -1884,7 +1884,7 @@ name = "cumulus-client-cli" version = "0.1.0" source = "git+https://github.com/paritytech/cumulus?branch=master#df9ed2455462e8c470a8a7ead44023b6eec79ed3" dependencies = [ - "clap 4.2.2", + "clap 4.2.4", "parity-scale-codec", "sc-chain-spec", "sc-cli", @@ -2247,7 +2247,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core", "futures", - "jsonrpsee-core", + "jsonrpsee-core 0.16.2", "parity-scale-codec", "polkadot-overseer", "sc-client-api", @@ -2305,7 +2305,7 @@ dependencies = [ "cumulus-relay-chain-interface", "futures", "futures-timer", - "jsonrpsee", + "jsonrpsee 0.16.2", "lru 0.9.0", "parity-scale-codec", "polkadot-overseer", @@ -2892,22 +2892,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb" +checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" +checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2 1.0.56", "quote 1.0.26", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] @@ -3298,7 +3298,7 @@ dependencies = [ "Inflector", "array-bytes 4.2.0", "chrono", - "clap 4.2.2", + "clap 4.2.4", "comfy-table", "frame-benchmarking", "frame-support", @@ -4119,7 +4119,7 @@ dependencies = [ "rustls 0.20.8", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "webpki-roots", ] @@ -4434,13 +4434,26 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", + "jsonrpsee-client-transport 0.16.2", + "jsonrpsee-core 0.16.2", "jsonrpsee-http-client", - "jsonrpsee-proc-macros", + "jsonrpsee-proc-macros 0.16.2", "jsonrpsee-server", - "jsonrpsee-types", - "jsonrpsee-ws-client", + "jsonrpsee-types 0.16.2", + "jsonrpsee-ws-client 0.16.2", + "tracing", +] + +[[package]] +name = "jsonrpsee" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b971ce0f6cd1521ede485afc564b95b2c8e7079b9da41d4273bd9b55140a55d" +dependencies = [ + "jsonrpsee-core 0.17.1", + "jsonrpsee-proc-macros 0.17.1", + "jsonrpsee-types 0.17.1", + "jsonrpsee-ws-client 0.17.1", "tracing", ] @@ -4452,19 +4465,38 @@ checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" dependencies = [ "futures-util", "http", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.2", + "jsonrpsee-types 0.16.2", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tokio-util", "tracing", "webpki-roots", ] +[[package]] +name = "jsonrpsee-client-transport" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca00d975eda834826b04ad57d4e690c67439bb51b02eb0f8b7e4c30fcef8ab9" +dependencies = [ + "futures-util", + "http", + "jsonrpsee-core 0.17.1", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.24.0", + "tokio-util", + "tracing", +] + [[package]] name = "jsonrpsee-core" version = "0.16.2" @@ -4481,7 +4513,7 @@ dependencies = [ "futures-util", "globset", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.16.2", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -4493,6 +4525,28 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-core" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b83cca7a5a7899eed8b2935d5f755c8c4052ad66ab5b328bd34ac2b3ffd3515f" +dependencies = [ + "anyhow", + "async-lock", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "jsonrpsee-types 0.17.1", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + [[package]] name = "jsonrpsee-http-client" version = "0.16.2" @@ -4502,8 +4556,8 @@ dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.2", + "jsonrpsee-types 0.16.2", "rustc-hash", "serde", "serde_json", @@ -4525,6 +4579,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d814a21d9a819f8de1a41b819a263ffd68e4bb5f043d936db1c49b54684bde0a" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate", + "proc-macro2 1.0.56", + "quote 1.0.26", + "syn 1.0.109", +] + [[package]] name = "jsonrpsee-server" version = "0.16.2" @@ -4535,8 +4602,8 @@ dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.2", + "jsonrpsee-types 0.16.2", "serde", "serde_json", "soketto", @@ -4561,6 +4628,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-types" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd301ccc3e08718393432d1961539d78c4580dcca86014dfe6769c308b2c08b2" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.16.2" @@ -4568,9 +4649,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" dependencies = [ "http", - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-client-transport 0.16.2", + "jsonrpsee-core 0.16.2", + "jsonrpsee-types 0.16.2", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a69852133d549b07cb37ff2d0ec540eae0d20abb75ae923f5d39bc7536d987" +dependencies = [ + "http", + "jsonrpsee-client-transport 0.17.1", + "jsonrpsee-core 0.17.1", + "jsonrpsee-types 0.17.1", ] [[package]] @@ -5569,6 +5662,7 @@ dependencies = [ "async-std", "async-trait", "bp-messages", + "env_logger", "finality-relay", "futures", "hex", @@ -5594,10 +5688,10 @@ dependencies = [ name = "millau-bridge-node" version = "0.1.0" dependencies = [ - "clap 4.2.2", + "clap 4.2.4", "frame-benchmarking", "frame-benchmarking-cli", - "jsonrpsee", + "jsonrpsee 0.16.2", "millau-runtime", "mmr-rpc", "node-inspect", @@ -5748,7 +5842,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ "anyhow", - "jsonrpsee", + "jsonrpsee 0.16.2", "parity-scale-codec", "serde", "sp-api", @@ -6022,7 +6116,7 @@ name = "node-inspect" version = "0.9.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a14236059c2d3da052fb08295082341aa7b87240" dependencies = [ - "clap 4.2.2", + "clap 4.2.4", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -7254,7 +7348,7 @@ name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.2", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", @@ -7812,7 +7906,7 @@ name = "polkadot-cli" version = "0.9.39" source = "git+https://github.com/paritytech/polkadot?branch=master#ae96e09e6ad1810b8d04d4530c07173e604a763d" dependencies = [ - "clap 4.2.2", + "clap 4.2.4", "frame-benchmarking-cli", "futures", "log", @@ -8487,7 +8581,7 @@ name = "polkadot-rpc" version = "0.9.39" source = "git+https://github.com/paritytech/polkadot?branch=master#ae96e09e6ad1810b8d04d4530c07173e604a763d" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.2", "mmr-rpc", "pallet-transaction-payment-rpc", "polkadot-primitives", @@ -9684,7 +9778,7 @@ dependencies = [ "frame-support", "frame-system", "futures", - "jsonrpsee", + "jsonrpsee 0.17.1", "log", "num-traits", "pallet-balances", @@ -9792,7 +9886,7 @@ dependencies = [ name = "rialto-bridge-node" version = "0.1.0" dependencies = [ - "clap 4.2.2", + "clap 4.2.4", "frame-benchmarking", "frame-benchmarking-cli", "frame-support", @@ -9819,7 +9913,7 @@ dependencies = [ name = "rialto-parachain-collator" version = "0.1.0" dependencies = [ - "clap 4.2.2", + "clap 4.2.4", "cumulus-client-cli", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", @@ -9830,7 +9924,7 @@ dependencies = [ "cumulus-relay-chain-interface", "frame-benchmarking", "frame-benchmarking-cli", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "pallet-transaction-payment-rpc", "parity-scale-codec", @@ -10283,6 +10377,18 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "rustls" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct 0.7.0", +] + [[package]] name = "rustls-native-certs" version = "0.6.2" @@ -10304,6 +10410,16 @@ dependencies = [ "base64 0.21.0", ] +[[package]] +name = "rustls-webpki" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.12" @@ -10459,7 +10575,7 @@ source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c dependencies = [ "array-bytes 4.2.0", "chrono", - "clap 4.2.2", + "clap 4.2.4", "fdlimit", "futures", "libp2p", @@ -10643,7 +10759,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.16.2", "sc-consensus-babe", "sc-consensus-epochs", "sc-rpc-api", @@ -10700,7 +10816,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -10773,7 +10889,7 @@ source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c dependencies = [ "finality-grandpa", "futures", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "parity-scale-codec", "sc-client-api", @@ -11155,7 +11271,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11184,7 +11300,7 @@ name = "sc-rpc-api" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.2", "parity-scale-codec", "sc-chain-spec", "sc-transaction-pool-api", @@ -11204,7 +11320,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ "http", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "serde_json", "substrate-prometheus-endpoint", @@ -11222,7 +11338,7 @@ dependencies = [ "futures", "futures-util", "hex", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11249,7 +11365,7 @@ dependencies = [ "exit-future", "futures", "futures-timer", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -11321,7 +11437,7 @@ name = "sc-storage-monitor" version = "0.1.0" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ - "clap 4.2.2", + "clap 4.2.4", "fs4", "futures", "log", @@ -11337,7 +11453,7 @@ name = "sc-sync-state-rpc" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.2", "parity-scale-codec", "sc-chain-spec", "sc-client-api", @@ -11500,16 +11616,58 @@ dependencies = [ [[package]] name = "scale-decode" -version = "0.4.0" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e5527e4b3bf079d4c0b2f253418598c380722ba37ef20fac9088081407f2b6" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-decode-derive", + "scale-info", + "thiserror", +] + +[[package]] +name = "scale-decode-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38741b2f78e4391b94eac6b102af0f6ea2b0f7fe65adb55d7f4004f507854db" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2 1.0.56", + "quote 1.0.26", + "syn 1.0.109", +] + +[[package]] +name = "scale-encode" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d823d4be477fc33321f93d08fb6c2698273d044f01362dc27573a750deb7c233" +checksum = "15546e5efbb45f0fc2291f7e202dee8623274c5d8bbfdf9c6886cc8b44a7ced3" dependencies = [ "parity-scale-codec", + "primitive-types", "scale-bits", + "scale-encode-derive", "scale-info", "thiserror", ] +[[package]] +name = "scale-encode-derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd983cf0a9effd76138554ead18a6de542d1af175ac12fd5e91836c5c0268082" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2 1.0.56", + "quote 1.0.26", + "syn 1.0.109", +] + [[package]] name = "scale-info" version = "2.5.0" @@ -11538,15 +11696,16 @@ dependencies = [ [[package]] name = "scale-value" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a5e7810815bd295da73e4216d1dfbced3c7c7c7054d70fa5f6e4c58123fff4" +checksum = "11f549769261561e6764218f847e500588f9a79a289de49ce92f9e26642a3574" dependencies = [ "either", "frame-metadata", "parity-scale-codec", "scale-bits", "scale-decode", + "scale-encode", "scale-info", "serde", "thiserror", @@ -12317,16 +12476,16 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "6.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc2d1947252b7a4e403b0a260f596920443742791765ec111daa2bbf98eff25" +checksum = "27449abdfbe41b473e625bce8113745e81d65777dd1d5a8462cf24137930dad8" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.6", "sha2 0.10.6", "sha3", - "sp-std 6.0.0", + "sp-std 7.0.0", "twox-hash", ] @@ -12626,9 +12785,9 @@ source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c [[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" @@ -13001,7 +13160,7 @@ source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c dependencies = [ "frame-system-rpc-runtime-api", "futures", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "parity-scale-codec", "sc-rpc-api", @@ -13138,7 +13297,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ "async-trait", - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "sc-rpc-api", "serde", @@ -13150,7 +13309,7 @@ name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.2", "log", "parity-scale-codec", "sc-client-api", @@ -13198,13 +13357,14 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54639dba6a113584083968b6a8f457dedae612abe1bd214762101ca29f12e332" +checksum = "53b9c4ddefcb2d87eb18a6336f65635c29208f766d0deefaa2a1a19f7426a993" dependencies = [ "base58", "blake2", "derivative", + "either", "frame-metadata", "futures", "getrandom 0.2.8", @@ -13215,11 +13375,12 @@ dependencies = [ "primitive-types", "scale-bits", "scale-decode", + "scale-encode", "scale-info", "scale-value", "serde", "serde_json", - "sp-core-hashing 6.0.0", + "sp-core-hashing 8.0.0", "subxt-macro", "subxt-metadata", "thiserror", @@ -13228,30 +13389,30 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e86cb719003f1cedf2710a6e55ca4c37aba4c989bbd3b81dd1c52af9e4827e" +checksum = "e924f41069e9273236398ff89662d6d336468a5d94faac812129d44547db0e7f" dependencies = [ "darling", "frame-metadata", "heck 0.4.1", "hex", - "jsonrpsee", + "jsonrpsee 0.16.2", "parity-scale-codec", - "proc-macro-error", "proc-macro2 1.0.56", "quote 1.0.26", "scale-info", "subxt-metadata", "syn 1.0.109", + "thiserror", "tokio", ] [[package]] name = "subxt-macro" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c08de402a78c4c06c3ee3702c80e519efdcb65911348e018b6998d04404916" +checksum = "ced0b043a069ee039f8700d3dfda01be156e4229c82277c305bc8e79a7dd855d" dependencies = [ "darling", "proc-macro-error", @@ -13261,14 +13422,14 @@ dependencies = [ [[package]] name = "subxt-metadata" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593ab5f53435e6352675af4f9851342607f37785d84c7a3fb3139550d3c35f0" +checksum = "18be3b8f4308fe7369ee1df66ae59c2eca79de20eab57b0f41c75736e843300f" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-core-hashing 6.0.0", + "sp-core-hashing 8.0.0", ] [[package]] @@ -13614,6 +13775,16 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "tokio-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +dependencies = [ + "rustls 0.21.0", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.12" @@ -13916,7 +14087,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#a6cb6d0fb79c303c9af513e856abfb61fc6d8d74" dependencies = [ "async-trait", - "clap 4.2.2", + "clap 4.2.4", "frame-remote-externalities", "hex", "log", @@ -15347,9 +15518,9 @@ dependencies = [ [[package]] name = "yap" -version = "0.7.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc77f52dc9e9b10d55d3f4462c3b7fc393c4f17975d641542833ab2d3bc26ef" +checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7" [[package]] name = "yasna" diff --git a/bin/millau/node/Cargo.toml b/bin/millau/node/Cargo.toml index 21b5cd02559..7eb7c79405b 100644 --- a/bin/millau/node/Cargo.toml +++ b/bin/millau/node/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] -clap = { version = "4.2.2", features = ["derive"] } +clap = { version = "4.2.4", features = ["derive"] } jsonrpsee = { version = "0.16.2", features = ["server"] } serde_json = "1.0.96" diff --git a/bin/millau/runtime/src/lib.rs b/bin/millau/runtime/src/lib.rs index 4e6f1e43e8c..dccd75a5b00 100644 --- a/bin/millau/runtime/src/lib.rs +++ b/bin/millau/runtime/src/lib.rs @@ -372,6 +372,7 @@ parameter_types! { /// Authorities are changing every 5 minutes. pub const Period: BlockNumber = bp_millau::SESSION_LENGTH; pub const Offset: BlockNumber = 0; + pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; } impl pallet_session::Config for Runtime { @@ -392,6 +393,14 @@ impl pallet_bridge_relayers::Config for Runtime { type Reward = Balance; type PaymentProcedure = bp_relayers::PayRewardFromAccount, AccountId>; + type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< + AccountId, + BlockNumber, + Balances, + RelayerStakeReserveId, + ConstU64<1_000>, + ConstU64<8>, + >; type WeightInfo = (); } diff --git a/bin/millau/runtime/src/rialto_messages.rs b/bin/millau/runtime/src/rialto_messages.rs index 84535283d48..573e3f5e68d 100644 --- a/bin/millau/runtime/src/rialto_messages.rs +++ b/bin/millau/runtime/src/rialto_messages.rs @@ -64,8 +64,6 @@ pub type ToRialtoMessagesDeliveryProof = /// Call-dispatch based message dispatch for Rialto -> Millau messages. pub type FromRialtoMessageDispatch = bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatch< - bp_millau::Millau, - bp_rialto::Rialto, crate::xcm_config::OnMillauBlobDispatcher, (), >; diff --git a/bin/millau/runtime/src/rialto_parachain_messages.rs b/bin/millau/runtime/src/rialto_parachain_messages.rs index bef8a281188..041d3256f42 100644 --- a/bin/millau/runtime/src/rialto_parachain_messages.rs +++ b/bin/millau/runtime/src/rialto_parachain_messages.rs @@ -59,8 +59,6 @@ pub type FromRialtoParachainMessagePayload = messages::target::FromBridgedChainM /// Call-dispatch based message dispatch for RialtoParachain -> Millau messages. pub type FromRialtoParachainMessageDispatch = bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatch< - bp_millau::Millau, - bp_rialto::Rialto, crate::xcm_config::OnMillauBlobDispatcher, (), >; diff --git a/bin/millau/runtime/src/xcm_config.rs b/bin/millau/runtime/src/xcm_config.rs index 4aaec83771b..cabb70f40cc 100644 --- a/bin/millau/runtime/src/xcm_config.rs +++ b/bin/millau/runtime/src/xcm_config.rs @@ -349,8 +349,7 @@ mod tests { // we care only about handing message to the XCM dispatcher, so we don't care about its // actual dispatch - let dispatch_result = - FromRialtoMessageDispatch::dispatch(&AccountId::from([0u8; 32]), incoming_message); + let dispatch_result = FromRialtoMessageDispatch::dispatch(incoming_message); assert!(matches!( dispatch_result.dispatch_level_result, XcmBlobMessageDispatchResult::NotDispatched(_), @@ -363,8 +362,7 @@ mod tests { // we care only about handing message to the XCM dispatcher, so we don't care about its // actual dispatch - let dispatch_result = - FromRialtoMessageDispatch::dispatch(&AccountId::from([0u8; 32]), incoming_message); + let dispatch_result = FromRialtoMessageDispatch::dispatch(incoming_message); assert!(matches!( dispatch_result.dispatch_level_result, XcmBlobMessageDispatchResult::NotDispatched(_), diff --git a/bin/rialto-parachain/node/Cargo.toml b/bin/rialto-parachain/node/Cargo.toml index 2315eb94a11..38521d7aa0e 100644 --- a/bin/rialto-parachain/node/Cargo.toml +++ b/bin/rialto-parachain/node/Cargo.toml @@ -17,7 +17,7 @@ default = [] runtime-benchmarks = ['rialto-parachain-runtime/runtime-benchmarks'] [dependencies] -clap = { version = "4.2.2", features = ["derive"] } +clap = { version = "4.2.4", features = ["derive"] } log = '0.4.17' codec = { package = 'parity-scale-codec', version = '3.1.5' } serde = { version = '1.0', features = ['derive'] } diff --git a/bin/rialto-parachain/runtime/src/lib.rs b/bin/rialto-parachain/runtime/src/lib.rs index cd4e256f420..de8ca493520 100644 --- a/bin/rialto-parachain/runtime/src/lib.rs +++ b/bin/rialto-parachain/runtime/src/lib.rs @@ -533,6 +533,7 @@ impl pallet_bridge_relayers::Config for Runtime { type Reward = Balance; type PaymentProcedure = bp_relayers::PayRewardFromAccount, AccountId>; + type StakeAndSlash = (); type WeightInfo = (); } @@ -925,8 +926,7 @@ mod tests { // we care only about handing message to the XCM dispatcher, so we don't care about its // actual dispatch - let dispatch_result = - FromMillauMessageDispatch::dispatch(&AccountId::from([0u8; 32]), incoming_message); + let dispatch_result = FromMillauMessageDispatch::dispatch(incoming_message); assert!(matches!( dispatch_result.dispatch_level_result, XcmBlobMessageDispatchResult::NotDispatched(_), diff --git a/bin/rialto-parachain/runtime/src/millau_messages.rs b/bin/rialto-parachain/runtime/src/millau_messages.rs index 5d4a92b5091..9c00e6bad34 100644 --- a/bin/rialto-parachain/runtime/src/millau_messages.rs +++ b/bin/rialto-parachain/runtime/src/millau_messages.rs @@ -60,8 +60,6 @@ pub type FromMillauMessagePayload = messages::target::FromBridgedChainMessagePay /// Call-dispatch based message dispatch for Millau -> RialtoParachain messages. pub type FromMillauMessageDispatch = bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatch< - bp_rialto_parachain::RialtoParachain, - bp_millau::Millau, crate::OnRialtoParachainBlobDispatcher, (), >; diff --git a/bin/rialto/node/Cargo.toml b/bin/rialto/node/Cargo.toml index 23c7d3315e7..ffbb587dc1f 100644 --- a/bin/rialto/node/Cargo.toml +++ b/bin/rialto/node/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] -clap = { version = "4.2.2", features = ["derive"] } +clap = { version = "4.2.4", features = ["derive"] } serde_json = "1.0.96" # Bridge dependencies diff --git a/bin/rialto/node/src/cli.rs b/bin/rialto/node/src/cli.rs index 98323c9d9ca..c39efed4ce9 100644 --- a/bin/rialto/node/src/cli.rs +++ b/bin/rialto/node/src/cli.rs @@ -68,15 +68,15 @@ pub enum Subcommand { Inspect(node_inspect::cli::InspectCmd), /// Benchmark runtime pallets. - #[clap(subcommand)] + #[command(subcommand)] Benchmark(frame_benchmarking_cli::BenchmarkCmd), /// FOR INTERNAL USE: analog of the "prepare-worker" command of the polkadot binary. - #[clap(name = "prepare-worker", hide = true)] + #[command(name = "prepare-worker", hide = true)] PvfPrepareWorker(ValidationWorkerCommand), /// FOR INTERNAL USE: analog of the "execute-worker" command of the polkadot binary. - #[clap(name = "execute-worker", hide = true)] + #[command(name = "execute-worker", hide = true)] PvfExecuteWorker(ValidationWorkerCommand), } @@ -84,5 +84,9 @@ pub enum Subcommand { #[derive(Debug, Parser)] pub struct ValidationWorkerCommand { /// The path to the validation host's socket. + #[arg(long)] pub socket_path: String, + /// Calling node implementation version + #[arg(long)] + pub node_impl_version: String, } diff --git a/bin/rialto/node/src/command.rs b/bin/rialto/node/src/command.rs index 0bff2e523b4..a21b3a88d2c 100644 --- a/bin/rialto/node/src/command.rs +++ b/bin/rialto/node/src/command.rs @@ -164,7 +164,10 @@ pub fn run() -> sc_cli::Result<()> { builder.with_colors(false); let _ = builder.init(); - polkadot_node_core_pvf::prepare_worker_entrypoint(&cmd.socket_path, None); + polkadot_node_core_pvf::prepare_worker_entrypoint( + &cmd.socket_path, + Some(&cmd.node_impl_version), + ); Ok(()) }, Some(crate::cli::Subcommand::PvfExecuteWorker(cmd)) => { @@ -172,7 +175,10 @@ pub fn run() -> sc_cli::Result<()> { builder.with_colors(false); let _ = builder.init(); - polkadot_node_core_pvf::execute_worker_entrypoint(&cmd.socket_path, None); + polkadot_node_core_pvf::execute_worker_entrypoint( + &cmd.socket_path, + Some(&cmd.node_impl_version), + ); Ok(()) }, None => { diff --git a/bin/rialto/runtime/src/lib.rs b/bin/rialto/runtime/src/lib.rs index aeb0a3a7c57..0d2c667efa5 100644 --- a/bin/rialto/runtime/src/lib.rs +++ b/bin/rialto/runtime/src/lib.rs @@ -389,6 +389,7 @@ impl pallet_bridge_relayers::Config for Runtime { type Reward = Balance; type PaymentProcedure = bp_relayers::PayRewardFromAccount, AccountId>; + type StakeAndSlash = (); type WeightInfo = (); } @@ -495,7 +496,7 @@ construct_runtime!( Scheduler: polkadot_runtime_parachains::scheduler::{Pallet, Storage}, Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config}, Initializer: polkadot_runtime_parachains::initializer::{Pallet, Call, Storage}, - Dmp: polkadot_runtime_parachains::dmp::{Pallet, Call, Storage}, + Dmp: polkadot_runtime_parachains::dmp::{Pallet, Storage}, Ump: polkadot_runtime_parachains::ump::{Pallet, Call, Storage, Event}, Hrmp: polkadot_runtime_parachains::hrmp::{Pallet, Call, Storage, Event, Config}, SessionInfo: polkadot_runtime_parachains::session_info::{Pallet, Storage}, diff --git a/bin/rialto/runtime/src/millau_messages.rs b/bin/rialto/runtime/src/millau_messages.rs index ab4b7dd521d..7c960639f2f 100644 --- a/bin/rialto/runtime/src/millau_messages.rs +++ b/bin/rialto/runtime/src/millau_messages.rs @@ -57,8 +57,6 @@ pub type FromMillauMessagePayload = messages::target::FromBridgedChainMessagePay /// Call-dispatch based message dispatch for Millau -> Rialto messages. pub type FromMillauMessageDispatch = bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatch< - bp_rialto::Rialto, - bp_millau::Millau, crate::xcm_config::OnRialtoBlobDispatcher, (), >; diff --git a/bin/rialto/runtime/src/xcm_config.rs b/bin/rialto/runtime/src/xcm_config.rs index 9f6488b4c4d..52c5af635b3 100644 --- a/bin/rialto/runtime/src/xcm_config.rs +++ b/bin/rialto/runtime/src/xcm_config.rs @@ -266,8 +266,7 @@ mod tests { // we care only about handing message to the XCM dispatcher, so we don't care about its // actual dispatch - let dispatch_result = - FromMillauMessageDispatch::dispatch(&AccountId::from([0u8; 32]), incoming_message); + let dispatch_result = FromMillauMessageDispatch::dispatch(incoming_message); assert!(matches!( dispatch_result.dispatch_level_result, XcmBlobMessageDispatchResult::NotDispatched(_), diff --git a/bin/runtime-common/Cargo.toml b/bin/runtime-common/Cargo.toml index 3db4ae9abca..e7cd39da90b 100644 --- a/bin/runtime-common/Cargo.toml +++ b/bin/runtime-common/Cargo.toml @@ -30,6 +30,7 @@ pallet-bridge-relayers = { path = "../../modules/relayers", 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 } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -62,6 +63,7 @@ std = [ "frame-system/std", "hash-db/std", "log/std", + "pallet-balances/std", "pallet-bridge-grandpa/std", "pallet-bridge-messages/std", "pallet-bridge-parachains/std", diff --git a/bin/runtime-common/src/messages.rs b/bin/runtime-common/src/messages.rs index 9d2e5811380..6f6b1959577 100644 --- a/bin/runtime-common/src/messages.rs +++ b/bin/runtime-common/src/messages.rs @@ -20,7 +20,7 @@ //! pallet is used to dispatch incoming messages. Message identified by a tuple //! of to elements - message lane id and message nonce. -pub use bp_runtime::{UnderlyingChainOf, UnderlyingChainProvider}; +pub use bp_runtime::{RangeInclusiveExt, UnderlyingChainOf, UnderlyingChainProvider}; use bp_header_chain::{HeaderChain, HeaderChainError}; use bp_messages::{ @@ -365,6 +365,7 @@ pub mod target { nonces_start, nonces_end, } = proof; + let nonces_range = nonces_start..=nonces_end; B::BridgedHeaderChain::parse_finalized_storage_proof( bridged_header_hash, @@ -374,26 +375,17 @@ pub mod target { StorageProofCheckerAdapter::<_, B> { storage, _dummy: Default::default() }; // receiving proofs where end < begin is ok (if proof includes outbound lane state) - let messages_in_the_proof = - if let Some(nonces_difference) = nonces_end.checked_sub(nonces_start) { - // let's check that the user (relayer) has passed correct `messages_count` - // (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(Error::MessagesCountMismatch) - } - - messages_in_the_proof - } else { - 0 - }; + let messages_in_the_proof = nonces_range.checked_len().unwrap_or(0); + if messages_in_the_proof != MessageNonce::from(messages_count) { + return Err(Error::MessagesCountMismatch) + } // Read messages first. All messages that are claimed to be in the proof must // be in the proof. So any error in `read_value`, or even missing value is fatal. // // Mind that we allow proofs with no messages if outbound lane state is proved. let mut messages = Vec::with_capacity(messages_in_the_proof as _); - for nonce in nonces_start..=nonces_end { + for nonce in nonces_range { let message_key = MessageKey { lane_id: lane, nonce }; let message_payload = parser.read_and_decode_message_payload(&message_key)?; messages.push(Message { key: message_key, payload: message_payload }); diff --git a/bin/runtime-common/src/messages_call_ext.rs b/bin/runtime-common/src/messages_call_ext.rs index f3665a8d93b..3f48ce583f9 100644 --- a/bin/runtime-common/src/messages_call_ext.rs +++ b/bin/runtime-common/src/messages_call_ext.rs @@ -115,6 +115,16 @@ pub enum CallInfo { ReceiveMessagesDeliveryProof(ReceiveMessagesDeliveryProofInfo), } +impl CallInfo { + /// Returns range of messages, bundled with the call. + pub fn bundled_messages(&self) -> RangeInclusive { + match *self { + Self::ReceiveMessagesProof(ref info) => info.base.bundled_range.clone(), + Self::ReceiveMessagesDeliveryProof(ref info) => info.0.bundled_range.clone(), + } + } +} + /// Helper struct that provides methods for working with a call supported by `CallInfo`. pub struct CallHelper, I: 'static> { pub _phantom_data: sp_std::marker::PhantomData<(T, I)>, diff --git a/bin/runtime-common/src/messages_xcm_extension.rs b/bin/runtime-common/src/messages_xcm_extension.rs index 4ccdd7a4b4d..96fdf1d5018 100644 --- a/bin/runtime-common/src/messages_xcm_extension.rs +++ b/bin/runtime-common/src/messages_xcm_extension.rs @@ -26,7 +26,7 @@ use bp_messages::{ target_chain::{DispatchMessage, MessageDispatch}, LaneId, }; -use bp_runtime::{messages::MessageDispatchResult, AccountIdOf, Chain}; +use bp_runtime::messages::MessageDispatchResult; use codec::{Decode, Encode}; use frame_support::{dispatch::Weight, CloneNoBound, EqNoBound, PartialEqNoBound}; use pallet_bridge_messages::WeightInfoExt as MessagesPalletWeights; @@ -46,23 +46,12 @@ pub enum XcmBlobMessageDispatchResult { } /// [`XcmBlobMessageDispatch`] is responsible for dispatching received messages -pub struct XcmBlobMessageDispatch -{ - _marker: sp_std::marker::PhantomData<( - SourceBridgeHubChain, - TargetBridgeHubChain, - DispatchBlob, - Weights, - )>, +pub struct XcmBlobMessageDispatch { + _marker: sp_std::marker::PhantomData<(DispatchBlob, Weights)>, } -impl< - SourceBridgeHubChain: Chain, - TargetBridgeHubChain: Chain, - BlobDispatcher: DispatchBlob, - Weights: MessagesPalletWeights, - > MessageDispatch> - for XcmBlobMessageDispatch +impl MessageDispatch + for XcmBlobMessageDispatch { type DispatchPayload = XcmAsPlainPayload; type DispatchLevelResult = XcmBlobMessageDispatchResult; @@ -78,7 +67,6 @@ impl< } fn dispatch( - _relayer_account: &AccountIdOf, message: DispatchMessage, ) -> MessageDispatchResult { let payload = match message.data.payload { diff --git a/bin/runtime-common/src/mock.rs b/bin/runtime-common/src/mock.rs index 036813f6fd5..c1767199676 100644 --- a/bin/runtime-common/src/mock.rs +++ b/bin/runtime-common/src/mock.rs @@ -35,6 +35,7 @@ use crate::messages::{ use bp_header_chain::{ChainWithGrandpa, HeaderChain}; use bp_messages::{target_chain::ForbidInboundMessages, LaneId, MessageNonce}; use bp_parachains::SingleParaStoredHeaderDataBuilder; +use bp_relayers::PayRewardFromAccount; use bp_runtime::{Chain, ChainId, Parachain, UnderlyingChainProvider}; use codec::{Decode, Encode}; use frame_support::{ @@ -83,6 +84,20 @@ pub type BridgedChainHasher = BlakeTwo256; pub type BridgedChainHeader = sp_runtime::generic::Header; +/// Rewards payment procedure. +pub type TestPaymentProcedure = PayRewardFromAccount; +/// Stake that we are using in tests. +pub type TestStake = ConstU64<5_000>; +/// Stake and slash mechanism to use in tests. +pub type TestStakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< + ThisChainAccountId, + ThisChainBlockNumber, + Balances, + ReserveId, + TestStake, + ConstU32<8>, +>; + /// Message lane used in tests. pub const TEST_LANE_ID: LaneId = LaneId([0, 0, 0, 0]); /// Bridged chain id used in tests. @@ -128,6 +143,7 @@ parameter_types! { pub MaximumMultiplier: Multiplier = sp_runtime::traits::Bounded::max_value(); pub const MaxUnrewardedRelayerEntriesAtInboundLane: MessageNonce = 16; pub const MaxUnconfirmedMessagesAtInboundLane: MessageNonce = 1_000; + pub const ReserveId: [u8; 8] = *b"brdgrlrs"; } impl frame_system::Config for TestRuntime { @@ -244,7 +260,8 @@ impl pallet_bridge_messages::Config for TestRuntime { impl pallet_bridge_relayers::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; type Reward = ThisChainBalance; - type PaymentProcedure = (); + type PaymentProcedure = TestPaymentProcedure; + type StakeAndSlash = TestStakeAndSlash; type WeightInfo = (); } @@ -400,3 +417,8 @@ impl ThisChainWithMessages for BridgedChain { } impl BridgedChainWithMessages for BridgedChain {} + +/// Run test within test externalities. +pub fn run_test(test: impl FnOnce()) { + sp_io::TestExternalities::new(Default::default()).execute_with(test) +} diff --git a/bin/runtime-common/src/refund_relayer_extension.rs b/bin/runtime-common/src/refund_relayer_extension.rs index 925fea2a743..7d65263e9fd 100644 --- a/bin/runtime-common/src/refund_relayer_extension.rs +++ b/bin/runtime-common/src/refund_relayer_extension.rs @@ -22,7 +22,7 @@ use crate::messages_call_ext::{ CallHelper as MessagesCallHelper, CallInfo as MessagesCallInfo, MessagesCallSubType, }; -use bp_messages::LaneId; +use bp_messages::{LaneId, MessageNonce}; use bp_relayers::{RewardsAccountOwner, RewardsAccountParams}; use bp_runtime::{RangeInclusiveExt, StaticStrProvider}; use codec::{Decode, Encode}; @@ -30,7 +30,7 @@ use frame_support::{ dispatch::{CallableCallFor, DispatchInfo, Dispatchable, PostDispatchInfo}, traits::IsSubType, weights::Weight, - CloneNoBound, DefaultNoBound, EqNoBound, PartialEqNoBound, RuntimeDebugNoBound, + CloneNoBound, DefaultNoBound, EqNoBound, PartialEqNoBound, RuntimeDebug, RuntimeDebugNoBound, }; use pallet_bridge_grandpa::{ CallSubType as GrandpaCallSubType, SubmitFinalityProofHelper, SubmitFinalityProofInfo, @@ -53,6 +53,7 @@ use sp_runtime::{ }; use sp_std::{marker::PhantomData, vec, vec::Vec}; +type AccountIdOf = ::AccountId; // without this typedef rustfmt fails with internal err type BalanceOf = <::OnChargeTransaction as OnChargeTransaction>::Balance; @@ -158,6 +159,14 @@ pub enum CallInfo { } impl CallInfo { + /// Returns true if call is a message delivery call (with optional finality calls). + fn is_receive_messages_proof_call(&self) -> bool { + match self.messages_call_info() { + MessagesCallInfo::ReceiveMessagesProof(_) => true, + MessagesCallInfo::ReceiveMessagesDeliveryProof(_) => false, + } + } + /// Returns the pre-dispatch `finality_target` sent to the `SubmitFinalityProof` call. fn submit_finality_proof_info(&self) -> Option> { match *self { @@ -185,6 +194,17 @@ impl CallInfo { } } +/// The actions on relayer account that need to be performed because of his actions. +#[derive(RuntimeDebug, PartialEq)] +enum RelayerAccountAction { + /// Do nothing with relayer account. + None, + /// Reward the relayer. + Reward(AccountId, RewardsAccountParams, Reward), + /// Slash the relayer. + Slash(AccountId, RewardsAccountParams), +} + /// Signed extension that refunds a relayer for new messages coming from a parachain. /// /// Also refunds relayer for successful finality delivery if it comes in batch (`utility.batchAll`) @@ -205,7 +225,25 @@ impl CallInfo { )] #[scale_info(skip_type_params(Runtime, Para, Msgs, Refund, Priority, Id))] pub struct RefundBridgedParachainMessages( - PhantomData<(Runtime, Para, Msgs, Refund, Priority, Id)>, + PhantomData<( + // runtime with `frame-utility`, `pallet-bridge-grandpa`, `pallet-bridge-parachains`, + // `pallet-bridge-messages` and `pallet-bridge-relayers` pallets deployed + Runtime, + // implementation of `RefundableParachainId` trait, which specifies the instance of + // the used `pallet-bridge-parachains` pallet and the bridged parachain id + Para, + // implementation of `RefundableMessagesLaneId` trait, which specifies the instance of + // the used `pallet-bridge-messages` pallet and the lane within this pallet + Msgs, + // implementation of the `RefundCalculator` trait, that is used to compute refund that + // we give to relayer for his transaction + Refund, + // getter for per-message `TransactionPriority` boost that we give to message + // delivery transactions + Priority, + // the runtime-unique identifier of this signed extension + Id, + )>, ); impl @@ -215,9 +253,13 @@ where Runtime: UtilityConfig> + BoundedBridgeGrandpaConfig + ParachainsConfig - + MessagesConfig, + + MessagesConfig + + RelayersConfig, Para: RefundableParachainId, Msgs: RefundableMessagesLaneId, + Refund: RefundCalculator, + Priority: Get, + Id: StaticStrProvider, CallOf: Dispatchable + IsSubType, Runtime>> + GrandpaCallSubType @@ -268,118 +310,69 @@ where call.check_obsolete_call()?; Ok(call) } -} - -impl SignedExtension - for RefundBridgedParachainMessages -where - Self: 'static + Send + Sync, - Runtime: UtilityConfig> - + BoundedBridgeGrandpaConfig - + ParachainsConfig - + MessagesConfig - + RelayersConfig, - Para: RefundableParachainId, - Msgs: RefundableMessagesLaneId, - Refund: RefundCalculator, - Priority: Get, - Id: StaticStrProvider, - CallOf: Dispatchable - + IsSubType, Runtime>> - + GrandpaCallSubType - + ParachainsCallSubType - + MessagesCallSubType, -{ - const IDENTIFIER: &'static str = Id::STR; - type AccountId = Runtime::AccountId; - type Call = CallOf; - type AdditionalSigned = (); - type Pre = Option>; - - fn additional_signed(&self) -> Result<(), TransactionValidityError> { - Ok(()) - } - fn validate( - &self, - _who: &Self::AccountId, - call: &Self::Call, - _info: &DispatchInfoOf, - _len: usize, - ) -> TransactionValidity { - // this is the only relevant line of code for the `pre_dispatch` - // - // we're not calling `validato` from `pre_dispatch` directly because of performance - // reasons, so if you're adding some code that may fail here, please check if it needs - // to be added to the `pre_dispatch` as well - let parsed_call = self.parse_and_check_for_obsolete_call(call)?; + /// Given post-dispatch information, analyze the outcome of relayer call and return + /// actions that need to be performed on relayer account. + fn analyze_call_result( + pre: Option>>, + info: &DispatchInfo, + post_info: &PostDispatchInfo, + len: usize, + result: &DispatchResult, + ) -> RelayerAccountAction, Runtime::Reward> { + let mut extra_weight = Weight::zero(); + let mut extra_size = 0; - // the following code just plays with transaction priority and never returns an error - let mut valid_transaction = ValidTransactionBuilder::default(); - if let Some(parsed_call) = parsed_call { - // we give delivery transactions some boost, that depends on number of messages inside - let messages_call_info = parsed_call.messages_call_info(); - if let MessagesCallInfo::ReceiveMessagesProof(info) = messages_call_info { - // compute total number of messages in transaction - let bundled_messages = info.base.bundled_range.checked_len().unwrap_or(0); - - // a quick check to avoid invalid high-priority transactions - if bundled_messages <= Runtime::MaxUnconfirmedMessagesAtInboundLane::get() { - let priority_boost = crate::priority_calculator::compute_priority_boost::< - Priority, - >(bundled_messages); - valid_transaction = valid_transaction.priority(priority_boost); - } - } - } + // We don't refund anything for transactions that we don't support. + let (relayer, call_info) = match pre { + Some(Some(pre)) => (pre.relayer, pre.call_info), + _ => return RelayerAccountAction::None, + }; - valid_transaction.build() - } + // now we know that the relayer either needs to be rewarded, or slashed + // => let's prepare the correspondent account that pays reward/receives slashed amount + let reward_account_params = RewardsAccountParams::new( + Msgs::Id::get(), + Runtime::BridgedChainId::get(), + if call_info.is_receive_messages_proof_call() { + RewardsAccountOwner::ThisChain + } else { + RewardsAccountOwner::BridgedChain + }, + ); - fn pre_dispatch( - self, - who: &Self::AccountId, - call: &Self::Call, - _info: &DispatchInfoOf, - _len: usize, - ) -> Result { - // this is a relevant piece of `validate` that we need here (in `pre_dispatch`) - let parsed_call = self.parse_and_check_for_obsolete_call(call)?; + // prepare return value for the case if the call has failed or it has not caused + // expected side effects (e.g. not all messages have been accepted) + // + // we are not checking if relayer is registered here - it happens during the slash attempt + // + // there are couple of edge cases here: + // + // - when the relayer becomes registered during message dispatch: this is unlikely + relayer + // should be ready for slashing after registration; + // + // - when relayer is registered after `validate` is called and priority is not boosted: + // relayer should be ready for slashing after registration. + let may_slash_relayer = + Self::bundled_messages_for_priority_boost(Some(&call_info)).is_some(); + let slash_relayer_if_delivery_result = may_slash_relayer + .then(|| RelayerAccountAction::Slash(relayer.clone(), reward_account_params)) + .unwrap_or(RelayerAccountAction::None); - Ok(parsed_call.map(|call_info| { + // We don't refund anything if the transaction has failed. + if let Err(e) = result { log::trace!( target: "runtime::bridge", - "{} from parachain {} via {:?} parsed bridge transaction in pre-dispatch: {:?}", + "{} from parachain {} via {:?}: relayer {:?} has submitted invalid messages transaction: {:?}", Self::IDENTIFIER, Para::Id::get(), Msgs::Id::get(), - call_info, + relayer, + e, ); - PreDispatchData { relayer: who.clone(), call_info } - })) - } - - fn post_dispatch( - pre: Option, - info: &DispatchInfoOf, - post_info: &PostDispatchInfoOf, - len: usize, - result: &DispatchResult, - ) -> Result<(), TransactionValidityError> { - let mut extra_weight = Weight::zero(); - let mut extra_size = 0; - - // We don't refund anything if the transaction has failed. - if result.is_err() { - return Ok(()) + return slash_relayer_if_delivery_result } - // We don't refund anything for transactions that we don't support. - let (relayer, call_info) = match pre { - Some(Some(pre)) => (pre.relayer, pre.call_info), - _ => return Ok(()), - }; - // check if relay chain state has been updated if let Some(finality_proof_info) = call_info.submit_finality_proof_info() { if !SubmitFinalityProofHelper::::was_successful( @@ -388,15 +381,13 @@ where // we only refund relayer if all calls have updated chain state log::trace!( target: "runtime::bridge", - "{} from parachain {} via {:?}: failed to refund relayer {:?}, because \ - relay chain finality proof has not been accepted", + "{} from parachain {} via {:?}: relayer {:?} has submitted invalid relay chain finality proof", Self::IDENTIFIER, Para::Id::get(), Msgs::Id::get(), relayer, ); - - return Ok(()) + return slash_relayer_if_delivery_result; } // there's a conflict between how bridge GRANDPA pallet works and a `utility.batchAll` @@ -420,33 +411,29 @@ where // we only refund relayer if all calls have updated chain state log::trace!( target: "runtime::bridge", - "{} from parachain {} via {:?}: failed to refund relayer {:?}, because \ - parachain finality proof has not been accepted", + "{} from parachain {} via {:?}: relayer {:?} has submitted invalid parachain finality proof", Self::IDENTIFIER, Para::Id::get(), Msgs::Id::get(), relayer, ); - - return Ok(()) + return slash_relayer_if_delivery_result } } - // Check if the `ReceiveMessagesProof` call delivered all the messages that + // Check if the `ReceiveMessagesProof` call delivered at least some of the messages that // it contained. If this happens, we consider the transaction "helpful" and refund it. let msgs_call_info = call_info.messages_call_info(); if !MessagesCallHelper::::was_successful(msgs_call_info) { log::trace!( target: "runtime::bridge", - "{} from parachain {} via {:?}: failed to refund relayer {:?}, because \ - some of messages have not been accepted", + "{} from parachain {} via {:?}: relayer {:?} has submitted invalid messages call", Self::IDENTIFIER, Para::Id::get(), Msgs::Id::get(), relayer, ); - - return Ok(()) + return slash_relayer_if_delivery_result } // regarding the tip - refund that happens here (at this side of the bridge) isn't the whole @@ -465,31 +452,172 @@ where // compute the relayer refund let refund = Refund::compute_refund(info, &post_info, post_info_len, tip); - // finally - register refund in relayers pallet - let rewards_account_owner = match msgs_call_info { - MessagesCallInfo::ReceiveMessagesProof(_) => RewardsAccountOwner::ThisChain, - MessagesCallInfo::ReceiveMessagesDeliveryProof(_) => RewardsAccountOwner::BridgedChain, + // we can finally reward relayer + RelayerAccountAction::Reward(relayer, reward_account_params, refund) + } + + /// Returns number of bundled messages `Some(_)`, if the given call info is a: + /// + /// - message delivery transaction; + /// + /// - with reasonable bundled messages that may be accepted by the messages pallet. + /// + /// This function is used to check whether the transaction priority should be + /// virtually boosted. The relayer registration (we only boost priority for registered + /// relayer transactions) must be checked outside. + fn bundled_messages_for_priority_boost(call_info: Option<&CallInfo>) -> Option { + // we only boost priority of message delivery transactions + let parsed_call = match call_info { + Some(parsed_call) if parsed_call.is_receive_messages_proof_call() => parsed_call, + _ => return None, }; - RelayersPallet::::register_relayer_reward( - RewardsAccountParams::new( - Msgs::Id::get(), - Runtime::BridgedChainId::get(), - rewards_account_owner, - ), - &relayer, - refund, - ); + + // compute total number of messages in transaction + let bundled_messages = + parsed_call.messages_call_info().bundled_messages().checked_len().unwrap_or(0); + + // a quick check to avoid invalid high-priority transactions + if bundled_messages > Runtime::MaxUnconfirmedMessagesAtInboundLane::get() { + return None + } + + Some(bundled_messages) + } +} + +impl SignedExtension + for RefundBridgedParachainMessages +where + Self: 'static + Send + Sync, + Runtime: UtilityConfig> + + BoundedBridgeGrandpaConfig + + ParachainsConfig + + MessagesConfig + + RelayersConfig, + Para: RefundableParachainId, + Msgs: RefundableMessagesLaneId, + Refund: RefundCalculator, + Priority: Get, + Id: StaticStrProvider, + CallOf: Dispatchable + + IsSubType, Runtime>> + + GrandpaCallSubType + + ParachainsCallSubType + + MessagesCallSubType, +{ + const IDENTIFIER: &'static str = Id::STR; + type AccountId = Runtime::AccountId; + type Call = CallOf; + type AdditionalSigned = (); + type Pre = Option>; + + fn additional_signed(&self) -> Result<(), TransactionValidityError> { + Ok(()) + } + + fn validate( + &self, + who: &Self::AccountId, + call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> TransactionValidity { + // this is the only relevant line of code for the `pre_dispatch` + // + // we're not calling `validate` from `pre_dispatch` directly because of performance + // reasons, so if you're adding some code that may fail here, please check if it needs + // to be added to the `pre_dispatch` as well + let parsed_call = self.parse_and_check_for_obsolete_call(call)?; + + // the following code just plays with transaction priority and never returns an error + + // we only boost priority of presumably correct message delivery transactions + let bundled_messages = match Self::bundled_messages_for_priority_boost(parsed_call.as_ref()) + { + Some(bundled_messages) => bundled_messages, + None => return Ok(Default::default()), + }; + + // we only boost priority if relayer has staked required balance + if !RelayersPallet::::is_registration_active(who) { + return Ok(Default::default()) + } + + // compute priority boost + let priority_boost = + crate::priority_calculator::compute_priority_boost::(bundled_messages); + let valid_transaction = ValidTransactionBuilder::default().priority(priority_boost); log::trace!( target: "runtime::bridge", - "{} from parachain {} via {:?} has registered reward: {:?} for {:?}", + "{} from parachain {} via {:?} has boosted priority of message delivery transaction \ + of relayer {:?}: {} messages -> {} priority", Self::IDENTIFIER, Para::Id::get(), Msgs::Id::get(), - refund, - relayer, + who, + bundled_messages, + priority_boost, ); + valid_transaction.build() + } + + fn pre_dispatch( + self, + who: &Self::AccountId, + call: &Self::Call, + _info: &DispatchInfoOf, + _len: usize, + ) -> Result { + // this is a relevant piece of `validate` that we need here (in `pre_dispatch`) + let parsed_call = self.parse_and_check_for_obsolete_call(call)?; + + Ok(parsed_call.map(|call_info| { + log::trace!( + target: "runtime::bridge", + "{} from parachain {} via {:?} parsed bridge transaction in pre-dispatch: {:?}", + Self::IDENTIFIER, + Para::Id::get(), + Msgs::Id::get(), + call_info, + ); + PreDispatchData { relayer: who.clone(), call_info } + })) + } + + fn post_dispatch( + pre: Option, + info: &DispatchInfoOf, + post_info: &PostDispatchInfoOf, + len: usize, + result: &DispatchResult, + ) -> Result<(), TransactionValidityError> { + let call_result = Self::analyze_call_result(pre, info, post_info, len, result); + + match call_result { + RelayerAccountAction::None => (), + RelayerAccountAction::Reward(relayer, reward_account, reward) => { + RelayersPallet::::register_relayer_reward( + reward_account, + &relayer, + reward, + ); + + log::trace!( + target: "runtime::bridge", + "{} from parachain {} via {:?} has registered reward: {:?} for {:?}", + Self::IDENTIFIER, + Para::Id::get(), + Msgs::Id::get(), + reward, + relayer, + ); + }, + RelayerAccountAction::Slash(relayer, slash_account) => + RelayersPallet::::slash_and_deregister(&relayer, slash_account), + } + Ok(()) } } @@ -509,10 +637,14 @@ mod tests { }; use bp_messages::{InboundLaneData, MessageNonce, OutboundLaneData, UnrewardedRelayersState}; use bp_parachains::{BestParaHeadHash, ParaInfo}; - use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; + use bp_polkadot_core::parachains::{ParaHeadsProof, ParaId}; use bp_runtime::HeaderId; use bp_test_utils::{make_default_justification, test_keyring}; - use frame_support::{assert_storage_noop, parameter_types, weights::Weight}; + use frame_support::{ + assert_storage_noop, parameter_types, + traits::{fungible::Mutate, ReservableCurrency}, + weights::Weight, + }; use pallet_bridge_grandpa::{Call as GrandpaCall, StoredAuthoritySet}; use pallet_bridge_messages::Call as MessagesCall; use pallet_bridge_parachains::{Call as ParachainsCall, RelayBlockHash}; @@ -547,6 +679,22 @@ mod tests { StrTestExtension, >; + fn initial_balance_of_relayer_account_at_this_chain() -> ThisChainBalance { + let test_stake: ThisChainBalance = TestStake::get(); + ExistentialDeposit::get().saturating_add(test_stake * 100) + } + + // in tests, the following accounts are equal (because of how `into_sub_account_truncating` + // works) + + fn delivery_rewards_account() -> ThisChainAccountId { + TestPaymentProcedure::rewards_account(MsgProofsRewardsAccount::get()) + } + + fn confirmation_rewards_account() -> ThisChainAccountId { + TestPaymentProcedure::rewards_account(MsgDeliveryProofsRewardsAccount::get()) + } + fn relayer_account_at_this_chain() -> ThisChainAccountId { 0 } @@ -558,7 +706,6 @@ mod tests { fn initialize_environment( best_relay_header_number: RelayBlockNumber, parachain_head_at_relay_header_number: RelayBlockNumber, - parachain_head_hash: ParaHash, best_message: MessageNonce, ) { let authorities = test_keyring().into_iter().map(|(a, w)| (a.into(), w)).collect(); @@ -572,7 +719,7 @@ mod tests { let para_info = ParaInfo { best_head_hash: BestParaHeadHash { at_relay_block_number: parachain_head_at_relay_header_number, - head_hash: parachain_head_hash, + head_hash: [parachain_head_at_relay_header_number as u8; 32].into(), }, next_imported_hash_position: 0, }; @@ -586,6 +733,14 @@ mod tests { let out_lane_data = OutboundLaneData { latest_received_nonce: best_message, ..Default::default() }; pallet_bridge_messages::OutboundLanes::::insert(lane_id, out_lane_data); + + Balances::mint_into(&delivery_rewards_account(), ExistentialDeposit::get()).unwrap(); + Balances::mint_into(&confirmation_rewards_account(), ExistentialDeposit::get()).unwrap(); + Balances::mint_into( + &relayer_account_at_this_chain(), + initial_balance_of_relayer_account_at_this_chain(), + ) + .unwrap(); } fn submit_relay_header_call(relay_header_number: RelayBlockNumber) -> RuntimeCall { @@ -609,7 +764,10 @@ mod tests { ) -> RuntimeCall { RuntimeCall::BridgeParachains(ParachainsCall::submit_parachain_heads { at_relay_block: (parachain_head_at_relay_header_number, RelayBlockHash::default()), - parachains: vec![(ParaId(TestParachain::get()), [1u8; 32].into())], + parachains: vec![( + ParaId(TestParachain::get()), + [parachain_head_at_relay_header_number as u8; 32].into(), + )], parachain_heads_proof: ParaHeadsProof(vec![]), }) } @@ -711,7 +869,7 @@ mod tests { SubmitParachainHeadsInfo { at_relay_block_number: 200, para_id: ParaId(TestParachain::get()), - para_head_hash: [1u8; 32].into(), + para_head_hash: [200u8; 32].into(), }, MessagesCallInfo::ReceiveMessagesProof(ReceiveMessagesProofInfo { base: BaseMessagesProofInfo { @@ -740,7 +898,7 @@ mod tests { SubmitParachainHeadsInfo { at_relay_block_number: 200, para_id: ParaId(TestParachain::get()), - para_head_hash: [1u8; 32].into(), + para_head_hash: [200u8; 32].into(), }, MessagesCallInfo::ReceiveMessagesDeliveryProof(ReceiveMessagesDeliveryProofInfo( BaseMessagesProofInfo { @@ -760,7 +918,7 @@ mod tests { SubmitParachainHeadsInfo { at_relay_block_number: 200, para_id: ParaId(TestParachain::get()), - para_head_hash: [1u8; 32].into(), + para_head_hash: [200u8; 32].into(), }, MessagesCallInfo::ReceiveMessagesProof(ReceiveMessagesProofInfo { base: BaseMessagesProofInfo { @@ -784,7 +942,7 @@ mod tests { SubmitParachainHeadsInfo { at_relay_block_number: 200, para_id: ParaId(TestParachain::get()), - para_head_hash: [1u8; 32].into(), + para_head_hash: [200u8; 32].into(), }, MessagesCallInfo::ReceiveMessagesDeliveryProof(ReceiveMessagesDeliveryProofInfo( BaseMessagesProofInfo { @@ -829,8 +987,21 @@ mod tests { } } - fn run_test(test: impl FnOnce()) { - sp_io::TestExternalities::new(Default::default()).execute_with(test) + fn set_bundled_range_end( + mut pre_dispatch_data: PreDispatchData, + end: MessageNonce, + ) -> PreDispatchData { + let msg_info = match pre_dispatch_data.call_info { + CallInfo::AllFinalityAndMsgs(_, _, ref mut info) => info, + CallInfo::ParachainFinalityAndMsgs(_, ref mut info) => info, + CallInfo::Msgs(ref mut info) => info, + }; + + if let MessagesCallInfo::ReceiveMessagesProof(ref mut msg_info) = msg_info { + msg_info.base.bundled_range = *msg_info.base.bundled_range.start()..=end + } + + pre_dispatch_data } fn run_validate(call: RuntimeCall) -> TransactionValidity { @@ -838,6 +1009,13 @@ mod tests { extension.validate(&relayer_account_at_this_chain(), &call, &DispatchInfo::default(), 0) } + fn run_validate_ignore_priority(call: RuntimeCall) -> TransactionValidity { + run_validate(call).map(|mut tx| { + tx.priority = 0; + tx + }) + } + fn run_pre_dispatch( call: RuntimeCall, ) -> Result>, TransactionValidityError> { @@ -883,10 +1061,49 @@ mod tests { ) } + #[test] + fn validate_doesnt_boost_transaction_priority_if_relayer_is_not_registered() { + run_test(|| { + initialize_environment(100, 100, 100); + Balances::set_balance(&relayer_account_at_this_chain(), ExistentialDeposit::get()); + + // message delivery is failing + assert_eq!(run_validate(message_delivery_call(200)), Ok(Default::default()),); + assert_eq!( + run_validate(parachain_finality_and_delivery_batch_call(200, 200)), + Ok(Default::default()), + ); + assert_eq!( + run_validate(all_finality_and_delivery_batch_call(200, 200, 200)), + Ok(Default::default()), + ); + // message confirmation validation is passing + assert_eq!( + run_validate_ignore_priority(message_confirmation_call(200)), + Ok(Default::default()), + ); + assert_eq!( + run_validate_ignore_priority(parachain_finality_and_confirmation_batch_call( + 200, 200 + )), + Ok(Default::default()), + ); + assert_eq!( + run_validate_ignore_priority(all_finality_and_confirmation_batch_call( + 200, 200, 200 + )), + Ok(Default::default()), + ); + }); + } + #[test] fn validate_boosts_priority_of_message_delivery_transactons() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); + + BridgeRelayers::register(RuntimeOrigin::signed(relayer_account_at_this_chain()), 1000) + .unwrap(); let priority_of_100_messages_delivery = run_validate(message_delivery_call(200)).unwrap().priority; @@ -913,7 +1130,10 @@ mod tests { #[test] fn validate_does_not_boost_priority_of_message_delivery_transactons_with_too_many_messages() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); + + BridgeRelayers::register(RuntimeOrigin::signed(relayer_account_at_this_chain()), 1000) + .unwrap(); let priority_of_max_messages_delivery = run_validate(message_delivery_call( 100 + MaxUnconfirmedMessagesAtInboundLane::get(), @@ -938,14 +1158,7 @@ mod tests { #[test] fn validate_allows_non_obsolete_transactions() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); - - fn run_validate_ignore_priority(call: RuntimeCall) -> TransactionValidity { - run_validate(call).map(|mut tx| { - tx.priority = 0; - tx - }) - } + initialize_environment(100, 100, 100); assert_eq!( run_validate_ignore_priority(message_delivery_call(200)), @@ -983,7 +1196,7 @@ mod tests { #[test] fn ext_rejects_batch_with_obsolete_relay_chain_header() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); assert_eq!( run_pre_dispatch(all_finality_and_delivery_batch_call(100, 200, 200)), @@ -1000,7 +1213,7 @@ mod tests { #[test] fn ext_rejects_batch_with_obsolete_parachain_head() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); assert_eq!( run_pre_dispatch(all_finality_and_delivery_batch_call(101, 100, 200)), @@ -1025,7 +1238,7 @@ mod tests { #[test] fn ext_rejects_batch_with_obsolete_messages() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); assert_eq!( run_pre_dispatch(all_finality_and_delivery_batch_call(200, 200, 100)), @@ -1068,7 +1281,7 @@ mod tests { #[test] fn pre_dispatch_parses_batch_with_relay_chain_and_parachain_headers() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); assert_eq!( run_pre_dispatch(all_finality_and_delivery_batch_call(200, 200, 200)), @@ -1084,7 +1297,7 @@ mod tests { #[test] fn pre_dispatch_parses_batch_with_parachain_header() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); assert_eq!( run_pre_dispatch(parachain_finality_and_delivery_batch_call(200, 200)), @@ -1100,7 +1313,7 @@ mod tests { #[test] fn pre_dispatch_fails_to_parse_batch_with_multiple_parachain_headers() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); let call = RuntimeCall::Utility(UtilityCall::batch_all { calls: vec![ @@ -1123,7 +1336,7 @@ mod tests { #[test] fn pre_dispatch_parses_message_transaction() { run_test(|| { - initialize_environment(100, 100, Default::default(), 100); + initialize_environment(100, 100, 100); assert_eq!( run_pre_dispatch(message_delivery_call(200)), @@ -1156,7 +1369,7 @@ mod tests { #[test] fn post_dispatch_ignores_transaction_that_has_not_updated_relay_chain_state() { run_test(|| { - initialize_environment(100, 200, Default::default(), 200); + initialize_environment(100, 200, 200); assert_storage_noop!(run_post_dispatch(Some(all_finality_pre_dispatch_data()), Ok(()))); }); @@ -1165,7 +1378,7 @@ mod tests { #[test] fn post_dispatch_ignores_transaction_that_has_not_updated_parachain_state() { run_test(|| { - initialize_environment(200, 100, Default::default(), 200); + initialize_environment(200, 100, 200); assert_storage_noop!(run_post_dispatch(Some(all_finality_pre_dispatch_data()), Ok(()))); assert_storage_noop!(run_post_dispatch( @@ -1178,7 +1391,7 @@ mod tests { #[test] fn post_dispatch_ignores_transaction_that_has_not_delivered_any_messages() { run_test(|| { - initialize_environment(200, 200, Default::default(), 100); + initialize_environment(200, 200, 100); assert_storage_noop!(run_post_dispatch(Some(all_finality_pre_dispatch_data()), Ok(()))); assert_storage_noop!(run_post_dispatch( @@ -1202,7 +1415,7 @@ mod tests { #[test] fn post_dispatch_ignores_transaction_that_has_not_delivered_all_messages() { run_test(|| { - initialize_environment(200, 200, Default::default(), 150); + initialize_environment(200, 200, 150); assert_storage_noop!(run_post_dispatch(Some(all_finality_pre_dispatch_data()), Ok(()))); assert_storage_noop!(run_post_dispatch( @@ -1226,7 +1439,7 @@ mod tests { #[test] fn post_dispatch_refunds_relayer_in_all_finality_batch_with_extra_weight() { run_test(|| { - initialize_environment(200, 200, [1u8; 32].into(), 200); + initialize_environment(200, 200, 200); let mut dispatch_info = dispatch_info(); dispatch_info.weight = Weight::from_parts( @@ -1275,7 +1488,7 @@ mod tests { #[test] fn post_dispatch_refunds_relayer_in_all_finality_batch() { run_test(|| { - initialize_environment(200, 200, [1u8; 32].into(), 200); + initialize_environment(200, 200, 200); run_post_dispatch(Some(all_finality_pre_dispatch_data()), Ok(())); assert_eq!( @@ -1300,7 +1513,7 @@ mod tests { #[test] fn post_dispatch_refunds_relayer_in_parachain_finality_batch() { run_test(|| { - initialize_environment(200, 200, [1u8; 32].into(), 200); + initialize_environment(200, 200, 200); run_post_dispatch(Some(parachain_finality_pre_dispatch_data()), Ok(())); assert_eq!( @@ -1325,7 +1538,7 @@ mod tests { #[test] fn post_dispatch_refunds_relayer_in_message_transaction() { run_test(|| { - initialize_environment(200, 200, Default::default(), 200); + initialize_environment(200, 200, 200); run_post_dispatch(Some(delivery_pre_dispatch_data()), Ok(())); assert_eq!( @@ -1346,4 +1559,149 @@ mod tests { ); }); } + + #[test] + fn post_dispatch_slashing_relayer_stake() { + run_test(|| { + initialize_environment(200, 200, 100); + + let delivery_rewards_account_balance = + Balances::free_balance(delivery_rewards_account()); + + let test_stake: ThisChainBalance = TestStake::get(); + Balances::set_balance( + &relayer_account_at_this_chain(), + ExistentialDeposit::get() + test_stake * 10, + ); + + // slashing works for message delivery calls + BridgeRelayers::register(RuntimeOrigin::signed(relayer_account_at_this_chain()), 1000) + .unwrap(); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), test_stake); + run_post_dispatch(Some(delivery_pre_dispatch_data()), Ok(())); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), 0); + assert_eq!( + delivery_rewards_account_balance + test_stake, + Balances::free_balance(delivery_rewards_account()) + ); + + BridgeRelayers::register(RuntimeOrigin::signed(relayer_account_at_this_chain()), 1000) + .unwrap(); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), test_stake); + run_post_dispatch(Some(parachain_finality_pre_dispatch_data()), Ok(())); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), 0); + assert_eq!( + delivery_rewards_account_balance + test_stake * 2, + Balances::free_balance(delivery_rewards_account()) + ); + + BridgeRelayers::register(RuntimeOrigin::signed(relayer_account_at_this_chain()), 1000) + .unwrap(); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), test_stake); + run_post_dispatch(Some(all_finality_pre_dispatch_data()), Ok(())); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), 0); + assert_eq!( + delivery_rewards_account_balance + test_stake * 3, + Balances::free_balance(delivery_rewards_account()) + ); + + // reserve doesn't work for message confirmation calls + let confirmation_rewards_account_balance = + Balances::free_balance(confirmation_rewards_account()); + + Balances::reserve(&relayer_account_at_this_chain(), test_stake).unwrap(); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), test_stake); + + assert_eq!( + confirmation_rewards_account_balance, + Balances::free_balance(confirmation_rewards_account()) + ); + run_post_dispatch(Some(confirmation_pre_dispatch_data()), Ok(())); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), test_stake); + + run_post_dispatch(Some(parachain_finality_confirmation_pre_dispatch_data()), Ok(())); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), test_stake); + + run_post_dispatch(Some(all_finality_confirmation_pre_dispatch_data()), Ok(())); + assert_eq!(Balances::reserved_balance(relayer_account_at_this_chain()), test_stake); + + // check that unreserve has happened, not slashing + assert_eq!( + delivery_rewards_account_balance + test_stake * 3, + Balances::free_balance(delivery_rewards_account()) + ); + assert_eq!( + confirmation_rewards_account_balance, + Balances::free_balance(confirmation_rewards_account()) + ); + }); + } + + fn run_analyze_call_result( + pre_dispatch_data: PreDispatchData, + dispatch_result: DispatchResult, + ) -> RelayerAccountAction { + TestExtension::analyze_call_result( + Some(Some(pre_dispatch_data)), + &dispatch_info(), + &post_dispatch_info(), + 1024, + &dispatch_result, + ) + } + + #[test] + fn analyze_call_result_shall_not_slash_for_transactions_with_too_many_messages() { + run_test(|| { + initialize_environment(100, 100, 100); + + // the `analyze_call_result` should return slash if number of bundled messages is + // within reasonable limits + assert_eq!( + run_analyze_call_result(all_finality_pre_dispatch_data(), Ok(())), + RelayerAccountAction::Slash( + relayer_account_at_this_chain(), + MsgProofsRewardsAccount::get() + ), + ); + assert_eq!( + run_analyze_call_result(parachain_finality_pre_dispatch_data(), Ok(())), + RelayerAccountAction::Slash( + relayer_account_at_this_chain(), + MsgProofsRewardsAccount::get() + ), + ); + assert_eq!( + run_analyze_call_result(delivery_pre_dispatch_data(), Ok(())), + RelayerAccountAction::Slash( + relayer_account_at_this_chain(), + MsgProofsRewardsAccount::get() + ), + ); + + // the `analyze_call_result` should not return slash if number of bundled messages is + // larger than the + assert_eq!( + run_analyze_call_result( + set_bundled_range_end(all_finality_pre_dispatch_data(), 1_000_000), + Ok(()) + ), + RelayerAccountAction::None, + ); + assert_eq!( + run_analyze_call_result( + set_bundled_range_end(parachain_finality_pre_dispatch_data(), 1_000_000), + Ok(()) + ), + RelayerAccountAction::None, + ); + assert_eq!( + run_analyze_call_result( + set_bundled_range_end(delivery_pre_dispatch_data(), 1_000_000), + Ok(()) + ), + RelayerAccountAction::None, + ); + }); + } } diff --git a/deployments/bridges/rialto-millau/docker-compose.yml b/deployments/bridges/rialto-millau/docker-compose.yml index 5d15a0398b1..7ce33da67c3 100644 --- a/deployments/bridges/rialto-millau/docker-compose.yml +++ b/deployments/bridges/rialto-millau/docker-compose.yml @@ -40,6 +40,7 @@ services: - rialto-node-charlie - rialto-node-dave - rialto-node-eve + - rialto-node-ferdie relay-messages-millau-to-rialto-generator: <<: *sub-bridge-relay diff --git a/deployments/bridges/rococo-wococo/dashboard/grafana/bridges-alerts.json b/deployments/bridges/rococo-wococo/dashboard/grafana/bridges-alerts.json index 6432f79deaf..51cea87cac9 100644 --- a/deployments/bridges/rococo-wococo/dashboard/grafana/bridges-alerts.json +++ b/deployments/bridges/rococo-wococo/dashboard/grafana/bridges-alerts.json @@ -1,1994 +1,2255 @@ { - "Bridges": [ - { - "name": "Bridges", - "interval": "1m", - "rules": [ - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "tkgc6_bnk", - "__panelId__": "12", - "summary": "Messages from RococoBridgeHub to WococoBridgeHub (00000001) are either not delivered, or are delivered with lags" - }, - "grafana_alert": { - "id": 51, - "orgId": 1, - "title": "RococoBridgeHub -> WococoBridgeHub delivery lags (00000001)", - "condition": "B", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Undelivered messages", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + "Bridges":[ + { + "name":"BEEFY Lagging Sessions", + "interval":"20m", + "rules":[ + { + "expr":"", + "for":"20m", + "labels":{ + "matrix_room":"!lMunCqbBqxEqfRuUDF:parity.io" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "annotations":{ + "__dashboardUid__":"3sEDRyl7z", + "__panelId__":"6", + "summary":"Some BEEFY validators experienced lagging sessions" + }, + "grafana_alert":{ + "id":42, + "orgId":1, + "title":"BEEFY Lagging Sessions", + "condition":"B", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":10800, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "editorMode":"code", + "exemplar":true, + "expr":"increase(substrate_beefy_lagging_sessions{chain=\"rococo_v2_2\", node=~\"rococo.*(3-validator|3-rpc).*\"}[60m])", + "interval":"", + "intervalMs":30000, + "legendFormat":"", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":0, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 0 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"grafana-expression", + "uid":"-100" + }, + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "B", - "type": "classic_conditions" - } + ], + "updated":"2023-02-14T12:24:20Z", + "intervalSeconds":1200, + "version":9, + "uid":"eYY8ks_7z", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"BEEFY Lagging Sessions", + "no_data_state":"NoData", + "exec_err_state":"Alerting" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 90, - "uid": "r41otJp4k", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "zqjpgXxnk", - "__panelId__": "14", - "summary": "Messages from WococoBridgeHub to RococoBridgeHub (00000001) are either not delivered, or are delivered with lags" - }, - "grafana_alert": { - "id": 55, - "orgId": 1, - "title": "WococoBridgeHub -> RococoBridgeHub delivery lags (00000001)", - "condition": "B", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Undelivered messages", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + } + ] + }, + { + "name":"Bridges", + "interval":"1m", + "rules":[ + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "annotations":{ + "__dashboardUid__":"tkgc6_bnk", + "__panelId__":"12", + "summary":"Messages from RococoBridgeHub to WococoBridgeHub (00000001) are either not delivered, or are delivered with lags" + }, + "grafana_alert":{ + "id":51, + "orgId":1, + "title":"RococoBridgeHub -\u003e WococoBridgeHub delivery lags (00000001)", + "condition":"A", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"((vector(0) and ((BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} \u003e on () BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(1)) + on () increase(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[10m]) * on () ((vector(1) and ((BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} \u003e on () BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(0))", + "interval":"", + "intervalMs":30000, + "legendFormat":"Undelivered messages", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 1 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"max" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "B", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":93, + "uid":"r41otJp4k", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 88, - "uid": "wqmPtJpVz", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "tkgc6_bnk", - "__panelId__": "14", - "summary": "Messages from RococoBridgeHub to WococoBridgeHub (00000001) are either not confirmed, or are confirmed with lags" - }, - "grafana_alert": { - "id": 56, - "orgId": 1, - "title": "RococoBridgeHub -> WococoBridgeHub confirmation lags (00000001)", - "condition": "B", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(RococoBridgeHub_to_WococoBridgeHub_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RococoBridgeHub_to_WococoBridgeHub_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Unconfirmed messages", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "annotations":{ + "__dashboardUid__":"zqjpgXxnk", + "__panelId__":"14", + "summary":"Messages from WococoBridgeHub to RococoBridgeHub (00000001) are either not delivered, or are delivered with lags" + }, + "grafana_alert":{ + "id":55, + "orgId":1, + "title":"WococoBridgeHub -\u003e RococoBridgeHub delivery lags (00000001)", + "condition":"B", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"((vector(0) and ((BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} \u003e on () BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(1)) + on () increase(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[10m]) * on () ((vector(1) and ((BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} \u003e on () BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(0))", + "interval":"", + "intervalMs":30000, + "legendFormat":"Undelivered messages", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 50 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 1 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"max" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "B", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":91, + "uid":"wqmPtJpVz", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 84, - "uid": "z4h3pJtVz", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "zqjpgXxnk", - "__panelId__": "16", - "summary": "Messages from WococoBridgeHub to RococoBridgeHub (00000001) are either not confirmed, or are confirmed with lags" - }, - "grafana_alert": { - "id": 57, - "orgId": 1, - "title": "WococoBridgeHub -> RococoBridgeHub confirmation lags (00000001)", - "condition": "B", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Unconfirmed messages", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" + }, + "annotations":{ + "__dashboardUid__":"tkgc6_bnk", + "__panelId__":"14", + "summary":"Messages from RococoBridgeHub to WococoBridgeHub (00000001) are either not confirmed, or are confirmed with lags" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":56, + "orgId":1, + "title":"RococoBridgeHub -\u003e WococoBridgeHub confirmation lags (00000001)", + "condition":"B", + "data":[ { - "evaluator": { - "params": [ - 50 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"scalar(max_over_time(RococoBridgeHub_to_WococoBridgeHub_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RococoBridgeHub_to_WococoBridgeHub_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", + "interval":"", + "intervalMs":30000, + "legendFormat":"Unconfirmed messages", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, + { + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 50 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"min" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "B", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":87, + "uid":"z4h3pJtVz", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 83, - "uid": "Kj_z21t4k", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "zqjpgXxnk", - "__panelId__": "18", - "summary": "Rewards for messages from WococoBridgeHub to RococoBridgeHub (00000001) are either not confirmed, or are confirmed with lags" - }, - "grafana_alert": { - "id": 58, - "orgId": 1, - "title": "WococoBridgeHub -> RococoBridgeHub reward lags (00000001)", - "condition": "C", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Unconfirmed rewards", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "(scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) > bool min_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", - "hide": true, - "interval": "", - "intervalMs": 30000, - "legendFormat": "__auto", - "maxDataPoints": 43200, - "range": true, - "refId": "B" - } + "annotations":{ + "__dashboardUid__":"zqjpgXxnk", + "__panelId__":"16", + "summary":"Messages from WococoBridgeHub to RococoBridgeHub (00000001) are either not confirmed, or are confirmed with lags" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":57, + "orgId":1, + "title":"WococoBridgeHub -\u003e RococoBridgeHub confirmation lags (00000001)", + "condition":"B", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", + "interval":"", + "intervalMs":30000, + "legendFormat":"Unconfirmed messages", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 10 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 50 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"min" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "C", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":86, + "uid":"Kj_z21t4k", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 78, - "uid": "hw_a21pVk", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "tkgc6_bnk", - "__panelId__": "15", - "summary": "Rewards for messages from RococoBridgeHub to WococoBridgeHub (00000001) are either not confirmed, or are confirmed with lags" - }, - "grafana_alert": { - "id": 59, - "orgId": 1, - "title": "RococoBridgeHub -> WococoBridgeHub reward lags (00000001)", - "condition": "C", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Unconfirmed rewards", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "(scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) > bool min_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", - "hide": true, - "interval": "", - "intervalMs": 30000, - "legendFormat": "__auto", - "maxDataPoints": 43200, - "range": true, - "refId": "B" - } + "annotations":{ + "__dashboardUid__":"zqjpgXxnk", + "__panelId__":"18", + "summary":"Rewards for messages from WococoBridgeHub to RococoBridgeHub (00000001) are either not confirmed, or are confirmed with lags" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":58, + "orgId":1, + "title":"WococoBridgeHub -\u003e RococoBridgeHub reward lags (00000001)", + "condition":"C", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", + "interval":"", + "intervalMs":30000, + "legendFormat":"Unconfirmed rewards", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 10 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "min" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"(scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) \u003e bool min_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", + "hide":true, + "interval":"", + "intervalMs":30000, + "legendFormat":"__auto", + "maxDataPoints":43200, + "range":true, + "refId":"B" + } + }, + { + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 10 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "B" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"min" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"C", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "C", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":81, + "uid":"hw_a21pVk", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 77, - "uid": "daN62Jt4z", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "UFsgbJtVz", - "__panelId__": "2", - "summary": "Best BridgeHubRococo header at BridgeHubWococo (00000001) doesn't match the same header at BridgeHubRococo" - }, - "grafana_alert": { - "id": 60, - "orgId": 1, - "title": "BridgeHubRococo header mismatch (00000001)", - "condition": "B", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" + }, + "annotations":{ + "__dashboardUid__":"tkgc6_bnk", + "__panelId__":"15", + "summary":"Rewards for messages from RococoBridgeHub to WococoBridgeHub (00000001) are either not confirmed, or are confirmed with lags" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":59, + "orgId":1, + "title":"RococoBridgeHub -\u003e WococoBridgeHub reward lags (00000001)", + "condition":"C", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", + "interval":"", + "intervalMs":30000, + "legendFormat":"Unconfirmed rewards", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"(scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) \u003e bool min_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", + "hide":true, + "interval":"", + "intervalMs":30000, + "legendFormat":"__auto", + "maxDataPoints":43200, + "range":true, + "refId":"B" + } + }, + { + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 10 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"min" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"C", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "B", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":80, + "uid":"daN62Jt4z", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 74, - "uid": "BzBDb1pVz", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "UFsgbJtVz", - "__panelId__": "3", - "summary": "Best BridgeHubWococo header at BridgeHubRococo (00000001) doesn't match the same header at BridgeHubWococo" - }, - "grafana_alert": { - "id": 61, - "orgId": 1, - "title": "BridgeHubWococo header mismatch (00000001)", - "condition": "B", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" + }, + "annotations":{ + "__dashboardUid__":"UFsgbJtVz", + "__panelId__":"2", + "summary":"Best BridgeHubRococo header at BridgeHubWococo (00000001) doesn't match the same header at BridgeHubRococo" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":60, + "orgId":1, + "title":"BridgeHubRococo header mismatch (00000001)", + "condition":"B", + "data":[ { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "max" - }, - "type": "query" + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "interval":"", + "intervalMs":30000, + "legendFormat":"Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, + { + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 0 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"max" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "B", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":77, + "uid":"BzBDb1pVz", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 73, - "uid": "1W6lb1p4z", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "UFsgbJtVz", - "__panelId__": "5", - "summary": "With-WococoBridgeHub messages relay balance at RococoBridgeHub (00000001) is too low" - }, - "grafana_alert": { - "id": 62, - "orgId": 1, - "title": "With-WococoBridgeHub messages relay balance at RococoBridgeHub (00000001) is too low", - "condition": "B", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "last_over_time(at_BridgeHubRococo_relay_BridgeHubWococoMessages_balance{domain=\"parity-testnet\"}[1h])", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Messages Relay Balance", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" + }, + "annotations":{ + "__dashboardUid__":"UFsgbJtVz", + "__panelId__":"3", + "summary":"Best BridgeHubWococo header at BridgeHubRococo (00000001) doesn't match the same header at BridgeHubWococo" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":61, + "orgId":1, + "title":"BridgeHubWococo header mismatch (00000001)", + "condition":"B", + "data":[ { - "evaluator": { - "params": [ - 10 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "interval":"", + "intervalMs":30000, + "legendFormat":"Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, + { + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 0 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"max" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "B", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":76, + "uid":"1W6lb1p4z", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 72, - "uid": "Y5Dm-1tVz", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "UFsgbJtVz", - "__panelId__": "6", - "summary": "With-RococoBridgeHub messages relay balance at WococoBridgeHub (00000001) is too low" - }, - "grafana_alert": { - "id": 63, - "orgId": 1, - "title": "With-RococoBridgeHub messages relay balance at WococoBridgeHub (00000001) is too low", - "condition": "B", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "last_over_time(at_BridgeHubWococo_relay_BridgeHubRococoMessages_balance{domain=\"parity-testnet\"}[1h])", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Messages Relay Balance", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" + }, + "annotations":{ + "__dashboardUid__":"UFsgbJtVz", + "__panelId__":"5", + "summary":"With-WococoBridgeHub messages relay balance at RococoBridgeHub (00000001) is too low" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 300, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":62, + "orgId":1, + "title":"With-WococoBridgeHub messages relay balance at RococoBridgeHub (00000001) is too low", + "condition":"B", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"last_over_time(at_BridgeHubRococo_relay_BridgeHubWococoMessages_balance{domain=\"parity-testnet\"}[1h])", + "interval":"", + "intervalMs":30000, + "legendFormat":"Messages Relay Balance", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 10 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 10 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "B", - "type": "classic_conditions" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":75, + "uid":"Y5Dm-1tVz", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 71, - "uid": "yUl4a1tVz", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "5m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "tkgc6_bnk", - "__panelId__": "6", - "summary": "Less than 500 Rococo headers have been synced to WococoBridgeHub in last 120 minutes. Relay is not running?" - }, - "grafana_alert": { - "id": 65, - "orgId": 1, - "title": "Rococo -> WococoBridgeHub finality sync lags (00000001)", - "condition": "D", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "max(increase(Rococo_to_BridgeHubWococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}[120m]))", - "interval": "", - "intervalMs": 30000, - "legendFormat": "At Rococo", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ - { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "last", - "refId": "C", - "type": "reduce" - } + "annotations":{ + "__dashboardUid__":"UFsgbJtVz", + "__panelId__":"6", + "summary":"With-RococoBridgeHub messages relay balance at WococoBridgeHub (00000001) is too low" }, - { - "refId": "D", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":63, + "orgId":1, + "title":"With-RococoBridgeHub messages relay balance at WococoBridgeHub (00000001) is too low", + "condition":"B", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"last_over_time(at_BridgeHubWococo_relay_BridgeHubRococoMessages_balance{domain=\"parity-testnet\"}[1h])", + "interval":"", + "intervalMs":30000, + "legendFormat":"Messages Relay Balance", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 500 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "D" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":300, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 10 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"B", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "C", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "D", - "type": "threshold" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":74, + "uid":"yUl4a1tVz", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 40, - "uid": "R6GKwNA4z", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "5m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "zqjpgXxnk", - "__panelId__": "2", - "summary": "Less than 500 Wococo headers have been synced to RococoBridgeHub in last 120 minutes. Relay is not running?" - }, - "grafana_alert": { - "id": 66, - "orgId": 1, - "title": "Wococo -> RococoBridgeHub finality sync lags (00000001)", - "condition": "D", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "max(increase(Wococo_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}[120m]))", - "interval": "", - "intervalMs": 30000, - "legendFormat": "At Wococo", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"5m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ - { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "last", - "refId": "C", - "type": "reduce" - } + "annotations":{ + "__dashboardUid__":"tkgc6_bnk", + "__panelId__":"6", + "summary":"Less than 500 Rococo headers have been synced to WococoBridgeHub in last 120 minutes. Relay is not running?" }, - { - "refId": "D", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":65, + "orgId":1, + "title":"Rococo -\u003e WococoBridgeHub finality sync lags (00000001)", + "condition":"D", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"max(increase(Rococo_to_BridgeHubWococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}[120m]))", + "interval":"", + "intervalMs":30000, + "legendFormat":"At Rococo", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 500 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "D" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "C" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "reducer":"last", + "refId":"C", + "type":"reduce" + } + }, + { + "refId":"D", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 500 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "D" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"C", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"D", + "type":"threshold" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "C", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "D", - "type": "threshold" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":43, + "uid":"R6GKwNA4z", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 38, - "uid": "rAM1QHAVk", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "0s", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "UFsgbJtVz", - "__panelId__": "11", - "summary": "The RococoBridgeHub <> WococoBridgeHub relay (00000001) has been aborted by version guard - i.e. one of chains has been upgraded and relay wasn't redeployed" - }, - "grafana_alert": { - "id": 67, - "orgId": 1, - "title": "Version guard has aborted RococoBridgeHub <> WococoBridgeHub relay (00000001)", - "condition": "B", - "data": [ - { - "refId": "B", - "queryType": "range", - "relativeTimeRange": { - "from": 600, - "to": 0 - }, - "datasourceUid": "P03E52D76DFE188C3", - "model": { - "datasource": { - "type": "loki", - "uid": "P03E52D76DFE188C3" - }, - "editorMode": "code", - "expr": "count_over_time({container=\"bridges-common-relay\"} |= `Aborting relay` [1m])", - "hide": false, - "intervalMs": 1000, - "legendFormat": "Aborts per minute", - "maxDataPoints": 43200, - "queryType": "range", - "refId": "B" - } + }, + { + "expr":"", + "for":"5m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ - { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "B", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "max", - "refId": "C", - "type": "reduce" - } + "annotations":{ + "__dashboardUid__":"zqjpgXxnk", + "__panelId__":"2", + "summary":"Less than 500 Wococo headers have been synced to RococoBridgeHub in last 120 minutes. Relay is not running?" }, - { - "refId": "D", - "queryType": "", - "relativeTimeRange": { - "from": 600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":66, + "orgId":1, + "title":"Wococo -\u003e RococoBridgeHub finality sync lags (00000001)", + "condition":"D", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"max(increase(Wococo_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}[120m]))", + "interval":"", + "intervalMs":30000, + "legendFormat":"At Wococo", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "D" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "C" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "reducer":"last", + "refId":"C", + "type":"reduce" + } + }, + { + "refId":"D", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 500 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "D" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"C", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"D", + "type":"threshold" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "C", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "D", - "type": "threshold" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":41, + "uid":"rAM1QHAVk", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 37, - "uid": "TwWPeN04z", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "UFsgbJtVz", - "__panelId__": "12", - "summary": "Best Rococo header at BridgeHubWococo (00000001) doesn't match the same header at Rococo" - }, - "grafana_alert": { - "id": 69, - "orgId": 1, - "title": "Rococo headers mismatch", - "condition": "C", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"0s", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ - { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "last", - "refId": "B", - "type": "reduce" - } + "annotations":{ + "__dashboardUid__":"UFsgbJtVz", + "__panelId__":"11", + "summary":"The RococoBridgeHub \u003c\u003e WococoBridgeHub relay (00000001) has been aborted by version guard - i.e. one of chains has been upgraded and relay wasn't redeployed" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":67, + "orgId":1, + "title":"Version guard has aborted RococoBridgeHub \u003c\u003e WococoBridgeHub relay (00000001)", + "condition":"B", + "data":[ { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"B", + "queryType":"range", + "relativeTimeRange":{ + "from":600, + "to":0 + }, + "datasourceUid":"P03E52D76DFE188C3", + "model":{ + "datasource":{ + "type":"loki", + "uid":"P03E52D76DFE188C3" + }, + "editorMode":"code", + "expr":"count_over_time({container=\"bridges-common-relay\"} |= `Aborting relay` [1m])", + "hide":false, + "intervalMs":1000, + "legendFormat":"Aborts per minute", + "maxDataPoints":43200, + "queryType":"range", + "refId":"B" + } + }, + { + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "C" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"B", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "reducer":"max", + "refId":"C", + "type":"reduce" + } + }, + { + "refId":"D", + "queryType":"", + "relativeTimeRange":{ + "from":600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 0 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "D" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"C", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"D", + "type":"threshold" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "B", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "C", - "type": "threshold" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":40, + "uid":"TwWPeN04z", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 32, - "uid": "08-5gv04k", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "10m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "UFsgbJtVz", - "__panelId__": "13", - "summary": "Best Wococo header at BridgeHubRococo (00000001) doesn't match the same header at Wococo" - }, - "grafana_alert": { - "id": 70, - "orgId": 1, - "title": "Wococo headers mismatch", - "condition": "C", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", - "interval": "", - "intervalMs": 30000, - "legendFormat": "Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ - { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "last", - "refId": "B", - "type": "reduce" - } + "annotations":{ + "__dashboardUid__":"UFsgbJtVz", + "__panelId__":"12", + "summary":"Best Rococo header at BridgeHubWococo (00000001) doesn't match the same header at Rococo" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":69, + "orgId":1, + "title":"Rococo headers mismatch", + "condition":"C", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"Rococo_to_BridgeHubWococo_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "interval":"", + "intervalMs":30000, + "legendFormat":"Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, + { + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":0, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "B" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "reducer":"last", + "refId":"B", + "type":"reduce" + } + }, { - "evaluator": { - "params": [ - 0 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":0, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 0 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "C" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"B", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"C", + "type":"threshold" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "B", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "C", - "type": "threshold" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":35, + "uid":"08-5gv04k", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 31, - "uid": "Esj2gD0Vk", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "5m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "tkgc6_bnk", - "__panelId__": "9", - "summary": "Test messages from RococoBridgeHub to WococoBridgeHub are not generated. Our cronjob has died?" - }, - "grafana_alert": { - "id": 73, - "orgId": 1, - "title": "Test messages from RococoBridgeHub to WococoBridgeHub are not generated.", - "condition": "D", - "data": [ - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 21600, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "increase(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\", type=~\"source_latest_generated\"}[24h])", - "hide": true, - "interval": "", - "intervalMs": 30000, - "legendFormat": "Messages generated in last 24h", - "maxDataPoints": 43200, - "range": true, - "refId": "B" - } + }, + { + "expr":"", + "for":"10m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "annotations":{ + "__dashboardUid__":"UFsgbJtVz", + "__panelId__":"13", + "summary":"Best Wococo header at BridgeHubRococo (00000001) doesn't match the same header at Wococo" + }, + "grafana_alert":{ + "id":70, + "orgId":1, + "title":"Wococo headers mismatch", + "condition":"C", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"Wococo_to_BridgeHubRococo_Sync_is_source_and_source_at_target_using_different_forks{domain=\"parity-testnet\"}", + "interval":"", + "intervalMs":30000, + "legendFormat":"Best BridgeHubRococo header at BridgeHubWococo doesn't match the same header of BridgeHubRococo", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":0, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "B" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "reducer":"last", + "refId":"B", + "type":"reduce" + } + }, + { + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":0, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 0 + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "C" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"B", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"C", + "type":"threshold" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "B", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "max", - "refId": "C", - "type": "reduce" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":34, + "uid":"Esj2gD0Vk", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" + } + }, + { + "expr":"", + "for":"5m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "D", - "queryType": "", - "relativeTimeRange": { - "from": 600, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "annotations":{ + "__dashboardUid__":"tkgc6_bnk", + "__panelId__":"9", + "summary":"Test messages from RococoBridgeHub to WococoBridgeHub are not generated. Our cronjob has died?" + }, + "grafana_alert":{ + "id":73, + "orgId":1, + "title":"Test messages from RococoBridgeHub to WococoBridgeHub are not generated.", + "condition":"D", + "data":[ + { + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":21600, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "expr":"increase(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\", type=~\"source_latest_generated\"}[24h])", + "hide":true, + "interval":"", + "intervalMs":30000, + "legendFormat":"Messages generated in last 24h", + "maxDataPoints":43200, + "range":true, + "refId":"B" + } + }, + { + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "C" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"B", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "reducer":"max", + "refId":"C", + "type":"reduce" + } + }, { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "D" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"D", + "queryType":"", + "relativeTimeRange":{ + "from":600, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 1 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "D" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"C", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"D", + "type":"threshold" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "C", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "D", - "type": "threshold" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":6, + "uid":"ry1K5SB4k", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 3, - "uid": "ry1K5SB4k", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - }, - { - "expr": "", - "for": "5m", - "labels": { - "matrix_room": "XyVkmRJgIkjcvIBPsP" - }, - "annotations": { - "__dashboardUid__": "UFsgbJtVz", - "__panelId__": "16", - "summary": "RococoBridgeHub <> WococoBridgeHub relay (00000001) node is down" - }, - "grafana_alert": { - "id": 74, - "orgId": 1, - "title": "RococoBridgeHub <> WococoBridgeHub relay (00000001) node is down", - "condition": "C", - "data": [ - { - "refId": "A", - "queryType": "", - "relativeTimeRange": { - "from": 900, - "to": 0 - }, - "datasourceUid": "PC96415006F908B67", - "model": { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "exemplar": false, - "expr": "up{domain=\"parity-testnet\",container=\"bridges-common-relay\"}", - "instant": false, - "interval": "", - "intervalMs": 30000, - "legendFormat": "Is relay running", - "maxDataPoints": 43200, - "range": true, - "refId": "A" - } + }, + { + "expr":"", + "for":"5m", + "labels":{ + "matrix_room":"XyVkmRJgIkjcvIBPsP" }, - { - "refId": "B", - "queryType": "", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "annotations":{ + "__dashboardUid__":"UFsgbJtVz", + "__panelId__":"16", + "summary":"RococoBridgeHub \u003c\u003e WococoBridgeHub relay (00000001) node is down" + }, + "grafana_alert":{ + "id":74, + "orgId":1, + "title":"RococoBridgeHub \u003c\u003e WococoBridgeHub relay (00000001) node is down", + "condition":"C", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":900, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "datasource":{ + "type":"prometheus", + "uid":"PC96415006F908B67" + }, + "editorMode":"code", + "exemplar":false, + "expr":"up{domain=\"parity-testnet\",container=\"bridges-common-relay\"}", + "instant":false, + "interval":"", + "intervalMs":30000, + "legendFormat":"Is relay running", + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, + { + "refId":"B", + "queryType":"", + "relativeTimeRange":{ + "from":0, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + + ], + "type":"gt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "B" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"A", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "reducer":"max", + "refId":"B", + "type":"reduce" + } + }, { - "evaluator": { - "params": [], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "B" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":0, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 1 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "C" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"__expr__", + "uid":"-100" + }, + "expression":"B", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"C", + "type":"threshold" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "A", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "reducer": "max", - "refId": "B", - "type": "reduce" - } + ], + "updated":"2023-04-18T09:14:37Z", + "intervalSeconds":60, + "version":4, + "uid":"9YAdEUB4z", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Bridges", + "no_data_state":"OK", + "exec_err_state":"OK" + } + } + ] + }, + { + "name":"Rococo Beefy best blocks not advancing", + "interval":"20m", + "rules":[ + { + "expr":"", + "for":"1h", + "labels":{ + "matrix_room":"!lMunCqbBqxEqfRuUDF:parity.io" + }, + "annotations":{ + "__dashboardUid__":"3sEDRyl7z", + "__panelId__":"2", + "summary":"Rococo BEEFY best blocks have not advanced for at least 60 mins" }, - { - "refId": "C", - "queryType": "", - "relativeTimeRange": { - "from": 0, - "to": 0 - }, - "datasourceUid": "-100", - "model": { - "conditions": [ + "grafana_alert":{ + "id":41, + "orgId":1, + "title":"Rococo BEEFY best blocks not advancing", + "condition":"C", + "data":[ + { + "refId":"A", + "queryType":"", + "relativeTimeRange":{ + "from":10800, + "to":0 + }, + "datasourceUid":"PC96415006F908B67", + "model":{ + "editorMode":"code", + "expr":"increase(substrate_beefy_best_block{chain=\"rococo_v2_2\", node=~\"rococo.*(3-validator|3-rpc).*\"}[1h])", + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "range":true, + "refId":"A" + } + }, { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "C" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" + "refId":"C", + "queryType":"", + "relativeTimeRange":{ + "from":0, + "to":0 + }, + "datasourceUid":"-100", + "model":{ + "conditions":[ + { + "evaluator":{ + "params":[ + 100 + ], + "type":"lt" + }, + "operator":{ + "type":"and" + }, + "query":{ + "params":[ + "A" + ] + }, + "reducer":{ + "params":[ + + ], + "type":"last" + }, + "type":"query" + } + ], + "datasource":{ + "type":"grafana-expression", + "uid":"-100" + }, + "hide":false, + "intervalMs":1000, + "maxDataPoints":43200, + "refId":"C", + "type":"classic_conditions" + } } - ], - "datasource": { - "type": "__expr__", - "uid": "-100" - }, - "expression": "B", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "C", - "type": "threshold" - } + ], + "updated":"2023-02-14T12:26:10Z", + "intervalSeconds":1200, + "version":10, + "uid":"CBuugs_7k", + "namespace_uid":"eblDiw17z", + "namespace_id":140, + "rule_group":"Rococo Beefy best blocks not advancing", + "no_data_state":"Alerting", + "exec_err_state":"Alerting" } - ], - "updated": "2023-03-29T05:39:46Z", - "intervalSeconds": 60, - "version": 1, - "uid": "9YAdEUB4z", - "namespace_uid": "eblDiw17z", - "namespace_id": 140, - "rule_group": "Bridges", - "no_data_state": "OK", - "exec_err_state": "OK" - } - } - ] - } + } + ] + } ] - } + } + \ No newline at end of file diff --git a/deployments/bridges/rococo-wococo/dashboard/grafana/relay-rococo-to-wococo-messages-dashboard.json b/deployments/bridges/rococo-wococo/dashboard/grafana/relay-rococo-to-wococo-messages-dashboard.json index d1ecba2acfd..cf0fa1bff79 100644 --- a/deployments/bridges/rococo-wococo/dashboard/grafana/relay-rococo-to-wococo-messages-dashboard.json +++ b/deployments/bridges/rococo-wococo/dashboard/grafana/relay-rococo-to-wococo-messages-dashboard.json @@ -1,941 +1,965 @@ { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 141, - "links": [], - "liveNow": false, - "panels": [ + "annotations": { + "list": [ { + "builtIn": 1, "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 141, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", - "legendFormat": "At Rococo", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", - "hide": false, - "legendFormat": "At BridgeHubWococo", - "range": true, - "refId": "B" - } - ], - "title": "Best finalized Rococo headers", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", + "legendFormat": "At Rococo", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "hide": false, + "legendFormat": "At BridgeHubWococo", + "range": true, + "refId": "B" + } + ], + "title": "Best finalized Rococo headers", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", - "legendFormat": "At Wococo", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", - "hide": false, - "legendFormat": "At BridgeHubRococo", - "range": true, - "refId": "B" - } - ], - "title": "Best finalized Wococo headers", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", + "legendFormat": "At Wococo", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "hide": false, + "legendFormat": "At BridgeHubRococo", + "range": true, + "refId": "B" + } + ], + "title": "Best finalized Wococo headers", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "exemplar": true, - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_source_block_number{domain=\"parity-testnet\"}", - "interval": "", - "legendFormat": "At RococoBridgeHub", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_source_at_target_block_number{domain=\"parity-testnet\"}", - "hide": false, - "legendFormat": "At WococoBridgeHub", - "range": true, - "refId": "B" - } - ], - "title": "Best finalized RococoBridgeHub headers", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "exemplar": true, + "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_source_block_number{domain=\"parity-testnet\"}", + "interval": "", + "legendFormat": "At RococoBridgeHub", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "hide": false, + "legendFormat": "At WococoBridgeHub", + "range": true, + "refId": "B" + } + ], + "title": "Best finalized RococoBridgeHub headers", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "exemplar": true, - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_target_block_number{domain=\"parity-testnet\"}", - "interval": "", - "legendFormat": "At WococoBridgeHub", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_target_at_source_block_number{domain=\"parity-testnet\"}", - "hide": false, - "legendFormat": "At RococoBridgeHub", - "range": true, - "refId": "B" - } - ], - "title": "Best finalized WococoBridgeHub headers", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "exemplar": true, + "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_target_block_number{domain=\"parity-testnet\"}", + "interval": "", + "legendFormat": "At WococoBridgeHub", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_best_target_at_source_block_number{domain=\"parity-testnet\"}", + "hide": false, + "legendFormat": "At RococoBridgeHub", + "range": true, + "refId": "B" + } + ], + "title": "Best finalized WococoBridgeHub headers", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 9, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "label_replace(label_replace(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\", type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from BridgeHubRococo\", \"type\", \"source_latest_generated\"), \"type\", \"Latest BridgeHubRococo message received by BridgeHubWococo\", \"type\", \"target_latest_received\")", - "legendFormat": "{{type}}", - "range": true, - "refId": "A" - } - ], - "title": "Delivery race (00000001)", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "label_replace(label_replace(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\", type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from BridgeHubRococo\", \"type\", \"source_latest_generated\"), \"type\", \"Latest BridgeHubRococo message received by BridgeHubWococo\", \"type\", \"target_latest_received\")", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "increase(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\", type=~\"source_latest_generated\"}[24h])", + "hide": true, + "legendFormat": "Messages generated in last 24h", + "range": true, + "refId": "B" + } + ], + "title": "Delivery race (00000001)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 10, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "label_replace(label_replace(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest delivery confirmation from BridgeHubWococo to BridgeHubRococo\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest BridgeHubRococo message received by BridgeHubWococo\", \"type\", \"target_latest_received\")", - "legendFormat": "{{type}}", - "range": true, - "refId": "A" - } - ], - "title": "Confirmations race (00000001)", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "label_replace(label_replace(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest delivery confirmation from BridgeHubWococo to BridgeHubRococo\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest BridgeHubRococo message received by BridgeHubWococo\", \"type\", \"target_latest_received\")", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Confirmations race (00000001)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 16 - }, - "id": 12, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", - "legendFormat": "Undelivered messages", - "range": true, - "refId": "A" - } - ], - "title": "Delivery race lags (00000001)", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 16 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", + "legendFormat": "Undelivered messages", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "((vector(0) and ((BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(1)) + on () increase(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[10m]) * on () ((vector(1) and ((BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(0))", + "hide": true, + "legendFormat": "1 if all messages are delivered. Otherwise - number of delivered messages in last 10m", + "range": true, + "refId": "B" + } + ], + "title": "Delivery race lags (00000001)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 16 - }, - "id": 14, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(RococoBridgeHub_to_WococoBridgeHub_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RococoBridgeHub_to_WococoBridgeHub_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", - "legendFormat": "Unconfirmed messages", - "range": true, - "refId": "A" - } - ], - "title": "Confirmations race lags (00000001)", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 16 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "scalar(max_over_time(RococoBridgeHub_to_WococoBridgeHub_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(RococoBridgeHub_to_WococoBridgeHub_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", + "legendFormat": "Unconfirmed messages", + "range": true, + "refId": "A" + } + ], + "title": "Confirmations race lags (00000001)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 16 - }, - "id": 15, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", - "legendFormat": "Unconfirmed rewards", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "(scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) > bool min_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", - "hide": true, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "Reward lags (00000001)", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 37, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "BridgeHubRococo to BridgeHubWococo (00000001)", - "uid": "tkgc6_bnk", - "version": 42, - "weekStart": "" - } \ No newline at end of file + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 16 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", + "legendFormat": "Unconfirmed rewards", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "(scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) > bool min_over_time(BridgeHubRococo_to_BridgeHubWococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", + "hide": true, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "Reward lags (00000001)", + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "BridgeHubRococo to BridgeHubWococo (00000001)", + "uid": "tkgc6_bnk", + "version": 44, + "weekStart": "" +} diff --git a/deployments/bridges/rococo-wococo/dashboard/grafana/relay-wococo-to-rococo-messages-dashboard.json b/deployments/bridges/rococo-wococo/dashboard/grafana/relay-wococo-to-rococo-messages-dashboard.json index be33f0dcecc..15967adcb34 100644 --- a/deployments/bridges/rococo-wococo/dashboard/grafana/relay-wococo-to-rococo-messages-dashboard.json +++ b/deployments/bridges/rococo-wococo/dashboard/grafana/relay-wococo-to-rococo-messages-dashboard.json @@ -1,941 +1,953 @@ { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 142, - "links": [], - "liveNow": false, - "panels": [ + "annotations": { + "list": [ { + "builtIn": 1, "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 142, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", - "legendFormat": "At Wococo", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", - "hide": false, - "legendFormat": "At BridgeHubRococo", - "range": true, - "refId": "B" - } - ], - "title": "Best finalized Wococo headers", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", + "legendFormat": "At Wococo", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Wococo_to_BridgeHubRococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "hide": false, + "legendFormat": "At BridgeHubRococo", + "range": true, + "refId": "B" + } + ], + "title": "Best finalized Wococo headers", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", - "legendFormat": "At Rococo", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", - "hide": false, - "legendFormat": "At WococoBridgeHub", - "range": true, - "refId": "B" - } - ], - "title": "Best finalized Rococo headers", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_block_number{domain=\"parity-testnet\"}", + "legendFormat": "At Rococo", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "Rococo_to_BridgeHubWococo_Sync_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "hide": false, + "legendFormat": "At WococoBridgeHub", + "range": true, + "refId": "B" + } + ], + "title": "Best finalized Rococo headers", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "exemplar": true, - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_source_block_number{domain=\"parity-testnet\"}", - "interval": "", - "legendFormat": "At WococoBridgeHub", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_source_at_target_block_number{domain=\"parity-testnet\"}", - "hide": false, - "legendFormat": "At RococoBridgeHub", - "range": true, - "refId": "B" - } - ], - "title": "Best finalized WococoBridgeHub headers", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 0 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "exemplar": true, + "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_source_block_number{domain=\"parity-testnet\"}", + "interval": "", + "legendFormat": "At WococoBridgeHub", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_source_at_target_block_number{domain=\"parity-testnet\"}", + "hide": false, + "legendFormat": "At RococoBridgeHub", + "range": true, + "refId": "B" + } + ], + "title": "Best finalized WococoBridgeHub headers", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "exemplar": true, - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_target_block_number{domain=\"parity-testnet\"}", - "interval": "", - "legendFormat": "At RococoBridgeHub", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_target_at_source_block_number{domain=\"parity-testnet\"}", - "hide": false, - "legendFormat": "At WococoBridgeHub", - "range": true, - "refId": "B" - } - ], - "title": "Best finalized RococoBridgeHub headers", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "exemplar": true, + "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_target_block_number{domain=\"parity-testnet\"}", + "interval": "", + "legendFormat": "At RococoBridgeHub", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_best_target_at_source_block_number{domain=\"parity-testnet\"}", + "hide": false, + "legendFormat": "At WococoBridgeHub", + "range": true, + "refId": "B" + } + ], + "title": "Best finalized RococoBridgeHub headers", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 10, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "label_replace(label_replace(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from BridgeHubWococo\", \"type\", \"source_latest_generated\"), \"type\", \"Latest BridgeHubWococo message received by BridgeHubRococo\", \"type\", \"target_latest_received\")", - "legendFormat": "{{type}}", - "range": true, - "refId": "A" - } - ], - "title": "Delivery race (00000001)", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "label_replace(label_replace(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_generated|target_latest_received\"}, \"type\", \"Latest message sent from BridgeHubWococo\", \"type\", \"source_latest_generated\"), \"type\", \"Latest BridgeHubWococo message received by BridgeHubRococo\", \"type\", \"target_latest_received\")", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Delivery race (00000001)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 12, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "label_replace(label_replace(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest delivery confirmation from BridgeHubRococo to BridgeHubWococo\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest BridgeHubWococo message received by BridgeHubRococo\", \"type\", \"target_latest_received\")", - "legendFormat": "{{type}}", - "range": true, - "refId": "A" - } - ], - "title": "Confirmations race (00000001)", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "label_replace(label_replace(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=~\"source_latest_confirmed|target_latest_received\"}, \"type\", \"Latest delivery confirmation from BridgeHubRococo to BridgeHubWococo\", \"type\", \"source_latest_confirmed\"), \"type\", \"Latest BridgeHubWococo message received by BridgeHubRococo\", \"type\", \"target_latest_received\")", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Confirmations race (00000001)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 16 - }, - "id": 14, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", - "legendFormat": "Undelivered messages", - "range": true, - "refId": "A" - } - ], - "title": "Delivery race lags (00000001)", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 16 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", + "legendFormat": "Undelivered messages", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "((vector(0) and ((BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(1)) + on () increase(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[10m]) * on () ((vector(1) and ((BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_generated\"} > on () BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}))) or vector(0))", + "hide": true, + "legendFormat": "1 if all messages are delivered. Otherwise - number of delivered messages in last 10m", + "range": true, + "refId": "B" + } + ], + "title": "Delivery race lags (00000001)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 16 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", - "legendFormat": "Unconfirmed messages", - "range": true, - "refId": "A" - } - ], - "title": "Confirmations race lags (00000001)", - "type": "timeseries" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 16 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0))", + "legendFormat": "Unconfirmed messages", + "range": true, + "refId": "A" + } + ], + "title": "Confirmations race lags (00000001)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 16 - }, - "id": 18, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", - "legendFormat": "Unconfirmed rewards", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC96415006F908B67" - }, - "editorMode": "code", - "expr": "(scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) > bool min_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", - "hide": true, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "Reward lags (00000001)", - "type": "timeseries" - } - ], - "refresh": "5s", - "schemaVersion": 37, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "BridgeHubWococo to BridgeHubRococo (00000001)", - "uid": "zqjpgXxnk", - "version": 30, - "weekStart": "" - } \ No newline at end of file + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 16 + }, + "id": 18, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))", + "legendFormat": "Unconfirmed rewards", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC96415006F908B67" + }, + "editorMode": "code", + "expr": "(scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"source_latest_confirmed\"}[2m]) OR on() vector(0)) - scalar(max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_confirmed\"}[2m]) OR on() vector(0))) * (max_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0) > bool min_over_time(BridgeHubWococo_to_BridgeHubRococo_MessageLane_00000001_lane_state_nonces{domain=\"parity-testnet\",type=\"target_latest_received\"}[2m]) OR on() vector(0))", + "hide": true, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "Reward lags (00000001)", + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "BridgeHubWococo to BridgeHubRococo (00000001)", + "uid": "zqjpgXxnk", + "version": 32, + "weekStart": "" +} diff --git a/deployments/monitoring/grafana-matrix/config.yml b/deployments/monitoring/grafana-matrix/config.yml index 123cf76a80b..662d7aa14d7 100644 --- a/deployments/monitoring/grafana-matrix/config.yml +++ b/deployments/monitoring/grafana-matrix/config.yml @@ -5,7 +5,7 @@ # Set up your HS connections matrix: - name: matrix-parity-io - url: https://matrix.parity.io + url: https://m.parity.io # Create a user - log that user in using a post request # curl -XPOST -d '{"type": "m.login.password", # "user":"grafana", @@ -22,7 +22,7 @@ msgtype: m.text # Set up notification ingress rules rules: - name: bridge # Name of the rule - room: "#bridges-rialto-millau-alerts:matrix.parity.io" # Room or ID + room: "#bridges-rialto-millau-alerts:parity.io" # Room or ID matrix: matrix-parity-io # The Matrix HS to use - defaults to first one msgtype: m.notice # The following values are optional: diff --git a/deployments/networks/dashboard/prometheus/rialto-targets.yml b/deployments/networks/dashboard/prometheus/rialto-targets.yml index 0c89926e8c3..7ec194f99d7 100644 --- a/deployments/networks/dashboard/prometheus/rialto-targets.yml +++ b/deployments/networks/dashboard/prometheus/rialto-targets.yml @@ -4,3 +4,4 @@ - rialto-node-charlie:9615 - rialto-node-dave:9615 - rialto-node-eve:9615 + - rialto-node-ferdie:9615 diff --git a/deployments/networks/rialto.yml b/deployments/networks/rialto.yml index fab85b89c04..ebd8393fcad 100644 --- a/deployments/networks/rialto.yml +++ b/deployments/networks/rialto.yml @@ -101,6 +101,24 @@ services: - "10344:9944" - "10315:9615" + rialto-node-ferdie: + <<: *rialto-bridge-node + entrypoint: + - /home/user/rialto-bridge-node + - --execution=Native + - --chain=local + - --bootnodes=/dns4/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE + - --ferdie + - --rpc-cors=all + - --enable-offchain-indexing=true + - --unsafe-rpc-external + - --unsafe-ws-external + - --prometheus-external + ports: + - "10433:9933" + - "10444:9944" + - "10415:9615" + rialto-chainspec-exporter: image: ${RIALTO_BRIDGE_NODE_IMAGE:-paritytech/rialto-bridge-node} entrypoint: /entrypoints/rialto-chainspec-exporter-entrypoint.sh @@ -118,6 +136,7 @@ services: - rialto-node-charlie - rialto-node-dave - rialto-node-eve + - rialto-node-ferdie # we're using `/rialto-share` to expose Rialto chain spec to those who are interested. Right # now it is Rialto Parachain collator nodes. Local + tmpfs combination allows sharing writable diff --git a/modules/grandpa/src/lib.rs b/modules/grandpa/src/lib.rs index 9d38c9723d7..329e4c21136 100644 --- a/modules/grandpa/src/lib.rs +++ b/modules/grandpa/src/lib.rs @@ -834,6 +834,7 @@ mod tests { run_test(|| { assert_eq!(BestFinalized::::get(), None,); assert_eq!(Pallet::::best_finalized(), None); + assert_eq!(PalletOperatingMode::::try_get(), Err(())); let init_data = init_with_origin(RuntimeOrigin::root()).unwrap(); @@ -843,7 +844,10 @@ mod tests { CurrentAuthoritySet::::get().authorities, init_data.authority_list ); - assert_eq!(PalletOperatingMode::::get(), BasicOperatingMode::Normal); + assert_eq!( + PalletOperatingMode::::try_get(), + Ok(BasicOperatingMode::Normal) + ); }) } diff --git a/modules/messages/src/inbound_lane.rs b/modules/messages/src/inbound_lane.rs index 59ff5667195..5ec4444dbdf 100644 --- a/modules/messages/src/inbound_lane.rs +++ b/modules/messages/src/inbound_lane.rs @@ -153,7 +153,7 @@ impl InboundLane { // Note: There will be max. 1 record to update as we don't allow messages from relayers to // overlap. match data.relayers.front_mut() { - Some(entry) if entry.messages.begin < new_confirmed_nonce => { + Some(entry) if entry.messages.begin <= new_confirmed_nonce => { entry.messages.begin = new_confirmed_nonce + 1; }, _ => {}, @@ -164,10 +164,9 @@ impl InboundLane { } /// Receive new message. - pub fn receive_message, AccountId>( + pub fn receive_message( &mut self, relayer_at_bridged_chain: &S::Relayer, - relayer_at_this_chain: &AccountId, nonce: MessageNonce, message_data: DispatchMessageData, ) -> ReceivalResult { @@ -189,13 +188,10 @@ impl InboundLane { } // then, dispatch message - let dispatch_result = Dispatch::dispatch( - relayer_at_this_chain, - DispatchMessage { - key: MessageKey { lane_id: self.storage.id(), nonce }, - data: message_data, - }, - ); + let dispatch_result = Dispatch::dispatch(DispatchMessage { + key: MessageKey { lane_id: self.storage.id(), nonce }, + data: message_data, + }); // now let's update inbound lane storage match data.relayers.back_mut() { @@ -221,20 +217,20 @@ mod tests { use crate::{ inbound_lane, mock::{ - dispatch_result, inbound_message_data, run_test, unrewarded_relayer, - TestMessageDispatch, TestRuntime, REGULAR_PAYLOAD, TEST_LANE_ID, TEST_RELAYER_A, - TEST_RELAYER_B, TEST_RELAYER_C, + dispatch_result, inbound_message_data, inbound_unrewarded_relayers_state, run_test, + unrewarded_relayer, TestMessageDispatch, TestRuntime, REGULAR_PAYLOAD, TEST_LANE_ID, + TEST_RELAYER_A, TEST_RELAYER_B, TEST_RELAYER_C, }, RuntimeInboundLaneStorage, }; + use bp_messages::UnrewardedRelayersState; fn receive_regular_message( lane: &mut InboundLane>, nonce: MessageNonce, ) { assert_eq!( - lane.receive_message::( - &TEST_RELAYER_A, + lane.receive_message::( &TEST_RELAYER_A, nonce, inbound_message_data(REGULAR_PAYLOAD) @@ -361,8 +357,7 @@ mod tests { run_test(|| { let mut lane = inbound_lane::(TEST_LANE_ID); assert_eq!( - lane.receive_message::( - &TEST_RELAYER_A, + lane.receive_message::( &TEST_RELAYER_A, 10, inbound_message_data(REGULAR_PAYLOAD) @@ -381,8 +376,7 @@ mod tests { ::MaxUnrewardedRelayerEntriesAtInboundLane::get(); for current_nonce in 1..max_nonce + 1 { assert_eq!( - lane.receive_message::( - &(TEST_RELAYER_A + current_nonce), + lane.receive_message::( &(TEST_RELAYER_A + current_nonce), current_nonce, inbound_message_data(REGULAR_PAYLOAD) @@ -392,8 +386,7 @@ mod tests { } // Fails to dispatch new message from different than latest relayer. assert_eq!( - lane.receive_message::( - &(TEST_RELAYER_A + max_nonce + 1), + lane.receive_message::( &(TEST_RELAYER_A + max_nonce + 1), max_nonce + 1, inbound_message_data(REGULAR_PAYLOAD) @@ -402,8 +395,7 @@ mod tests { ); // Fails to dispatch new messages from latest relayer. Prevents griefing attacks. assert_eq!( - lane.receive_message::( - &(TEST_RELAYER_A + max_nonce), + lane.receive_message::( &(TEST_RELAYER_A + max_nonce), max_nonce + 1, inbound_message_data(REGULAR_PAYLOAD) @@ -420,8 +412,7 @@ mod tests { let max_nonce = ::MaxUnconfirmedMessagesAtInboundLane::get(); for current_nonce in 1..=max_nonce { assert_eq!( - lane.receive_message::( - &TEST_RELAYER_A, + lane.receive_message::( &TEST_RELAYER_A, current_nonce, inbound_message_data(REGULAR_PAYLOAD) @@ -431,8 +422,7 @@ mod tests { } // Fails to dispatch new message from different than latest relayer. assert_eq!( - lane.receive_message::( - &TEST_RELAYER_B, + lane.receive_message::( &TEST_RELAYER_B, max_nonce + 1, inbound_message_data(REGULAR_PAYLOAD) @@ -441,8 +431,7 @@ mod tests { ); // Fails to dispatch new messages from latest relayer. assert_eq!( - lane.receive_message::( - &TEST_RELAYER_A, + lane.receive_message::( &TEST_RELAYER_A, max_nonce + 1, inbound_message_data(REGULAR_PAYLOAD) @@ -457,8 +446,7 @@ mod tests { run_test(|| { let mut lane = inbound_lane::(TEST_LANE_ID); assert_eq!( - lane.receive_message::( - &TEST_RELAYER_A, + lane.receive_message::( &TEST_RELAYER_A, 1, inbound_message_data(REGULAR_PAYLOAD) @@ -466,8 +454,7 @@ mod tests { ReceivalResult::Dispatched(dispatch_result(0)) ); assert_eq!( - lane.receive_message::( - &TEST_RELAYER_B, + lane.receive_message::( &TEST_RELAYER_B, 2, inbound_message_data(REGULAR_PAYLOAD) @@ -475,8 +462,7 @@ mod tests { ReceivalResult::Dispatched(dispatch_result(0)) ); assert_eq!( - lane.receive_message::( - &TEST_RELAYER_A, + lane.receive_message::( &TEST_RELAYER_A, 3, inbound_message_data(REGULAR_PAYLOAD) @@ -499,8 +485,7 @@ mod tests { run_test(|| { let mut lane = inbound_lane::(TEST_LANE_ID); assert_eq!( - lane.receive_message::( - &TEST_RELAYER_A, + lane.receive_message::( &TEST_RELAYER_A, 1, inbound_message_data(REGULAR_PAYLOAD) @@ -508,8 +493,7 @@ mod tests { ReceivalResult::Dispatched(dispatch_result(0)) ); assert_eq!( - lane.receive_message::( - &TEST_RELAYER_B, + lane.receive_message::( &TEST_RELAYER_B, 1, inbound_message_data(REGULAR_PAYLOAD) @@ -535,8 +519,7 @@ mod tests { let mut payload = REGULAR_PAYLOAD; *payload.dispatch_result.unspent_weight.ref_time_mut() = 1; assert_eq!( - lane.receive_message::( - &TEST_RELAYER_A, + lane.receive_message::( &TEST_RELAYER_A, 1, inbound_message_data(payload) @@ -545,4 +528,29 @@ mod tests { ); }); } + + #[test] + fn first_message_is_confirmed_correctly() { + run_test(|| { + let mut lane = inbound_lane::(TEST_LANE_ID); + receive_regular_message(&mut lane, 1); + receive_regular_message(&mut lane, 2); + assert_eq!( + lane.receive_state_update(OutboundLaneData { + latest_received_nonce: 1, + ..Default::default() + }), + Some(1), + ); + assert_eq!( + inbound_unrewarded_relayers_state(TEST_LANE_ID), + UnrewardedRelayersState { + unrewarded_relayer_entries: 1, + messages_in_oldest_entry: 1, + total_messages: 1, + last_delivered_nonce: 2, + }, + ); + }); + } } diff --git a/modules/messages/src/lib.rs b/modules/messages/src/lib.rs index c94f5ffa752..8f4911b8d03 100644 --- a/modules/messages/src/lib.rs +++ b/modules/messages/src/lib.rs @@ -162,10 +162,7 @@ pub mod pallet { /// Source header chain, as it is represented on target chain. type SourceHeaderChain: SourceHeaderChain; /// Message dispatch. - type MessageDispatch: MessageDispatch< - Self::AccountId, - DispatchPayload = Self::InboundPayload, - >; + type MessageDispatch: MessageDispatch; } /// Shortcut to messages proof type for Config. @@ -361,9 +358,8 @@ pub mod pallet { fail!(Error::::InsufficientDispatchWeight); } - let receival_result = lane.receive_message::( + let receival_result = lane.receive_message::( &relayer_id_at_bridged_chain, - &relayer_id_at_this_chain, message.key.nonce, message.data, ); @@ -545,11 +541,7 @@ pub mod pallet { MessageAccepted { lane_id: LaneId, nonce: MessageNonce }, /// Messages have been received from the bridged chain. MessagesReceived( - Vec< - ReceivedMessages< - >::DispatchLevelResult, - >, - >, + Vec::DispatchLevelResult>>, ), /// Messages in the inclusive range have been delivered to the bridged chain. MessagesDelivered { lane_id: LaneId, messages: DeliveredMessages }, @@ -949,12 +941,12 @@ fn verify_and_decode_messages_proof::reset_events(); } - fn inbound_unrewarded_relayers_state( - lane: bp_messages::LaneId, - ) -> bp_messages::UnrewardedRelayersState { - let inbound_lane_data = InboundLanes::::get(lane).0; - let last_delivered_nonce = inbound_lane_data.last_delivered_nonce(); - let relayers = inbound_lane_data.relayers; - bp_messages::UnrewardedRelayersState { - unrewarded_relayer_entries: relayers.len() as _, - messages_in_oldest_entry: relayers - .front() - .map(|entry| 1 + entry.messages.end - entry.messages.begin) - .unwrap_or(0), - total_messages: total_unrewarded_messages(&relayers).unwrap_or(MessageNonce::MAX), - last_delivered_nonce, - } - } - fn send_regular_message() { get_ready_for_events(); diff --git a/modules/messages/src/mock.rs b/modules/messages/src/mock.rs index 75f05b4820a..3d78ab562d2 100644 --- a/modules/messages/src/mock.rs +++ b/modules/messages/src/mock.rs @@ -26,8 +26,8 @@ use bp_messages::{ DeliveryPayments, DispatchMessage, DispatchMessageData, MessageDispatch, ProvedLaneMessages, ProvedMessages, SourceHeaderChain, }, - DeliveredMessages, InboundLaneData, LaneId, Message, MessageKey, MessageNonce, MessagePayload, - OutboundLaneData, UnrewardedRelayer, + total_unrewarded_messages, DeliveredMessages, InboundLaneData, LaneId, Message, MessageKey, + MessageNonce, MessagePayload, OutboundLaneData, UnrewardedRelayer, UnrewardedRelayersState, }; use bp_runtime::{messages::MessageDispatchResult, Size}; use codec::{Decode, Encode}; @@ -142,7 +142,7 @@ impl pallet_balances::Config for TestRuntime { parameter_types! { pub const MaxMessagesToPruneAtOnce: u64 = 10; pub const MaxUnrewardedRelayerEntriesAtInboundLane: u64 = 16; - pub const MaxUnconfirmedMessagesAtInboundLane: u64 = 32; + pub const MaxUnconfirmedMessagesAtInboundLane: u64 = 128; pub const TestBridgedChainId: bp_runtime::ChainId = *b"test"; pub const ActiveOutboundLanes: &'static [LaneId] = &[TEST_LANE_ID, TEST_LANE_ID_2]; } @@ -416,7 +416,7 @@ impl SourceHeaderChain for TestSourceHeaderChain { #[derive(Debug)] pub struct TestMessageDispatch; -impl MessageDispatch for TestMessageDispatch { +impl MessageDispatch for TestMessageDispatch { type DispatchPayload = TestPayload; type DispatchLevelResult = TestDispatchLevelResult; @@ -428,7 +428,6 @@ impl MessageDispatch for TestMessageDispatch { } fn dispatch( - _relayer_account: &AccountId, message: DispatchMessage, ) -> MessageDispatchResult { match message.data.payload.as_ref() { @@ -483,6 +482,22 @@ pub fn unrewarded_relayer( UnrewardedRelayer { relayer, messages: DeliveredMessages { begin, end } } } +/// Returns unrewarded relayers state at given lane. +pub fn inbound_unrewarded_relayers_state(lane: bp_messages::LaneId) -> UnrewardedRelayersState { + let inbound_lane_data = crate::InboundLanes::::get(lane).0; + let last_delivered_nonce = inbound_lane_data.last_delivered_nonce(); + let relayers = inbound_lane_data.relayers; + UnrewardedRelayersState { + unrewarded_relayer_entries: relayers.len() as _, + messages_in_oldest_entry: relayers + .front() + .map(|entry| 1 + entry.messages.end - entry.messages.begin) + .unwrap_or(0), + total_messages: total_unrewarded_messages(&relayers).unwrap_or(MessageNonce::MAX), + last_delivered_nonce, + } +} + /// Return test externalities to use in tests. pub fn new_test_ext() -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); diff --git a/modules/relayers/src/lib.rs b/modules/relayers/src/lib.rs index bd33b811b30..14e44d30f89 100644 --- a/modules/relayers/src/lib.rs +++ b/modules/relayers/src/lib.rs @@ -20,20 +20,25 @@ #![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs)] -use bp_relayers::{PaymentProcedure, RelayerRewardsKeyProvider, RewardsAccountParams}; +use bp_relayers::{ + PaymentProcedure, Registration, RelayerRewardsKeyProvider, RewardsAccountParams, StakeAndSlash, +}; use bp_runtime::StorageDoubleMapKeyProvider; -use frame_support::sp_runtime::Saturating; +use frame_support::fail; use sp_arithmetic::traits::{AtLeast32BitUnsigned, Zero}; +use sp_runtime::{traits::CheckedSub, Saturating}; use sp_std::marker::PhantomData; pub use pallet::*; pub use payment_adapter::DeliveryConfirmationPaymentsAdapter; +pub use stake_adapter::StakeAndSlashNamed; pub use weights::WeightInfo; pub mod benchmarking; mod mock; mod payment_adapter; +mod stake_adapter; pub mod weights; @@ -56,8 +61,10 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Type of relayer reward. type Reward: AtLeast32BitUnsigned + Copy + Parameter + MaxEncodedLen; - /// Pay rewards adapter. + /// Pay rewards scheme. type PaymentProcedure: PaymentProcedure; + /// Stake and slash scheme. + type StakeAndSlash: StakeAndSlash; /// Pallet call weights. type WeightInfo: WeightInfo; } @@ -102,9 +109,194 @@ pub mod pallet { }, ) } + + /// Register relayer or update its registration. + /// + /// Registration allows relayer to get priority boost for its message delivery transactions. + #[pallet::call_index(1)] + #[pallet::weight(Weight::zero())] // TODO: https://github.com/paritytech/parity-bridges-common/issues/2033 + pub fn register(origin: OriginFor, valid_till: T::BlockNumber) -> DispatchResult { + let relayer = ensure_signed(origin)?; + + // valid till must be larger than the current block number and the lease must be larger + // than the `RequiredRegistrationLease` + let lease = valid_till.saturating_sub(frame_system::Pallet::::block_number()); + ensure!( + lease > Pallet::::required_registration_lease(), + Error::::InvalidRegistrationLease + ); + + RegisteredRelayers::::try_mutate(&relayer, |maybe_registration| -> DispatchResult { + let mut registration = maybe_registration + .unwrap_or_else(|| Registration { valid_till, stake: Zero::zero() }); + + // new `valid_till` must be larger (or equal) than the old one + ensure!( + valid_till >= registration.valid_till, + Error::::CannotReduceRegistrationLease, + ); + registration.valid_till = valid_till; + + // regarding stake, there are three options: + // - if relayer stake is larger than required stake, we may do unreserve + // - if relayer stake equals to required stake, we do nothing + // - if relayer stake is smaller than required stake, we do additional reserve + let required_stake = Pallet::::required_stake(); + if let Some(to_unreserve) = registration.stake.checked_sub(&required_stake) { + Self::do_unreserve(&relayer, to_unreserve)?; + } else if let Some(to_reserve) = required_stake.checked_sub(®istration.stake) { + T::StakeAndSlash::reserve(&relayer, to_reserve).map_err(|e| { + log::trace!( + target: LOG_TARGET, + "Failed to reserve {:?} on relayer {:?} account: {:?}", + to_reserve, + relayer, + e, + ); + + Error::::FailedToReserve + })?; + } + registration.stake = required_stake; + + Self::deposit_event(Event::::RegistrationUpdated { + relayer: relayer.clone(), + registration, + }); + + *maybe_registration = Some(registration); + + Ok(()) + }) + } + + /// `Deregister` relayer. + /// + /// After this call, message delivery transactions of the relayer won't get any priority + /// boost. + #[pallet::call_index(2)] + #[pallet::weight(Weight::zero())] // TODO: https://github.com/paritytech/parity-bridges-common/issues/2033 + pub fn deregister(origin: OriginFor) -> DispatchResult { + let relayer = ensure_signed(origin)?; + + RegisteredRelayers::::try_mutate(&relayer, |maybe_registration| -> DispatchResult { + let registration = match maybe_registration.take() { + Some(registration) => registration, + None => fail!(Error::::NotRegistered), + }; + + // we can't deregister until `valid_till + 1` + ensure!( + registration.valid_till < frame_system::Pallet::::block_number(), + Error::::RegistrationIsStillActive, + ); + + // if stake is non-zero, we should do unreserve + if !registration.stake.is_zero() { + Self::do_unreserve(&relayer, registration.stake)?; + } + + Self::deposit_event(Event::::Deregistered { relayer: relayer.clone() }); + + *maybe_registration = None; + + Ok(()) + }) + } } impl Pallet { + /// Returns true if given relayer registration is active at current block. + /// + /// This call respects both `RequiredStake` and `RequiredRegistrationLease`, meaning that + /// it'll return false if registered stake is lower than required or if remaining lease + /// is less than `RequiredRegistrationLease`. + pub fn is_registration_active(relayer: &T::AccountId) -> bool { + let registration = match Self::registered_relayer(relayer) { + Some(registration) => registration, + None => return false, + }; + + // registration is inactive if relayer stake is less than required + if registration.stake < Self::required_stake() { + return false + } + + // registration is inactive if it ends soon + let remaining_lease = registration + .valid_till + .saturating_sub(frame_system::Pallet::::block_number()); + if remaining_lease <= Self::required_registration_lease() { + return false + } + + true + } + + /// Slash and `deregister` relayer. This function slashes all staked balance. + /// + /// It may fail inside, but error is swallowed and we only log it. + pub fn slash_and_deregister( + relayer: &T::AccountId, + slash_destination: RewardsAccountParams, + ) { + let registration = match RegisteredRelayers::::take(relayer) { + Some(registration) => registration, + None => { + log::trace!( + target: crate::LOG_TARGET, + "Cannot slash unregistered relayer {:?}", + relayer, + ); + + return + }, + }; + + match T::StakeAndSlash::repatriate_reserved( + relayer, + slash_destination, + registration.stake, + ) { + Ok(failed_to_slash) if failed_to_slash.is_zero() => { + log::trace!( + target: crate::LOG_TARGET, + "Relayer account {:?} has been slashed for {:?}. Funds were deposited to {:?}", + relayer, + registration.stake, + slash_destination, + ); + }, + Ok(failed_to_slash) => { + log::trace!( + target: crate::LOG_TARGET, + "Relayer account {:?} has been partially slashed for {:?}. Funds were deposited to {:?}. \ + Failed to slash: {:?}", + relayer, + registration.stake, + slash_destination, + failed_to_slash, + ); + }, + Err(e) => { + // TODO: document this. Where? + + // it may fail if there's no beneficiary account. For us it means that this + // account must exists before we'll deploy the bridge + log::debug!( + target: crate::LOG_TARGET, + "Failed to slash relayer account {:?}: {:?}. Maybe beneficiary account doesn't exist? \ + Beneficiary: {:?}, amount: {:?}, failed to slash: {:?}", + relayer, + e, + slash_destination, + registration.stake, + registration.stake, + ); + }, + } + } + /// Register reward for given relayer. pub fn register_relayer_reward( rewards_account_params: RewardsAccountParams, @@ -132,6 +324,42 @@ pub mod pallet { }, ); } + + /// Return required registration lease. + fn required_registration_lease() -> T::BlockNumber { + >::RequiredRegistrationLease::get() + } + + /// Return required stake. + fn required_stake() -> T::Reward { + >::RequiredStake::get() + } + + /// `Unreserve` given amount on relayer account. + fn do_unreserve(relayer: &T::AccountId, amount: T::Reward) -> DispatchResult { + let failed_to_unreserve = T::StakeAndSlash::unreserve(relayer, amount); + if !failed_to_unreserve.is_zero() { + log::trace!( + target: LOG_TARGET, + "Failed to unreserve {:?}/{:?} on relayer {:?} account", + failed_to_unreserve, + amount, + relayer, + ); + + fail!(Error::::FailedToUnreserve) + } + + Ok(()) + } } #[pallet::event] @@ -146,6 +374,25 @@ pub mod pallet { /// Reward amount. reward: T::Reward, }, + /// Relayer registration has been added or updated. + RegistrationUpdated { + /// Relayer account that has been registered. + relayer: T::AccountId, + /// Relayer registration. + registration: Registration, + }, + /// Relayer has been `deregistered`. + Deregistered { + /// Relayer account that has been `deregistered`. + relayer: T::AccountId, + }, + /// Relayer has been slashed and `deregistered`. + SlashedAndDeregistered { + /// Relayer account that has been `deregistered`. + relayer: T::AccountId, + /// Registration that was removed. + registration: Registration, + }, } #[pallet::error] @@ -154,6 +401,19 @@ pub mod pallet { NoRewardForRelayer, /// Reward payment procedure has failed. FailedToPayReward, + /// The relayer has tried to register for past block or registration lease + /// is too short. + InvalidRegistrationLease, + /// New registration lease is less than the previous one. + CannotReduceRegistrationLease, + /// Failed to reserve enough funds on relayer account. + FailedToReserve, + /// Failed to `unreserve` enough funds on relayer account. + FailedToUnreserve, + /// Cannot `deregister` if not registered. + NotRegistered, + /// Failed to `deregister` relayer, because lease is still active. + RegistrationIsStillActive, } /// Map of the relayer => accumulated reward. @@ -168,6 +428,22 @@ pub mod pallet { as StorageDoubleMapKeyProvider>::Value, OptionQuery, >; + + /// Relayers that have reserved some of their balance to get free priority boost + /// for their message delivery transactions. + /// + /// Other relayers may submit transactions as well, but they will have default + /// priority and will be rejected (without significant tip) in case if registered + /// relayer is present. + #[pallet::storage] + #[pallet::getter(fn registered_relayer)] + pub type RegisteredRelayers = StorageMap< + _, + Blake2_128Concat, + T::AccountId, + Registration, + OptionQuery, + >; } #[cfg(test)] @@ -253,10 +529,10 @@ mod tests { None ); - //Check if the `RewardPaid` event was emitted. + // Check if the `RewardPaid` event was emitted. assert_eq!( - System::::events(), - vec![EventRecord { + System::::events().last(), + Some(&EventRecord { phase: Phase::Initialization, event: TestEvent::Relayers(RewardPaid { relayer: REGULAR_RELAYER, @@ -264,7 +540,7 @@ mod tests { reward: 100 }), topics: vec![], - }], + }), ); }); } @@ -306,4 +582,295 @@ mod tests { assert_eq!(Balances::balance(&1), 200); }); } + + #[test] + fn register_fails_if_valid_till_is_a_past_block() { + run_test(|| { + System::::set_block_number(100); + + assert_noop!( + Pallet::::register(RuntimeOrigin::signed(REGISTER_RELAYER), 50), + Error::::InvalidRegistrationLease, + ); + }); + } + + #[test] + fn register_fails_if_valid_till_lease_is_less_than_required() { + run_test(|| { + System::::set_block_number(100); + + assert_noop!( + Pallet::::register( + RuntimeOrigin::signed(REGISTER_RELAYER), + 99 + Lease::get() + ), + Error::::InvalidRegistrationLease, + ); + }); + } + + #[test] + fn register_works() { + run_test(|| { + get_ready_for_events(); + + assert_ok!(Pallet::::register( + RuntimeOrigin::signed(REGISTER_RELAYER), + 150 + )); + assert_eq!(Balances::reserved_balance(REGISTER_RELAYER), Stake::get()); + assert_eq!( + Pallet::::registered_relayer(REGISTER_RELAYER), + Some(Registration { valid_till: 150, stake: Stake::get() }), + ); + + assert_eq!( + System::::events().last(), + Some(&EventRecord { + phase: Phase::Initialization, + event: TestEvent::Relayers(Event::RegistrationUpdated { + relayer: REGISTER_RELAYER, + registration: Registration { valid_till: 150, stake: Stake::get() }, + }), + topics: vec![], + }), + ); + }); + } + + #[test] + fn register_fails_if_new_valid_till_is_lesser_than_previous() { + run_test(|| { + assert_ok!(Pallet::::register( + RuntimeOrigin::signed(REGISTER_RELAYER), + 150 + )); + + assert_noop!( + Pallet::::register(RuntimeOrigin::signed(REGISTER_RELAYER), 125), + Error::::CannotReduceRegistrationLease, + ); + }); + } + + #[test] + fn register_fails_if_it_cant_unreserve_some_balance_if_required_stake_decreases() { + run_test(|| { + RegisteredRelayers::::insert( + REGISTER_RELAYER, + Registration { valid_till: 150, stake: Stake::get() + 1 }, + ); + + assert_noop!( + Pallet::::register(RuntimeOrigin::signed(REGISTER_RELAYER), 150), + Error::::FailedToUnreserve, + ); + }); + } + + #[test] + fn register_unreserves_some_balance_if_required_stake_decreases() { + run_test(|| { + get_ready_for_events(); + + RegisteredRelayers::::insert( + REGISTER_RELAYER, + Registration { valid_till: 150, stake: Stake::get() + 1 }, + ); + TestStakeAndSlash::reserve(®ISTER_RELAYER, Stake::get() + 1).unwrap(); + assert_eq!(Balances::reserved_balance(REGISTER_RELAYER), Stake::get() + 1); + let free_balance = Balances::free_balance(REGISTER_RELAYER); + + assert_ok!(Pallet::::register( + RuntimeOrigin::signed(REGISTER_RELAYER), + 150 + )); + assert_eq!(Balances::reserved_balance(REGISTER_RELAYER), Stake::get()); + assert_eq!(Balances::free_balance(REGISTER_RELAYER), free_balance + 1); + assert_eq!( + Pallet::::registered_relayer(REGISTER_RELAYER), + Some(Registration { valid_till: 150, stake: Stake::get() }), + ); + + assert_eq!( + System::::events().last(), + Some(&EventRecord { + phase: Phase::Initialization, + event: TestEvent::Relayers(Event::RegistrationUpdated { + relayer: REGISTER_RELAYER, + registration: Registration { valid_till: 150, stake: Stake::get() } + }), + topics: vec![], + }), + ); + }); + } + + #[test] + fn register_fails_if_it_cant_reserve_some_balance() { + run_test(|| { + Balances::set_balance(®ISTER_RELAYER, 0); + assert_noop!( + Pallet::::register(RuntimeOrigin::signed(REGISTER_RELAYER), 150), + Error::::FailedToReserve, + ); + }); + } + + #[test] + fn register_fails_if_it_cant_reserve_some_balance_if_required_stake_increases() { + run_test(|| { + RegisteredRelayers::::insert( + REGISTER_RELAYER, + Registration { valid_till: 150, stake: Stake::get() - 1 }, + ); + Balances::set_balance(®ISTER_RELAYER, 0); + + assert_noop!( + Pallet::::register(RuntimeOrigin::signed(REGISTER_RELAYER), 150), + Error::::FailedToReserve, + ); + }); + } + + #[test] + fn register_reserves_some_balance_if_required_stake_increases() { + run_test(|| { + get_ready_for_events(); + + RegisteredRelayers::::insert( + REGISTER_RELAYER, + Registration { valid_till: 150, stake: Stake::get() - 1 }, + ); + TestStakeAndSlash::reserve(®ISTER_RELAYER, Stake::get() - 1).unwrap(); + + let free_balance = Balances::free_balance(REGISTER_RELAYER); + assert_ok!(Pallet::::register( + RuntimeOrigin::signed(REGISTER_RELAYER), + 150 + )); + assert_eq!(Balances::reserved_balance(REGISTER_RELAYER), Stake::get()); + assert_eq!(Balances::free_balance(REGISTER_RELAYER), free_balance - 1); + assert_eq!( + Pallet::::registered_relayer(REGISTER_RELAYER), + Some(Registration { valid_till: 150, stake: Stake::get() }), + ); + + assert_eq!( + System::::events().last(), + Some(&EventRecord { + phase: Phase::Initialization, + event: TestEvent::Relayers(Event::RegistrationUpdated { + relayer: REGISTER_RELAYER, + registration: Registration { valid_till: 150, stake: Stake::get() } + }), + topics: vec![], + }), + ); + }); + } + + #[test] + fn deregister_fails_if_not_registered() { + run_test(|| { + assert_noop!( + Pallet::::deregister(RuntimeOrigin::signed(REGISTER_RELAYER)), + Error::::NotRegistered, + ); + }); + } + + #[test] + fn deregister_fails_if_registration_is_still_active() { + run_test(|| { + assert_ok!(Pallet::::register( + RuntimeOrigin::signed(REGISTER_RELAYER), + 150 + )); + + System::::set_block_number(100); + + assert_noop!( + Pallet::::deregister(RuntimeOrigin::signed(REGISTER_RELAYER)), + Error::::RegistrationIsStillActive, + ); + }); + } + + #[test] + fn deregister_works() { + run_test(|| { + get_ready_for_events(); + + assert_ok!(Pallet::::register( + RuntimeOrigin::signed(REGISTER_RELAYER), + 150 + )); + + System::::set_block_number(151); + + let reserved_balance = Balances::reserved_balance(REGISTER_RELAYER); + let free_balance = Balances::free_balance(REGISTER_RELAYER); + assert_ok!(Pallet::::deregister(RuntimeOrigin::signed(REGISTER_RELAYER))); + assert_eq!( + Balances::reserved_balance(REGISTER_RELAYER), + reserved_balance - Stake::get() + ); + assert_eq!(Balances::free_balance(REGISTER_RELAYER), free_balance + Stake::get()); + + assert_eq!( + System::::events().last(), + Some(&EventRecord { + phase: Phase::Initialization, + event: TestEvent::Relayers(Event::Deregistered { relayer: REGISTER_RELAYER }), + topics: vec![], + }), + ); + }); + } + + #[test] + fn is_registration_active_is_false_for_unregistered_relayer() { + run_test(|| { + assert!(!Pallet::::is_registration_active(®ISTER_RELAYER)); + }); + } + + #[test] + fn is_registration_active_is_false_when_stake_is_too_low() { + run_test(|| { + RegisteredRelayers::::insert( + REGISTER_RELAYER, + Registration { valid_till: 150, stake: Stake::get() - 1 }, + ); + assert!(!Pallet::::is_registration_active(®ISTER_RELAYER)); + }); + } + + #[test] + fn is_registration_active_is_false_when_remaining_lease_is_too_low() { + run_test(|| { + System::::set_block_number(150 - Lease::get()); + + RegisteredRelayers::::insert( + REGISTER_RELAYER, + Registration { valid_till: 150, stake: Stake::get() }, + ); + assert!(!Pallet::::is_registration_active(®ISTER_RELAYER)); + }); + } + + #[test] + fn is_registration_active_is_true_when_relayer_is_properly_registeered() { + run_test(|| { + System::::set_block_number(150 - Lease::get()); + + RegisteredRelayers::::insert( + REGISTER_RELAYER, + Registration { valid_till: 151, stake: Stake::get() }, + ); + assert!(Pallet::::is_registration_active(®ISTER_RELAYER)); + }); + } } diff --git a/modules/relayers/src/mock.rs b/modules/relayers/src/mock.rs index fe8c586eecc..406a365f350 100644 --- a/modules/relayers/src/mock.rs +++ b/modules/relayers/src/mock.rs @@ -19,8 +19,10 @@ use crate as pallet_bridge_relayers; use bp_messages::LaneId; -use bp_relayers::{PaymentProcedure, RewardsAccountOwner, RewardsAccountParams}; -use frame_support::{parameter_types, weights::RuntimeDbWeight}; +use bp_relayers::{ + PayRewardFromAccount, PaymentProcedure, RewardsAccountOwner, RewardsAccountParams, +}; +use frame_support::{parameter_types, traits::fungible::Mutate, weights::RuntimeDbWeight}; use sp_core::H256; use sp_runtime::{ testing::Header as SubstrateHeader, @@ -29,6 +31,16 @@ use sp_runtime::{ pub type AccountId = u64; pub type Balance = u64; +pub type BlockNumber = u64; + +pub type TestStakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< + AccountId, + BlockNumber, + Balances, + ReserveId, + Stake, + Lease, +>; type Block = frame_system::mocking::MockBlock; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; @@ -47,13 +59,17 @@ frame_support::construct_runtime! { parameter_types! { pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { read: 1, write: 2 }; + pub const ExistentialDeposit: Balance = 1; + pub const ReserveId: [u8; 8] = *b"brdgrlrs"; + pub const Stake: Balance = 1_000; + pub const Lease: BlockNumber = 8; } impl frame_system::Config for TestRuntime { type RuntimeOrigin = RuntimeOrigin; type Index = u64; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type BlockNumber = BlockNumber; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; @@ -81,11 +97,11 @@ impl pallet_balances::Config for TestRuntime { type Balance = Balance; type DustRemoval = (); type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = frame_support::traits::ConstU64<1>; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = (); + type MaxReserves = ConstU32<1>; + type ReserveIdentifier = [u8; 8]; type HoldIdentifier = (); type FreezeIdentifier = (); type MaxHolds = ConstU32<0>; @@ -96,6 +112,7 @@ impl pallet_bridge_relayers::Config for TestRuntime { type RuntimeEvent = RuntimeEvent; type Reward = Balance; type PaymentProcedure = TestPaymentProcedure; + type StakeAndSlash = TestStakeAndSlash; type WeightInfo = (); } @@ -121,9 +138,18 @@ pub const REGULAR_RELAYER: AccountId = 1; /// Relayer that can't receive rewards. pub const FAILING_RELAYER: AccountId = 2; +/// Relayer that is able to register. +pub const REGISTER_RELAYER: AccountId = 42; + /// Payment procedure that rejects payments to the `FAILING_RELAYER`. pub struct TestPaymentProcedure; +impl TestPaymentProcedure { + pub fn rewards_account(params: RewardsAccountParams) -> AccountId { + PayRewardFromAccount::<(), AccountId>::rewards_account(params) + } +} + impl PaymentProcedure for TestPaymentProcedure { type Error = (); @@ -147,5 +173,10 @@ pub fn new_test_ext() -> sp_io::TestExternalities { /// Run pallet test. pub fn run_test(test: impl FnOnce() -> T) -> T { - new_test_ext().execute_with(test) + new_test_ext().execute_with(|| { + Balances::mint_into(®ISTER_RELAYER, ExistentialDeposit::get() + 10 * Stake::get()) + .unwrap(); + + test() + }) } diff --git a/modules/relayers/src/stake_adapter.rs b/modules/relayers/src/stake_adapter.rs new file mode 100644 index 00000000000..055b6a111ec --- /dev/null +++ b/modules/relayers/src/stake_adapter.rs @@ -0,0 +1,186 @@ +// Copyright 2019-2021 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 . + +//! Code that allows `NamedReservableCurrency` to be used as a `StakeAndSlash` +//! mechanism of the relayers pallet. + +use bp_relayers::{PayRewardFromAccount, RewardsAccountParams, StakeAndSlash}; +use codec::Codec; +use frame_support::traits::{tokens::BalanceStatus, NamedReservableCurrency}; +use sp_runtime::{traits::Get, DispatchError, DispatchResult}; +use sp_std::{fmt::Debug, marker::PhantomData}; + +/// `StakeAndSlash` that works with `NamedReservableCurrency` and uses named +/// reservations. +/// +/// **WARNING**: this implementation assumes that the relayers pallet is configured to +/// use the [`bp_relayers::PayRewardFromAccount`] as its relayers payment scheme. +pub struct StakeAndSlashNamed( + PhantomData<(AccountId, BlockNumber, Currency, ReserveId, Stake, Lease)>, +); + +impl + StakeAndSlash + for StakeAndSlashNamed +where + AccountId: Codec + Debug, + Currency: NamedReservableCurrency, + ReserveId: Get, + Stake: Get, + Lease: Get, +{ + type RequiredStake = Stake; + type RequiredRegistrationLease = Lease; + + fn reserve(relayer: &AccountId, amount: Currency::Balance) -> DispatchResult { + Currency::reserve_named(&ReserveId::get(), relayer, amount) + } + + fn unreserve(relayer: &AccountId, amount: Currency::Balance) -> Currency::Balance { + Currency::unreserve_named(&ReserveId::get(), relayer, amount) + } + + fn repatriate_reserved( + relayer: &AccountId, + beneficiary: RewardsAccountParams, + amount: Currency::Balance, + ) -> Result { + let beneficiary_account = + PayRewardFromAccount::<(), AccountId>::rewards_account(beneficiary); + Currency::repatriate_reserved_named( + &ReserveId::get(), + relayer, + &beneficiary_account, + amount, + BalanceStatus::Free, + ) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::mock::*; + + use frame_support::traits::fungible::Mutate; + + fn test_stake() -> Balance { + Stake::get() + } + + #[test] + fn reserve_works() { + run_test(|| { + assert!(TestStakeAndSlash::reserve(&1, test_stake()).is_err()); + assert_eq!(Balances::free_balance(1), 0); + assert_eq!(Balances::reserved_balance(1), 0); + + Balances::mint_into(&2, test_stake() - 1).unwrap(); + assert!(TestStakeAndSlash::reserve(&2, test_stake()).is_err()); + assert_eq!(Balances::free_balance(2), test_stake() - 1); + assert_eq!(Balances::reserved_balance(2), 0); + + Balances::mint_into(&3, test_stake() * 2).unwrap(); + assert_eq!(TestStakeAndSlash::reserve(&3, test_stake()), Ok(())); + assert_eq!(Balances::free_balance(3), test_stake()); + assert_eq!(Balances::reserved_balance(3), test_stake()); + }) + } + + #[test] + fn unreserve_works() { + run_test(|| { + assert_eq!(TestStakeAndSlash::unreserve(&1, test_stake()), test_stake()); + assert_eq!(Balances::free_balance(1), 0); + assert_eq!(Balances::reserved_balance(1), 0); + + Balances::mint_into(&2, test_stake() * 2).unwrap(); + TestStakeAndSlash::reserve(&2, test_stake() / 3).unwrap(); + assert_eq!( + TestStakeAndSlash::unreserve(&2, test_stake()), + test_stake() - test_stake() / 3 + ); + assert_eq!(Balances::free_balance(2), test_stake() * 2); + assert_eq!(Balances::reserved_balance(2), 0); + + Balances::mint_into(&3, test_stake() * 2).unwrap(); + TestStakeAndSlash::reserve(&3, test_stake()).unwrap(); + assert_eq!(TestStakeAndSlash::unreserve(&3, test_stake()), 0); + assert_eq!(Balances::free_balance(3), test_stake() * 2); + assert_eq!(Balances::reserved_balance(3), 0); + }) + } + + #[test] + fn repatriate_reserved_works() { + run_test(|| { + let beneficiary = TEST_REWARDS_ACCOUNT_PARAMS; + let beneficiary_account = TestPaymentProcedure::rewards_account(beneficiary); + + let mut expected_balance = ExistentialDeposit::get(); + Balances::mint_into(&beneficiary_account, expected_balance).unwrap(); + + assert_eq!( + TestStakeAndSlash::repatriate_reserved(&1, beneficiary, test_stake()), + Ok(test_stake()) + ); + assert_eq!(Balances::free_balance(1), 0); + assert_eq!(Balances::reserved_balance(1), 0); + assert_eq!(Balances::free_balance(beneficiary_account), expected_balance); + assert_eq!(Balances::reserved_balance(beneficiary_account), 0); + + expected_balance += test_stake() / 3; + Balances::mint_into(&2, test_stake() * 2).unwrap(); + TestStakeAndSlash::reserve(&2, test_stake() / 3).unwrap(); + assert_eq!( + TestStakeAndSlash::repatriate_reserved(&2, beneficiary, test_stake()), + Ok(test_stake() - test_stake() / 3) + ); + assert_eq!(Balances::free_balance(2), test_stake() * 2 - test_stake() / 3); + assert_eq!(Balances::reserved_balance(2), 0); + assert_eq!(Balances::free_balance(beneficiary_account), expected_balance); + assert_eq!(Balances::reserved_balance(beneficiary_account), 0); + + expected_balance += test_stake(); + Balances::mint_into(&3, test_stake() * 2).unwrap(); + TestStakeAndSlash::reserve(&3, test_stake()).unwrap(); + assert_eq!( + TestStakeAndSlash::repatriate_reserved(&3, beneficiary, test_stake()), + Ok(0) + ); + assert_eq!(Balances::free_balance(3), test_stake()); + assert_eq!(Balances::reserved_balance(3), 0); + assert_eq!(Balances::free_balance(beneficiary_account), expected_balance); + assert_eq!(Balances::reserved_balance(beneficiary_account), 0); + }) + } + + #[test] + fn repatriate_reserved_doesnt_work_when_beneficiary_account_is_missing() { + run_test(|| { + let beneficiary = TEST_REWARDS_ACCOUNT_PARAMS; + let beneficiary_account = TestPaymentProcedure::rewards_account(beneficiary); + + Balances::mint_into(&3, test_stake() * 2).unwrap(); + TestStakeAndSlash::reserve(&3, test_stake()).unwrap(); + assert!(TestStakeAndSlash::repatriate_reserved(&3, beneficiary, test_stake()).is_err()); + assert_eq!(Balances::free_balance(3), test_stake()); + assert_eq!(Balances::reserved_balance(3), test_stake()); + assert_eq!(Balances::free_balance(beneficiary_account), 0); + assert_eq!(Balances::reserved_balance(beneficiary_account), 0); + }); + } +} diff --git a/primitives/messages/src/target_chain.rs b/primitives/messages/src/target_chain.rs index 8496b90214c..3c2e8cf0cb0 100644 --- a/primitives/messages/src/target_chain.rs +++ b/primitives/messages/src/target_chain.rs @@ -83,7 +83,7 @@ pub trait SourceHeaderChain { } /// Called when inbound message is received. -pub trait MessageDispatch { +pub trait MessageDispatch { /// Decoded message payload type. Valid message may contain invalid payload. In this case /// message is delivered, but dispatch fails. Therefore, two separate types of payload /// (opaque `MessagePayload` used in delivery and this `DispatchPayload` used in dispatch). @@ -103,11 +103,7 @@ pub trait MessageDispatch { /// /// It is up to the implementers of this trait to determine whether the message /// is invalid (i.e. improperly encoded, has too large weight, ...) or not. - /// - /// If your configuration allows paying dispatch fee at the target chain, then - /// it must be paid inside this method to the `relayer_account`. fn dispatch( - relayer_account: &AccountId, message: DispatchMessage, ) -> MessageDispatchResult; } @@ -186,7 +182,7 @@ impl SourceHeaderChain } } -impl MessageDispatch +impl MessageDispatch for ForbidInboundMessages { type DispatchPayload = DispatchPayload; @@ -197,7 +193,6 @@ impl MessageDispatch, ) -> MessageDispatchResult { MessageDispatchResult { unspent_weight: Weight::zero(), dispatch_level_result: () } diff --git a/primitives/relayers/src/lib.rs b/primitives/relayers/src/lib.rs index f14b841fa9e..21f66a2ffa1 100644 --- a/primitives/relayers/src/lib.rs +++ b/primitives/relayers/src/lib.rs @@ -19,6 +19,8 @@ #![warn(missing_docs)] #![cfg_attr(not(feature = "std"), no_std)] +pub use registration::{Registration, StakeAndSlash}; + use bp_messages::LaneId; use bp_runtime::{ChainId, StorageDoubleMapKeyProvider}; use frame_support::{traits::tokens::Preservation, Blake2_128Concat, Identity}; @@ -30,6 +32,8 @@ use sp_runtime::{ }; use sp_std::{fmt::Debug, marker::PhantomData}; +mod registration; + /// The owner of the sovereign account that should pay the rewards. /// /// Each of the 2 final points connected by a bridge owns a sovereign account at each end of the diff --git a/primitives/relayers/src/registration.rs b/primitives/relayers/src/registration.rs new file mode 100644 index 00000000000..da64bdde379 --- /dev/null +++ b/primitives/relayers/src/registration.rs @@ -0,0 +1,121 @@ +// Copyright 2021 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 . + +//! Bridge relayers registration and slashing scheme. +//! +//! There is an option to add a refund-relayer signed extension that will compensate +//! relayer costs of the message delivery and confirmation transactions (as well as +//! required finality proofs). This extension boosts priority of message delivery +//! transactions, based on the number of bundled messages. So transaction with more +//! messages has larger priority than the transaction with less messages. +//! See [`bridge_runtime_common::priority_calculator`] for details; +//! +//! This encourages relayers to include more messages to their delivery transactions. +//! At the same time, we are not verifying storage proofs before boosting +//! priority. Instead, we simply trust relayer, when it says that transaction delivers +//! `N` messages. +//! +//! This allows relayers to submit transactions which declare large number of bundled +//! transactions to receive priority boost for free, potentially pushing actual delivery +//! transactions from the block (or even transaction queue). Such transactions are +//! not free, but their cost is relatively small. +//! +//! To alleviate that, we only boost transactions of relayers that have some stake +//! that guarantees that their transactions are valid. Such relayers get priority +//! for free, but they risk to lose their stake. + +use crate::RewardsAccountParams; + +use codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; +use sp_runtime::{ + traits::{Get, Zero}, + DispatchError, DispatchResult, +}; + +/// Relayer registration. +#[derive(Copy, Clone, Debug, Decode, Encode, Eq, PartialEq, TypeInfo, MaxEncodedLen)] +pub struct Registration { + /// The last block number, where this registration is considered active. + /// + /// Relayer has an option to renew his registration (this may be done before it + /// is spoiled as well). Starting from block `valid_till + 1`, relayer may `deregister` + /// himself and get his stake back. + /// + /// Please keep in mind that priority boost stops working some blocks before the + /// registration ends (see [`StakeAndSlash::RequiredRegistrationLease`]). + pub valid_till: BlockNumber, + /// Active relayer stake, which is mapped to the relayer reserved balance. + /// + /// If `stake` is less than the [`StakeAndSlash::RequiredStake`], the registration + /// is considered inactive even if `valid_till + 1` is not yet reached. + pub stake: Balance, +} + +/// Relayer stake-and-slash mechanism. +pub trait StakeAndSlash { + /// The stake that the relayer must have to have its transactions boosted. + type RequiredStake: Get; + /// Required **remaining** registration lease to be able to get transaction priority boost. + /// + /// If the difference between registration's `valid_till` and the current block number + /// is less than the `RequiredRegistrationLease`, it becomes inactive and relayer transaction + /// won't get priority boost. This period exists, because priority is calculated when + /// transaction is placed to the queue (and it is reevaluated periodically) and then some time + /// may pass before transaction will be included into the block. + type RequiredRegistrationLease: Get; + + /// Reserve the given amount at relayer account. + fn reserve(relayer: &AccountId, amount: Balance) -> DispatchResult; + /// `Unreserve` the given amount from relayer account. + /// + /// Returns amount that we have failed to `unreserve`. + fn unreserve(relayer: &AccountId, amount: Balance) -> Balance; + /// Slash up to `amount` from reserved balance of account `relayer` and send funds to given + /// `beneficiary`. + /// + /// Returns `Ok(_)` with non-zero balance if we have failed to repatriate some portion of stake. + fn repatriate_reserved( + relayer: &AccountId, + beneficiary: RewardsAccountParams, + amount: Balance, + ) -> Result; +} + +impl StakeAndSlash for () +where + Balance: Default + Zero, + BlockNumber: Default, +{ + type RequiredStake = (); + type RequiredRegistrationLease = (); + + fn reserve(_relayer: &AccountId, _amount: Balance) -> DispatchResult { + Ok(()) + } + + fn unreserve(_relayer: &AccountId, _amount: Balance) -> Balance { + Zero::zero() + } + + fn repatriate_reserved( + _relayer: &AccountId, + _beneficiary: RewardsAccountParams, + _amount: Balance, + ) -> Result { + Ok(Zero::zero()) + } +} diff --git a/relays/client-rialto-parachain/Cargo.toml b/relays/client-rialto-parachain/Cargo.toml index 4450dee3711..b6d5c423336 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.5.0", default-features = false, features = ["derive"] } -subxt = { version = "0.27.1", default-features = false, features = [] } +subxt = { version = "0.28.0", 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 3ea4a0ac2b5..1338d4938a3 100644 --- a/relays/client-rialto-parachain/src/codegen_runtime.rs +++ b/relays/client-rialto-parachain/src/codegen_runtime.rs @@ -22,5956 +22,24 @@ #[allow(clippy::all)] pub mod api { use super::api as root_mod; - pub static PALLETS: [&str; 16usize] = [ - "System", - "Timestamp", - "Sudo", - "TransactionPayment", - "ParachainSystem", - "ParachainInfo", - "Balances", - "Aura", - "AuraExt", - "XcmpQueue", - "PolkadotXcm", - "CumulusXcm", - "DmpQueue", - "BridgeRelayers", - "BridgeMillauGrandpa", - "BridgeMillauMessages", - ]; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub enum Event { - #[codec(index = 0)] - System(system::Event), - #[codec(index = 2)] - Sudo(sudo::Event), - #[codec(index = 3)] - TransactionPayment(transaction_payment::Event), - #[codec(index = 20)] - ParachainSystem(parachain_system::Event), - #[codec(index = 30)] - Balances(balances::Event), - #[codec(index = 50)] - XcmpQueue(xcmp_queue::Event), - #[codec(index = 51)] - PolkadotXcm(polkadot_xcm::Event), - #[codec(index = 52)] - CumulusXcm(cumulus_xcm::Event), - #[codec(index = 53)] - DmpQueue(dmp_queue::Event), - #[codec(index = 54)] - BridgeRelayers(bridge_relayers::Event), - #[codec(index = 55)] - BridgeMillauGrandpa(bridge_millau_grandpa::Event), - #[codec(index = 56)] - BridgeMillauMessages(bridge_millau_messages::Event), - } - pub mod system { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct Remark { - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - pub struct SetHeapPages { - pub pages: ::core::primitive::u64, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetCode { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetCodeWithoutChecks { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetStorage { - pub items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct KillStorage { - pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct KillPrefix { - pub prefix: ::std::vec::Vec<::core::primitive::u8>, - pub subkeys: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct RemarkWithEvent { - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Make some on-chain remark."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`"] - pub fn remark( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "remark", - Remark { remark }, - [ - 101u8, 80u8, 195u8, 226u8, 224u8, 247u8, 60u8, 128u8, 3u8, 101u8, 51u8, - 147u8, 96u8, 126u8, 76u8, 230u8, 194u8, 227u8, 191u8, 73u8, 160u8, - 146u8, 87u8, 147u8, 243u8, 28u8, 228u8, 116u8, 224u8, 181u8, 129u8, - 160u8, - ], - ) - } - #[doc = "Set the number of pages in the WebAssembly environment's heap."] - pub fn set_heap_pages( - &self, - pages: ::core::primitive::u64, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "set_heap_pages", - SetHeapPages { pages }, - [ - 43u8, 103u8, 128u8, 49u8, 156u8, 136u8, 11u8, 204u8, 80u8, 6u8, 244u8, - 86u8, 171u8, 44u8, 140u8, 225u8, 142u8, 198u8, 43u8, 87u8, 26u8, 45u8, - 125u8, 222u8, 165u8, 254u8, 172u8, 158u8, 39u8, 178u8, 86u8, 87u8, - ], - ) - } - #[doc = "Set the new runtime code."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] - pub fn set_code( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "set_code", - SetCode { code }, - [ - 27u8, 104u8, 244u8, 205u8, 188u8, 254u8, 121u8, 13u8, 106u8, 120u8, - 244u8, 108u8, 97u8, 84u8, 100u8, 68u8, 26u8, 69u8, 93u8, 128u8, 107u8, - 4u8, 3u8, 142u8, 13u8, 134u8, 196u8, 62u8, 113u8, 181u8, 14u8, 40u8, - ], - ) - } - #[doc = "Set the new runtime code without doing any checks of the given `code`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(C)` where `C` length of `code`"] - pub fn set_code_without_checks( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "set_code_without_checks", - SetCodeWithoutChecks { code }, - [ - 102u8, 160u8, 125u8, 235u8, 30u8, 23u8, 45u8, 239u8, 112u8, 148u8, - 159u8, 158u8, 42u8, 93u8, 206u8, 94u8, 80u8, 250u8, 66u8, 195u8, 60u8, - 40u8, 142u8, 169u8, 183u8, 80u8, 80u8, 96u8, 3u8, 231u8, 99u8, 216u8, - ], - ) - } - #[doc = "Set some items of storage."] - pub fn set_storage( - &self, - items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "set_storage", - SetStorage { items }, - [ - 74u8, 43u8, 106u8, 255u8, 50u8, 151u8, 192u8, 155u8, 14u8, 90u8, 19u8, - 45u8, 165u8, 16u8, 235u8, 242u8, 21u8, 131u8, 33u8, 172u8, 119u8, 78u8, - 140u8, 10u8, 107u8, 202u8, 122u8, 235u8, 181u8, 191u8, 22u8, 116u8, - ], - ) - } - #[doc = "Kill some items from storage."] - pub fn kill_storage( - &self, - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "kill_storage", - KillStorage { keys }, - [ - 174u8, 174u8, 13u8, 174u8, 75u8, 138u8, 128u8, 235u8, 222u8, 216u8, - 85u8, 18u8, 198u8, 1u8, 138u8, 70u8, 19u8, 108u8, 209u8, 41u8, 228u8, - 67u8, 130u8, 230u8, 160u8, 207u8, 11u8, 180u8, 139u8, 242u8, 41u8, - 15u8, - ], - ) - } - #[doc = "Kill all storage items with a key that starts with the given prefix."] - #[doc = ""] - #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] - #[doc = "the prefix we are removing to accurately calculate the weight of this function."] - pub fn kill_prefix( - &self, - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "kill_prefix", - KillPrefix { prefix, subkeys }, - [ - 203u8, 116u8, 217u8, 42u8, 154u8, 215u8, 77u8, 217u8, 13u8, 22u8, - 193u8, 2u8, 128u8, 115u8, 179u8, 115u8, 187u8, 218u8, 129u8, 34u8, - 80u8, 4u8, 173u8, 120u8, 92u8, 35u8, 237u8, 112u8, 201u8, 207u8, 200u8, - 48u8, - ], - ) - } - #[doc = "Make some on-chain remark and emit event."] - pub fn remark_with_event( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "remark_with_event", - RemarkWithEvent { remark }, - [ - 123u8, 225u8, 180u8, 179u8, 144u8, 74u8, 27u8, 85u8, 101u8, 75u8, - 134u8, 44u8, 181u8, 25u8, 183u8, 158u8, 14u8, 213u8, 56u8, 225u8, - 136u8, 88u8, 26u8, 114u8, 178u8, 43u8, 176u8, 43u8, 240u8, 84u8, 116u8, - 46u8, - ], - ) - } - } - } - #[doc = "Event for the System pallet."] - pub type Event = runtime_types::frame_system::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An extrinsic completed successfully."] - pub struct ExtrinsicSuccess { - pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - } - impl ::subxt::events::StaticEvent for ExtrinsicSuccess { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "ExtrinsicSuccess"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An extrinsic failed."] - pub struct ExtrinsicFailed { - pub dispatch_error: runtime_types::sp_runtime::DispatchError, - pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, - } - impl ::subxt::events::StaticEvent for ExtrinsicFailed { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "ExtrinsicFailed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "`:code` was updated."] - pub struct CodeUpdated; - impl ::subxt::events::StaticEvent for CodeUpdated { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "CodeUpdated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A new account was created."] - pub struct NewAccount { - pub account: ::sp_core::crypto::AccountId32, - } - impl ::subxt::events::StaticEvent for NewAccount { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "NewAccount"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An account was reaped."] - pub struct KilledAccount { - pub account: ::sp_core::crypto::AccountId32, - } - impl ::subxt::events::StaticEvent for KilledAccount { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "KilledAccount"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "On on-chain remark happened."] - pub struct Remarked { - pub sender: ::sp_core::crypto::AccountId32, - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Remarked { - const PALLET: &'static str = "System"; - const EVENT: &'static str = "Remarked"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The full account information for a particular account ID."] - pub fn account( - &self, - _0: impl ::std::borrow::Borrow<::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::types::AccountData< - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Account", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 248u8, 178u8, 160u8, 222u8, 45u8, 231u8, 115u8, 164u8, 98u8, 184u8, - 174u8, 206u8, 149u8, 190u8, 175u8, 34u8, 202u8, 230u8, 69u8, 218u8, - 83u8, 43u8, 170u8, 41u8, 106u8, 77u8, 233u8, 97u8, 114u8, 14u8, 155u8, - 131u8, - ], - ) - } - #[doc = " The full account information for a particular account ID."] - pub fn account_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::types::AccountData< - ::core::primitive::u128, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Account", - Vec::new(), - [ - 248u8, 178u8, 160u8, 222u8, 45u8, 231u8, 115u8, 164u8, 98u8, 184u8, - 174u8, 206u8, 149u8, 190u8, 175u8, 34u8, 202u8, 230u8, 69u8, 218u8, - 83u8, 43u8, 170u8, 41u8, 106u8, 77u8, 233u8, 97u8, 114u8, 14u8, 155u8, - 131u8, - ], - ) - } - #[doc = " Total extrinsics count for the current block."] - pub fn extrinsic_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ExtrinsicCount", - vec![], - [ - 223u8, 60u8, 201u8, 120u8, 36u8, 44u8, 180u8, 210u8, 242u8, 53u8, - 222u8, 154u8, 123u8, 176u8, 249u8, 8u8, 225u8, 28u8, 232u8, 4u8, 136u8, - 41u8, 151u8, 82u8, 189u8, 149u8, 49u8, 166u8, 139u8, 9u8, 163u8, 231u8, - ], - ) - } - #[doc = " The current weight for the block."] - pub fn block_weight( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_support::dispatch::PerDispatchClass< - ::sp_weights::Weight, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "BlockWeight", - vec![], - [ - 120u8, 67u8, 71u8, 163u8, 36u8, 202u8, 52u8, 106u8, 143u8, 155u8, - 144u8, 87u8, 142u8, 241u8, 232u8, 183u8, 56u8, 235u8, 27u8, 237u8, - 20u8, 202u8, 33u8, 85u8, 189u8, 0u8, 28u8, 52u8, 198u8, 40u8, 219u8, - 54u8, - ], - ) - } - #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] - pub fn all_extrinsics_len( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "AllExtrinsicsLen", - vec![], - [ - 202u8, 145u8, 209u8, 225u8, 40u8, 220u8, 174u8, 74u8, 93u8, 164u8, - 254u8, 248u8, 254u8, 192u8, 32u8, 117u8, 96u8, 149u8, 53u8, 145u8, - 219u8, 64u8, 234u8, 18u8, 217u8, 200u8, 203u8, 141u8, 145u8, 28u8, - 134u8, 60u8, - ], - ) - } - #[doc = " Map of block numbers to block hashes."] - pub fn block_hash( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "BlockHash", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, 195u8, - 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, 106u8, 20u8, 168u8, - 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, 149u8, 200u8, 4u8, 220u8, 237u8, - ], - ) - } - #[doc = " Map of block numbers to block hashes."] - pub fn block_hash_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "BlockHash", - Vec::new(), - [ - 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, 195u8, - 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, 106u8, 20u8, 168u8, - 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, 149u8, 200u8, 4u8, 220u8, 237u8, - ], - ) - } - #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ExtrinsicData", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, 238u8, 211u8, - 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, 125u8, 98u8, 23u8, 241u8, - 59u8, 49u8, 86u8, 126u8, 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, - ], - ) - } - #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ExtrinsicData", - Vec::new(), - [ - 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, 238u8, 211u8, - 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, 125u8, 98u8, 23u8, 241u8, - 59u8, 49u8, 86u8, 126u8, 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, - ], - ) - } - #[doc = " The current block number being processed. Set by `execute_block`."] - pub fn number( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Number", - vec![], - [ - 228u8, 96u8, 102u8, 190u8, 252u8, 130u8, 239u8, 172u8, 126u8, 235u8, - 246u8, 139u8, 208u8, 15u8, 88u8, 245u8, 141u8, 232u8, 43u8, 204u8, - 36u8, 87u8, 211u8, 141u8, 187u8, 68u8, 236u8, 70u8, 193u8, 235u8, - 164u8, 191u8, - ], - ) - } - #[doc = " Hash of the previous block."] - pub fn parent_hash( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ParentHash", - vec![], - [ - 232u8, 206u8, 177u8, 119u8, 38u8, 57u8, 233u8, 50u8, 225u8, 49u8, - 169u8, 176u8, 210u8, 51u8, 231u8, 176u8, 234u8, 186u8, 188u8, 112u8, - 15u8, 152u8, 195u8, 232u8, 201u8, 97u8, 208u8, 249u8, 9u8, 163u8, 69u8, - 36u8, - ], - ) - } - #[doc = " Digest of the current block, also part of the block header."] - pub fn digest( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::sp_runtime::generic::Digest>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Digest", - vec![], - [ - 83u8, 141u8, 200u8, 132u8, 182u8, 55u8, 197u8, 122u8, 13u8, 159u8, - 31u8, 42u8, 60u8, 191u8, 89u8, 221u8, 242u8, 47u8, 199u8, 213u8, 48u8, - 216u8, 131u8, 168u8, 245u8, 82u8, 56u8, 190u8, 62u8, 69u8, 96u8, 37u8, - ], - ) - } - #[doc = " Events deposited for the current block."] - #[doc = ""] - #[doc = " NOTE: The item is unbound and should therefore never be read on chain."] - #[doc = " It could otherwise inflate the PoV size of a block."] - #[doc = ""] - #[doc = " Events have a large in-memory size. Box the events to not go out-of-memory"] - #[doc = " just in case someone still reads them from within the runtime."] - pub fn events( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::rialto_parachain_runtime::RuntimeEvent, - ::subxt::utils::H256, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "Events", - vec![], - [ - 76u8, 19u8, 44u8, 121u8, 59u8, 168u8, 101u8, 101u8, 248u8, 3u8, 172u8, - 27u8, 249u8, 200u8, 147u8, 17u8, 4u8, 102u8, 186u8, 6u8, 152u8, 62u8, - 76u8, 195u8, 45u8, 188u8, 191u8, 30u8, 134u8, 78u8, 199u8, 93u8, - ], - ) - } - #[doc = " The number of events in the `Events` list."] - pub fn event_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "EventCount", - vec![], - [ - 236u8, 93u8, 90u8, 177u8, 250u8, 211u8, 138u8, 187u8, 26u8, 208u8, - 203u8, 113u8, 221u8, 233u8, 227u8, 9u8, 249u8, 25u8, 202u8, 185u8, - 161u8, 144u8, 167u8, 104u8, 127u8, 187u8, 38u8, 18u8, 52u8, 61u8, 66u8, - 112u8, - ], - ) - } - #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] - #[doc = " of events in the `>` list."] - #[doc = ""] - #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] - #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] - #[doc = " in case of changes fetch the list of events of interest."] - #[doc = ""] - #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] - #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] - #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "EventTopics", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, 1u8, 129u8, - 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, 139u8, 196u8, 154u8, - 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, 176u8, 232u8, 82u8, 223u8, - 38u8, - ], - ) - } - #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] - #[doc = " of events in the `>` list."] - #[doc = ""] - #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] - #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] - #[doc = " in case of changes fetch the list of events of interest."] - #[doc = ""] - #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] - #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] - #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "EventTopics", - Vec::new(), - [ - 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, 1u8, 129u8, - 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, 139u8, 196u8, 154u8, - 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, 176u8, 232u8, 82u8, 223u8, - 38u8, - ], - ) - } - #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] - pub fn last_runtime_upgrade( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::LastRuntimeUpgradeInfo, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "LastRuntimeUpgrade", - vec![], - [ - 52u8, 37u8, 117u8, 111u8, 57u8, 130u8, 196u8, 14u8, 99u8, 77u8, 91u8, - 126u8, 178u8, 249u8, 78u8, 34u8, 9u8, 194u8, 92u8, 105u8, 113u8, 81u8, - 185u8, 127u8, 245u8, 184u8, 60u8, 29u8, 234u8, 182u8, 96u8, 196u8, - ], - ) - } - #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] - pub fn upgraded_to_u32_ref_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "UpgradedToU32RefCount", - vec![], - [ - 171u8, 88u8, 244u8, 92u8, 122u8, 67u8, 27u8, 18u8, 59u8, 175u8, 175u8, - 178u8, 20u8, 150u8, 213u8, 59u8, 222u8, 141u8, 32u8, 107u8, 3u8, 114u8, - 83u8, 250u8, 180u8, 233u8, 152u8, 54u8, 187u8, 99u8, 131u8, 204u8, - ], - ) - } - #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] - #[doc = " (default) if not."] - pub fn upgraded_to_triple_ref_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "UpgradedToTripleRefCount", - vec![], - [ - 90u8, 33u8, 56u8, 86u8, 90u8, 101u8, 89u8, 133u8, 203u8, 56u8, 201u8, - 210u8, 244u8, 232u8, 150u8, 18u8, 51u8, 105u8, 14u8, 230u8, 103u8, - 155u8, 246u8, 99u8, 53u8, 207u8, 225u8, 128u8, 186u8, 76u8, 40u8, - 185u8, - ], - ) - } - #[doc = " The execution phase of the block."] - pub fn execution_phase( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "System", - "ExecutionPhase", - vec![], - [ - 230u8, 183u8, 221u8, 135u8, 226u8, 223u8, 55u8, 104u8, 138u8, 224u8, - 103u8, 156u8, 222u8, 99u8, 203u8, 199u8, 164u8, 168u8, 193u8, 133u8, - 201u8, 155u8, 63u8, 95u8, 17u8, 206u8, 165u8, 123u8, 161u8, 33u8, - 172u8, 93u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Block & extrinsics weights: base values and limits."] - pub fn block_weights( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::limits::BlockWeights, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "System", - "BlockWeights", - [ - 118u8, 253u8, 239u8, 217u8, 145u8, 115u8, 85u8, 86u8, 172u8, 248u8, - 139u8, 32u8, 158u8, 126u8, 172u8, 188u8, 197u8, 105u8, 145u8, 235u8, - 171u8, 50u8, 31u8, 225u8, 167u8, 187u8, 241u8, 87u8, 6u8, 17u8, 234u8, - 185u8, - ], - ) - } - #[doc = " The maximum length of a block (in bytes)."] - pub fn block_length( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::limits::BlockLength, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "System", - "BlockLength", - [ - 116u8, 184u8, 225u8, 228u8, 207u8, 203u8, 4u8, 220u8, 234u8, 198u8, - 150u8, 108u8, 205u8, 87u8, 194u8, 131u8, 229u8, 51u8, 140u8, 4u8, 47u8, - 12u8, 200u8, 144u8, 153u8, 62u8, 51u8, 39u8, 138u8, 205u8, 203u8, - 236u8, - ], - ) - } - #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] - pub fn block_hash_count( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "System", - "BlockHashCount", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The weight of runtime database operations the runtime can invoke."] - pub fn db_weight( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType, - > { - ::subxt::constants::StaticConstantAddress::new( - "System", - "DbWeight", - [ - 124u8, 162u8, 190u8, 149u8, 49u8, 177u8, 162u8, 231u8, 62u8, 167u8, - 199u8, 181u8, 43u8, 232u8, 185u8, 116u8, 195u8, 51u8, 233u8, 223u8, - 20u8, 129u8, 246u8, 13u8, 65u8, 180u8, 64u8, 9u8, 157u8, 59u8, 245u8, - 118u8, - ], - ) - } - #[doc = " Get the chain's current version."] - pub fn version( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType, - > { - ::subxt::constants::StaticConstantAddress::new( - "System", - "Version", - [ - 93u8, 98u8, 57u8, 243u8, 229u8, 8u8, 234u8, 231u8, 72u8, 230u8, 139u8, - 47u8, 63u8, 181u8, 17u8, 2u8, 220u8, 231u8, 104u8, 237u8, 185u8, 143u8, - 165u8, 253u8, 188u8, 76u8, 147u8, 12u8, 170u8, 26u8, 74u8, 200u8, - ], - ) - } - #[doc = " The designated SS58 prefix of this chain."] - #[doc = ""] - #[doc = " This replaces the \"ss58Format\" property declared in the chain spec. Reason is"] - #[doc = " that the runtime should know about the prefix in order to make use of it as"] - #[doc = " an identifier of the chain."] - pub fn ss58_prefix( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, - > { - ::subxt::constants::StaticConstantAddress::new( - "System", - "SS58Prefix", - [ - 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, - 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, - 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, - ], - ) - } - } - } - } - pub mod timestamp { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct Set { - #[codec(compact)] - pub now: ::core::primitive::u64, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Set the current time."] - #[doc = ""] - #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] - #[doc = "phase, if this call hasn't been invoked by that time."] - #[doc = ""] - #[doc = "The timestamp should be greater than the previous one by the amount specified by"] - #[doc = "`MinimumPeriod`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Inherent`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] - #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in"] - #[doc = " `on_finalize`)"] - #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] - pub fn set( - &self, - now: ::core::primitive::u64, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Timestamp", - "set", - Set { now }, - [ - 6u8, 97u8, 172u8, 236u8, 118u8, 238u8, 228u8, 114u8, 15u8, 115u8, - 102u8, 85u8, 66u8, 151u8, 16u8, 33u8, 187u8, 17u8, 166u8, 88u8, 127u8, - 214u8, 182u8, 51u8, 168u8, 88u8, 43u8, 101u8, 185u8, 8u8, 1u8, 28u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Current time for the current block."] - pub fn now( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Timestamp", - "Now", - vec![], - [ - 148u8, 53u8, 50u8, 54u8, 13u8, 161u8, 57u8, 150u8, 16u8, 83u8, 144u8, - 221u8, 59u8, 75u8, 158u8, 130u8, 39u8, 123u8, 106u8, 134u8, 202u8, - 185u8, 83u8, 85u8, 60u8, 41u8, 120u8, 96u8, 210u8, 34u8, 2u8, 250u8, - ], - ) - } - #[doc = " Did the timestamp get updated in this block?"] - pub fn did_update( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Timestamp", - "DidUpdate", - vec![], - [ - 70u8, 13u8, 92u8, 186u8, 80u8, 151u8, 167u8, 90u8, 158u8, 232u8, 175u8, - 13u8, 103u8, 135u8, 2u8, 78u8, 16u8, 6u8, 39u8, 158u8, 167u8, 85u8, - 27u8, 47u8, 122u8, 73u8, 127u8, 26u8, 35u8, 168u8, 72u8, 204u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum period between blocks. Beware that this is different to the *expected*"] - #[doc = " period that the block production apparatus provides. Your chosen consensus system will"] - #[doc = " generally work with this to determine a sensible block time. e.g. For Aura, it will be"] - #[doc = " double this period on default settings."] - pub fn minimum_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Timestamp", - "MinimumPeriod", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, - ], - ) - } - } - } - } - pub mod sudo { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct Sudo { - pub call: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SudoUncheckedWeight { - pub call: ::std::boxed::Box, - pub weight: ::sp_weights::Weight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetKey { - pub new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SudoAs { - pub who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - pub call: ::std::boxed::Box, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] - pub fn sudo( - &self, - call: runtime_types::rialto_parachain_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Sudo", - "sudo", - Sudo { call: ::std::boxed::Box::new(call) }, - [ - 19u8, 178u8, 172u8, 30u8, 28u8, 209u8, 160u8, 61u8, 76u8, 239u8, 71u8, - 124u8, 21u8, 34u8, 233u8, 176u8, 100u8, 90u8, 198u8, 118u8, 117u8, 2u8, - 147u8, 7u8, 109u8, 1u8, 32u8, 35u8, 99u8, 0u8, 107u8, 145u8, - ], - ) - } - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - #[doc = "This function does not check the weight of the call, and instead allows the"] - #[doc = "Sudo user to specify the weight of the call."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] - pub fn sudo_unchecked_weight( - &self, - call: runtime_types::rialto_parachain_runtime::RuntimeCall, - weight: ::sp_weights::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Sudo", - "sudo_unchecked_weight", - SudoUncheckedWeight { call: ::std::boxed::Box::new(call), weight }, - [ - 145u8, 160u8, 12u8, 105u8, 228u8, 240u8, 115u8, 105u8, 220u8, 99u8, - 215u8, 228u8, 115u8, 71u8, 109u8, 28u8, 149u8, 247u8, 159u8, 216u8, - 76u8, 71u8, 68u8, 87u8, 254u8, 146u8, 185u8, 174u8, 251u8, 209u8, 72u8, - 122u8, - ], - ) - } - #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] - #[doc = "key."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] - pub fn set_key( - &self, - new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Sudo", - "set_key", - SetKey { new }, - [ - 23u8, 224u8, 218u8, 169u8, 8u8, 28u8, 111u8, 199u8, 26u8, 88u8, 225u8, - 105u8, 17u8, 19u8, 87u8, 156u8, 97u8, 67u8, 89u8, 173u8, 70u8, 0u8, - 5u8, 246u8, 198u8, 135u8, 182u8, 180u8, 44u8, 9u8, 212u8, 95u8, - ], - ) - } - #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] - #[doc = "a given account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] - pub fn sudo_as( - &self, - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - call: runtime_types::rialto_parachain_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Sudo", - "sudo_as", - SudoAs { who, call: ::std::boxed::Box::new(call) }, - [ - 229u8, 45u8, 129u8, 96u8, 54u8, 29u8, 159u8, 77u8, 210u8, 144u8, 29u8, - 97u8, 127u8, 133u8, 122u8, 110u8, 152u8, 194u8, 211u8, 246u8, 97u8, - 197u8, 187u8, 203u8, 46u8, 12u8, 104u8, 125u8, 15u8, 226u8, 28u8, - 183u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_sudo::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A sudo just took place. \\[result\\]"] - pub struct Sudid { - pub sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Sudid { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "Sudid"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "The \\[sudoer\\] just switched identity; the old key is supplied if one existed."] - pub struct KeyChanged { - pub old_sudoer: ::core::option::Option<::sp_core::crypto::AccountId32>, - } - impl ::subxt::events::StaticEvent for KeyChanged { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "KeyChanged"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A sudo just took place. \\[result\\]"] - pub struct SudoAsDone { - pub sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for SudoAsDone { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "SudoAsDone"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The `AccountId` of the sudo key."] - pub fn key( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::sp_core::crypto::AccountId32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Sudo", - "Key", - vec![], - [ - 244u8, 73u8, 188u8, 136u8, 218u8, 163u8, 68u8, 179u8, 122u8, 173u8, - 34u8, 108u8, 137u8, 28u8, 182u8, 16u8, 196u8, 92u8, 138u8, 34u8, 102u8, - 80u8, 199u8, 88u8, 107u8, 207u8, 36u8, 22u8, 168u8, 167u8, 20u8, 142u8, - ], - ) - } - } - } - } - pub mod transaction_payment { - use super::{root_mod, runtime_types}; - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] - #[doc = "has been paid by `who`."] - pub struct TransactionFeePaid { - pub who: ::sp_core::crypto::AccountId32, - pub actual_fee: ::core::primitive::u128, - pub tip: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for TransactionFeePaid { - const PALLET: &'static str = "TransactionPayment"; - const EVENT: &'static str = "TransactionFeePaid"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn next_fee_multiplier( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::fixed_point::FixedU128, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionPayment", - "NextFeeMultiplier", - vec![], - [ - 210u8, 0u8, 206u8, 165u8, 183u8, 10u8, 206u8, 52u8, 14u8, 90u8, 218u8, - 197u8, 189u8, 125u8, 113u8, 216u8, 52u8, 161u8, 45u8, 24u8, 245u8, - 237u8, 121u8, 41u8, 106u8, 29u8, 45u8, 129u8, 250u8, 203u8, 206u8, - 180u8, - ], - ) - } - pub fn storage_version( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_transaction_payment::Releases, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionPayment", - "StorageVersion", - vec![], - [ - 219u8, 243u8, 82u8, 176u8, 65u8, 5u8, 132u8, 114u8, 8u8, 82u8, 176u8, - 200u8, 97u8, 150u8, 177u8, 164u8, 166u8, 11u8, 34u8, 12u8, 12u8, 198u8, - 58u8, 191u8, 186u8, 221u8, 221u8, 119u8, 181u8, 253u8, 154u8, 228u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] - #[doc = " `priority`"] - #[doc = ""] - #[doc = " This value is multipled by the `final_fee` to obtain a \"virtual tip\" that is later"] - #[doc = " added to a tip component in regular `priority` calculations."] - #[doc = " It means that a `Normal` transaction can front-run a similarly-sized `Operational`"] - #[doc = " extrinsic (with no tip), by including a tip value greater than the virtual tip."] - #[doc = ""] - #[doc = " ```rust,ignore"] - #[doc = " // For `Normal`"] - #[doc = " let priority = priority_calc(tip);"] - #[doc = ""] - #[doc = " // For `Operational`"] - #[doc = " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;"] - #[doc = " let priority = priority_calc(tip + virtual_tip);"] - #[doc = " ```"] - #[doc = ""] - #[doc = " Note that since we use `final_fee` the multiplier applies also to the regular `tip`"] - #[doc = " sent with the transaction. So, not only does the transaction get a priority bump based"] - #[doc = " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`"] - #[doc = " transactions."] - pub fn operational_fee_multiplier( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u8>, - > { - ::subxt::constants::StaticConstantAddress::new( - "TransactionPayment", - "OperationalFeeMultiplier", - [ - 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, - 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, - 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, - 165u8, - ], - ) - } - } - } - } - pub mod parachain_system { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetValidationData { - pub data: - runtime_types::cumulus_primitives_parachain_inherent::ParachainInherentData, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SudoSendUpwardMessage { - pub message: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct AuthorizeUpgrade { - pub code_hash: ::subxt::utils::H256, - pub check_version: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct EnactAuthorizedUpgrade { - pub code: ::std::vec::Vec<::core::primitive::u8>, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Set the current validation data."] - #[doc = ""] - #[doc = "This should be invoked exactly once per block. It will panic at the finalization"] - #[doc = "phase if the call was not invoked."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Inherent`"] - #[doc = ""] - #[doc = "As a side effect, this function upgrades the current validation function"] - #[doc = "if the appropriate time has come."] - pub fn set_validation_data( - &self, - data : runtime_types :: cumulus_primitives_parachain_inherent :: ParachainInherentData, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ParachainSystem", - "set_validation_data", - SetValidationData { data }, - [ - 200u8, 80u8, 163u8, 177u8, 184u8, 117u8, 61u8, 203u8, 244u8, 214u8, - 106u8, 151u8, 128u8, 131u8, 254u8, 120u8, 254u8, 76u8, 104u8, 39u8, - 215u8, 227u8, 233u8, 254u8, 26u8, 62u8, 17u8, 42u8, 19u8, 127u8, 108u8, - 242u8, - ], - ) - } - pub fn sudo_send_upward_message( - &self, - message: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ParachainSystem", - "sudo_send_upward_message", - SudoSendUpwardMessage { message }, - [ - 127u8, 79u8, 45u8, 183u8, 190u8, 205u8, 184u8, 169u8, 255u8, 191u8, - 86u8, 154u8, 134u8, 25u8, 249u8, 63u8, 47u8, 194u8, 108u8, 62u8, 60u8, - 170u8, 81u8, 240u8, 113u8, 48u8, 181u8, 171u8, 95u8, 63u8, 26u8, 222u8, - ], - ) - } - #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] - #[doc = "later."] - #[doc = ""] - #[doc = "The `check_version` parameter sets a boolean flag for whether or not the runtime's spec"] - #[doc = "version and name should be verified on upgrade. Since the authorization only has a hash,"] - #[doc = "it cannot actually perform the verification."] - #[doc = ""] - #[doc = "This call requires Root origin."] - pub fn authorize_upgrade( - &self, - code_hash: ::subxt::utils::H256, - check_version: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ParachainSystem", - "authorize_upgrade", - AuthorizeUpgrade { code_hash, check_version }, - [ - 208u8, 115u8, 62u8, 35u8, 70u8, 223u8, 65u8, 57u8, 216u8, 44u8, 169u8, - 249u8, 90u8, 112u8, 17u8, 208u8, 30u8, 131u8, 102u8, 131u8, 240u8, - 217u8, 230u8, 214u8, 145u8, 198u8, 55u8, 13u8, 217u8, 51u8, 178u8, - 141u8, - ], - ) - } - #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] - #[doc = ""] - #[doc = "If the authorization required a version check, this call will ensure the spec name"] - #[doc = "remains unchanged and that the spec version has increased."] - #[doc = ""] - #[doc = "Note that this function will not apply the new `code`, but only attempt to schedule the"] - #[doc = "upgrade with the Relay Chain."] - #[doc = ""] - #[doc = "All origins are allowed."] - pub fn enact_authorized_upgrade( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ParachainSystem", - "enact_authorized_upgrade", - EnactAuthorizedUpgrade { code }, - [ - 43u8, 157u8, 1u8, 230u8, 134u8, 72u8, 230u8, 35u8, 159u8, 13u8, 201u8, - 134u8, 184u8, 94u8, 167u8, 13u8, 108u8, 157u8, 145u8, 166u8, 119u8, - 37u8, 51u8, 121u8, 252u8, 255u8, 48u8, 251u8, 126u8, 152u8, 247u8, 5u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::cumulus_pallet_parachain_system::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "The validation function has been scheduled to apply."] - pub struct ValidationFunctionStored; - impl ::subxt::events::StaticEvent for ValidationFunctionStored { - const PALLET: &'static str = "ParachainSystem"; - const EVENT: &'static str = "ValidationFunctionStored"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "The validation function was applied as of the contained relay chain block number."] - pub struct ValidationFunctionApplied { - pub relay_chain_block_num: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ValidationFunctionApplied { - const PALLET: &'static str = "ParachainSystem"; - const EVENT: &'static str = "ValidationFunctionApplied"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "The relay-chain aborted the upgrade process."] - pub struct ValidationFunctionDiscarded; - impl ::subxt::events::StaticEvent for ValidationFunctionDiscarded { - const PALLET: &'static str = "ParachainSystem"; - const EVENT: &'static str = "ValidationFunctionDiscarded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An upgrade has been authorized."] - pub struct UpgradeAuthorized { - pub code_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for UpgradeAuthorized { - const PALLET: &'static str = "ParachainSystem"; - const EVENT: &'static str = "UpgradeAuthorized"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Some downward messages have been received and will be processed."] - pub struct DownwardMessagesReceived { - pub count: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for DownwardMessagesReceived { - const PALLET: &'static str = "ParachainSystem"; - const EVENT: &'static str = "DownwardMessagesReceived"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward messages were processed using the given weight."] - pub struct DownwardMessagesProcessed { - pub weight_used: ::sp_weights::Weight, - pub dmq_head: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for DownwardMessagesProcessed { - const PALLET: &'static str = "ParachainSystem"; - const EVENT: &'static str = "DownwardMessagesProcessed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An upward message was sent to the relay chain."] - pub struct UpwardMessageSent { - pub message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for UpwardMessageSent { - const PALLET: &'static str = "ParachainSystem"; - const EVENT: &'static str = "UpwardMessageSent"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " In case of a scheduled upgrade, this storage field contains the validation code to be applied."] - #[doc = ""] - #[doc = " As soon as the relay chain gives us the go-ahead signal, we will overwrite the [`:code`][well_known_keys::CODE]"] - #[doc = " which will result the next block process with the new validation code. This concludes the upgrade process."] - #[doc = ""] - #[doc = " [well_known_keys::CODE]: sp_core::storage::well_known_keys::CODE"] - pub fn pending_validation_code( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "PendingValidationCode", - vec![], - [ - 162u8, 35u8, 108u8, 76u8, 160u8, 93u8, 215u8, 84u8, 20u8, 249u8, 57u8, - 187u8, 88u8, 161u8, 15u8, 131u8, 213u8, 89u8, 140u8, 20u8, 227u8, - 204u8, 79u8, 176u8, 114u8, 119u8, 8u8, 7u8, 64u8, 15u8, 90u8, 92u8, - ], - ) - } - #[doc = " Validation code that is set by the parachain and is to be communicated to collator and"] - #[doc = " consequently the relay-chain."] - #[doc = ""] - #[doc = " This will be cleared in `on_initialize` of each new block if no other pallet already set"] - #[doc = " the value."] - pub fn new_validation_code( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "NewValidationCode", - vec![], - [ - 224u8, 174u8, 53u8, 106u8, 240u8, 49u8, 48u8, 79u8, 219u8, 74u8, 142u8, - 166u8, 92u8, 204u8, 244u8, 200u8, 43u8, 169u8, 177u8, 207u8, 190u8, - 106u8, 180u8, 65u8, 245u8, 131u8, 134u8, 4u8, 53u8, 45u8, 76u8, 3u8, - ], - ) - } - #[doc = " The [`PersistedValidationData`] set for this block."] - #[doc = " This value is expected to be set only once per block and it's never stored"] - #[doc = " in the trie."] - pub fn validation_data( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v4::PersistedValidationData< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "ValidationData", - vec![], - [ - 112u8, 58u8, 240u8, 81u8, 219u8, 110u8, 244u8, 186u8, 251u8, 90u8, - 195u8, 217u8, 229u8, 102u8, 233u8, 24u8, 109u8, 96u8, 219u8, 72u8, - 139u8, 93u8, 58u8, 140u8, 40u8, 110u8, 167u8, 98u8, 199u8, 12u8, 138u8, - 131u8, - ], - ) - } - #[doc = " Were the validation data set to notify the relay chain?"] - pub fn did_set_validation_code( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "DidSetValidationCode", - vec![], - [ - 89u8, 83u8, 74u8, 174u8, 234u8, 188u8, 149u8, 78u8, 140u8, 17u8, 92u8, - 165u8, 243u8, 87u8, 59u8, 97u8, 135u8, 81u8, 192u8, 86u8, 193u8, 187u8, - 113u8, 22u8, 108u8, 83u8, 242u8, 208u8, 174u8, 40u8, 49u8, 245u8, - ], - ) - } - #[doc = " The relay chain block number associated with the last parachain block."] - pub fn last_relay_chain_block_number( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "LastRelayChainBlockNumber", - vec![], - [ - 68u8, 121u8, 6u8, 159u8, 181u8, 94u8, 151u8, 215u8, 225u8, 244u8, 4u8, - 158u8, 216u8, 85u8, 55u8, 228u8, 197u8, 35u8, 200u8, 33u8, 29u8, 182u8, - 17u8, 83u8, 59u8, 63u8, 25u8, 180u8, 132u8, 23u8, 97u8, 252u8, - ], - ) - } - #[doc = " An option which indicates if the relay-chain restricts signalling a validation code upgrade."] - #[doc = " In other words, if this is `Some` and [`NewValidationCode`] is `Some` then the produced"] - #[doc = " candidate will be invalid."] - #[doc = ""] - #[doc = " This storage item is a mirror of the corresponding value for the current parachain from the"] - #[doc = " relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is"] - #[doc = " set after the inherent."] - pub fn upgrade_restriction_signal( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option< - runtime_types::polkadot_primitives::v4::UpgradeRestriction, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "UpgradeRestrictionSignal", - vec![], - [ - 61u8, 3u8, 26u8, 6u8, 88u8, 114u8, 109u8, 63u8, 7u8, 115u8, 245u8, - 198u8, 73u8, 234u8, 28u8, 228u8, 126u8, 27u8, 151u8, 18u8, 133u8, 54u8, - 144u8, 149u8, 246u8, 43u8, 83u8, 47u8, 77u8, 238u8, 10u8, 196u8, - ], - ) - } - #[doc = " The state proof for the last relay parent block."] - #[doc = ""] - #[doc = " This field is meant to be updated each block with the validation data inherent. Therefore,"] - #[doc = " before processing of the inherent, e.g. in `on_initialize` this data may be stale."] - #[doc = ""] - #[doc = " This data is also absent from the genesis."] - pub fn relay_state_proof( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_trie::storage_proof::StorageProof, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "RelayStateProof", - vec![], - [ - 35u8, 124u8, 167u8, 221u8, 162u8, 145u8, 158u8, 186u8, 57u8, 154u8, - 225u8, 6u8, 176u8, 13u8, 178u8, 195u8, 209u8, 122u8, 221u8, 26u8, - 155u8, 126u8, 153u8, 246u8, 101u8, 221u8, 61u8, 145u8, 211u8, 236u8, - 48u8, 130u8, - ], - ) - } - #[doc = " The snapshot of some state related to messaging relevant to the current parachain as per"] - #[doc = " the relay parent."] - #[doc = ""] - #[doc = " This field is meant to be updated each block with the validation data inherent. Therefore,"] - #[doc = " before processing of the inherent, e.g. in `on_initialize` this data may be stale."] - #[doc = ""] - #[doc = " This data is also absent from the genesis."] pub fn relevant_messaging_state (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: cumulus_pallet_parachain_system :: relay_state_snapshot :: MessagingStateSnapshot > , :: subxt :: storage :: address :: Yes , () , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "RelevantMessagingState", - vec![], - [ - 68u8, 241u8, 114u8, 83u8, 200u8, 99u8, 8u8, 244u8, 110u8, 134u8, 106u8, - 153u8, 17u8, 90u8, 184u8, 157u8, 100u8, 140u8, 157u8, 83u8, 25u8, - 166u8, 173u8, 31u8, 221u8, 24u8, 236u8, 85u8, 176u8, 223u8, 237u8, - 65u8, - ], - ) - } - #[doc = " The parachain host configuration that was obtained from the relay parent."] - #[doc = ""] - #[doc = " This field is meant to be updated each block with the validation data inherent. Therefore,"] - #[doc = " before processing of the inherent, e.g. in `on_initialize` this data may be stale."] - #[doc = ""] - #[doc = " This data is also absent from the genesis."] - pub fn host_configuration( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v4::AbridgedHostConfiguration, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "HostConfiguration", - vec![], - [ - 104u8, 200u8, 30u8, 202u8, 119u8, 204u8, 233u8, 20u8, 67u8, 199u8, - 47u8, 166u8, 254u8, 152u8, 10u8, 187u8, 240u8, 255u8, 148u8, 201u8, - 134u8, 41u8, 130u8, 201u8, 112u8, 65u8, 68u8, 103u8, 56u8, 123u8, - 178u8, 113u8, - ], - ) - } - #[doc = " The last downward message queue chain head we have observed."] - #[doc = ""] - #[doc = " This value is loaded before and saved after processing inbound downward messages carried"] - #[doc = " by the system inherent."] - pub fn last_dmq_mqc_head( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::cumulus_primitives_parachain_inherent::MessageQueueChain, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "LastDmqMqcHead", - vec![], - [ - 176u8, 255u8, 246u8, 125u8, 36u8, 120u8, 24u8, 44u8, 26u8, 64u8, 236u8, - 210u8, 189u8, 237u8, 50u8, 78u8, 45u8, 139u8, 58u8, 141u8, 112u8, - 253u8, 178u8, 198u8, 87u8, 71u8, 77u8, 248u8, 21u8, 145u8, 187u8, 52u8, - ], - ) - } - #[doc = " The message queue chain heads we have observed per each channel incoming channel."] - #[doc = ""] - #[doc = " This value is loaded before and saved after processing inbound downward messages carried"] - #[doc = " by the system inherent."] - pub fn last_hrmp_mqc_heads( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::KeyedVec< - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::cumulus_primitives_parachain_inherent::MessageQueueChain, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "LastHrmpMqcHeads", - vec![], - [ - 55u8, 179u8, 35u8, 16u8, 173u8, 0u8, 122u8, 179u8, 236u8, 98u8, 9u8, - 112u8, 11u8, 219u8, 241u8, 89u8, 131u8, 198u8, 64u8, 139u8, 103u8, - 158u8, 77u8, 107u8, 83u8, 236u8, 255u8, 208u8, 47u8, 61u8, 219u8, - 240u8, - ], - ) - } - #[doc = " Number of downward messages processed in a block."] - #[doc = ""] - #[doc = " This will be cleared in `on_initialize` of each new block."] - pub fn processed_downward_messages( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "ProcessedDownwardMessages", - vec![], - [ - 48u8, 177u8, 84u8, 228u8, 101u8, 235u8, 181u8, 27u8, 66u8, 55u8, 50u8, - 146u8, 245u8, 223u8, 77u8, 132u8, 178u8, 80u8, 74u8, 90u8, 166u8, 81u8, - 109u8, 25u8, 91u8, 69u8, 5u8, 69u8, 123u8, 197u8, 160u8, 146u8, - ], - ) - } - #[doc = " HRMP watermark that was set in a block."] - #[doc = ""] - #[doc = " This will be cleared in `on_initialize` of each new block."] - pub fn hrmp_watermark( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "HrmpWatermark", - vec![], - [ - 189u8, 59u8, 183u8, 195u8, 69u8, 185u8, 241u8, 226u8, 62u8, 204u8, - 230u8, 77u8, 102u8, 75u8, 86u8, 157u8, 249u8, 140u8, 219u8, 72u8, 94u8, - 64u8, 176u8, 72u8, 34u8, 205u8, 114u8, 103u8, 231u8, 233u8, 206u8, - 111u8, - ], - ) - } - #[doc = " HRMP messages that were sent in a block."] - #[doc = ""] - #[doc = " This will be cleared in `on_initialize` of each new block."] - pub fn hrmp_outbound_messages( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::OutboundHrmpMessage< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "HrmpOutboundMessages", - vec![], - [ - 74u8, 86u8, 173u8, 248u8, 90u8, 230u8, 71u8, 225u8, 127u8, 164u8, - 221u8, 62u8, 146u8, 13u8, 73u8, 9u8, 98u8, 168u8, 6u8, 14u8, 97u8, - 166u8, 45u8, 70u8, 62u8, 210u8, 9u8, 32u8, 83u8, 18u8, 4u8, 201u8, - ], - ) - } - #[doc = " Upward messages that were sent in a block."] - #[doc = ""] - #[doc = " This will be cleared in `on_initialize` of each new block."] - pub fn upward_messages( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "UpwardMessages", - vec![], - [ - 129u8, 208u8, 187u8, 36u8, 48u8, 108u8, 135u8, 56u8, 204u8, 60u8, - 100u8, 158u8, 113u8, 238u8, 46u8, 92u8, 228u8, 41u8, 178u8, 177u8, - 208u8, 195u8, 148u8, 149u8, 127u8, 21u8, 93u8, 92u8, 29u8, 115u8, 10u8, - 248u8, - ], - ) - } - #[doc = " Upward messages that are still pending and not yet send to the relay chain."] - pub fn pending_upward_messages( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "PendingUpwardMessages", - vec![], - [ - 223u8, 46u8, 224u8, 227u8, 222u8, 119u8, 225u8, 244u8, 59u8, 87u8, - 127u8, 19u8, 217u8, 237u8, 103u8, 61u8, 6u8, 210u8, 107u8, 201u8, - 117u8, 25u8, 85u8, 248u8, 36u8, 231u8, 28u8, 202u8, 41u8, 140u8, 208u8, - 254u8, - ], - ) - } - #[doc = " The number of HRMP messages we observed in `on_initialize` and thus used that number for"] - #[doc = " announcing the weight of `on_initialize` and `on_finalize`."] - pub fn announced_hrmp_messages_per_candidate( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "AnnouncedHrmpMessagesPerCandidate", - vec![], - [ - 132u8, 61u8, 162u8, 129u8, 251u8, 243u8, 20u8, 144u8, 162u8, 73u8, - 237u8, 51u8, 248u8, 41u8, 127u8, 171u8, 180u8, 79u8, 137u8, 23u8, 66u8, - 134u8, 106u8, 222u8, 182u8, 154u8, 0u8, 145u8, 184u8, 156u8, 36u8, - 97u8, - ], - ) - } - #[doc = " The weight we reserve at the beginning of the block for processing XCMP messages. This"] - #[doc = " overrides the amount set in the Config trait."] - pub fn reserved_xcmp_weight_override( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::sp_weights::Weight>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "ReservedXcmpWeightOverride", - vec![], - [ - 180u8, 90u8, 34u8, 178u8, 1u8, 242u8, 211u8, 97u8, 100u8, 34u8, 39u8, - 42u8, 142u8, 249u8, 236u8, 194u8, 244u8, 164u8, 96u8, 54u8, 98u8, 46u8, - 92u8, 196u8, 185u8, 51u8, 231u8, 234u8, 249u8, 143u8, 244u8, 64u8, - ], - ) - } - #[doc = " The weight we reserve at the beginning of the block for processing DMP messages. This"] - #[doc = " overrides the amount set in the Config trait."] - pub fn reserved_dmp_weight_override( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::sp_weights::Weight>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "ReservedDmpWeightOverride", - vec![], - [ - 90u8, 122u8, 168u8, 240u8, 95u8, 195u8, 160u8, 109u8, 175u8, 170u8, - 227u8, 44u8, 139u8, 176u8, 32u8, 161u8, 57u8, 233u8, 56u8, 55u8, 123u8, - 168u8, 174u8, 96u8, 159u8, 62u8, 186u8, 186u8, 17u8, 70u8, 57u8, 246u8, - ], - ) - } - #[doc = " The next authorized upgrade, if there is one."] - pub fn authorized_upgrade( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::cumulus_pallet_parachain_system::CodeUpgradeAuthorization, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "AuthorizedUpgrade", - vec![], - [ - 12u8, 212u8, 71u8, 191u8, 89u8, 101u8, 195u8, 3u8, 23u8, 180u8, 233u8, - 52u8, 53u8, 133u8, 207u8, 94u8, 58u8, 43u8, 221u8, 236u8, 161u8, 41u8, - 30u8, 194u8, 125u8, 2u8, 118u8, 152u8, 197u8, 49u8, 34u8, 33u8, - ], - ) - } - #[doc = " A custom head data that should be returned as result of `validate_block`."] - #[doc = ""] - #[doc = " See [`Pallet::set_custom_validation_head_data`] for more information."] - pub fn custom_validation_head_data( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainSystem", - "CustomValidationHeadData", - vec![], - [ - 189u8, 150u8, 234u8, 128u8, 111u8, 27u8, 173u8, 92u8, 109u8, 4u8, 98u8, - 103u8, 158u8, 19u8, 16u8, 5u8, 107u8, 135u8, 126u8, 170u8, 62u8, 64u8, - 149u8, 80u8, 33u8, 17u8, 83u8, 22u8, 176u8, 118u8, 26u8, 223u8, - ], - ) - } - } - } - } - pub mod parachain_info { - use super::{root_mod, runtime_types}; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn parachain_id( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParachainInfo", - "ParachainId", - vec![], - [ - 151u8, 191u8, 241u8, 118u8, 192u8, 47u8, 166u8, 151u8, 217u8, 240u8, - 165u8, 232u8, 51u8, 113u8, 243u8, 1u8, 89u8, 240u8, 11u8, 1u8, 77u8, - 104u8, 12u8, 56u8, 17u8, 135u8, 214u8, 19u8, 114u8, 135u8, 66u8, 76u8, - ], - ) - } - } - } - } - pub mod balances { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct TransferAllowDeath { - pub dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetBalanceDeprecated { - pub who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - pub new_free: ::core::primitive::u128, - #[codec(compact)] - pub old_reserved: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ForceTransfer { - pub source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - pub dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct TransferKeepAlive { - pub dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct TransferAll { - pub dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - pub keep_alive: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ForceUnreserve { - pub who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - pub amount: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct UpgradeAccounts { - pub who: ::std::vec::Vec<::sp_core::crypto::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct Transfer { - pub dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ForceSetBalance { - pub who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - #[codec(compact)] - pub new_free: ::core::primitive::u128, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Transfer some liquid free balance to another account."] - #[doc = ""] - #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] - #[doc = "If the sender's account is below the existential deposit as a result"] - #[doc = "of the transfer, the account will be reaped."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] - pub fn transfer_allow_death( - &self, - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "transfer_allow_death", - TransferAllowDeath { dest, value }, - [ - 234u8, 130u8, 149u8, 36u8, 235u8, 112u8, 159u8, 189u8, 104u8, 148u8, - 108u8, 230u8, 25u8, 198u8, 71u8, 158u8, 112u8, 3u8, 162u8, 25u8, 145u8, - 252u8, 44u8, 63u8, 47u8, 34u8, 47u8, 158u8, 61u8, 14u8, 120u8, 255u8, - ], - ) - } - #[doc = "Set the regular balance of a given account; it also takes a reserved balance but this"] - #[doc = "must be the same as the account's current reserved balance."] - #[doc = ""] - #[doc = "The dispatch origin for this call is `root`."] - #[doc = ""] - #[doc = "WARNING: This call is DEPRECATED! Use `force_set_balance` instead."] - pub fn set_balance_deprecated( - &self, - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - new_free: ::core::primitive::u128, - old_reserved: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "set_balance_deprecated", - SetBalanceDeprecated { who, new_free, old_reserved }, - [ - 240u8, 107u8, 184u8, 206u8, 78u8, 106u8, 115u8, 152u8, 130u8, 56u8, - 156u8, 176u8, 105u8, 27u8, 176u8, 187u8, 49u8, 171u8, 229u8, 79u8, - 254u8, 248u8, 8u8, 162u8, 134u8, 12u8, 89u8, 100u8, 137u8, 102u8, - 132u8, 158u8, - ], - ) - } - #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] - #[doc = "may be specified."] - pub fn force_transfer( - &self, - source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "force_transfer", - ForceTransfer { source, dest, value }, - [ - 79u8, 174u8, 212u8, 108u8, 184u8, 33u8, 170u8, 29u8, 232u8, 254u8, - 195u8, 218u8, 221u8, 134u8, 57u8, 99u8, 6u8, 70u8, 181u8, 227u8, 56u8, - 239u8, 243u8, 158u8, 157u8, 245u8, 36u8, 162u8, 11u8, 237u8, 147u8, - 15u8, - ], - ) - } - #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] - #[doc = "kill the origin account."] - #[doc = ""] - #[doc = "99% of the time you want [`transfer_allow_death`] instead."] - #[doc = ""] - #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] - pub fn transfer_keep_alive( - &self, - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "transfer_keep_alive", - TransferKeepAlive { dest, value }, - [ - 112u8, 179u8, 75u8, 168u8, 193u8, 221u8, 9u8, 82u8, 190u8, 113u8, - 253u8, 13u8, 130u8, 134u8, 170u8, 216u8, 136u8, 111u8, 242u8, 220u8, - 202u8, 112u8, 47u8, 79u8, 73u8, 244u8, 226u8, 59u8, 240u8, 188u8, - 210u8, 208u8, - ], - ) - } - #[doc = "Transfer the entire transferable balance from the caller account."] - #[doc = ""] - #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] - #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] - #[doc = "transferred by this function. To ensure that this function results in a killed account,"] - #[doc = "you might need to prepare the account by removing any reference counters, storage"] - #[doc = "deposits, etc..."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be Signed."] - #[doc = ""] - #[doc = "- `dest`: The recipient of the transfer."] - #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] - #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] - #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] - #[doc = " keep the sender account alive (true)."] - pub fn transfer_all( - &self, - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "transfer_all", - TransferAll { dest, keep_alive }, - [ - 46u8, 129u8, 29u8, 177u8, 221u8, 107u8, 245u8, 69u8, 238u8, 126u8, - 145u8, 26u8, 219u8, 208u8, 14u8, 80u8, 149u8, 1u8, 214u8, 63u8, 67u8, - 201u8, 144u8, 45u8, 129u8, 145u8, 174u8, 71u8, 238u8, 113u8, 208u8, - 34u8, - ], - ) - } - #[doc = "Unreserve some balance from a user by force."] - #[doc = ""] - #[doc = "Can only be called by ROOT."] - pub fn force_unreserve( - &self, - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "force_unreserve", - ForceUnreserve { who, amount }, - [ - 160u8, 146u8, 137u8, 76u8, 157u8, 187u8, 66u8, 148u8, 207u8, 76u8, - 32u8, 254u8, 82u8, 215u8, 35u8, 161u8, 213u8, 52u8, 32u8, 98u8, 102u8, - 106u8, 234u8, 123u8, 6u8, 175u8, 184u8, 188u8, 174u8, 106u8, 176u8, - 78u8, - ], - ) - } - #[doc = "Upgrade a specified account."] - #[doc = ""] - #[doc = "- `origin`: Must be `Signed`."] - #[doc = "- `who`: The account to be upgraded."] - #[doc = ""] - #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] - #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] - #[doc = "possibililty of churn)."] - pub fn upgrade_accounts( - &self, - who: ::std::vec::Vec<::sp_core::crypto::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "upgrade_accounts", - UpgradeAccounts { who }, - [ - 164u8, 61u8, 119u8, 24u8, 165u8, 46u8, 197u8, 59u8, 39u8, 198u8, 228u8, - 96u8, 228u8, 45u8, 85u8, 51u8, 37u8, 5u8, 75u8, 40u8, 241u8, 163u8, - 86u8, 228u8, 151u8, 217u8, 47u8, 105u8, 203u8, 103u8, 207u8, 4u8, - ], - ) - } - #[doc = "Alias for `transfer_allow_death`, provided only for name-wise compatibility."] - #[doc = ""] - #[doc = "WARNING: DEPRECATED! Will be released in approximately 3 months."] - pub fn transfer( - &self, - dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "transfer", - Transfer { dest, value }, - [ - 111u8, 222u8, 32u8, 56u8, 171u8, 77u8, 252u8, 29u8, 194u8, 155u8, - 200u8, 192u8, 198u8, 81u8, 23u8, 115u8, 236u8, 91u8, 218u8, 114u8, - 107u8, 141u8, 138u8, 100u8, 237u8, 21u8, 58u8, 172u8, 3u8, 20u8, 216u8, - 38u8, - ], - ) - } - #[doc = "Set the regular balance of a given account."] - #[doc = ""] - #[doc = "The dispatch origin for this call is `root`."] - pub fn force_set_balance( - &self, - who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, - new_free: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Balances", - "force_set_balance", - ForceSetBalance { who, new_free }, - [ - 237u8, 4u8, 41u8, 58u8, 62u8, 179u8, 160u8, 4u8, 50u8, 71u8, 178u8, - 36u8, 130u8, 130u8, 92u8, 229u8, 16u8, 245u8, 169u8, 109u8, 165u8, - 72u8, 94u8, 70u8, 196u8, 136u8, 37u8, 94u8, 140u8, 215u8, 125u8, 125u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_balances::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An account was created with some free balance."] - pub struct Endowed { - pub account: ::sp_core::crypto::AccountId32, - pub free_balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Endowed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Endowed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] - #[doc = "resulting in an outright loss."] - pub struct DustLost { - pub account: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for DustLost { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "DustLost"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Transfer succeeded."] - pub struct Transfer { - pub from: ::sp_core::crypto::AccountId32, - pub to: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Transfer { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Transfer"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A balance was set by root."] - pub struct BalanceSet { - pub who: ::sp_core::crypto::AccountId32, - pub free: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for BalanceSet { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "BalanceSet"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some balance was reserved (moved from free to reserved)."] - pub struct Reserved { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Reserved { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Reserved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some balance was unreserved (moved from reserved to free)."] - pub struct Unreserved { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Unreserved { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Unreserved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some balance was moved from the reserve of the first account to the second account."] - #[doc = "Final argument indicates the destination balance type."] - pub struct ReserveRepatriated { - pub from: ::sp_core::crypto::AccountId32, - pub to: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - pub destination_status: - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - } - impl ::subxt::events::StaticEvent for ReserveRepatriated { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "ReserveRepatriated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some amount was deposited (e.g. for transaction fees)."] - pub struct Deposit { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Deposit { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Deposit"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] - pub struct Withdraw { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Withdraw { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Withdraw"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] - pub struct Slashed { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Slashed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some amount was minted into an account."] - pub struct Minted { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Minted { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Minted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some amount was burned from an account."] - pub struct Burned { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Burned { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Burned"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some amount was suspended from an account (it can be restored later)."] - pub struct Suspended { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Suspended { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Suspended"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some amount was restored into an account."] - pub struct Restored { - pub who: ::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Restored { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Restored"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An account was upgraded."] - pub struct Upgraded { - pub who: ::sp_core::crypto::AccountId32, - } - impl ::subxt::events::StaticEvent for Upgraded { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Upgraded"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] - pub struct Issued { - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Issued { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Issued"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] - pub struct Rescinded { - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Rescinded { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Rescinded"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The total units issued in the system."] - pub fn total_issuance( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "TotalIssuance", - vec![], - [ - 1u8, 206u8, 252u8, 237u8, 6u8, 30u8, 20u8, 232u8, 164u8, 115u8, 51u8, - 156u8, 156u8, 206u8, 241u8, 187u8, 44u8, 84u8, 25u8, 164u8, 235u8, - 20u8, 86u8, 242u8, 124u8, 23u8, 28u8, 140u8, 26u8, 73u8, 231u8, 51u8, - ], - ) - } - #[doc = " The total units of outstanding deactivated balance in the system."] - pub fn inactive_issuance( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "InactiveIssuance", - vec![], - [ - 74u8, 203u8, 111u8, 142u8, 225u8, 104u8, 173u8, 51u8, 226u8, 12u8, - 85u8, 135u8, 41u8, 206u8, 177u8, 238u8, 94u8, 246u8, 184u8, 250u8, - 140u8, 213u8, 91u8, 118u8, 163u8, 111u8, 211u8, 46u8, 204u8, 160u8, - 154u8, 21u8, - ], - ) - } - #[doc = " The Balances pallet example of storing the balance of an account."] - #[doc = ""] - #[doc = " # Example"] - #[doc = ""] - #[doc = " ```nocompile"] - #[doc = " impl pallet_balances::Config for Runtime {"] - #[doc = " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>"] - #[doc = " }"] - #[doc = " ```"] - #[doc = ""] - #[doc = " You can also store the balance of an account in the `System` pallet."] - #[doc = ""] - #[doc = " # Example"] - #[doc = ""] - #[doc = " ```nocompile"] - #[doc = " impl pallet_balances::Config for Runtime {"] - #[doc = " type AccountStore = System"] - #[doc = " }"] - #[doc = " ```"] - #[doc = ""] - #[doc = " But this comes with tradeoffs, storing account balances in the system pallet stores"] - #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] - #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] - #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] - pub fn account( - &self, - _0: impl ::std::borrow::Borrow<::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Account", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 109u8, 250u8, 18u8, 96u8, 139u8, 232u8, 4u8, 139u8, 133u8, 239u8, 30u8, - 237u8, 73u8, 209u8, 143u8, 160u8, 94u8, 248u8, 124u8, 43u8, 224u8, - 165u8, 11u8, 6u8, 176u8, 144u8, 189u8, 161u8, 174u8, 210u8, 56u8, - 225u8, - ], - ) - } - #[doc = " The Balances pallet example of storing the balance of an account."] - #[doc = ""] - #[doc = " # Example"] - #[doc = ""] - #[doc = " ```nocompile"] - #[doc = " impl pallet_balances::Config for Runtime {"] - #[doc = " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>"] - #[doc = " }"] - #[doc = " ```"] - #[doc = ""] - #[doc = " You can also store the balance of an account in the `System` pallet."] - #[doc = ""] - #[doc = " # Example"] - #[doc = ""] - #[doc = " ```nocompile"] - #[doc = " impl pallet_balances::Config for Runtime {"] - #[doc = " type AccountStore = System"] - #[doc = " }"] - #[doc = " ```"] - #[doc = ""] - #[doc = " But this comes with tradeoffs, storing account balances in the system pallet stores"] - #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] - #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] - #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] - pub fn account_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Account", - Vec::new(), - [ - 109u8, 250u8, 18u8, 96u8, 139u8, 232u8, 4u8, 139u8, 133u8, 239u8, 30u8, - 237u8, 73u8, 209u8, 143u8, 160u8, 94u8, 248u8, 124u8, 43u8, 224u8, - 165u8, 11u8, 6u8, 176u8, 144u8, 189u8, 161u8, 174u8, 210u8, 56u8, - 225u8, - ], - ) - } - #[doc = " Any liquidity locks on some account balances."] - #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] - pub fn locks( - &self, - _0: impl ::std::borrow::Borrow<::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::types::BalanceLock< - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Locks", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8, 134u8, 195u8, - 58u8, 255u8, 64u8, 153u8, 212u8, 210u8, 232u8, 4u8, 122u8, 90u8, 212u8, - 136u8, 14u8, 127u8, 232u8, 8u8, 192u8, 40u8, 233u8, 18u8, 250u8, - ], - ) - } - #[doc = " Any liquidity locks on some account balances."] - #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] - pub fn locks_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::types::BalanceLock< - ::core::primitive::u128, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Locks", - Vec::new(), - [ - 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8, 134u8, 195u8, - 58u8, 255u8, 64u8, 153u8, 212u8, 210u8, 232u8, 4u8, 122u8, 90u8, 212u8, - 136u8, 14u8, 127u8, 232u8, 8u8, 192u8, 40u8, 233u8, 18u8, 250u8, - ], - ) - } - #[doc = " Named reserves on some account balances."] - pub fn reserves( - &self, - _0: impl ::std::borrow::Borrow<::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Reserves", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8, 250u8, 128u8, - 167u8, 117u8, 44u8, 85u8, 96u8, 105u8, 216u8, 16u8, 147u8, 74u8, 55u8, - 183u8, 94u8, 160u8, 177u8, 26u8, 187u8, 71u8, 197u8, 187u8, 163u8, - ], - ) - } - #[doc = " Named reserves on some account balances."] - pub fn reserves_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Reserves", - Vec::new(), - [ - 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8, 250u8, 128u8, - 167u8, 117u8, 44u8, 85u8, 96u8, 105u8, 216u8, 16u8, 147u8, 74u8, 55u8, - 183u8, 94u8, 160u8, 177u8, 26u8, 187u8, 71u8, 197u8, 187u8, 163u8, - ], - ) - } - #[doc = " Holds on account balances."] - pub fn holds( - &self, - _0: impl ::std::borrow::Borrow<::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::IdAmount< - (), - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Holds", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 247u8, 81u8, 4u8, 220u8, 77u8, 205u8, 28u8, 131u8, 215u8, 74u8, 197u8, - 137u8, 113u8, 214u8, 249u8, 91u8, 81u8, 216u8, 8u8, 5u8, 233u8, 39u8, - 104u8, 250u8, 3u8, 228u8, 148u8, 78u8, 4u8, 34u8, 45u8, 143u8, - ], - ) - } - #[doc = " Holds on account balances."] - pub fn holds_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::IdAmount< - (), - ::core::primitive::u128, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Holds", - Vec::new(), - [ - 247u8, 81u8, 4u8, 220u8, 77u8, 205u8, 28u8, 131u8, 215u8, 74u8, 197u8, - 137u8, 113u8, 214u8, 249u8, 91u8, 81u8, 216u8, 8u8, 5u8, 233u8, 39u8, - 104u8, 250u8, 3u8, 228u8, 148u8, 78u8, 4u8, 34u8, 45u8, 143u8, - ], - ) - } - #[doc = " Freeze locks on account balances."] - pub fn freezes( - &self, - _0: impl ::std::borrow::Borrow<::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::IdAmount< - (), - ::core::primitive::u128, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Freezes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 211u8, 24u8, 237u8, 217u8, 47u8, 230u8, 147u8, 39u8, 112u8, 209u8, - 193u8, 47u8, 242u8, 13u8, 241u8, 0u8, 100u8, 45u8, 116u8, 130u8, 246u8, - 196u8, 50u8, 134u8, 135u8, 112u8, 206u8, 1u8, 12u8, 53u8, 106u8, 131u8, - ], - ) - } - #[doc = " Freeze locks on account balances."] - pub fn freezes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::pallet_balances::types::IdAmount< - (), - ::core::primitive::u128, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "Freezes", - Vec::new(), - [ - 211u8, 24u8, 237u8, 217u8, 47u8, 230u8, 147u8, 39u8, 112u8, 209u8, - 193u8, 47u8, 242u8, 13u8, 241u8, 0u8, 100u8, 45u8, 116u8, 130u8, 246u8, - 196u8, 50u8, 134u8, 135u8, 112u8, 206u8, 1u8, 12u8, 53u8, 106u8, 131u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum amount required to keep an account open."] - pub fn existential_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Balances", - "ExistentialDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, - 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, - 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum number of locks that should exist on an account."] - #[doc = " Not strictly enforced, but used for weight estimation."] - pub fn max_locks( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Balances", - "MaxLocks", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The maximum number of named reserves that can exist on an account."] - pub fn max_reserves( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Balances", - "MaxReserves", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The maximum number of holds that can exist on an account at any time."] - pub fn max_holds( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Balances", - "MaxHolds", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] - pub fn max_freezes( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Balances", - "MaxFreezes", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod aura { - use super::{root_mod, runtime_types}; - } - pub mod aura_ext { - use super::{root_mod, runtime_types}; - } - pub mod xcmp_queue { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ServiceOverweight { - pub index: ::core::primitive::u64, - pub weight_limit: ::sp_weights::Weight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SuspendXcmExecution; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ResumeXcmExecution; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - pub struct UpdateSuspendThreshold { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - pub struct UpdateDropThreshold { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - pub struct UpdateResumeThreshold { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct UpdateThresholdWeight { - pub new: ::sp_weights::Weight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct UpdateWeightRestrictDecay { - pub new: ::sp_weights::Weight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct UpdateXcmpMaxIndividualWeight { - pub new: ::sp_weights::Weight, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Services a single overweight XCM."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] - #[doc = "- `index`: The index of the overweight XCM to service"] - #[doc = "- `weight_limit`: The amount of weight that XCM execution may take."] - #[doc = ""] - #[doc = "Errors:"] - #[doc = "- `BadOverweightIndex`: XCM under `index` is not found in the `Overweight` storage map."] - #[doc = "- `BadXcm`: XCM under `index` cannot be properly decoded into a valid XCM format."] - #[doc = "- `WeightOverLimit`: XCM execution may use greater `weight_limit`."] - #[doc = ""] - #[doc = "Events:"] - #[doc = "- `OverweightServiced`: On success."] - pub fn service_overweight( - &self, - index: ::core::primitive::u64, - weight_limit: ::sp_weights::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "service_overweight", - ServiceOverweight { index, weight_limit }, - [ - 121u8, 236u8, 235u8, 23u8, 210u8, 238u8, 238u8, 122u8, 15u8, 86u8, - 34u8, 119u8, 105u8, 100u8, 214u8, 236u8, 117u8, 39u8, 254u8, 235u8, - 189u8, 15u8, 72u8, 74u8, 225u8, 134u8, 148u8, 126u8, 31u8, 203u8, - 144u8, 106u8, - ], - ) - } - #[doc = "Suspends all XCM executions for the XCMP queue, regardless of the sender's origin."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ControllerOrigin`."] - pub fn suspend_xcm_execution( - &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "suspend_xcm_execution", - SuspendXcmExecution {}, - [ - 139u8, 76u8, 166u8, 86u8, 106u8, 144u8, 16u8, 47u8, 105u8, 185u8, 7u8, - 7u8, 63u8, 14u8, 250u8, 236u8, 99u8, 121u8, 101u8, 143u8, 28u8, 175u8, - 108u8, 197u8, 226u8, 43u8, 103u8, 92u8, 186u8, 12u8, 51u8, 153u8, - ], - ) - } - #[doc = "Resumes all XCM executions for the XCMP queue."] - #[doc = ""] - #[doc = "Note that this function doesn't change the status of the in/out bound channels."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ControllerOrigin`."] - pub fn resume_xcm_execution( - &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "resume_xcm_execution", - ResumeXcmExecution {}, - [ - 67u8, 111u8, 47u8, 237u8, 79u8, 42u8, 90u8, 56u8, 245u8, 2u8, 20u8, - 23u8, 33u8, 121u8, 135u8, 50u8, 204u8, 147u8, 195u8, 80u8, 177u8, - 202u8, 8u8, 160u8, 164u8, 138u8, 64u8, 252u8, 178u8, 63u8, 102u8, - 245u8, - ], - ) - } - #[doc = "Overwrites the number of pages of messages which must be in the queue for the other side to be told to"] - #[doc = "suspend their sending."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.suspend_value`"] - pub fn update_suspend_threshold( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "update_suspend_threshold", - UpdateSuspendThreshold { new }, - [ - 155u8, 120u8, 9u8, 228u8, 110u8, 62u8, 233u8, 36u8, 57u8, 85u8, 19u8, - 67u8, 246u8, 88u8, 81u8, 116u8, 243u8, 236u8, 174u8, 130u8, 8u8, 246u8, - 254u8, 97u8, 155u8, 207u8, 123u8, 60u8, 164u8, 14u8, 196u8, 97u8, - ], - ) - } - #[doc = "Overwrites the number of pages of messages which must be in the queue after which we drop any further"] - #[doc = "messages from the channel."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.drop_threshold`"] - pub fn update_drop_threshold( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "update_drop_threshold", - UpdateDropThreshold { new }, - [ - 146u8, 177u8, 164u8, 96u8, 247u8, 182u8, 229u8, 175u8, 194u8, 101u8, - 186u8, 168u8, 94u8, 114u8, 172u8, 119u8, 35u8, 222u8, 175u8, 21u8, - 67u8, 61u8, 216u8, 144u8, 194u8, 10u8, 181u8, 62u8, 166u8, 198u8, - 138u8, 243u8, - ], - ) - } - #[doc = "Overwrites the number of pages of messages which the queue must be reduced to before it signals that"] - #[doc = "message sending may recommence after it has been suspended."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.resume_threshold`"] - pub fn update_resume_threshold( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "update_resume_threshold", - UpdateResumeThreshold { new }, - [ - 231u8, 128u8, 80u8, 179u8, 61u8, 50u8, 103u8, 209u8, 103u8, 55u8, - 101u8, 113u8, 150u8, 10u8, 202u8, 7u8, 0u8, 77u8, 58u8, 4u8, 227u8, - 17u8, 225u8, 112u8, 121u8, 203u8, 184u8, 113u8, 231u8, 156u8, 174u8, - 154u8, - ], - ) - } - #[doc = "Overwrites the amount of remaining weight under which we stop processing messages."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.threshold_weight`"] - pub fn update_threshold_weight( - &self, - new: ::sp_weights::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "update_threshold_weight", - UpdateThresholdWeight { new }, - [ - 14u8, 144u8, 112u8, 207u8, 195u8, 208u8, 184u8, 164u8, 94u8, 41u8, 8u8, - 58u8, 180u8, 80u8, 239u8, 39u8, 210u8, 159u8, 114u8, 169u8, 152u8, - 176u8, 26u8, 161u8, 32u8, 43u8, 250u8, 156u8, 56u8, 21u8, 43u8, 159u8, - ], - ) - } - #[doc = "Overwrites the speed to which the available weight approaches the maximum weight."] - #[doc = "A lower number results in a faster progression. A value of 1 makes the entire weight available initially."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.weight_restrict_decay`."] - pub fn update_weight_restrict_decay( - &self, - new: ::sp_weights::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "update_weight_restrict_decay", - UpdateWeightRestrictDecay { new }, - [ - 42u8, 53u8, 83u8, 191u8, 51u8, 227u8, 210u8, 193u8, 142u8, 218u8, - 244u8, 177u8, 19u8, 87u8, 148u8, 177u8, 231u8, 197u8, 196u8, 255u8, - 41u8, 130u8, 245u8, 139u8, 107u8, 212u8, 90u8, 161u8, 82u8, 248u8, - 160u8, 223u8, - ], - ) - } - #[doc = "Overwrite the maximum amount of weight any individual message may consume."] - #[doc = "Messages above this weight go into the overweight queue and may only be serviced explicitly."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.xcmp_max_individual_weight`."] - pub fn update_xcmp_max_individual_weight( - &self, - new: ::sp_weights::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmpQueue", - "update_xcmp_max_individual_weight", - UpdateXcmpMaxIndividualWeight { new }, - [ - 148u8, 185u8, 89u8, 36u8, 152u8, 220u8, 248u8, 233u8, 236u8, 82u8, - 170u8, 111u8, 225u8, 142u8, 25u8, 211u8, 72u8, 248u8, 250u8, 14u8, - 45u8, 72u8, 78u8, 95u8, 92u8, 196u8, 245u8, 104u8, 112u8, 128u8, 27u8, - 109u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::cumulus_pallet_xcmp_queue::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some XCM was executed ok."] - pub struct Success { - pub message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - pub weight: ::sp_weights::Weight, - } - impl ::subxt::events::StaticEvent for Success { - const PALLET: &'static str = "XcmpQueue"; - const EVENT: &'static str = "Success"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some XCM failed."] - pub struct Fail { - pub message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - pub error: runtime_types::xcm::v3::traits::Error, - pub weight: ::sp_weights::Weight, - } - impl ::subxt::events::StaticEvent for Fail { - const PALLET: &'static str = "XcmpQueue"; - const EVENT: &'static str = "Fail"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Bad XCM version used."] - pub struct BadVersion { - pub message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for BadVersion { - const PALLET: &'static str = "XcmpQueue"; - const EVENT: &'static str = "BadVersion"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Bad XCM format used."] - pub struct BadFormat { - pub message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for BadFormat { - const PALLET: &'static str = "XcmpQueue"; - const EVENT: &'static str = "BadFormat"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An HRMP message was sent to a sibling parachain."] - pub struct XcmpMessageSent { - pub message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for XcmpMessageSent { - const PALLET: &'static str = "XcmpQueue"; - const EVENT: &'static str = "XcmpMessageSent"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An XCM exceeded the individual message weight budget."] - pub struct OverweightEnqueued { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - pub sent_at: ::core::primitive::u32, - pub index: ::core::primitive::u64, - pub required: ::sp_weights::Weight, - } - impl ::subxt::events::StaticEvent for OverweightEnqueued { - const PALLET: &'static str = "XcmpQueue"; - const EVENT: &'static str = "OverweightEnqueued"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An XCM from the overweight queue was executed with the given actual weight used."] - pub struct OverweightServiced { - pub index: ::core::primitive::u64, - pub used: ::sp_weights::Weight, - } - impl ::subxt::events::StaticEvent for OverweightServiced { - const PALLET: &'static str = "XcmpQueue"; - const EVENT: &'static str = "OverweightServiced"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Status of the inbound XCMP channels."] - pub fn inbound_xcmp_status( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::cumulus_pallet_xcmp_queue::InboundChannelDetails, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "InboundXcmpStatus", - vec![], - [ - 183u8, 198u8, 237u8, 153u8, 132u8, 201u8, 87u8, 182u8, 121u8, 164u8, - 129u8, 241u8, 58u8, 192u8, 115u8, 152u8, 7u8, 33u8, 95u8, 51u8, 2u8, - 176u8, 144u8, 12u8, 125u8, 83u8, 92u8, 198u8, 211u8, 101u8, 28u8, 50u8, - ], - ) - } - #[doc = " Inbound aggregate XCMP messages. It can only be one per ParaId/block."] - pub fn inbound_xcmp_messages( - &self, - _0: impl ::std::borrow::Borrow, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "InboundXcmpMessages", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], - [ - 157u8, 232u8, 222u8, 97u8, 218u8, 96u8, 96u8, 90u8, 216u8, 205u8, 39u8, - 130u8, 109u8, 152u8, 127u8, 57u8, 54u8, 63u8, 104u8, 135u8, 33u8, - 175u8, 197u8, 166u8, 238u8, 22u8, 137u8, 162u8, 226u8, 199u8, 87u8, - 25u8, - ], - ) - } - #[doc = " Inbound aggregate XCMP messages. It can only be one per ParaId/block."] - pub fn inbound_xcmp_messages_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "InboundXcmpMessages", - Vec::new(), - [ - 157u8, 232u8, 222u8, 97u8, 218u8, 96u8, 96u8, 90u8, 216u8, 205u8, 39u8, - 130u8, 109u8, 152u8, 127u8, 57u8, 54u8, 63u8, 104u8, 135u8, 33u8, - 175u8, 197u8, 166u8, 238u8, 22u8, 137u8, 162u8, 226u8, 199u8, 87u8, - 25u8, - ], - ) - } - #[doc = " The non-empty XCMP channels in order of becoming non-empty, and the index of the first"] - #[doc = " and last outbound message. If the two indices are equal, then it indicates an empty"] - #[doc = " queue and there must be a non-`Ok` `OutboundStatus`. We assume queues grow no greater"] - #[doc = " than 65535 items. Queue indices for normal messages begin at one; zero is reserved in"] - #[doc = " case of the need to send a high-priority signal message this block."] - #[doc = " The bool is true if there is a signal message waiting to be sent."] - pub fn outbound_xcmp_status( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::cumulus_pallet_xcmp_queue::OutboundChannelDetails, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "OutboundXcmpStatus", - vec![], - [ - 238u8, 120u8, 185u8, 141u8, 82u8, 159u8, 41u8, 68u8, 204u8, 15u8, 46u8, - 152u8, 144u8, 74u8, 250u8, 83u8, 71u8, 105u8, 54u8, 53u8, 226u8, 87u8, - 14u8, 202u8, 58u8, 160u8, 54u8, 162u8, 239u8, 248u8, 227u8, 116u8, - ], - ) - } - #[doc = " The messages outbound in a given XCMP channel."] - pub fn outbound_xcmp_messages( - &self, - _0: impl ::std::borrow::Borrow, - _1: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "OutboundXcmpMessages", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - ), - ], - [ - 50u8, 182u8, 237u8, 191u8, 106u8, 67u8, 54u8, 1u8, 17u8, 107u8, 70u8, - 90u8, 202u8, 8u8, 63u8, 184u8, 171u8, 111u8, 192u8, 196u8, 7u8, 31u8, - 186u8, 68u8, 31u8, 63u8, 71u8, 61u8, 83u8, 223u8, 79u8, 200u8, - ], - ) - } - #[doc = " The messages outbound in a given XCMP channel."] - pub fn outbound_xcmp_messages_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "OutboundXcmpMessages", - Vec::new(), - [ - 50u8, 182u8, 237u8, 191u8, 106u8, 67u8, 54u8, 1u8, 17u8, 107u8, 70u8, - 90u8, 202u8, 8u8, 63u8, 184u8, 171u8, 111u8, 192u8, 196u8, 7u8, 31u8, - 186u8, 68u8, 31u8, 63u8, 71u8, 61u8, 83u8, 223u8, 79u8, 200u8, - ], - ) - } - #[doc = " Any signal messages waiting to be sent."] - pub fn signal_messages( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "SignalMessages", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 156u8, 242u8, 186u8, 89u8, 177u8, 195u8, 90u8, 121u8, 94u8, 106u8, - 222u8, 78u8, 19u8, 162u8, 179u8, 96u8, 38u8, 113u8, 209u8, 148u8, 29u8, - 110u8, 106u8, 167u8, 162u8, 96u8, 221u8, 20u8, 33u8, 179u8, 168u8, - 142u8, - ], - ) - } - #[doc = " Any signal messages waiting to be sent."] - pub fn signal_messages_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::std::vec::Vec<::core::primitive::u8>>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "SignalMessages", - Vec::new(), - [ - 156u8, 242u8, 186u8, 89u8, 177u8, 195u8, 90u8, 121u8, 94u8, 106u8, - 222u8, 78u8, 19u8, 162u8, 179u8, 96u8, 38u8, 113u8, 209u8, 148u8, 29u8, - 110u8, 106u8, 167u8, 162u8, 96u8, 221u8, 20u8, 33u8, 179u8, 168u8, - 142u8, - ], - ) - } - #[doc = " The configuration which controls the dynamics of the outbound queue."] - pub fn queue_config( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::cumulus_pallet_xcmp_queue::QueueConfigData, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "QueueConfig", - vec![], - [ - 154u8, 172u8, 227u8, 208u8, 130u8, 93u8, 173u8, 129u8, 33u8, 75u8, - 180u8, 100u8, 35u8, 154u8, 40u8, 188u8, 86u8, 53u8, 74u8, 118u8, 131u8, - 159u8, 240u8, 159u8, 185u8, 45u8, 165u8, 6u8, 90u8, 125u8, 77u8, 253u8, - ], - ) - } - #[doc = " The messages that exceeded max individual message weight budget."] - #[doc = ""] - #[doc = " These message stay in this storage map until they are manually dispatched via"] - #[doc = " `service_overweight`."] - pub fn overweight( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ::std::vec::Vec<::core::primitive::u8>, - )>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "Overweight", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 222u8, 249u8, 232u8, 110u8, 117u8, 229u8, 165u8, 164u8, 219u8, 219u8, - 149u8, 204u8, 25u8, 78u8, 204u8, 116u8, 111u8, 114u8, 120u8, 222u8, - 56u8, 77u8, 122u8, 147u8, 108u8, 15u8, 94u8, 161u8, 212u8, 50u8, 7u8, - 7u8, - ], - ) - } - #[doc = " The messages that exceeded max individual message weight budget."] - #[doc = ""] - #[doc = " These message stay in this storage map until they are manually dispatched via"] - #[doc = " `service_overweight`."] - pub fn overweight_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ::std::vec::Vec<::core::primitive::u8>, - )>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "Overweight", - Vec::new(), - [ - 222u8, 249u8, 232u8, 110u8, 117u8, 229u8, 165u8, 164u8, 219u8, 219u8, - 149u8, 204u8, 25u8, 78u8, 204u8, 116u8, 111u8, 114u8, 120u8, 222u8, - 56u8, 77u8, 122u8, 147u8, 108u8, 15u8, 94u8, 161u8, 212u8, 50u8, 7u8, - 7u8, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_overweight( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "CounterForOverweight", - vec![], - [ - 148u8, 226u8, 248u8, 107u8, 165u8, 97u8, 218u8, 160u8, 127u8, 48u8, - 185u8, 251u8, 35u8, 137u8, 119u8, 251u8, 151u8, 167u8, 189u8, 66u8, - 80u8, 74u8, 134u8, 129u8, 222u8, 180u8, 51u8, 182u8, 50u8, 110u8, 10u8, - 43u8, - ], - ) - } - #[doc = " The number of overweight messages ever recorded in `Overweight`. Also doubles as the next"] - #[doc = " available free overweight index."] - pub fn overweight_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "OverweightCount", - vec![], - [ - 102u8, 180u8, 196u8, 148u8, 115u8, 62u8, 46u8, 238u8, 97u8, 116u8, - 117u8, 42u8, 14u8, 5u8, 72u8, 237u8, 230u8, 46u8, 150u8, 126u8, 89u8, - 64u8, 233u8, 166u8, 180u8, 137u8, 52u8, 233u8, 252u8, 255u8, 36u8, - 20u8, - ], - ) - } - #[doc = " Whether or not the XCMP queue is suspended from executing incoming XCMs or not."] - pub fn queue_suspended( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmpQueue", - "QueueSuspended", - vec![], - [ - 23u8, 37u8, 48u8, 112u8, 222u8, 17u8, 252u8, 65u8, 160u8, 217u8, 218u8, - 30u8, 2u8, 1u8, 204u8, 0u8, 251u8, 17u8, 138u8, 197u8, 164u8, 50u8, - 122u8, 0u8, 31u8, 238u8, 147u8, 213u8, 30u8, 132u8, 184u8, 215u8, - ], - ) - } - } - } - } - pub mod polkadot_xcm { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct Send { - pub dest: ::std::boxed::Box, - pub message: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct TeleportAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ReserveTransferAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct Execute { - pub message: ::std::boxed::Box, - pub max_weight: ::sp_weights::Weight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ForceXcmVersion { - pub location: - ::std::boxed::Box, - pub xcm_version: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ForceDefaultXcmVersion { - pub maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ForceSubscribeVersionNotify { - pub location: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ForceUnsubscribeVersionNotify { - pub location: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct LimitedReserveTransferAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - pub weight_limit: runtime_types::xcm::v3::WeightLimit, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct LimitedTeleportAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - pub weight_limit: runtime_types::xcm::v3::WeightLimit, - } - pub struct TransactionApi; - impl TransactionApi { - pub fn send( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - message: runtime_types::xcm::VersionedXcm, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "send", - Send { - dest: ::std::boxed::Box::new(dest), - message: ::std::boxed::Box::new(message), - }, - [ - 246u8, 35u8, 227u8, 112u8, 223u8, 7u8, 44u8, 186u8, 60u8, 225u8, 153u8, - 249u8, 104u8, 51u8, 123u8, 227u8, 143u8, 65u8, 232u8, 209u8, 178u8, - 104u8, 70u8, 56u8, 230u8, 14u8, 75u8, 83u8, 250u8, 160u8, 9u8, 39u8, - ], - ) - } - #[doc = "Teleport some assets from the local chain to some destination chain."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] - #[doc = "with all fees taken as needed from the asset."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] - #[doc = " `dest` side. May not be empty."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - pub fn teleport_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "teleport_assets", - TeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }, - [ - 187u8, 42u8, 2u8, 96u8, 105u8, 125u8, 74u8, 53u8, 2u8, 21u8, 31u8, - 160u8, 201u8, 197u8, 157u8, 190u8, 40u8, 145u8, 5u8, 99u8, 194u8, 41u8, - 114u8, 60u8, 165u8, 186u8, 15u8, 226u8, 85u8, 113u8, 159u8, 136u8, - ], - ) - } - #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] - #[doc = "chain and forward a notification XCM."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] - #[doc = "with all fees taken as needed from the asset."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] - #[doc = " `dest` side."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - pub fn reserve_transfer_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "reserve_transfer_assets", - ReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }, - [ - 249u8, 177u8, 76u8, 204u8, 186u8, 165u8, 16u8, 186u8, 129u8, 239u8, - 65u8, 252u8, 9u8, 132u8, 32u8, 164u8, 117u8, 177u8, 40u8, 21u8, 196u8, - 246u8, 147u8, 2u8, 95u8, 110u8, 68u8, 162u8, 148u8, 9u8, 59u8, 170u8, - ], - ) - } - #[doc = "Execute an XCM message from a local, signed, origin."] - #[doc = ""] - #[doc = "An event is deposited indicating whether `msg` could be executed completely or only"] - #[doc = "partially."] - #[doc = ""] - #[doc = "No more than `max_weight` will be used in its attempted execution. If this is less than the"] - #[doc = "maximum amount of weight that the message could take to be executed, then no execution"] - #[doc = "attempt will be made."] - #[doc = ""] - #[doc = "NOTE: A successful return to this does *not* imply that the `msg` was executed successfully"] - #[doc = "to completion; only that *some* of it was executed."] - pub fn execute( - &self, - message: runtime_types::xcm::VersionedXcm, - max_weight: ::sp_weights::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "execute", - Execute { message: ::std::boxed::Box::new(message), max_weight }, - [ - 102u8, 41u8, 146u8, 29u8, 241u8, 205u8, 95u8, 153u8, 228u8, 141u8, - 11u8, 228u8, 13u8, 44u8, 75u8, 204u8, 174u8, 35u8, 155u8, 104u8, 204u8, - 82u8, 239u8, 98u8, 249u8, 187u8, 193u8, 1u8, 122u8, 88u8, 162u8, 200u8, - ], - ) - } - #[doc = "Extoll that a particular destination can be communicated with through a particular"] - #[doc = "version of XCM."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The destination that is being described."] - #[doc = "- `xcm_version`: The latest version of XCM that `location` supports."] - pub fn force_xcm_version( - &self, - location: runtime_types::xcm::v3::multilocation::MultiLocation, - xcm_version: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "force_xcm_version", - ForceXcmVersion { location: ::std::boxed::Box::new(location), xcm_version }, - [ - 68u8, 48u8, 95u8, 61u8, 152u8, 95u8, 213u8, 126u8, 209u8, 176u8, 230u8, - 160u8, 164u8, 42u8, 128u8, 62u8, 175u8, 3u8, 161u8, 170u8, 20u8, 31u8, - 216u8, 122u8, 31u8, 77u8, 64u8, 182u8, 121u8, 41u8, 23u8, 80u8, - ], - ) - } - #[doc = "Set a safe XCM version (the version that XCM should be encoded with if the most recent"] - #[doc = "version a destination can accept is unknown)."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `maybe_xcm_version`: The default XCM encoding version, or `None` to disable."] - pub fn force_default_xcm_version( - &self, - maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "force_default_xcm_version", - ForceDefaultXcmVersion { maybe_xcm_version }, - [ - 38u8, 36u8, 59u8, 231u8, 18u8, 79u8, 76u8, 9u8, 200u8, 125u8, 214u8, - 166u8, 37u8, 99u8, 111u8, 161u8, 135u8, 2u8, 133u8, 157u8, 165u8, 18u8, - 152u8, 81u8, 209u8, 255u8, 137u8, 237u8, 28u8, 126u8, 224u8, 141u8, - ], - ) - } - #[doc = "Ask a location to notify us regarding their XCM version and any changes to it."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The location to which we should subscribe for XCM version notifications."] - pub fn force_subscribe_version_notify( - &self, - location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "force_subscribe_version_notify", - ForceSubscribeVersionNotify { location: ::std::boxed::Box::new(location) }, - [ - 236u8, 37u8, 153u8, 26u8, 174u8, 187u8, 154u8, 38u8, 179u8, 223u8, - 130u8, 32u8, 128u8, 30u8, 148u8, 229u8, 7u8, 185u8, 174u8, 9u8, 96u8, - 215u8, 189u8, 178u8, 148u8, 141u8, 249u8, 118u8, 7u8, 238u8, 1u8, 49u8, - ], - ) - } - #[doc = "Require that a particular destination should no longer notify us regarding any XCM"] - #[doc = "version changes."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The location to which we are currently subscribed for XCM version"] - #[doc = " notifications which we no longer desire."] - pub fn force_unsubscribe_version_notify( - &self, - location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "force_unsubscribe_version_notify", - ForceUnsubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }, - [ - 154u8, 169u8, 145u8, 211u8, 185u8, 71u8, 9u8, 63u8, 3u8, 158u8, 187u8, - 173u8, 115u8, 166u8, 100u8, 66u8, 12u8, 40u8, 198u8, 40u8, 213u8, - 104u8, 95u8, 183u8, 215u8, 53u8, 94u8, 158u8, 106u8, 56u8, 149u8, 52u8, - ], - ) - } - #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] - #[doc = "chain and forward a notification XCM."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] - #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] - #[doc = "at risk."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] - #[doc = " `dest` side."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] - pub fn limited_reserve_transfer_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v3::WeightLimit, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "limited_reserve_transfer_assets", - LimitedReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, - [ - 131u8, 191u8, 89u8, 27u8, 236u8, 142u8, 130u8, 129u8, 245u8, 95u8, - 159u8, 96u8, 252u8, 80u8, 28u8, 40u8, 128u8, 55u8, 41u8, 123u8, 22u8, - 18u8, 0u8, 236u8, 77u8, 68u8, 135u8, 181u8, 40u8, 47u8, 92u8, 240u8, - ], - ) - } - #[doc = "Teleport some assets from the local chain to some destination chain."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] - #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] - #[doc = "at risk."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] - #[doc = " `dest` side. May not be empty."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] - pub fn limited_teleport_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v3::WeightLimit, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "PolkadotXcm", - "limited_teleport_assets", - LimitedTeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, - [ - 234u8, 19u8, 104u8, 174u8, 98u8, 159u8, 205u8, 110u8, 240u8, 78u8, - 186u8, 138u8, 236u8, 116u8, 104u8, 215u8, 57u8, 178u8, 166u8, 208u8, - 197u8, 113u8, 101u8, 56u8, 23u8, 56u8, 84u8, 14u8, 173u8, 70u8, 211u8, - 201u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_xcm::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Execution of an XCM message was attempted."] - #[doc = ""] - #[doc = "\\[ outcome \\]"] - pub struct Attempted(pub runtime_types::xcm::v3::traits::Outcome); - impl ::subxt::events::StaticEvent for Attempted { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "Attempted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A XCM message was sent."] - #[doc = ""] - #[doc = "\\[ origin, destination, message \\]"] - pub struct Sent( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::Xcm, - ); - impl ::subxt::events::StaticEvent for Sent { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "Sent"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Query response received which does not match a registered query. This may be because a"] - #[doc = "matching query was never registered, it may be because it is a duplicate response, or"] - #[doc = "because the query timed out."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] - pub struct UnexpectedResponse( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::events::StaticEvent for UnexpectedResponse { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "UnexpectedResponse"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Query response has been received and is ready for taking with `take_response`. There is"] - #[doc = "no registered notification call."] - #[doc = ""] - #[doc = "\\[ id, response \\]"] - pub struct ResponseReady( - pub ::core::primitive::u64, - pub runtime_types::xcm::v3::Response, - ); - impl ::subxt::events::StaticEvent for ResponseReady { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "ResponseReady"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Query response has been received and query is removed. The registered notification has"] - #[doc = "been dispatched and executed successfully."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - pub struct Notified( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::events::StaticEvent for Notified { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "Notified"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Query response has been received and query is removed. The registered notification could"] - #[doc = "not be dispatched because the dispatch weight is greater than the maximum weight"] - #[doc = "originally budgeted by this runtime for the query result."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index, actual weight, max budgeted weight \\]"] - pub struct NotifyOverweight( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - pub ::sp_weights::Weight, - pub ::sp_weights::Weight, - ); - impl ::subxt::events::StaticEvent for NotifyOverweight { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "NotifyOverweight"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Query response has been received and query is removed. There was a general error with"] - #[doc = "dispatching the notification call."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - pub struct NotifyDispatchError( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::events::StaticEvent for NotifyDispatchError { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "NotifyDispatchError"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Query response has been received and query is removed. The dispatch was unable to be"] - #[doc = "decoded into a `Call`; this might be due to dispatch function having a signature which"] - #[doc = "is not `(origin, QueryId, Response)`."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - pub struct NotifyDecodeFailed( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::events::StaticEvent for NotifyDecodeFailed { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "NotifyDecodeFailed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Expected query response has been received but the origin location of the response does"] - #[doc = "not match that expected. The query remains registered for a later, valid, response to"] - #[doc = "be received and acted upon."] - #[doc = ""] - #[doc = "\\[ origin location, id, expected location \\]"] - pub struct InvalidResponder( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub ::core::option::Option, - ); - impl ::subxt::events::StaticEvent for InvalidResponder { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "InvalidResponder"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Expected query response has been received but the expected origin location placed in"] - #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] - #[doc = ""] - #[doc = "This is unexpected (since a location placed in storage in a previously executing"] - #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] - #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] - #[doc = "needed."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] - pub struct InvalidResponderVersion( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::events::StaticEvent for InvalidResponderVersion { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "InvalidResponderVersion"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Received query response has been read and removed."] - #[doc = ""] - #[doc = "\\[ id \\]"] - pub struct ResponseTaken(pub ::core::primitive::u64); - impl ::subxt::events::StaticEvent for ResponseTaken { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "ResponseTaken"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some assets have been placed in an asset trap."] - #[doc = ""] - #[doc = "\\[ hash, origin, assets \\]"] - pub struct AssetsTrapped( - pub ::subxt::utils::H256, - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::VersionedMultiAssets, - ); - impl ::subxt::events::StaticEvent for AssetsTrapped { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "AssetsTrapped"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "An XCM version change notification message has been attempted to be sent."] - #[doc = ""] - #[doc = "The cost of sending it (borne by the chain) is included."] - #[doc = ""] - #[doc = "\\[ destination, result, cost \\]"] - pub struct VersionChangeNotified( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u32, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - impl ::subxt::events::StaticEvent for VersionChangeNotified { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "VersionChangeNotified"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "The supported version of a location has been changed. This might be through an"] - #[doc = "automatic notification or a manual intervention."] - #[doc = ""] - #[doc = "\\[ location, XCM version \\]"] - pub struct SupportedVersionChanged( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for SupportedVersionChanged { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "SupportedVersionChanged"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A given location which had a version change subscription was dropped owing to an error"] - #[doc = "sending the notification to it."] - #[doc = ""] - #[doc = "\\[ location, query ID, error \\]"] - pub struct NotifyTargetSendFail( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub runtime_types::xcm::v3::traits::Error, - ); - impl ::subxt::events::StaticEvent for NotifyTargetSendFail { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "NotifyTargetSendFail"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A given location which had a version change subscription was dropped owing to an error"] - #[doc = "migrating the location to our new XCM format."] - #[doc = ""] - #[doc = "\\[ location, query ID \\]"] - pub struct NotifyTargetMigrationFail( - pub runtime_types::xcm::VersionedMultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::events::StaticEvent for NotifyTargetMigrationFail { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "NotifyTargetMigrationFail"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Expected query response has been received but the expected querier location placed in"] - #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] - #[doc = ""] - #[doc = "This is unexpected (since a location placed in storage in a previously executing"] - #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] - #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] - #[doc = "needed."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] - pub struct InvalidQuerierVersion( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::events::StaticEvent for InvalidQuerierVersion { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "InvalidQuerierVersion"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Expected query response has been received but the querier location of the response does"] - #[doc = "not match the expected. The query remains registered for a later, valid, response to"] - #[doc = "be received and acted upon."] - #[doc = ""] - #[doc = "\\[ origin location, id, expected querier, maybe actual querier \\]"] - pub struct InvalidQuerier( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub ::core::option::Option, - ); - impl ::subxt::events::StaticEvent for InvalidQuerier { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "InvalidQuerier"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "A remote has requested XCM version change notification from us and we have honored it."] - #[doc = "A version information message is sent to them and its cost is included."] - #[doc = ""] - #[doc = "\\[ destination location, cost \\]"] - pub struct VersionNotifyStarted( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - impl ::subxt::events::StaticEvent for VersionNotifyStarted { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "VersionNotifyStarted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "We have requested that a remote chain sends us XCM version change notifications."] - #[doc = ""] - #[doc = "\\[ destination location, cost \\]"] - pub struct VersionNotifyRequested( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - impl ::subxt::events::StaticEvent for VersionNotifyRequested { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "VersionNotifyRequested"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "We have requested that a remote chain stops sending us XCM version change notifications."] - #[doc = ""] - #[doc = "\\[ destination location, cost \\]"] - pub struct VersionNotifyUnrequested( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - impl ::subxt::events::StaticEvent for VersionNotifyUnrequested { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "VersionNotifyUnrequested"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Fees were paid from a location for an operation (often for using `SendXcm`)."] - #[doc = ""] - #[doc = "\\[ paying location, fees \\]"] - pub struct FeesPaid( - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::v3::multiasset::MultiAssets, - ); - impl ::subxt::events::StaticEvent for FeesPaid { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "FeesPaid"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Some assets have been claimed from an asset trap"] - #[doc = ""] - #[doc = "\\[ hash, origin, assets \\]"] - pub struct AssetsClaimed( - pub ::subxt::utils::H256, - pub runtime_types::xcm::v3::multilocation::MultiLocation, - pub runtime_types::xcm::VersionedMultiAssets, - ); - impl ::subxt::events::StaticEvent for AssetsClaimed { - const PALLET: &'static str = "PolkadotXcm"; - const EVENT: &'static str = "AssetsClaimed"; - } - } - } - pub mod cumulus_xcm { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::cumulus_pallet_xcm::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward message is invalid XCM."] - #[doc = "\\[ id \\]"] - pub struct InvalidFormat(pub [::core::primitive::u8; 32usize]); - impl ::subxt::events::StaticEvent for InvalidFormat { - const PALLET: &'static str = "CumulusXcm"; - const EVENT: &'static str = "InvalidFormat"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward message is unsupported version of XCM."] - #[doc = "\\[ id \\]"] - pub struct UnsupportedVersion(pub [::core::primitive::u8; 32usize]); - impl ::subxt::events::StaticEvent for UnsupportedVersion { - const PALLET: &'static str = "CumulusXcm"; - const EVENT: &'static str = "UnsupportedVersion"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward message executed with the given outcome."] - #[doc = "\\[ id, outcome \\]"] - pub struct ExecutedDownward( - pub [::core::primitive::u8; 32usize], - pub runtime_types::xcm::v3::traits::Outcome, - ); - impl ::subxt::events::StaticEvent for ExecutedDownward { - const PALLET: &'static str = "CumulusXcm"; - const EVENT: &'static str = "ExecutedDownward"; - } - } - } - pub mod dmp_queue { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ServiceOverweight { - pub index: ::core::primitive::u64, - pub weight_limit: ::sp_weights::Weight, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Service a single overweight message."] - pub fn service_overweight( - &self, - index: ::core::primitive::u64, - weight_limit: ::sp_weights::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "DmpQueue", - "service_overweight", - ServiceOverweight { index, weight_limit }, - [ - 121u8, 236u8, 235u8, 23u8, 210u8, 238u8, 238u8, 122u8, 15u8, 86u8, - 34u8, 119u8, 105u8, 100u8, 214u8, 236u8, 117u8, 39u8, 254u8, 235u8, - 189u8, 15u8, 72u8, 74u8, 225u8, 134u8, 148u8, 126u8, 31u8, 203u8, - 144u8, 106u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::cumulus_pallet_dmp_queue::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward message is invalid XCM."] - pub struct InvalidFormat { - pub message_id: [::core::primitive::u8; 32usize], - } - impl ::subxt::events::StaticEvent for InvalidFormat { - const PALLET: &'static str = "DmpQueue"; - const EVENT: &'static str = "InvalidFormat"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward message is unsupported version of XCM."] - pub struct UnsupportedVersion { - pub message_id: [::core::primitive::u8; 32usize], - } - impl ::subxt::events::StaticEvent for UnsupportedVersion { - const PALLET: &'static str = "DmpQueue"; - const EVENT: &'static str = "UnsupportedVersion"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward message executed with the given outcome."] - pub struct ExecutedDownward { - pub message_id: [::core::primitive::u8; 32usize], - pub outcome: runtime_types::xcm::v3::traits::Outcome, - } - impl ::subxt::events::StaticEvent for ExecutedDownward { - const PALLET: &'static str = "DmpQueue"; - const EVENT: &'static str = "ExecutedDownward"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "The weight limit for handling downward messages was reached."] - pub struct WeightExhausted { - pub message_id: [::core::primitive::u8; 32usize], - pub remaining_weight: ::sp_weights::Weight, - pub required_weight: ::sp_weights::Weight, - } - impl ::subxt::events::StaticEvent for WeightExhausted { - const PALLET: &'static str = "DmpQueue"; - const EVENT: &'static str = "WeightExhausted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward message is overweight and was placed in the overweight queue."] - pub struct OverweightEnqueued { - pub message_id: [::core::primitive::u8; 32usize], - pub overweight_index: ::core::primitive::u64, - pub required_weight: ::sp_weights::Weight, - } - impl ::subxt::events::StaticEvent for OverweightEnqueued { - const PALLET: &'static str = "DmpQueue"; - const EVENT: &'static str = "OverweightEnqueued"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Downward message from the overweight queue was executed."] - pub struct OverweightServiced { - pub overweight_index: ::core::primitive::u64, - pub weight_used: ::sp_weights::Weight, - } - impl ::subxt::events::StaticEvent for OverweightServiced { - const PALLET: &'static str = "DmpQueue"; - const EVENT: &'static str = "OverweightServiced"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "The maximum number of downward messages was."] - pub struct MaxMessagesExhausted { - pub message_id: [::core::primitive::u8; 32usize], - } - impl ::subxt::events::StaticEvent for MaxMessagesExhausted { - const PALLET: &'static str = "DmpQueue"; - const EVENT: &'static str = "MaxMessagesExhausted"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The configuration."] - pub fn configuration( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::cumulus_pallet_dmp_queue::ConfigData, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "DmpQueue", - "Configuration", - vec![], - [ - 133u8, 113u8, 115u8, 164u8, 128u8, 145u8, 234u8, 106u8, 150u8, 54u8, - 247u8, 135u8, 181u8, 197u8, 178u8, 30u8, 204u8, 46u8, 6u8, 137u8, 82u8, - 1u8, 75u8, 171u8, 7u8, 157u8, 3u8, 19u8, 92u8, 10u8, 234u8, 66u8, - ], - ) - } - #[doc = " The page index."] - pub fn page_index( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::cumulus_pallet_dmp_queue::PageIndexData, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "DmpQueue", - "PageIndex", - vec![], - [ - 94u8, 132u8, 34u8, 67u8, 10u8, 22u8, 235u8, 96u8, 168u8, 26u8, 57u8, - 200u8, 130u8, 218u8, 37u8, 71u8, 28u8, 119u8, 78u8, 107u8, 209u8, - 120u8, 190u8, 2u8, 101u8, 215u8, 122u8, 187u8, 94u8, 38u8, 255u8, - 234u8, - ], - ) - } - #[doc = " The queue pages."] - pub fn pages( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - ::core::primitive::u32, - ::std::vec::Vec<::core::primitive::u8>, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "DmpQueue", - "Pages", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 228u8, 86u8, 33u8, 107u8, 248u8, 4u8, 223u8, 175u8, 222u8, 25u8, 204u8, - 42u8, 235u8, 21u8, 215u8, 91u8, 167u8, 14u8, 133u8, 151u8, 190u8, 57u8, - 138u8, 208u8, 79u8, 244u8, 132u8, 14u8, 48u8, 247u8, 171u8, 108u8, - ], - ) - } - #[doc = " The queue pages."] - pub fn pages_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - ::core::primitive::u32, - ::std::vec::Vec<::core::primitive::u8>, - )>, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "DmpQueue", - "Pages", - Vec::new(), - [ - 228u8, 86u8, 33u8, 107u8, 248u8, 4u8, 223u8, 175u8, 222u8, 25u8, 204u8, - 42u8, 235u8, 21u8, 215u8, 91u8, 167u8, 14u8, 133u8, 151u8, 190u8, 57u8, - 138u8, 208u8, 79u8, 244u8, 132u8, 14u8, 48u8, 247u8, 171u8, 108u8, - ], - ) - } - #[doc = " The overweight messages."] - pub fn overweight( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::std::vec::Vec<::core::primitive::u8>, - )>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "DmpQueue", - "Overweight", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 222u8, 85u8, 143u8, 49u8, 42u8, 248u8, 138u8, 163u8, 46u8, 199u8, - 188u8, 61u8, 137u8, 135u8, 127u8, 146u8, 210u8, 254u8, 121u8, 42u8, - 112u8, 114u8, 22u8, 228u8, 207u8, 207u8, 245u8, 175u8, 152u8, 140u8, - 225u8, 237u8, - ], - ) - } - #[doc = " The overweight messages."] - pub fn overweight_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::std::vec::Vec<::core::primitive::u8>, - )>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "DmpQueue", - "Overweight", - Vec::new(), - [ - 222u8, 85u8, 143u8, 49u8, 42u8, 248u8, 138u8, 163u8, 46u8, 199u8, - 188u8, 61u8, 137u8, 135u8, 127u8, 146u8, 210u8, 254u8, 121u8, 42u8, - 112u8, 114u8, 22u8, 228u8, 207u8, 207u8, 245u8, 175u8, 152u8, 140u8, - 225u8, 237u8, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_overweight( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "DmpQueue", - "CounterForOverweight", - vec![], - [ - 148u8, 226u8, 248u8, 107u8, 165u8, 97u8, 218u8, 160u8, 127u8, 48u8, - 185u8, 251u8, 35u8, 137u8, 119u8, 251u8, 151u8, 167u8, 189u8, 66u8, - 80u8, 74u8, 134u8, 129u8, 222u8, 180u8, 51u8, 182u8, 50u8, 110u8, 10u8, - 43u8, - ], - ) - } - } - } - } - pub mod bridge_relayers { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ClaimRewards { - pub rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Claim accumulated rewards."] - pub fn claim_rewards( - &self, - rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeRelayers", - "claim_rewards", - ClaimRewards { rewards_account_params }, - [ - 141u8, 52u8, 193u8, 42u8, 145u8, 26u8, 147u8, 35u8, 227u8, 221u8, - 221u8, 188u8, 104u8, 186u8, 123u8, 46u8, 190u8, 236u8, 120u8, 19u8, - 230u8, 219u8, 238u8, 227u8, 75u8, 35u8, 36u8, 177u8, 227u8, 130u8, - 103u8, 128u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bridge_relayers::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Reward has been paid to the relayer."] - pub struct RewardPaid { - pub relayer: ::sp_core::crypto::AccountId32, - pub rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, - pub reward: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for RewardPaid { - const PALLET: &'static str = "BridgeRelayers"; - const EVENT: &'static str = "RewardPaid"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Map of the relayer => accumulated reward."] - pub fn relayer_rewards( - &self, - _0: impl ::std::borrow::Borrow<::sp_core::crypto::AccountId32>, - _1: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeRelayers", - "RelayerRewards", - vec![ - ::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - ), - ::subxt::storage::address::StorageMapKey::new( - _1.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - ), - ], - [ - 116u8, 81u8, 48u8, 55u8, 199u8, 26u8, 100u8, 7u8, 177u8, 230u8, 132u8, - 248u8, 221u8, 90u8, 33u8, 155u8, 198u8, 216u8, 43u8, 149u8, 92u8, - 100u8, 199u8, 183u8, 150u8, 214u8, 199u8, 222u8, 224u8, 228u8, 238u8, - 108u8, - ], - ) - } - #[doc = " Map of the relayer => accumulated reward."] - pub fn relayer_rewards_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeRelayers", - "RelayerRewards", - Vec::new(), - [ - 116u8, 81u8, 48u8, 55u8, 199u8, 26u8, 100u8, 7u8, 177u8, 230u8, 132u8, - 248u8, 221u8, 90u8, 33u8, 155u8, 198u8, 216u8, 43u8, 149u8, 92u8, - 100u8, 199u8, 183u8, 150u8, 214u8, 199u8, 222u8, 224u8, 228u8, 238u8, - 108u8, - ], - ) - } - } - } - } - pub mod bridge_millau_grandpa { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SubmitFinalityProof { - pub finality_target: ::std::boxed::Box< - ::sp_runtime::generic::Header< - ::core::primitive::u64, - ::bp_millau::BlakeTwoAndKeccak256, - >, - >, - pub justification: ::bp_header_chain::justification::GrandpaJustification< - ::sp_runtime::generic::Header< - ::core::primitive::u64, - ::bp_millau::BlakeTwoAndKeccak256, - >, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct Initialize { - pub init_data: ::bp_header_chain::InitializationData< - ::sp_runtime::generic::Header< - ::core::primitive::u64, - ::bp_millau::BlakeTwoAndKeccak256, - >, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetOwner { - pub new_owner: ::core::option::Option<::sp_core::crypto::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetOperatingMode { - pub operating_mode: runtime_types::bp_runtime::BasicOperatingMode, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Verify a target header is finalized according to the given finality proof."] - #[doc = ""] - #[doc = "It will use the underlying storage pallet to fetch information about the current"] - #[doc = "authorities and best finalized header in order to verify that the header is finalized."] - #[doc = ""] - #[doc = "If successful in verification, it will write the target header to the underlying storage"] - #[doc = "pallet."] - pub fn submit_finality_proof( - &self, - finality_target: ::sp_runtime::generic::Header< - ::core::primitive::u64, - ::bp_millau::BlakeTwoAndKeccak256, - >, - justification: ::bp_header_chain::justification::GrandpaJustification< - ::sp_runtime::generic::Header< - ::core::primitive::u64, - ::bp_millau::BlakeTwoAndKeccak256, - >, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeMillauGrandpa", - "submit_finality_proof", - SubmitFinalityProof { - finality_target: ::std::boxed::Box::new(finality_target), - justification, - }, - [ - 3u8, 161u8, 243u8, 208u8, 245u8, 135u8, 86u8, 233u8, 103u8, 140u8, - 81u8, 3u8, 119u8, 185u8, 68u8, 167u8, 208u8, 155u8, 169u8, 201u8, - 209u8, 248u8, 162u8, 45u8, 155u8, 225u8, 173u8, 62u8, 156u8, 171u8, - 19u8, 190u8, - ], - ) - } - #[doc = "Bootstrap the bridge pallet with an initial header and authority set from which to sync."] - #[doc = ""] - #[doc = "The initial configuration provided does not need to be the genesis header of the bridged"] - #[doc = "chain, it can be any arbitrary header. You can also provide the next scheduled set"] - #[doc = "change if it is already know."] - #[doc = ""] - #[doc = "This function is only allowed to be called from a trusted origin and writes to storage"] - #[doc = "with practically no checks in terms of the validity of the data. It is important that"] - #[doc = "you ensure that valid data is being passed in."] - pub fn initialize( - &self, - init_data: ::bp_header_chain::InitializationData< - ::sp_runtime::generic::Header< - ::core::primitive::u64, - ::bp_millau::BlakeTwoAndKeccak256, - >, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeMillauGrandpa", - "initialize", - Initialize { init_data }, - [ - 244u8, 188u8, 202u8, 145u8, 218u8, 91u8, 74u8, 80u8, 41u8, 185u8, - 239u8, 178u8, 231u8, 128u8, 198u8, 90u8, 135u8, 219u8, 200u8, 23u8, - 194u8, 47u8, 61u8, 222u8, 194u8, 84u8, 142u8, 37u8, 64u8, 37u8, 69u8, - 198u8, - ], - ) - } - #[doc = "Change `PalletOwner`."] - #[doc = ""] - #[doc = "May only be called either by root, or by `PalletOwner`."] - pub fn set_owner( - &self, - new_owner: ::core::option::Option<::sp_core::crypto::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeMillauGrandpa", - "set_owner", - SetOwner { new_owner }, - [ - 100u8, 221u8, 84u8, 142u8, 158u8, 5u8, 47u8, 212u8, 9u8, 35u8, 82u8, - 135u8, 108u8, 238u8, 231u8, 197u8, 77u8, 219u8, 176u8, 222u8, 88u8, - 167u8, 152u8, 34u8, 177u8, 244u8, 160u8, 195u8, 211u8, 3u8, 66u8, - 253u8, - ], - ) - } - #[doc = "Halt or resume all pallet operations."] - #[doc = ""] - #[doc = "May only be called either by root, or by `PalletOwner`."] - pub fn set_operating_mode( - &self, - operating_mode: runtime_types::bp_runtime::BasicOperatingMode, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeMillauGrandpa", - "set_operating_mode", - SetOperatingMode { operating_mode }, - [ - 128u8, 25u8, 81u8, 145u8, 111u8, 185u8, 226u8, 152u8, 18u8, 51u8, 89u8, - 236u8, 200u8, 157u8, 157u8, 186u8, 207u8, 208u8, 152u8, 168u8, 12u8, - 39u8, 249u8, 48u8, 195u8, 160u8, 54u8, 73u8, 30u8, 230u8, 25u8, 46u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bridge_grandpa::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Best finalized chain header has been updated to the header with given number and hash."] - pub struct UpdatedBestFinalizedHeader { - pub number: ::core::primitive::u64, - pub hash: ::bp_millau::MillauHash, - } - impl ::subxt::events::StaticEvent for UpdatedBestFinalizedHeader { - const PALLET: &'static str = "BridgeMillauGrandpa"; - const EVENT: &'static str = "UpdatedBestFinalizedHeader"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current number of requests which have written to storage."] - #[doc = ""] - #[doc = " If the `RequestCount` hits `MaxRequests`, no more calls will be allowed to the pallet until"] - #[doc = " the request capacity is increased."] - #[doc = ""] - #[doc = " The `RequestCount` is decreased by one at the beginning of every block. This is to ensure"] - #[doc = " that the pallet can always make progress."] - pub fn request_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "RequestCount", - vec![], - [ - 100u8, 156u8, 98u8, 176u8, 229u8, 85u8, 81u8, 159u8, 120u8, 156u8, - 33u8, 179u8, 224u8, 237u8, 52u8, 198u8, 81u8, 81u8, 10u8, 180u8, 53u8, - 141u8, 96u8, 4u8, 39u8, 217u8, 58u8, 9u8, 57u8, 79u8, 47u8, 201u8, - ], - ) - } - #[doc = " Hash of the header used to bootstrap the pallet."] - pub fn initial_hash( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::bp_millau::MillauHash>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "InitialHash", - vec![], - [ - 167u8, 131u8, 64u8, 215u8, 102u8, 70u8, 21u8, 34u8, 254u8, 233u8, 2u8, - 49u8, 253u8, 67u8, 235u8, 10u8, 21u8, 223u8, 220u8, 198u8, 180u8, - 137u8, 88u8, 251u8, 230u8, 108u8, 9u8, 104u8, 101u8, 105u8, 38u8, - 138u8, - ], - ) - } - #[doc = " Hash of the best finalized header."] - pub fn best_finalized( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_runtime::HeaderId< - ::bp_millau::MillauHash, - ::core::primitive::u64, - >, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "BestFinalized", - vec![], - [ - 61u8, 173u8, 97u8, 223u8, 180u8, 235u8, 85u8, 126u8, 217u8, 228u8, - 87u8, 174u8, 116u8, 156u8, 162u8, 252u8, 100u8, 200u8, 138u8, 14u8, - 102u8, 177u8, 66u8, 164u8, 216u8, 114u8, 18u8, 223u8, 94u8, 78u8, - 107u8, 58u8, - ], - ) - } - #[doc = " A ring buffer of imported hashes. Ordered by the insertion time."] - pub fn imported_hashes( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::bp_millau::MillauHash>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "ImportedHashes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 249u8, 185u8, 202u8, 36u8, 40u8, 197u8, 111u8, 168u8, 136u8, 138u8, - 84u8, 135u8, 69u8, 34u8, 181u8, 46u8, 158u8, 16u8, 150u8, 190u8, 81u8, - 53u8, 239u8, 199u8, 83u8, 93u8, 197u8, 205u8, 129u8, 173u8, 141u8, - 43u8, - ], - ) - } - #[doc = " A ring buffer of imported hashes. Ordered by the insertion time."] - pub fn imported_hashes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::bp_millau::MillauHash>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "ImportedHashes", - Vec::new(), - [ - 249u8, 185u8, 202u8, 36u8, 40u8, 197u8, 111u8, 168u8, 136u8, 138u8, - 84u8, 135u8, 69u8, 34u8, 181u8, 46u8, 158u8, 16u8, 150u8, 190u8, 81u8, - 53u8, 239u8, 199u8, 83u8, 93u8, 197u8, 205u8, 129u8, 173u8, 141u8, - 43u8, - ], - ) - } - #[doc = " Current ring buffer position."] - pub fn imported_hashes_pointer( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "ImportedHashesPointer", - vec![], - [ - 159u8, 83u8, 35u8, 45u8, 27u8, 249u8, 155u8, 131u8, 181u8, 196u8, - 224u8, 26u8, 92u8, 132u8, 127u8, 237u8, 13u8, 142u8, 196u8, 147u8, - 221u8, 216u8, 11u8, 78u8, 190u8, 241u8, 201u8, 96u8, 74u8, 185u8, - 208u8, 42u8, - ], - ) - } - #[doc = " Relevant fields of imported headers."] - pub fn imported_headers( - &self, - _0: impl ::std::borrow::Borrow<::bp_millau::MillauHash>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_header_chain::StoredHeaderData< - ::core::primitive::u64, - ::bp_millau::MillauHash, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "ImportedHeaders", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 109u8, 41u8, 102u8, 223u8, 133u8, 169u8, 46u8, 221u8, 235u8, 67u8, - 28u8, 192u8, 2u8, 242u8, 215u8, 166u8, 227u8, 182u8, 136u8, 217u8, - 61u8, 10u8, 246u8, 70u8, 17u8, 246u8, 223u8, 113u8, 9u8, 136u8, 181u8, - 242u8, - ], - ) - } - #[doc = " Relevant fields of imported headers."] - pub fn imported_headers_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_header_chain::StoredHeaderData< - ::core::primitive::u64, - ::bp_millau::MillauHash, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "ImportedHeaders", - Vec::new(), - [ - 109u8, 41u8, 102u8, 223u8, 133u8, 169u8, 46u8, 221u8, 235u8, 67u8, - 28u8, 192u8, 2u8, 242u8, 215u8, 166u8, 227u8, 182u8, 136u8, 217u8, - 61u8, 10u8, 246u8, 70u8, 17u8, 246u8, 223u8, 113u8, 9u8, 136u8, 181u8, - 242u8, - ], - ) - } - #[doc = " The current GRANDPA Authority set."] - pub fn current_authority_set( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bridge_grandpa::storage_types::StoredAuthoritySet, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "CurrentAuthoritySet", - vec![], - [ - 249u8, 40u8, 229u8, 120u8, 141u8, 219u8, 206u8, 5u8, 54u8, 121u8, - 207u8, 77u8, 8u8, 80u8, 105u8, 107u8, 151u8, 111u8, 82u8, 119u8, 8u8, - 31u8, 104u8, 82u8, 92u8, 156u8, 37u8, 160u8, 235u8, 64u8, 62u8, 94u8, - ], - ) - } - #[doc = " Optional pallet owner."] - #[doc = ""] - #[doc = " Pallet owner has a right to halt all pallet operations and then resume it. If it is"] - #[doc = " `None`, then there are no direct ways to halt/resume pallet operations, but other"] - #[doc = " runtime methods may still be used to do that (i.e. democracy::referendum to update halt"] - #[doc = " flag directly or call the `halt_operations`)."] - pub fn pallet_owner( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::sp_core::crypto::AccountId32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "PalletOwner", - vec![], - [ - 89u8, 42u8, 74u8, 119u8, 21u8, 164u8, 30u8, 115u8, 207u8, 126u8, 98u8, - 16u8, 162u8, 214u8, 67u8, 172u8, 178u8, 223u8, 139u8, 121u8, 174u8, - 89u8, 215u8, 75u8, 200u8, 161u8, 61u8, 195u8, 65u8, 222u8, 246u8, - 233u8, - ], - ) - } - #[doc = " The current operating mode of the pallet."] - #[doc = ""] - #[doc = " Depending on the mode either all, or no transactions will be allowed."] - pub fn pallet_operating_mode( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_runtime::BasicOperatingMode, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauGrandpa", - "PalletOperatingMode", - vec![], - [ - 218u8, 66u8, 212u8, 71u8, 38u8, 152u8, 55u8, 129u8, 125u8, 231u8, 91u8, - 216u8, 157u8, 141u8, 173u8, 146u8, 30u8, 40u8, 132u8, 107u8, 97u8, - 39u8, 36u8, 81u8, 231u8, 222u8, 113u8, 136u8, 233u8, 212u8, 225u8, - 75u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The upper bound on the number of requests allowed by the pallet."] - #[doc = ""] - #[doc = " A request refers to an action which writes a header to storage."] - #[doc = ""] - #[doc = " Once this bound is reached the pallet will not allow any dispatchables to be called"] - #[doc = " until the request count has decreased."] - pub fn max_requests( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "BridgeMillauGrandpa", - "MaxRequests", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Maximal number of finalized headers to keep in the storage."] - #[doc = ""] - #[doc = " The setting is there to prevent growing the on-chain state indefinitely. Note"] - #[doc = " the setting does not relate to block numbers - we will simply keep as much items"] - #[doc = " in the storage, so it doesn't guarantee any fixed timeframe for finality headers."] - #[doc = ""] - #[doc = " Incautious change of this constant may lead to orphan entries in the runtime storage."] - pub fn headers_to_keep( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "BridgeMillauGrandpa", - "HeadersToKeep", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - } - } - } - pub mod bridge_millau_messages { - use super::{root_mod, runtime_types}; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetOwner { - pub new_owner: ::core::option::Option<::sp_core::crypto::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct SetOperatingMode { - pub operating_mode: runtime_types::bp_messages::MessagesOperatingMode, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ReceiveMessagesProof { - pub relayer_id_at_bridged_chain: ::sp_core::crypto::AccountId32, - pub proof: ::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< - ::bp_millau::MillauHash, - >, - pub messages_count: ::core::primitive::u32, - pub dispatch_weight: ::sp_weights::Weight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - pub struct ReceiveMessagesDeliveryProof { pub proof : :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: bp_millau :: MillauHash > , pub relayers_state : :: bp_messages :: UnrewardedRelayersState , } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Change `PalletOwner`."] - #[doc = ""] - #[doc = "May only be called either by root, or by `PalletOwner`."] - pub fn set_owner( - &self, - new_owner: ::core::option::Option<::sp_core::crypto::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeMillauMessages", - "set_owner", - SetOwner { new_owner }, - [ - 100u8, 221u8, 84u8, 142u8, 158u8, 5u8, 47u8, 212u8, 9u8, 35u8, 82u8, - 135u8, 108u8, 238u8, 231u8, 197u8, 77u8, 219u8, 176u8, 222u8, 88u8, - 167u8, 152u8, 34u8, 177u8, 244u8, 160u8, 195u8, 211u8, 3u8, 66u8, - 253u8, - ], - ) - } - #[doc = "Halt or resume all/some pallet operations."] - #[doc = ""] - #[doc = "May only be called either by root, or by `PalletOwner`."] - pub fn set_operating_mode( - &self, - operating_mode: runtime_types::bp_messages::MessagesOperatingMode, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeMillauMessages", - "set_operating_mode", - SetOperatingMode { operating_mode }, - [ - 236u8, 230u8, 127u8, 17u8, 145u8, 186u8, 102u8, 200u8, 227u8, 208u8, - 230u8, 121u8, 102u8, 199u8, 123u8, 118u8, 199u8, 160u8, 131u8, 116u8, - 102u8, 167u8, 119u8, 144u8, 70u8, 114u8, 0u8, 223u8, 54u8, 197u8, 39u8, - 58u8, - ], - ) - } - #[doc = "Receive messages proof from bridged chain."] - #[doc = ""] - #[doc = "The weight of the call assumes that the transaction always brings outbound lane"] - #[doc = "state update. Because of that, the submitter (relayer) has no benefit of not including"] - #[doc = "this data in the transaction, so reward confirmations lags should be minimal."] - pub fn receive_messages_proof( - &self, - relayer_id_at_bridged_chain: ::sp_core::crypto::AccountId32, - proof: ::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< - ::bp_millau::MillauHash, - >, - messages_count: ::core::primitive::u32, - dispatch_weight: ::sp_weights::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeMillauMessages", - "receive_messages_proof", - ReceiveMessagesProof { - relayer_id_at_bridged_chain, - proof, - messages_count, - dispatch_weight, - }, - [ - 14u8, 23u8, 191u8, 242u8, 252u8, 163u8, 87u8, 149u8, 211u8, 25u8, - 112u8, 192u8, 206u8, 49u8, 135u8, 124u8, 79u8, 92u8, 204u8, 39u8, 80u8, - 139u8, 155u8, 124u8, 134u8, 1u8, 66u8, 68u8, 213u8, 85u8, 42u8, 250u8, - ], - ) - } - #[doc = "Receive messages delivery proof from bridged chain."] - pub fn receive_messages_delivery_proof( - &self, - proof : :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: bp_millau :: MillauHash >, - relayers_state: ::bp_messages::UnrewardedRelayersState, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "BridgeMillauMessages", - "receive_messages_delivery_proof", - ReceiveMessagesDeliveryProof { proof, relayers_state }, - [ - 216u8, 113u8, 64u8, 20u8, 16u8, 64u8, 144u8, 143u8, 105u8, 30u8, 192u8, - 89u8, 74u8, 34u8, 56u8, 151u8, 20u8, 234u8, 14u8, 211u8, 64u8, 103u8, - 218u8, 164u8, 69u8, 107u8, 6u8, 119u8, 13u8, 90u8, 150u8, 24u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bridge_messages::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Message has been accepted and is waiting to be delivered."] - pub struct MessageAccepted { - pub lane_id: runtime_types::bp_messages::LaneId, - pub nonce: ::core::primitive::u64, - } - impl ::subxt::events::StaticEvent for MessageAccepted { - const PALLET: &'static str = "BridgeMillauMessages"; - const EVENT: &'static str = "MessageAccepted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Messages have been received from the bridged chain."] - pub struct MessagesReceived (pub :: std :: vec :: Vec < runtime_types :: bp_messages :: ReceivedMessages < runtime_types :: bridge_runtime_common :: messages_xcm_extension :: XcmBlobMessageDispatchResult > > ,) ; - impl ::subxt::events::StaticEvent for MessagesReceived { - const PALLET: &'static str = "BridgeMillauMessages"; - const EVENT: &'static str = "MessagesReceived"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] - #[doc = "Messages in the inclusive range have been delivered to the bridged chain."] - pub struct MessagesDelivered { - pub lane_id: runtime_types::bp_messages::LaneId, - pub messages: runtime_types::bp_messages::DeliveredMessages, - } - impl ::subxt::events::StaticEvent for MessagesDelivered { - const PALLET: &'static str = "BridgeMillauMessages"; - const EVENT: &'static str = "MessagesDelivered"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Optional pallet owner."] - #[doc = ""] - #[doc = " Pallet owner has a right to halt all pallet operations and then resume it. If it is"] - #[doc = " `None`, then there are no direct ways to halt/resume pallet operations, but other"] - #[doc = " runtime methods may still be used to do that (i.e. democracy::referendum to update halt"] - #[doc = " flag directly or call the `halt_operations`)."] - pub fn pallet_owner( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::sp_core::crypto::AccountId32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauMessages", - "PalletOwner", - vec![], - [ - 89u8, 42u8, 74u8, 119u8, 21u8, 164u8, 30u8, 115u8, 207u8, 126u8, 98u8, - 16u8, 162u8, 214u8, 67u8, 172u8, 178u8, 223u8, 139u8, 121u8, 174u8, - 89u8, 215u8, 75u8, 200u8, 161u8, 61u8, 195u8, 65u8, 222u8, 246u8, - 233u8, - ], - ) - } - #[doc = " The current operating mode of the pallet."] - #[doc = ""] - #[doc = " Depending on the mode either all, some, or no transactions will be allowed."] - pub fn pallet_operating_mode( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_messages::MessagesOperatingMode, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauMessages", - "PalletOperatingMode", - vec![], - [ - 215u8, 195u8, 85u8, 231u8, 158u8, 22u8, 160u8, 132u8, 69u8, 206u8, - 238u8, 14u8, 56u8, 100u8, 134u8, 41u8, 58u8, 120u8, 225u8, 164u8, - 173u8, 87u8, 22u8, 123u8, 102u8, 167u8, 68u8, 70u8, 184u8, 131u8, - 232u8, 65u8, - ], - ) - } - #[doc = " Map of lane id => inbound lane data."] - pub fn inbound_lanes( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_messages::InboundLaneData<::sp_core::crypto::AccountId32>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauMessages", - "InboundLanes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 38u8, 58u8, 110u8, 130u8, 112u8, 76u8, 231u8, 76u8, 56u8, 241u8, 183u8, - 153u8, 112u8, 41u8, 248u8, 208u8, 217u8, 57u8, 102u8, 30u8, 107u8, - 98u8, 59u8, 78u8, 56u8, 119u8, 186u8, 183u8, 213u8, 72u8, 199u8, 90u8, - ], - ) - } - #[doc = " Map of lane id => inbound lane data."] - pub fn inbound_lanes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_messages::InboundLaneData<::sp_core::crypto::AccountId32>, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauMessages", - "InboundLanes", - Vec::new(), - [ - 38u8, 58u8, 110u8, 130u8, 112u8, 76u8, 231u8, 76u8, 56u8, 241u8, 183u8, - 153u8, 112u8, 41u8, 248u8, 208u8, 217u8, 57u8, 102u8, 30u8, 107u8, - 98u8, 59u8, 78u8, 56u8, 119u8, 186u8, 183u8, 213u8, 72u8, 199u8, 90u8, - ], - ) - } - #[doc = " Map of lane id => outbound lane data."] - pub fn outbound_lanes( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_messages::OutboundLaneData, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauMessages", - "OutboundLanes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 67u8, 155u8, 173u8, 244u8, 80u8, 38u8, 26u8, 71u8, 51u8, 150u8, 86u8, - 146u8, 132u8, 122u8, 70u8, 122u8, 172u8, 246u8, 106u8, 232u8, 149u8, - 227u8, 240u8, 146u8, 51u8, 184u8, 30u8, 182u8, 200u8, 43u8, 190u8, - 38u8, - ], - ) - } - #[doc = " Map of lane id => outbound lane data."] - pub fn outbound_lanes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bp_messages::OutboundLaneData, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauMessages", - "OutboundLanes", - Vec::new(), - [ - 67u8, 155u8, 173u8, 244u8, 80u8, 38u8, 26u8, 71u8, 51u8, 150u8, 86u8, - 146u8, 132u8, 122u8, 70u8, 122u8, 172u8, 246u8, 106u8, 232u8, 149u8, - 227u8, 240u8, 146u8, 51u8, 184u8, 30u8, 182u8, 200u8, 43u8, 190u8, - 38u8, - ], - ) - } - #[doc = " All queued outbound messages."] - pub fn outbound_messages( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauMessages", - "OutboundMessages", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 44u8, 35u8, 2u8, 25u8, 91u8, 101u8, 152u8, 23u8, 48u8, 250u8, 178u8, - 15u8, 194u8, 118u8, 146u8, 1u8, 112u8, 83u8, 243u8, 166u8, 124u8, - 153u8, 48u8, 193u8, 43u8, 31u8, 33u8, 72u8, 228u8, 113u8, 86u8, 217u8, - ], - ) - } - #[doc = " All queued outbound messages."] - pub fn outbound_messages_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "BridgeMillauMessages", - "OutboundMessages", - Vec::new(), - [ - 44u8, 35u8, 2u8, 25u8, 91u8, 101u8, 152u8, 23u8, 48u8, 250u8, 178u8, - 15u8, 194u8, 118u8, 146u8, 1u8, 112u8, 83u8, 243u8, 166u8, 124u8, - 153u8, 48u8, 193u8, 43u8, 31u8, 33u8, 72u8, 228u8, 113u8, 86u8, 217u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Gets the chain id value from the instance."] - pub fn bridged_chain_id( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 4usize]>, - > { - ::subxt::constants::StaticConstantAddress::new( - "BridgeMillauMessages", - "BridgedChainId", - [ - 101u8, 157u8, 37u8, 163u8, 190u8, 134u8, 129u8, 212u8, 240u8, 135u8, - 174u8, 76u8, 220u8, 179u8, 252u8, 69u8, 65u8, 253u8, 69u8, 214u8, 61u8, - 249u8, 4u8, 38u8, 181u8, 237u8, 25u8, 131u8, 242u8, 20u8, 17u8, 152u8, - ], - ) - } - #[doc = " Maximal encoded size of the outbound payload."] - pub fn maximal_outbound_payload_size( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "BridgeMillauMessages", - "MaximalOutboundPayloadSize", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - } - } - } pub mod runtime_types { use super::runtime_types; pub mod bounded_collections { use super::runtime_types; pub mod bounded_vec { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); } pub mod weak_bounded_vec { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); } } pub mod bp_header_chain { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct StoredHeaderData<_0, _1> { pub number: _0, pub state_root: _1, @@ -5979,51 +47,37 @@ pub mod api { } pub mod bp_messages { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct DeliveredMessages { pub begin: ::core::primitive::u64, pub end: ::core::primitive::u64, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct InboundLaneData<_0> { pub relayers: ::std::vec::Vec>, pub last_confirmed_nonce: ::core::primitive::u64, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct LaneId(pub [::core::primitive::u8; 4usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MessageKey { pub lane_id: runtime_types::bp_messages::LaneId, pub nonce: ::core::primitive::u64, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum MessagesOperatingMode { #[codec(index = 0)] Basic(runtime_types::bp_runtime::BasicOperatingMode), #[codec(index = 1)] RejectingOutboundMessages, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct OutboundLaneData { pub oldest_unpruned_nonce: ::core::primitive::u64, pub latest_received_nonce: ::core::primitive::u64, pub latest_generated_nonce: ::core::primitive::u64, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum ReceivalResult<_0> { #[codec(index = 0)] Dispatched(runtime_types::bp_runtime::messages::MessageDispatchResult<_0>), @@ -6034,9 +88,7 @@ pub mod api { #[codec(index = 3)] TooManyUnconfirmedMessages, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct ReceivedMessages<_0> { pub lane: runtime_types::bp_messages::LaneId, pub receive_results: ::std::vec::Vec<( @@ -6044,9 +96,7 @@ pub mod api { runtime_types::bp_messages::ReceivalResult<_0>, )>, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct UnrewardedRelayer<_0> { pub relayer: _0, pub messages: runtime_types::bp_messages::DeliveredMessages, @@ -6054,18 +104,14 @@ pub mod api { } pub mod bp_relayers { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum RewardsAccountOwner { #[codec(index = 0)] ThisChain, #[codec(index = 1)] BridgedChain, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct RewardsAccountParams { pub lane_id: runtime_types::bp_messages::LaneId, pub bridged_chain_id: [::core::primitive::u8; 4usize], @@ -6076,33 +122,22 @@ pub mod api { use super::runtime_types; pub mod messages { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MessageDispatchResult<_0> { pub unspent_weight: ::sp_weights::Weight, pub dispatch_level_result: _0, } } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum BasicOperatingMode { #[codec(index = 0)] Normal, #[codec(index = 1)] Halted, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct HeaderId<_0, _1>(pub _1, pub _0); - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum OwnedBridgeModuleError { #[codec(index = 0)] Halted, @@ -6112,12 +147,7 @@ pub mod api { use super::runtime_types; pub mod messages_xcm_extension { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum XcmBlobMessageDispatchResult { #[codec(index = 0)] InvalidPayload, @@ -6132,90 +162,58 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] - #[doc = "Service a single overweight message."] service_overweight { index: ::core::primitive::u64, weight_limit: ::sp_weights::Weight, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "The message index given is unknown."] Unknown, #[codec(index = 1)] - #[doc = "The amount of weight given is possibly not enough for executing the message."] OverLimit, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "Downward message is invalid XCM."] InvalidFormat { message_id: [::core::primitive::u8; 32usize] }, #[codec(index = 1)] - #[doc = "Downward message is unsupported version of XCM."] UnsupportedVersion { message_id: [::core::primitive::u8; 32usize] }, #[codec(index = 2)] - #[doc = "Downward message executed with the given outcome."] ExecutedDownward { message_id: [::core::primitive::u8; 32usize], outcome: runtime_types::xcm::v3::traits::Outcome, }, #[codec(index = 3)] - #[doc = "The weight limit for handling downward messages was reached."] WeightExhausted { message_id: [::core::primitive::u8; 32usize], remaining_weight: ::sp_weights::Weight, required_weight: ::sp_weights::Weight, }, #[codec(index = 4)] - #[doc = "Downward message is overweight and was placed in the overweight queue."] OverweightEnqueued { message_id: [::core::primitive::u8; 32usize], overweight_index: ::core::primitive::u64, required_weight: ::sp_weights::Weight, }, #[codec(index = 5)] - #[doc = "Downward message from the overweight queue was executed."] OverweightServiced { overweight_index: ::core::primitive::u64, weight_used: ::sp_weights::Weight, }, #[codec(index = 6)] - #[doc = "The maximum number of downward messages was."] MaxMessagesExhausted { message_id: [::core::primitive::u8; 32usize] }, } } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct ConfigData { pub max_individual: ::sp_weights::Weight, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct PageIndexData { pub begin_used: ::core::primitive::u32, pub end_used: ::core::primitive::u32, @@ -6226,80 +224,46 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { - # [codec (index = 0)] # [doc = "Set the current validation data."] # [doc = ""] # [doc = "This should be invoked exactly once per block. It will panic at the finalization"] # [doc = "phase if the call was not invoked."] # [doc = ""] # [doc = "The dispatch origin for this call must be `Inherent`"] # [doc = ""] # [doc = "As a side effect, this function upgrades the current validation function"] # [doc = "if the appropriate time has come."] set_validation_data { data : runtime_types :: cumulus_primitives_parachain_inherent :: ParachainInherentData , } , # [codec (index = 1)] sudo_send_upward_message { message : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 2)] # [doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] # [doc = "later."] # [doc = ""] # [doc = "The `check_version` parameter sets a boolean flag for whether or not the runtime's spec"] # [doc = "version and name should be verified on upgrade. Since the authorization only has a hash,"] # [doc = "it cannot actually perform the verification."] # [doc = ""] # [doc = "This call requires Root origin."] authorize_upgrade { code_hash : :: subxt :: utils :: H256 , check_version : :: core :: primitive :: bool , } , # [codec (index = 3)] # [doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] # [doc = ""] # [doc = "If the authorization required a version check, this call will ensure the spec name"] # [doc = "remains unchanged and that the spec version has increased."] # [doc = ""] # [doc = "Note that this function will not apply the new `code`, but only attempt to schedule the"] # [doc = "upgrade with the Relay Chain."] # [doc = ""] # [doc = "All origins are allowed."] enact_authorized_upgrade { code : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + # [codec (index = 0)] set_validation_data { data : runtime_types :: cumulus_primitives_parachain_inherent :: ParachainInherentData , } , # [codec (index = 1)] sudo_send_upward_message { message : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 2)] authorize_upgrade { code_hash : :: subxt :: utils :: H256 , check_version : :: core :: primitive :: bool , } , # [codec (index = 3)] enact_authorized_upgrade { code : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "Attempt to upgrade validation function while existing upgrade pending."] OverlappingUpgrades, #[codec(index = 1)] - #[doc = "Polkadot currently prohibits this parachain from upgrading its validation function."] ProhibitedByPolkadot, #[codec(index = 2)] - #[doc = "The supplied validation function has compiled into a blob larger than Polkadot is"] - #[doc = "willing to run."] TooBig, #[codec(index = 3)] - #[doc = "The inherent which supplies the validation data did not run this block."] ValidationDataNotAvailable, #[codec(index = 4)] - #[doc = "The inherent which supplies the host configuration did not run this block."] HostConfigurationNotAvailable, #[codec(index = 5)] - #[doc = "No validation function upgrade is currently scheduled."] NotScheduled, #[codec(index = 6)] - #[doc = "No code upgrade has been authorized."] NothingAuthorized, #[codec(index = 7)] - #[doc = "The given code upgrade has not been authorized."] Unauthorized, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "The validation function has been scheduled to apply."] ValidationFunctionStored, #[codec(index = 1)] - #[doc = "The validation function was applied as of the contained relay chain block number."] ValidationFunctionApplied { relay_chain_block_num: ::core::primitive::u32 }, #[codec(index = 2)] - #[doc = "The relay-chain aborted the upgrade process."] ValidationFunctionDiscarded, #[codec(index = 3)] - #[doc = "An upgrade has been authorized."] UpgradeAuthorized { code_hash: ::subxt::utils::H256 }, #[codec(index = 4)] - #[doc = "Some downward messages have been received and will be processed."] DownwardMessagesReceived { count: ::core::primitive::u32 }, #[codec(index = 5)] - #[doc = "Downward messages were processed using the given weight."] DownwardMessagesProcessed { weight_used: ::sp_weights::Weight, dmq_head: ::subxt::utils::H256, }, #[codec(index = 6)] - #[doc = "An upward message was sent to the relay chain."] UpwardMessageSent { message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, }, @@ -6307,12 +271,7 @@ pub mod api { } pub mod relay_state_snapshot { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MessagingStateSnapshot { pub dmq_mqc_head: ::subxt::utils::H256, pub relay_dispatch_queue_size: (::core::primitive::u32, ::core::primitive::u32), @@ -6326,9 +285,7 @@ pub mod api { )>, } } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct CodeUpgradeAuthorization { pub code_hash: ::subxt::utils::H256, pub check_version: ::core::primitive::bool, @@ -6338,41 +295,17 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "Downward message is invalid XCM."] - #[doc = "\\[ id \\]"] InvalidFormat([::core::primitive::u8; 32usize]), #[codec(index = 1)] - #[doc = "Downward message is unsupported version of XCM."] - #[doc = "\\[ id \\]"] UnsupportedVersion([::core::primitive::u8; 32usize]), #[codec(index = 2)] - #[doc = "Downward message executed with the given outcome."] - #[doc = "\\[ id, outcome \\]"] ExecutedDownward( [::core::primitive::u8; 32usize], runtime_types::xcm::v3::traits::Outcome, @@ -6384,148 +317,69 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] - #[doc = "Services a single overweight XCM."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] - #[doc = "- `index`: The index of the overweight XCM to service"] - #[doc = "- `weight_limit`: The amount of weight that XCM execution may take."] - #[doc = ""] - #[doc = "Errors:"] - #[doc = "- `BadOverweightIndex`: XCM under `index` is not found in the `Overweight` storage map."] - #[doc = "- `BadXcm`: XCM under `index` cannot be properly decoded into a valid XCM format."] - #[doc = "- `WeightOverLimit`: XCM execution may use greater `weight_limit`."] - #[doc = ""] - #[doc = "Events:"] - #[doc = "- `OverweightServiced`: On success."] service_overweight { index: ::core::primitive::u64, weight_limit: ::sp_weights::Weight, }, #[codec(index = 1)] - #[doc = "Suspends all XCM executions for the XCMP queue, regardless of the sender's origin."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ControllerOrigin`."] suspend_xcm_execution, #[codec(index = 2)] - #[doc = "Resumes all XCM executions for the XCMP queue."] - #[doc = ""] - #[doc = "Note that this function doesn't change the status of the in/out bound channels."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ControllerOrigin`."] resume_xcm_execution, #[codec(index = 3)] - #[doc = "Overwrites the number of pages of messages which must be in the queue for the other side to be told to"] - #[doc = "suspend their sending."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.suspend_value`"] update_suspend_threshold { new: ::core::primitive::u32 }, #[codec(index = 4)] - #[doc = "Overwrites the number of pages of messages which must be in the queue after which we drop any further"] - #[doc = "messages from the channel."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.drop_threshold`"] update_drop_threshold { new: ::core::primitive::u32 }, #[codec(index = 5)] - #[doc = "Overwrites the number of pages of messages which the queue must be reduced to before it signals that"] - #[doc = "message sending may recommence after it has been suspended."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.resume_threshold`"] update_resume_threshold { new: ::core::primitive::u32 }, #[codec(index = 6)] - #[doc = "Overwrites the amount of remaining weight under which we stop processing messages."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.threshold_weight`"] update_threshold_weight { new: ::sp_weights::Weight }, #[codec(index = 7)] - #[doc = "Overwrites the speed to which the available weight approaches the maximum weight."] - #[doc = "A lower number results in a faster progression. A value of 1 makes the entire weight available initially."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.weight_restrict_decay`."] update_weight_restrict_decay { new: ::sp_weights::Weight }, #[codec(index = 8)] - #[doc = "Overwrite the maximum amount of weight any individual message may consume."] - #[doc = "Messages above this weight go into the overweight queue and may only be serviced explicitly."] - #[doc = ""] - #[doc = "- `origin`: Must pass `Root`."] - #[doc = "- `new`: Desired value for `QueueConfigData.xcmp_max_individual_weight`."] update_xcmp_max_individual_weight { new: ::sp_weights::Weight }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "Failed to send XCM message."] FailedToSend, #[codec(index = 1)] - #[doc = "Bad XCM origin."] BadXcmOrigin, #[codec(index = 2)] - #[doc = "Bad XCM data."] BadXcm, #[codec(index = 3)] - #[doc = "Bad overweight index."] BadOverweightIndex, #[codec(index = 4)] - #[doc = "Provided weight is possibly not enough to execute the message."] WeightOverLimit, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "Some XCM was executed ok."] Success { message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, weight: ::sp_weights::Weight, }, #[codec(index = 1)] - #[doc = "Some XCM failed."] Fail { message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, error: runtime_types::xcm::v3::traits::Error, weight: ::sp_weights::Weight, }, #[codec(index = 2)] - #[doc = "Bad XCM version used."] BadVersion { message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, }, #[codec(index = 3)] - #[doc = "Bad XCM format used."] BadFormat { message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, }, #[codec(index = 4)] - #[doc = "An HRMP message was sent to a sibling parachain."] XcmpMessageSent { message_hash: ::core::option::Option<[::core::primitive::u8; 32usize]>, }, #[codec(index = 5)] - #[doc = "An XCM exceeded the individual message weight budget."] OverweightEnqueued { sender: runtime_types::polkadot_parachain::primitives::Id, sent_at: ::core::primitive::u32, @@ -6533,13 +387,10 @@ pub mod api { required: ::sp_weights::Weight, }, #[codec(index = 6)] - #[doc = "An XCM from the overweight queue was executed with the given actual weight used."] OverweightServiced { index: ::core::primitive::u64, used: ::sp_weights::Weight }, } } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct InboundChannelDetails { pub sender: runtime_types::polkadot_parachain::primitives::Id, pub state: runtime_types::cumulus_pallet_xcmp_queue::InboundState, @@ -6548,18 +399,14 @@ pub mod api { runtime_types::polkadot_parachain::primitives::XcmpMessageFormat, )>, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum InboundState { #[codec(index = 0)] Ok, #[codec(index = 1)] Suspended, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct OutboundChannelDetails { pub recipient: runtime_types::polkadot_parachain::primitives::Id, pub state: runtime_types::cumulus_pallet_xcmp_queue::OutboundState, @@ -6567,18 +414,14 @@ pub mod api { pub first_index: ::core::primitive::u16, pub last_index: ::core::primitive::u16, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum OutboundState { #[codec(index = 0)] Ok, #[codec(index = 1)] Suspended, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct QueueConfigData { pub suspend_threshold: ::core::primitive::u32, pub drop_threshold: ::core::primitive::u32, @@ -6590,13 +433,9 @@ pub mod api { } pub mod cumulus_primitives_parachain_inherent { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MessageQueueChain(pub ::subxt::utils::H256); - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct ParachainInherentData { pub validation_data: runtime_types::polkadot_primitives::v4::PersistedValidationData< @@ -6621,9 +460,7 @@ pub mod api { } pub mod finality_grandpa { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Commit<_0, _1, _2, _3> { pub target_hash: _0, pub target_number: _1, @@ -6631,16 +468,12 @@ pub mod api { runtime_types::finality_grandpa::SignedPrecommit<_0, _1, _2, _3>, >, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Precommit<_0, _1> { pub target_hash: _0, pub target_number: _1, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct SignedPrecommit<_0, _1, _2, _3> { pub precommit: runtime_types::finality_grandpa::Precommit<_0, _1>, pub signature: _2, @@ -6651,12 +484,7 @@ pub mod api { use super::runtime_types; pub mod dispatch { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum DispatchClass { #[codec(index = 0)] Normal, @@ -6665,35 +493,20 @@ pub mod api { #[codec(index = 2)] Mandatory, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct DispatchInfo { pub weight: ::sp_weights::Weight, pub class: runtime_types::frame_support::dispatch::DispatchClass, pub pays_fee: runtime_types::frame_support::dispatch::Pays, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Pays { #[codec(index = 0)] Yes, #[codec(index = 1)] No, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct PerDispatchClass<_0> { pub normal: _0, pub operational: _0, @@ -6706,12 +519,7 @@ pub mod api { use super::runtime_types; pub mod misc { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum BalanceStatus { #[codec(index = 0)] Free, @@ -6728,94 +536,49 @@ pub mod api { use super::runtime_types; pub mod check_genesis { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct CheckGenesis; } pub mod check_mortality { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct CheckMortality(pub ::sp_runtime::generic::Era); } pub mod check_non_zero_sender { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct CheckNonZeroSender; } pub mod check_nonce { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); } pub mod check_spec_version { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct CheckSpecVersion; } pub mod check_tx_version { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct CheckTxVersion; } pub mod check_weight { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct CheckWeight; } } pub mod limits { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct BlockLength { pub max: runtime_types::frame_support::dispatch::PerDispatchClass< ::core::primitive::u32, >, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct BlockWeights { pub base_block: ::sp_weights::Weight, pub max_block: ::sp_weights::Weight, @@ -6823,12 +586,7 @@ pub mod api { runtime_types::frame_system::limits::WeightsPerClass, >, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct WeightsPerClass { pub base_extrinsic: ::sp_weights::Weight, pub max_extrinsic: ::core::option::Option<::sp_weights::Weight>, @@ -6838,37 +596,17 @@ pub mod api { } pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] - #[doc = "Make some on-chain remark."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)`"] remark { remark: ::std::vec::Vec<::core::primitive::u8> }, #[codec(index = 1)] - #[doc = "Set the number of pages in the WebAssembly environment's heap."] set_heap_pages { pages: ::core::primitive::u64 }, #[codec(index = 2)] - #[doc = "Set the new runtime code."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"] set_code { code: ::std::vec::Vec<::core::primitive::u8> }, #[codec(index = 3)] - #[doc = "Set the new runtime code without doing any checks of the given `code`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(C)` where `C` length of `code`"] set_code_without_checks { code: ::std::vec::Vec<::core::primitive::u8> }, #[codec(index = 4)] - #[doc = "Set some items of storage."] set_storage { items: ::std::vec::Vec<( ::std::vec::Vec<::core::primitive::u8>, @@ -6876,88 +614,52 @@ pub mod api { )>, }, #[codec(index = 5)] - #[doc = "Kill some items from storage."] kill_storage { keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>> }, #[codec(index = 6)] - #[doc = "Kill all storage items with a key that starts with the given prefix."] - #[doc = ""] - #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] - #[doc = "the prefix we are removing to accurately calculate the weight of this function."] kill_prefix { prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, }, #[codec(index = 7)] - #[doc = "Make some on-chain remark and emit event."] remark_with_event { remark: ::std::vec::Vec<::core::primitive::u8> }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Error for the System pallet"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "The name of specification does not match between the current runtime"] - #[doc = "and the new runtime."] InvalidSpecName, #[codec(index = 1)] - #[doc = "The specification version is not allowed to decrease between the current runtime"] - #[doc = "and the new runtime."] SpecVersionNeedsToIncrease, #[codec(index = 2)] - #[doc = "Failed to extract the runtime version from the new runtime."] - #[doc = ""] - #[doc = "Either calling `Core_version` or decoding `RuntimeVersion` failed."] FailedToExtractRuntimeVersion, #[codec(index = 3)] - #[doc = "Suicide called when the account has non-default composite data."] NonDefaultComposite, #[codec(index = 4)] - #[doc = "There is a non-zero reference count preventing the account from being purged."] NonZeroRefCount, #[codec(index = 5)] - #[doc = "The origin filter prevent the call to be dispatched."] CallFiltered, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Event for the System pallet."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "An extrinsic completed successfully."] ExtrinsicSuccess { dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, }, #[codec(index = 1)] - #[doc = "An extrinsic failed."] ExtrinsicFailed { dispatch_error: runtime_types::sp_runtime::DispatchError, dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, }, #[codec(index = 2)] - #[doc = "`:code` was updated."] CodeUpdated, #[codec(index = 3)] - #[doc = "A new account was created."] NewAccount { account: ::sp_core::crypto::AccountId32 }, #[codec(index = 4)] - #[doc = "An account was reaped."] KilledAccount { account: ::sp_core::crypto::AccountId32 }, #[codec(index = 5)] - #[doc = "On on-chain remark happened."] Remarked { sender: ::sp_core::crypto::AccountId32, hash: ::subxt::utils::H256 }, } } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct AccountInfo<_0, _1> { pub nonce: _0, pub consumers: _0, @@ -6965,25 +667,19 @@ pub mod api { pub sufficients: _0, pub data: _1, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct EventRecord<_0, _1> { pub phase: runtime_types::frame_system::Phase, pub event: _0, pub topics: ::std::vec::Vec<_1>, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct LastRuntimeUpgradeInfo { #[codec(compact)] pub spec_version: ::core::primitive::u32, pub spec_name: ::std::string::String, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Phase { #[codec(index = 0)] ApplyExtrinsic(::core::primitive::u32), @@ -6997,34 +693,15 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] - #[doc = "Transfer some liquid free balance to another account."] - #[doc = ""] - #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] - #[doc = "If the sender's account is below the existential deposit as a result"] - #[doc = "of the transfer, the account will be reaped."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] transfer_allow_death { dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, #[codec(compact)] value: ::core::primitive::u128, }, #[codec(index = 1)] - #[doc = "Set the regular balance of a given account; it also takes a reserved balance but this"] - #[doc = "must be the same as the account's current reserved balance."] - #[doc = ""] - #[doc = "The dispatch origin for this call is `root`."] - #[doc = ""] - #[doc = "WARNING: This call is DEPRECATED! Use `force_set_balance` instead."] set_balance_deprecated { who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, #[codec(compact)] @@ -7033,8 +710,6 @@ pub mod api { old_reserved: ::core::primitive::u128, }, #[codec(index = 2)] - #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] - #[doc = "may be specified."] force_transfer { source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, @@ -7042,162 +717,93 @@ pub mod api { value: ::core::primitive::u128, }, #[codec(index = 3)] - #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] - #[doc = "kill the origin account."] - #[doc = ""] - #[doc = "99% of the time you want [`transfer_allow_death`] instead."] - #[doc = ""] - #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] transfer_keep_alive { dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, #[codec(compact)] value: ::core::primitive::u128, }, #[codec(index = 4)] - #[doc = "Transfer the entire transferable balance from the caller account."] - #[doc = ""] - #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] - #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] - #[doc = "transferred by this function. To ensure that this function results in a killed account,"] - #[doc = "you might need to prepare the account by removing any reference counters, storage"] - #[doc = "deposits, etc..."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be Signed."] - #[doc = ""] - #[doc = "- `dest`: The recipient of the transfer."] - #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] - #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] - #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] - #[doc = " keep the sender account alive (true)."] transfer_all { dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, keep_alive: ::core::primitive::bool, }, #[codec(index = 5)] - #[doc = "Unreserve some balance from a user by force."] - #[doc = ""] - #[doc = "Can only be called by ROOT."] force_unreserve { who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, amount: ::core::primitive::u128, }, #[codec(index = 6)] - #[doc = "Upgrade a specified account."] - #[doc = ""] - #[doc = "- `origin`: Must be `Signed`."] - #[doc = "- `who`: The account to be upgraded."] - #[doc = ""] - #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] - #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] - #[doc = "possibililty of churn)."] upgrade_accounts { who: ::std::vec::Vec<::sp_core::crypto::AccountId32> }, #[codec(index = 7)] - #[doc = "Alias for `transfer_allow_death`, provided only for name-wise compatibility."] - #[doc = ""] - #[doc = "WARNING: DEPRECATED! Will be released in approximately 3 months."] transfer { dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, #[codec(compact)] value: ::core::primitive::u128, }, #[codec(index = 8)] - #[doc = "Set the regular balance of a given account."] - #[doc = ""] - #[doc = "The dispatch origin for this call is `root`."] force_set_balance { who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, #[codec(compact)] new_free: ::core::primitive::u128, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "Vesting balance too high to send value."] VestingBalance, #[codec(index = 1)] - #[doc = "Account liquidity restrictions prevent withdrawal."] LiquidityRestrictions, #[codec(index = 2)] - #[doc = "Balance too low to send value."] InsufficientBalance, #[codec(index = 3)] - #[doc = "Value too low to create account due to existential deposit."] ExistentialDeposit, #[codec(index = 4)] - #[doc = "Transfer/payment would kill account."] Expendability, #[codec(index = 5)] - #[doc = "A vesting schedule already exists for this account."] ExistingVestingSchedule, #[codec(index = 6)] - #[doc = "Beneficiary account must pre-exist."] DeadAccount, #[codec(index = 7)] - #[doc = "Number of named reserves exceed `MaxReserves`."] TooManyReserves, #[codec(index = 8)] - #[doc = "Number of holds exceed `MaxHolds`."] TooManyHolds, #[codec(index = 9)] - #[doc = "Number of freezes exceed `MaxFreezes`."] TooManyFreezes, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "An account was created with some free balance."] Endowed { account: ::sp_core::crypto::AccountId32, free_balance: ::core::primitive::u128, }, #[codec(index = 1)] - #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] - #[doc = "resulting in an outright loss."] DustLost { account: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 2)] - #[doc = "Transfer succeeded."] Transfer { from: ::sp_core::crypto::AccountId32, to: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 3)] - #[doc = "A balance was set by root."] BalanceSet { who: ::sp_core::crypto::AccountId32, free: ::core::primitive::u128, }, #[codec(index = 4)] - #[doc = "Some balance was reserved (moved from free to reserved)."] Reserved { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 5)] - #[doc = "Some balance was unreserved (moved from reserved to free)."] Unreserved { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 6)] - #[doc = "Some balance was moved from the reserve of the first account to the second account."] - #[doc = "Final argument indicates the destination balance type."] ReserveRepatriated { from: ::sp_core::crypto::AccountId32, to: ::sp_core::crypto::AccountId32, @@ -7206,95 +812,72 @@ pub mod api { runtime_types::frame_support::traits::tokens::misc::BalanceStatus, }, #[codec(index = 7)] - #[doc = "Some amount was deposited (e.g. for transaction fees)."] Deposit { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, #[codec(index = 8)] - #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] Withdraw { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 9)] - #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] Slashed { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, #[codec(index = 10)] - #[doc = "Some amount was minted into an account."] Minted { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, #[codec(index = 11)] - #[doc = "Some amount was burned from an account."] Burned { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, #[codec(index = 12)] - #[doc = "Some amount was suspended from an account (it can be restored later)."] Suspended { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 13)] - #[doc = "Some amount was restored into an account."] Restored { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 14)] - #[doc = "An account was upgraded."] Upgraded { who: ::sp_core::crypto::AccountId32 }, #[codec(index = 15)] - #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] Issued { amount: ::core::primitive::u128 }, #[codec(index = 16)] - #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] Rescinded { amount: ::core::primitive::u128 }, + #[codec(index = 17)] + Locked { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 18)] + Unlocked { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + } + pub mod types { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct AccountData<_0> { pub free: _0, pub reserved: _0, pub frozen: _0, pub flags: runtime_types::pallet_balances::types::ExtraFlags, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct BalanceLock<_0> { pub id: [::core::primitive::u8; 8usize], pub amount: _0, pub reasons: runtime_types::pallet_balances::types::Reasons, } #[derive( + :: codec :: Decode, + :: codec :: Encode, :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, Clone, Debug, )] pub struct ExtraFlags(pub ::core::primitive::u128); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct IdAmount<_0, _1> { pub id: _0, pub amount: _1, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Reasons { #[codec(index = 0)] Fee, @@ -7303,12 +886,7 @@ pub mod api { #[codec(index = 2)] All, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct ReserveData<_0, _1> { pub id: _0, pub amount: _1, @@ -7319,22 +897,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] - #[doc = "Verify a target header is finalized according to the given finality proof."] - #[doc = ""] - #[doc = "It will use the underlying storage pallet to fetch information about the current"] - #[doc = "authorities and best finalized header in order to verify that the header is finalized."] - #[doc = ""] - #[doc = "If successful in verification, it will write the target header to the underlying storage"] - #[doc = "pallet."] submit_finality_proof { finality_target: ::std::boxed::Box< ::sp_runtime::generic::Header< @@ -7350,15 +915,6 @@ pub mod api { >, }, #[codec(index = 1)] - #[doc = "Bootstrap the bridge pallet with an initial header and authority set from which to sync."] - #[doc = ""] - #[doc = "The initial configuration provided does not need to be the genesis header of the bridged"] - #[doc = "chain, it can be any arbitrary header. You can also provide the next scheduled set"] - #[doc = "change if it is already know."] - #[doc = ""] - #[doc = "This function is only allowed to be called from a trusted origin and writes to storage"] - #[doc = "with practically no checks in terms of the validity of the data. It is important that"] - #[doc = "you ensure that valid data is being passed in."] initialize { init_data: ::bp_header_chain::InitializationData< ::sp_runtime::generic::Header< @@ -7368,66 +924,34 @@ pub mod api { >, }, #[codec(index = 2)] - #[doc = "Change `PalletOwner`."] - #[doc = ""] - #[doc = "May only be called either by root, or by `PalletOwner`."] set_owner { new_owner: ::core::option::Option<::sp_core::crypto::AccountId32> }, #[codec(index = 3)] - #[doc = "Halt or resume all pallet operations."] - #[doc = ""] - #[doc = "May only be called either by root, or by `PalletOwner`."] set_operating_mode { operating_mode: runtime_types::bp_runtime::BasicOperatingMode, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "The given justification is invalid for the given header."] InvalidJustification, #[codec(index = 1)] - #[doc = "The authority set from the underlying header chain is invalid."] InvalidAuthoritySet, #[codec(index = 2)] - #[doc = "There are too many requests for the current window to handle."] - TooManyRequests, - #[codec(index = 3)] - #[doc = "The header being imported is older than the best finalized header known to the pallet."] OldHeader, - #[codec(index = 4)] - #[doc = "The scheduled authority set change found in the header is unsupported by the pallet."] - #[doc = ""] - #[doc = "This is the case for non-standard (e.g forced) authority set changes."] + #[codec(index = 3)] UnsupportedScheduledChange, - #[codec(index = 5)] - #[doc = "The pallet is not yet initialized."] + #[codec(index = 4)] NotInitialized, - #[codec(index = 6)] - #[doc = "The pallet has already been initialized."] + #[codec(index = 5)] AlreadyInitialized, - #[codec(index = 7)] - #[doc = "Too many authorities in the set."] + #[codec(index = 6)] TooManyAuthoritiesInSet, - #[codec(index = 8)] - #[doc = "Error generated by the `OwnedBridgeModule` trait."] + #[codec(index = 7)] BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "Best finalized chain header has been updated to the header with given number and hash."] UpdatedBestFinalizedHeader { number: ::core::primitive::u64, hash: ::bp_millau::MillauHash, @@ -7436,12 +960,7 @@ pub mod api { } pub mod storage_types { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct StoredAuthoritySet { pub authorities: runtime_types::bounded_collections::bounded_vec::BoundedVec<( runtime_types::sp_consensus_grandpa::app::Public, @@ -7455,126 +974,68 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { - # [codec (index = 0)] # [doc = "Change `PalletOwner`."] # [doc = ""] # [doc = "May only be called either by root, or by `PalletOwner`."] set_owner { new_owner : :: core :: option :: Option < :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] # [doc = "Halt or resume all/some pallet operations."] # [doc = ""] # [doc = "May only be called either by root, or by `PalletOwner`."] set_operating_mode { operating_mode : runtime_types :: bp_messages :: MessagesOperatingMode , } , # [codec (index = 2)] # [doc = "Receive messages proof from bridged chain."] # [doc = ""] # [doc = "The weight of the call assumes that the transaction always brings outbound lane"] # [doc = "state update. Because of that, the submitter (relayer) has no benefit of not including"] # [doc = "this data in the transaction, so reward confirmations lags should be minimal."] receive_messages_proof { relayer_id_at_bridged_chain : :: sp_core :: crypto :: AccountId32 , proof : :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: bp_millau :: MillauHash > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: sp_weights :: Weight , } , # [codec (index = 3)] # [doc = "Receive messages delivery proof from bridged chain."] receive_messages_delivery_proof { proof : :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: bp_millau :: MillauHash > , relayers_state : :: bp_messages :: UnrewardedRelayersState , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: MessagesOperatingMode , } , # [codec (index = 2)] receive_messages_proof { relayer_id_at_bridged_chain : :: sp_core :: crypto :: AccountId32 , proof : :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: bp_millau :: MillauHash > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: sp_weights :: Weight , } , # [codec (index = 3)] receive_messages_delivery_proof { proof : :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: bp_millau :: MillauHash > , relayers_state : :: bp_messages :: UnrewardedRelayersState , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "Pallet is not in Normal operating mode."] NotOperatingNormally, #[codec(index = 1)] - #[doc = "The outbound lane is inactive."] InactiveOutboundLane, #[codec(index = 2)] - #[doc = "The message is too large to be sent over the bridge."] MessageIsTooLarge, #[codec(index = 3)] - #[doc = "Message has been treated as invalid by chain verifier."] MessageRejectedByChainVerifier, #[codec(index = 4)] - #[doc = "Message has been treated as invalid by lane verifier."] MessageRejectedByLaneVerifier, #[codec(index = 5)] - #[doc = "Submitter has failed to pay fee for delivering and dispatching messages."] FailedToWithdrawMessageFee, #[codec(index = 6)] - #[doc = "The transaction brings too many messages."] TooManyMessagesInTheProof, #[codec(index = 7)] - #[doc = "Invalid messages has been submitted."] InvalidMessagesProof, #[codec(index = 8)] - #[doc = "Invalid messages delivery proof has been submitted."] InvalidMessagesDeliveryProof, #[codec(index = 9)] - #[doc = "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)."] InvalidUnrewardedRelayers, #[codec(index = 10)] - #[doc = "The relayer has declared invalid unrewarded relayers state in the"] - #[doc = "`receive_messages_delivery_proof` call."] InvalidUnrewardedRelayersState, #[codec(index = 11)] - #[doc = "The cumulative dispatch weight, passed by relayer is not enough to cover dispatch"] - #[doc = "of all bundled messages."] InsufficientDispatchWeight, #[codec(index = 12)] - #[doc = "The message someone is trying to work with (i.e. increase fee) is not yet sent."] MessageIsNotYetSent, #[codec(index = 13)] - #[doc = "The number of actually confirmed messages is going to be larger than the number of"] - #[doc = "messages in the proof. This may mean that this or bridged chain storage is corrupted."] TryingToConfirmMoreMessagesThanExpected, #[codec(index = 14)] - #[doc = "Error generated by the `OwnedBridgeModule` trait."] BridgeModule(runtime_types::bp_runtime::OwnedBridgeModuleError), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { - # [codec (index = 0)] # [doc = "Message has been accepted and is waiting to be delivered."] MessageAccepted { lane_id : runtime_types :: bp_messages :: LaneId , nonce : :: core :: primitive :: u64 , } , # [codec (index = 1)] # [doc = "Messages have been received from the bridged chain."] MessagesReceived (:: std :: vec :: Vec < runtime_types :: bp_messages :: ReceivedMessages < runtime_types :: bridge_runtime_common :: messages_xcm_extension :: XcmBlobMessageDispatchResult > > ,) , # [codec (index = 2)] # [doc = "Messages in the inclusive range have been delivered to the bridged chain."] MessagesDelivered { lane_id : runtime_types :: bp_messages :: LaneId , messages : runtime_types :: bp_messages :: DeliveredMessages , } , } + # [codec (index = 0)] MessageAccepted { lane_id : runtime_types :: bp_messages :: LaneId , nonce : :: core :: primitive :: u64 , } , # [codec (index = 1)] MessagesReceived (:: std :: vec :: Vec < runtime_types :: bp_messages :: ReceivedMessages < runtime_types :: bridge_runtime_common :: messages_xcm_extension :: XcmBlobMessageDispatchResult > > ,) , # [codec (index = 2)] MessagesDelivered { lane_id : runtime_types :: bp_messages :: LaneId , messages : runtime_types :: bp_messages :: DeliveredMessages , } , } } } pub mod pallet_bridge_relayers { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] - #[doc = "Claim accumulated rewards."] claim_rewards { rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "No reward can be claimed by given relayer."] NoRewardForRelayer, #[codec(index = 1)] - #[doc = "Reward payment procedure has failed."] FailedToPayReward, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "Reward has been paid to the relayer."] RewardPaid { relayer: ::sp_core::crypto::AccountId32, rewards_account_params: runtime_types::bp_relayers::RewardsAccountParams, @@ -7587,97 +1048,47 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] sudo { call: ::std::boxed::Box, }, #[codec(index = 1)] - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] - #[doc = "This function does not check the weight of the call, and instead allows the"] - #[doc = "Sudo user to specify the weight of the call."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] sudo_unchecked_weight { call: ::std::boxed::Box, weight: ::sp_weights::Weight, }, #[codec(index = 2)] - #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] - #[doc = "key."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] set_key { new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, }, #[codec(index = 3)] - #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] - #[doc = "a given account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- O(1)."] sudo_as { who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, call: ::std::boxed::Box, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Error for the Sudo pallet"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "Sender must be the Sudo account"] RequireSudo, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "A sudo just took place. \\[result\\]"] Sudid { sudo_result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, }, #[codec(index = 1)] - #[doc = "The \\[sudoer\\] just switched identity; the old key is supplied if one existed."] KeyChanged { old_sudoer: ::core::option::Option<::sp_core::crypto::AccountId32>, }, #[codec(index = 2)] - #[doc = "A sudo just took place. \\[result\\]"] SudoAsDone { sudo_result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, @@ -7689,30 +1100,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] - #[doc = "Set the current time."] - #[doc = ""] - #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] - #[doc = "phase, if this call hasn't been invoked by that time."] - #[doc = ""] - #[doc = "The timestamp should be greater than the previous one by the amount specified by"] - #[doc = "`MinimumPeriod`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `Inherent`."] - #[doc = ""] - #[doc = "## Complexity"] - #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] - #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in"] - #[doc = " `on_finalize`)"] - #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] set { #[codec(compact)] now: ::core::primitive::u64, @@ -7724,17 +1114,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] - #[doc = "has been paid by `who`."] TransactionFeePaid { who: ::sp_core::crypto::AccountId32, actual_fee: ::core::primitive::u128, @@ -7742,13 +1124,9 @@ pub mod api { }, } } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Releases { #[codec(index = 0)] V1Ancient, @@ -7760,13 +1138,7 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Call { #[codec(index = 0)] send { @@ -7774,21 +1146,6 @@ pub mod api { message: ::std::boxed::Box, }, #[codec(index = 1)] - #[doc = "Teleport some assets from the local chain to some destination chain."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] - #[doc = "with all fees taken as needed from the asset."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] - #[doc = " `dest` side. May not be empty."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] teleport_assets { dest: ::std::boxed::Box, beneficiary: ::std::boxed::Box, @@ -7796,22 +1153,6 @@ pub mod api { fee_asset_item: ::core::primitive::u32, }, #[codec(index = 2)] - #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] - #[doc = "chain and forward a notification XCM."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] - #[doc = "with all fees taken as needed from the asset."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] - #[doc = " `dest` side."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] reserve_transfer_assets { dest: ::std::boxed::Box, beneficiary: ::std::boxed::Box, @@ -7819,79 +1160,29 @@ pub mod api { fee_asset_item: ::core::primitive::u32, }, #[codec(index = 3)] - #[doc = "Execute an XCM message from a local, signed, origin."] - #[doc = ""] - #[doc = "An event is deposited indicating whether `msg` could be executed completely or only"] - #[doc = "partially."] - #[doc = ""] - #[doc = "No more than `max_weight` will be used in its attempted execution. If this is less than the"] - #[doc = "maximum amount of weight that the message could take to be executed, then no execution"] - #[doc = "attempt will be made."] - #[doc = ""] - #[doc = "NOTE: A successful return to this does *not* imply that the `msg` was executed successfully"] - #[doc = "to completion; only that *some* of it was executed."] execute { message: ::std::boxed::Box, max_weight: ::sp_weights::Weight, }, #[codec(index = 4)] - #[doc = "Extoll that a particular destination can be communicated with through a particular"] - #[doc = "version of XCM."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The destination that is being described."] - #[doc = "- `xcm_version`: The latest version of XCM that `location` supports."] force_xcm_version { location: ::std::boxed::Box, xcm_version: ::core::primitive::u32, }, #[codec(index = 5)] - #[doc = "Set a safe XCM version (the version that XCM should be encoded with if the most recent"] - #[doc = "version a destination can accept is unknown)."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `maybe_xcm_version`: The default XCM encoding version, or `None` to disable."] force_default_xcm_version { maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, }, #[codec(index = 6)] - #[doc = "Ask a location to notify us regarding their XCM version and any changes to it."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The location to which we should subscribe for XCM version notifications."] force_subscribe_version_notify { location: ::std::boxed::Box, }, #[codec(index = 7)] - #[doc = "Require that a particular destination should no longer notify us regarding any XCM"] - #[doc = "version changes."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The location to which we are currently subscribed for XCM version"] - #[doc = " notifications which we no longer desire."] force_unsubscribe_version_notify { location: ::std::boxed::Box, }, #[codec(index = 8)] - #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] - #[doc = "chain and forward a notification XCM."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] - #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] - #[doc = "at risk."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] - #[doc = " `dest` side."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] limited_reserve_transfer_assets { dest: ::std::boxed::Box, beneficiary: ::std::boxed::Box, @@ -7900,23 +1191,6 @@ pub mod api { weight_limit: runtime_types::xcm::v3::WeightLimit, }, #[codec(index = 9)] - #[doc = "Teleport some assets from the local chain to some destination chain."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] - #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] - #[doc = "at risk."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] - #[doc = " `dest` side. May not be empty."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] limited_teleport_assets { dest: ::std::boxed::Box, beneficiary: ::std::boxed::Box, @@ -7925,128 +1199,69 @@ pub mod api { weight_limit: runtime_types::xcm::v3::WeightLimit, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] - #[doc = "The desired destination was unreachable, generally because there is a no way of routing"] - #[doc = "to it."] Unreachable, #[codec(index = 1)] - #[doc = "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps"] - #[doc = "a lack of space for buffering the message."] SendFailure, #[codec(index = 2)] - #[doc = "The message execution fails the filter."] Filtered, #[codec(index = 3)] - #[doc = "The message's weight could not be determined."] UnweighableMessage, #[codec(index = 4)] - #[doc = "The destination `MultiLocation` provided cannot be inverted."] DestinationNotInvertible, #[codec(index = 5)] - #[doc = "The assets to be sent are empty."] Empty, #[codec(index = 6)] - #[doc = "Could not re-anchor the assets to declare the fees for the destination chain."] CannotReanchor, #[codec(index = 7)] - #[doc = "Too many assets have been attempted for transfer."] TooManyAssets, #[codec(index = 8)] - #[doc = "Origin is invalid for sending."] InvalidOrigin, #[codec(index = 9)] - #[doc = "The version of the `Versioned` value used is not able to be interpreted."] BadVersion, #[codec(index = 10)] - #[doc = "The given location could not be used (e.g. because it cannot be expressed in the"] - #[doc = "desired version of XCM)."] BadLocation, #[codec(index = 11)] - #[doc = "The referenced subscription could not be found."] NoSubscription, #[codec(index = 12)] - #[doc = "The location is invalid since it already has a subscription from us."] AlreadySubscribed, #[codec(index = 13)] - #[doc = "Invalid asset for the operation."] InvalidAsset, #[codec(index = 14)] - #[doc = "The owner does not own (all) of the asset that they wish to do the operation on."] LowBalance, #[codec(index = 15)] - #[doc = "The asset owner has too many locks on the asset."] TooManyLocks, #[codec(index = 16)] - #[doc = "The given account is not an identifiable sovereign account for any location."] AccountNotSovereign, #[codec(index = 17)] - #[doc = "The operation required fees to be paid which the initiator could not meet."] FeesNotMet, #[codec(index = 18)] - #[doc = "A remote lock with the corresponding data could not be found."] LockNotFound, #[codec(index = 19)] - #[doc = "The unlock operation cannot succeed because there are still users of the lock."] InUse, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Event { #[codec(index = 0)] - #[doc = "Execution of an XCM message was attempted."] - #[doc = ""] - #[doc = "\\[ outcome \\]"] Attempted(runtime_types::xcm::v3::traits::Outcome), #[codec(index = 1)] - #[doc = "A XCM message was sent."] - #[doc = ""] - #[doc = "\\[ origin, destination, message \\]"] Sent( runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::v3::Xcm, ), #[codec(index = 2)] - #[doc = "Query response received which does not match a registered query. This may be because a"] - #[doc = "matching query was never registered, it may be because it is a duplicate response, or"] - #[doc = "because the query timed out."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] UnexpectedResponse( runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, ), #[codec(index = 3)] - #[doc = "Query response has been received and is ready for taking with `take_response`. There is"] - #[doc = "no registered notification call."] - #[doc = ""] - #[doc = "\\[ id, response \\]"] ResponseReady(::core::primitive::u64, runtime_types::xcm::v3::Response), #[codec(index = 4)] - #[doc = "Query response has been received and query is removed. The registered notification has"] - #[doc = "been dispatched and executed successfully."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] Notified(::core::primitive::u64, ::core::primitive::u8, ::core::primitive::u8), #[codec(index = 5)] - #[doc = "Query response has been received and query is removed. The registered notification could"] - #[doc = "not be dispatched because the dispatch weight is greater than the maximum weight"] - #[doc = "originally budgeted by this runtime for the query result."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index, actual weight, max budgeted weight \\]"] NotifyOverweight( ::core::primitive::u64, ::core::primitive::u8, @@ -8055,32 +1270,18 @@ pub mod api { ::sp_weights::Weight, ), #[codec(index = 6)] - #[doc = "Query response has been received and query is removed. There was a general error with"] - #[doc = "dispatching the notification call."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] NotifyDispatchError( ::core::primitive::u64, ::core::primitive::u8, ::core::primitive::u8, ), #[codec(index = 7)] - #[doc = "Query response has been received and query is removed. The dispatch was unable to be"] - #[doc = "decoded into a `Call`; this might be due to dispatch function having a signature which"] - #[doc = "is not `(origin, QueryId, Response)`."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] NotifyDecodeFailed( ::core::primitive::u64, ::core::primitive::u8, ::core::primitive::u8, ), #[codec(index = 8)] - #[doc = "Expected query response has been received but the origin location of the response does"] - #[doc = "not match that expected. The query remains registered for a later, valid, response to"] - #[doc = "be received and acted upon."] - #[doc = ""] - #[doc = "\\[ origin location, id, expected location \\]"] InvalidResponder( runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, @@ -8089,92 +1290,46 @@ pub mod api { >, ), #[codec(index = 9)] - #[doc = "Expected query response has been received but the expected origin location placed in"] - #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] - #[doc = ""] - #[doc = "This is unexpected (since a location placed in storage in a previously executing"] - #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] - #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] - #[doc = "needed."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] InvalidResponderVersion( runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, ), #[codec(index = 10)] - #[doc = "Received query response has been read and removed."] - #[doc = ""] - #[doc = "\\[ id \\]"] ResponseTaken(::core::primitive::u64), #[codec(index = 11)] - #[doc = "Some assets have been placed in an asset trap."] - #[doc = ""] - #[doc = "\\[ hash, origin, assets \\]"] AssetsTrapped( ::subxt::utils::H256, runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::VersionedMultiAssets, ), #[codec(index = 12)] - #[doc = "An XCM version change notification message has been attempted to be sent."] - #[doc = ""] - #[doc = "The cost of sending it (borne by the chain) is included."] - #[doc = ""] - #[doc = "\\[ destination, result, cost \\]"] VersionChangeNotified( runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u32, runtime_types::xcm::v3::multiasset::MultiAssets, ), #[codec(index = 13)] - #[doc = "The supported version of a location has been changed. This might be through an"] - #[doc = "automatic notification or a manual intervention."] - #[doc = ""] - #[doc = "\\[ location, XCM version \\]"] SupportedVersionChanged( runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u32, ), #[codec(index = 14)] - #[doc = "A given location which had a version change subscription was dropped owing to an error"] - #[doc = "sending the notification to it."] - #[doc = ""] - #[doc = "\\[ location, query ID, error \\]"] NotifyTargetSendFail( runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, runtime_types::xcm::v3::traits::Error, ), #[codec(index = 15)] - #[doc = "A given location which had a version change subscription was dropped owing to an error"] - #[doc = "migrating the location to our new XCM format."] - #[doc = ""] - #[doc = "\\[ location, query ID \\]"] NotifyTargetMigrationFail( runtime_types::xcm::VersionedMultiLocation, ::core::primitive::u64, ), #[codec(index = 16)] - #[doc = "Expected query response has been received but the expected querier location placed in"] - #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] - #[doc = ""] - #[doc = "This is unexpected (since a location placed in storage in a previously executing"] - #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] - #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] - #[doc = "needed."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] InvalidQuerierVersion( runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, ), #[codec(index = 17)] - #[doc = "Expected query response has been received but the querier location of the response does"] - #[doc = "not match the expected. The query remains registered for a later, valid, response to"] - #[doc = "be received and acted upon."] - #[doc = ""] - #[doc = "\\[ origin location, id, expected querier, maybe actual querier \\]"] InvalidQuerier( runtime_types::xcm::v3::multilocation::MultiLocation, ::core::primitive::u64, @@ -8184,42 +1339,26 @@ pub mod api { >, ), #[codec(index = 18)] - #[doc = "A remote has requested XCM version change notification from us and we have honored it."] - #[doc = "A version information message is sent to them and its cost is included."] - #[doc = ""] - #[doc = "\\[ destination location, cost \\]"] VersionNotifyStarted( runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::v3::multiasset::MultiAssets, ), #[codec(index = 19)] - #[doc = "We have requested that a remote chain sends us XCM version change notifications."] - #[doc = ""] - #[doc = "\\[ destination location, cost \\]"] VersionNotifyRequested( runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::v3::multiasset::MultiAssets, ), #[codec(index = 20)] - #[doc = "We have requested that a remote chain stops sending us XCM version change notifications."] - #[doc = ""] - #[doc = "\\[ destination location, cost \\]"] VersionNotifyUnrequested( runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::v3::multiasset::MultiAssets, ), #[codec(index = 21)] - #[doc = "Fees were paid from a location for an operation (often for using `SendXcm`)."] - #[doc = ""] - #[doc = "\\[ paying location, fees \\]"] FeesPaid( runtime_types::xcm::v3::multilocation::MultiLocation, runtime_types::xcm::v3::multiasset::MultiAssets, ), #[codec(index = 22)] - #[doc = "Some assets have been claimed from an asset trap"] - #[doc = ""] - #[doc = "\\[ hash, origin, assets \\]"] AssetsClaimed( ::subxt::utils::H256, runtime_types::xcm::v3::multilocation::MultiLocation, @@ -8230,23 +1369,17 @@ pub mod api { } pub mod polkadot_core_primitives { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct InboundDownwardMessage<_0> { pub sent_at: _0, pub msg: ::std::vec::Vec<::core::primitive::u8>, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct InboundHrmpMessage<_0> { pub sent_at: _0, pub data: ::std::vec::Vec<::core::primitive::u8>, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct OutboundHrmpMessage<_0> { pub recipient: _0, pub data: ::std::vec::Vec<::core::primitive::u8>, @@ -8256,27 +1389,17 @@ pub mod api { use super::runtime_types; pub mod primitives { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( + :: codec :: Decode, + :: codec :: Encode, :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, Clone, Debug, )] pub struct Id(pub ::core::primitive::u32); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum XcmpMessageFormat { #[codec(index = 0)] ConcatenatedVersionedXcm, @@ -8291,12 +1414,7 @@ pub mod api { use super::runtime_types; pub mod v4 { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct AbridgedHostConfiguration { pub max_code_size: ::core::primitive::u32, pub max_head_data_size: ::core::primitive::u32, @@ -8308,12 +1426,7 @@ pub mod api { pub validation_upgrade_cooldown: ::core::primitive::u32, pub validation_upgrade_delay: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct AbridgedHrmpChannel { pub max_capacity: ::core::primitive::u32, pub max_total_size: ::core::primitive::u32, @@ -8322,24 +1435,14 @@ pub mod api { pub total_size: ::core::primitive::u32, pub mqc_head: ::core::option::Option<::subxt::utils::H256>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct PersistedValidationData<_0, _1> { pub parent_head: runtime_types::polkadot_parachain::primitives::HeadData, pub relay_parent_number: _1, pub relay_parent_storage_root: _0, pub max_pov_size: _1, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum UpgradeRestriction { #[codec(index = 0)] Present, @@ -8348,21 +1451,13 @@ pub mod api { } pub mod rialto_parachain_runtime { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct BridgeRejectObsoleteHeadersAndMessages; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct DummyBridgeRefundMillauMessages; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Runtime; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum RuntimeCall { #[codec(index = 0)] System(runtime_types::frame_system::pallet::Call), @@ -8389,9 +1484,7 @@ pub mod api { #[codec(index = 56)] BridgeMillauMessages(runtime_types::pallet_bridge_messages::pallet::Call), } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum RuntimeEvent { #[codec(index = 0)] System(runtime_types::frame_system::pallet::Event), @@ -8424,17 +1517,15 @@ pub mod api { pub mod fixed_point { use super::runtime_types; #[derive( + :: codec :: Decode, + :: codec :: Encode, :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, Clone, Debug, )] pub struct FixedU128(pub ::core::primitive::u128); } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum ArithmeticError { #[codec(index = 0)] Underflow, @@ -8448,19 +1539,9 @@ pub mod api { use super::runtime_types; pub mod app { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Public(pub runtime_types::sp_core::ed25519::Public); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); } } @@ -8468,39 +1549,19 @@ pub mod api { use super::runtime_types; pub mod ecdsa { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Signature(pub [::core::primitive::u8; 65usize]); } pub mod ed25519 { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Signature(pub [::core::primitive::u8; 64usize]); } pub mod sr25519 { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Signature(pub [::core::primitive::u8; 64usize]); } } @@ -8510,12 +1571,7 @@ pub mod api { use super::runtime_types; pub mod digest { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum DigestItem { #[codec(index = 6)] PreRuntime( @@ -8540,21 +1596,14 @@ pub mod api { } pub mod unchecked_extrinsic { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct UncheckedExtrinsic<_0, _1, _2, _3>( pub ::std::vec::Vec<::core::primitive::u8>, #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, ); } } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum DispatchError { #[codec(index = 0)] Other, @@ -8583,16 +1632,12 @@ pub mod api { #[codec(index = 12)] Unavailable, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct ModuleError { pub index: ::core::primitive::u8, pub error: [::core::primitive::u8; 4usize], } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum MultiSignature { #[codec(index = 0)] Ed25519(runtime_types::sp_core::ed25519::Signature), @@ -8601,9 +1646,7 @@ pub mod api { #[codec(index = 2)] Ecdsa(runtime_types::sp_core::ecdsa::Signature), } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum TokenError { #[codec(index = 0)] FundsUnavailable, @@ -8624,9 +1667,7 @@ pub mod api { #[codec(index = 8)] NotExpendable, } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum TransactionalError { #[codec(index = 0)] LimitReached, @@ -8638,12 +1679,7 @@ pub mod api { use super::runtime_types; pub mod storage_proof { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct StorageProof { pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, } @@ -8651,9 +1687,7 @@ pub mod api { } pub mod sp_version { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct RuntimeVersion { pub spec_name: ::std::string::String, pub impl_name: ::std::string::String, @@ -8668,9 +1702,7 @@ pub mod api { } pub mod sp_weights { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct RuntimeDbWeight { pub read: ::core::primitive::u64, pub write: ::core::primitive::u64, @@ -8680,12 +1712,7 @@ pub mod api { use super::runtime_types; pub mod double_encoded { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct DoubleEncoded { pub encoded: ::std::vec::Vec<::core::primitive::u8>, } @@ -8694,12 +1721,7 @@ pub mod api { use super::runtime_types; pub mod junction { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Junction { #[codec(index = 0)] Parachain(#[codec(compact)] ::core::primitive::u32), @@ -8740,24 +1762,14 @@ pub mod api { } pub mod multiasset { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum AssetId { #[codec(index = 0)] Concrete(runtime_types::xcm::v2::multilocation::MultiLocation), #[codec(index = 1)] Abstract(::std::vec::Vec<::core::primitive::u8>), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum AssetInstance { #[codec(index = 0)] Undefined, @@ -8774,67 +1786,37 @@ pub mod api { #[codec(index = 6)] Blob(::std::vec::Vec<::core::primitive::u8>), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Fungibility { #[codec(index = 0)] Fungible(#[codec(compact)] ::core::primitive::u128), #[codec(index = 1)] NonFungible(runtime_types::xcm::v2::multiasset::AssetInstance), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MultiAsset { pub id: runtime_types::xcm::v2::multiasset::AssetId, pub fun: runtime_types::xcm::v2::multiasset::Fungibility, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum MultiAssetFilter { #[codec(index = 0)] Definite(runtime_types::xcm::v2::multiasset::MultiAssets), #[codec(index = 1)] Wild(runtime_types::xcm::v2::multiasset::WildMultiAsset), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MultiAssets( pub ::std::vec::Vec, ); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum WildFungibility { #[codec(index = 0)] Fungible, #[codec(index = 1)] NonFungible, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum WildMultiAsset { #[codec(index = 0)] All, @@ -8847,12 +1829,7 @@ pub mod api { } pub mod multilocation { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Junctions { #[codec(index = 0)] Here, @@ -8915,12 +1892,7 @@ pub mod api { runtime_types::xcm::v2::junction::Junction, ), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MultiLocation { pub parents: ::core::primitive::u8, pub interior: runtime_types::xcm::v2::multilocation::Junctions, @@ -8928,12 +1900,7 @@ pub mod api { } pub mod traits { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] Overflow, @@ -8989,12 +1956,7 @@ pub mod api { WeightNotComputable, } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum BodyId { #[codec(index = 0)] Unit, @@ -9021,12 +1983,7 @@ pub mod api { #[codec(index = 9)] Treasury, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum BodyPart { #[codec(index = 0)] Voice, @@ -9057,12 +2014,7 @@ pub mod api { denom: ::core::primitive::u32, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Instruction { #[codec(index = 0)] WithdrawAsset(runtime_types::xcm::v2::multiasset::MultiAssets), @@ -9202,12 +2154,7 @@ pub mod api { #[codec(index = 27)] UnsubscribeVersion, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum NetworkId { #[codec(index = 0)] Any, @@ -9222,12 +2169,7 @@ pub mod api { #[codec(index = 3)] Kusama, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum OriginKind { #[codec(index = 0)] Native, @@ -9238,12 +2180,7 @@ pub mod api { #[codec(index = 3)] Xcm, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Response { #[codec(index = 0)] Null, @@ -9259,36 +2196,21 @@ pub mod api { #[codec(index = 3)] Version(::core::primitive::u32), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum WeightLimit { #[codec(index = 0)] Unlimited, #[codec(index = 1)] Limited(#[codec(compact)] ::core::primitive::u64), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Xcm(pub ::std::vec::Vec); } pub mod v3 { use super::runtime_types; pub mod junction { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum BodyId { #[codec(index = 0)] Unit, @@ -9311,12 +2233,7 @@ pub mod api { #[codec(index = 9)] Treasury, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum BodyPart { #[codec(index = 0)] Voice, @@ -9347,12 +2264,7 @@ pub mod api { denom: ::core::primitive::u32, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Junction { #[codec(index = 0)] Parachain(#[codec(compact)] ::core::primitive::u32), @@ -9394,12 +2306,7 @@ pub mod api { #[codec(index = 9)] GlobalConsensus(runtime_types::xcm::v3::junction::NetworkId), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum NetworkId { #[codec(index = 0)] ByGenesis([::core::primitive::u8; 32usize]), @@ -9431,12 +2338,7 @@ pub mod api { } pub mod junctions { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Junctions { #[codec(index = 0)] Here, @@ -9502,24 +2404,14 @@ pub mod api { } pub mod multiasset { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum AssetId { #[codec(index = 0)] Concrete(runtime_types::xcm::v3::multilocation::MultiLocation), #[codec(index = 1)] Abstract([::core::primitive::u8; 32usize]), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum AssetInstance { #[codec(index = 0)] Undefined, @@ -9534,67 +2426,37 @@ pub mod api { #[codec(index = 5)] Array32([::core::primitive::u8; 32usize]), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Fungibility { #[codec(index = 0)] Fungible(#[codec(compact)] ::core::primitive::u128), #[codec(index = 1)] NonFungible(runtime_types::xcm::v3::multiasset::AssetInstance), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MultiAsset { pub id: runtime_types::xcm::v3::multiasset::AssetId, pub fun: runtime_types::xcm::v3::multiasset::Fungibility, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum MultiAssetFilter { #[codec(index = 0)] Definite(runtime_types::xcm::v3::multiasset::MultiAssets), #[codec(index = 1)] Wild(runtime_types::xcm::v3::multiasset::WildMultiAsset), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MultiAssets( pub ::std::vec::Vec, ); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum WildFungibility { #[codec(index = 0)] Fungible, #[codec(index = 1)] NonFungible, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum WildMultiAsset { #[codec(index = 0)] All, @@ -9616,12 +2478,7 @@ pub mod api { } pub mod multilocation { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct MultiLocation { pub parents: ::core::primitive::u8, pub interior: runtime_types::xcm::v3::junctions::Junctions, @@ -9629,12 +2486,7 @@ pub mod api { } pub mod traits { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Error { #[codec(index = 0)] Overflow, @@ -9717,12 +2569,7 @@ pub mod api { #[codec(index = 39)] ExceedsStackLimit, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Outcome { #[codec(index = 0)] Complete(::sp_weights::Weight), @@ -9732,12 +2579,7 @@ pub mod api { Error(runtime_types::xcm::v3::traits::Error), } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Instruction { #[codec(index = 0)] WithdrawAsset(runtime_types::xcm::v3::multiasset::MultiAssets), @@ -9946,12 +2788,7 @@ pub mod api { >, }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum MaybeErrorCode { #[codec(index = 0)] Success, @@ -9968,12 +2805,7 @@ pub mod api { >, ), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct PalletInfo { #[codec(compact)] pub index: ::core::primitive::u32, @@ -9990,24 +2822,14 @@ pub mod api { #[codec(compact)] pub patch: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct QueryResponseInfo { pub destination: runtime_types::xcm::v3::multilocation::MultiLocation, #[codec(compact)] pub query_id: ::core::primitive::u64, pub max_weight: ::sp_weights::Weight, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum Response { #[codec(index = 0)] Null, @@ -10031,47 +2853,31 @@ pub mod api { #[codec(index = 5)] DispatchResult(runtime_types::xcm::v3::MaybeErrorCode), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum WeightLimit { #[codec(index = 0)] Unlimited, #[codec(index = 1)] Limited(::sp_weights::Weight), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Clone, - Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub struct Xcm(pub ::std::vec::Vec); } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum VersionedMultiAssets { #[codec(index = 1)] V2(runtime_types::xcm::v2::multiasset::MultiAssets), #[codec(index = 3)] V3(runtime_types::xcm::v3::multiasset::MultiAssets), } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum VersionedMultiLocation { #[codec(index = 1)] V2(runtime_types::xcm::v2::multilocation::MultiLocation), #[codec(index = 3)] V3(runtime_types::xcm::v3::multilocation::MultiLocation), } - #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Clone, Debug, - )] + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug)] pub enum VersionedXcm { #[codec(index = 2)] V2(runtime_types::xcm::v2::Xcm), @@ -10080,131 +2886,4 @@ pub mod api { } } } - #[doc = r" The default error type returned when there is a runtime issue,"] - #[doc = r" exposed here for ease of use."] - pub type DispatchError = runtime_types::sp_runtime::DispatchError; - pub fn constants() -> ConstantsApi { - ConstantsApi - } - pub fn storage() -> StorageApi { - StorageApi - } - pub fn tx() -> TransactionApi { - TransactionApi - } - pub struct ConstantsApi; - impl ConstantsApi { - pub fn system(&self) -> system::constants::ConstantsApi { - system::constants::ConstantsApi - } - pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { - timestamp::constants::ConstantsApi - } - pub fn transaction_payment(&self) -> transaction_payment::constants::ConstantsApi { - transaction_payment::constants::ConstantsApi - } - pub fn balances(&self) -> balances::constants::ConstantsApi { - balances::constants::ConstantsApi - } - pub fn bridge_millau_grandpa(&self) -> bridge_millau_grandpa::constants::ConstantsApi { - bridge_millau_grandpa::constants::ConstantsApi - } - pub fn bridge_millau_messages(&self) -> bridge_millau_messages::constants::ConstantsApi { - bridge_millau_messages::constants::ConstantsApi - } - } - pub struct StorageApi; - impl StorageApi { - pub fn system(&self) -> system::storage::StorageApi { - system::storage::StorageApi - } - pub fn timestamp(&self) -> timestamp::storage::StorageApi { - timestamp::storage::StorageApi - } - pub fn sudo(&self) -> sudo::storage::StorageApi { - sudo::storage::StorageApi - } - pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { - transaction_payment::storage::StorageApi - } - pub fn parachain_system(&self) -> parachain_system::storage::StorageApi { - parachain_system::storage::StorageApi - } - pub fn parachain_info(&self) -> parachain_info::storage::StorageApi { - parachain_info::storage::StorageApi - } - pub fn balances(&self) -> balances::storage::StorageApi { - balances::storage::StorageApi - } - pub fn xcmp_queue(&self) -> xcmp_queue::storage::StorageApi { - xcmp_queue::storage::StorageApi - } - pub fn dmp_queue(&self) -> dmp_queue::storage::StorageApi { - dmp_queue::storage::StorageApi - } - pub fn bridge_relayers(&self) -> bridge_relayers::storage::StorageApi { - bridge_relayers::storage::StorageApi - } - pub fn bridge_millau_grandpa(&self) -> bridge_millau_grandpa::storage::StorageApi { - bridge_millau_grandpa::storage::StorageApi - } - pub fn bridge_millau_messages(&self) -> bridge_millau_messages::storage::StorageApi { - bridge_millau_messages::storage::StorageApi - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn system(&self) -> system::calls::TransactionApi { - system::calls::TransactionApi - } - pub fn timestamp(&self) -> timestamp::calls::TransactionApi { - timestamp::calls::TransactionApi - } - pub fn sudo(&self) -> sudo::calls::TransactionApi { - sudo::calls::TransactionApi - } - pub fn parachain_system(&self) -> parachain_system::calls::TransactionApi { - parachain_system::calls::TransactionApi - } - pub fn balances(&self) -> balances::calls::TransactionApi { - balances::calls::TransactionApi - } - pub fn xcmp_queue(&self) -> xcmp_queue::calls::TransactionApi { - xcmp_queue::calls::TransactionApi - } - pub fn polkadot_xcm(&self) -> polkadot_xcm::calls::TransactionApi { - polkadot_xcm::calls::TransactionApi - } - pub fn cumulus_xcm(&self) -> cumulus_xcm::calls::TransactionApi { - cumulus_xcm::calls::TransactionApi - } - pub fn dmp_queue(&self) -> dmp_queue::calls::TransactionApi { - dmp_queue::calls::TransactionApi - } - pub fn bridge_relayers(&self) -> bridge_relayers::calls::TransactionApi { - bridge_relayers::calls::TransactionApi - } - pub fn bridge_millau_grandpa(&self) -> bridge_millau_grandpa::calls::TransactionApi { - bridge_millau_grandpa::calls::TransactionApi - } - pub fn bridge_millau_messages(&self) -> bridge_millau_messages::calls::TransactionApi { - bridge_millau_messages::calls::TransactionApi - } - } - #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] - pub fn validate_codegen>( - client: &C, - ) -> Result<(), ::subxt::error::MetadataError> { - let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); - if runtime_metadata_hash != - [ - 244u8, 26u8, 245u8, 96u8, 241u8, 56u8, 22u8, 163u8, 219u8, 209u8, 103u8, 161u8, - 138u8, 242u8, 33u8, 114u8, 162u8, 107u8, 1u8, 216u8, 115u8, 116u8, 164u8, 126u8, - 81u8, 51u8, 88u8, 36u8, 180u8, 113u8, 18u8, 58u8, - ] { - Err(::subxt::error::MetadataError::IncompatibleMetadata) - } else { - Ok(()) - } - } } diff --git a/relays/client-rialto-parachain/src/lib.rs b/relays/client-rialto-parachain/src/lib.rs index ddb54fbefc0..bb7be12979f 100644 --- a/relays/client-rialto-parachain/src/lib.rs +++ b/relays/client-rialto-parachain/src/lib.rs @@ -61,8 +61,7 @@ impl Chain for RialtoParachain { impl ChainWithBalances for RialtoParachain { fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { - let key = codegen_runtime::api::storage().system().account(account_id); - StorageKey(key.to_bytes()) + bp_polkadot_core::AccountInfoStorageMapKeyProvider::final_key(account_id) } } diff --git a/relays/client-substrate/Cargo.toml b/relays/client-substrate/Cargo.toml index 2a79832bf9d..90904ab9be1 100644 --- a/relays/client-substrate/Cargo.toml +++ b/relays/client-substrate/Cargo.toml @@ -10,7 +10,7 @@ async-std = { version = "1.6.5", features = ["attributes"] } async-trait = "0.1" codec = { package = "parity-scale-codec", version = "3.1.5" } futures = "0.3.28" -jsonrpsee = { version = "0.16", features = ["macros", "ws-client"] } +jsonrpsee = { version = "0.17", features = ["macros", "ws-client"] } log = "0.4.17" num-traits = "0.2" rand = "0.8" diff --git a/relays/client-substrate/src/chain.rs b/relays/client-substrate/src/chain.rs index 8c7dc00aa67..54c9ad4f3b6 100644 --- a/relays/client-substrate/src/chain.rs +++ b/relays/client-substrate/src/chain.rs @@ -55,7 +55,7 @@ pub trait Chain: ChainBase + Clone { /// Block type. type SignedBlock: Member + Serialize + DeserializeOwned + BlockWithJustification; /// The aggregated `Call` type. - type Call: Clone + Codec + Debug + Send; + type Call: Clone + Codec + Debug + Send + Sync; } /// Substrate-based relay chain that supports parachains. diff --git a/relays/client-substrate/src/client.rs b/relays/client-substrate/src/client.rs index 27af7d7d77f..91ff7b9a214 100644 --- a/relays/client-substrate/src/client.rs +++ b/relays/client-substrate/src/client.rs @@ -231,7 +231,7 @@ impl Client { let client = tokio .spawn(async move { RpcClientBuilder::default() - .max_notifs_per_subscription(MAX_SUBSCRIPTION_CAPACITY) + .max_buffer_capacity_per_subscription(MAX_SUBSCRIPTION_CAPACITY) .build(&uri) .await }) diff --git a/relays/client-substrate/src/error.rs b/relays/client-substrate/src/error.rs index 54247c5dc17..40015c122bb 100644 --- a/relays/client-substrate/src/error.rs +++ b/relays/client-substrate/src/error.rs @@ -138,13 +138,11 @@ impl Error { impl MaybeConnectionError for Error { fn is_connection_error(&self) -> bool { 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(_) => true, - Error::FailedToReadBestFinalizedHeaderHash { ref error, .. } => error.is_connection_error(), + Error::RpcError(RpcError::Transport(_)) | + Error::RpcError(RpcError::RestartNeeded(_)) | + 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(), diff --git a/relays/client-substrate/src/rpc.rs b/relays/client-substrate/src/rpc.rs index 083b1dea761..94726e49187 100644 --- a/relays/client-substrate/src/rpc.rs +++ b/relays/client-substrate/src/rpc.rs @@ -73,7 +73,7 @@ pub(crate) trait SubstrateAuthor { async fn pending_extrinsics(&self) -> RpcResult>; /// Submit and watch for extrinsic state. #[subscription(name = "submitAndWatchExtrinsic", unsubscribe = "unwatchExtrinsic", item = TransactionStatusOf)] - fn submit_and_watch_extrinsic(&self, extrinsic: Bytes); + async fn submit_and_watch_extrinsic(&self, extrinsic: Bytes); } /// RPC methods of Substrate `state` namespace, that we are using. @@ -118,7 +118,7 @@ pub trait SubstrateFinalityClient { pub(crate) trait SubstrateGrandpa { /// Subscribe to GRANDPA justifications. #[subscription(name = "subscribeJustifications", unsubscribe = "unsubscribeJustifications", item = Bytes)] - fn subscribe_justifications(&self); + async fn subscribe_justifications(&self); } /// RPC finality methods of Substrate `grandpa` namespace, that we are using. @@ -136,7 +136,7 @@ impl SubstrateFinalityClient for SubstrateGrandpaFinalit pub(crate) trait SubstrateBeefy { /// Subscribe to BEEFY justifications. #[subscription(name = "subscribeJustifications", unsubscribe = "unsubscribeJustifications", item = Bytes)] - fn subscribe_justifications(&self); + async fn subscribe_justifications(&self); } /// RPC finality methods of Substrate `beefy` namespace, that we are using. diff --git a/relays/lib-substrate-relay/src/lib.rs b/relays/lib-substrate-relay/src/lib.rs index 37a4d602e59..f9bd80d5079 100644 --- a/relays/lib-substrate-relay/src/lib.rs +++ b/relays/lib-substrate-relay/src/lib.rs @@ -91,7 +91,7 @@ impl TaggedAccount { } /// Batch call builder. -pub trait BatchCallBuilder: Clone + Send { +pub trait BatchCallBuilder: Clone + Send + Sync { /// Create batch call from given calls vector. fn build_batch_call(&self, _calls: Vec) -> Call; } diff --git a/relays/messages/Cargo.toml b/relays/messages/Cargo.toml index 8c4b8257d5a..a45b2728105 100644 --- a/relays/messages/Cargo.toml +++ b/relays/messages/Cargo.toml @@ -8,6 +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" +env_logger = "0.10" futures = "0.3.28" hex = "0.4" log = "0.4.17" diff --git a/relays/messages/src/message_lane_loop.rs b/relays/messages/src/message_lane_loop.rs index ba86f05ffd3..b681d86d2ae 100644 --- a/relays/messages/src/message_lane_loop.rs +++ b/relays/messages/src/message_lane_loop.rs @@ -111,7 +111,7 @@ pub struct NoncesSubmitArtifacts { /// Batch transaction that already submit some headers and needs to be extended with /// messages/delivery proof before sending. -pub trait BatchTransaction: Debug + Send { +pub trait BatchTransaction: Debug + Send + Sync { /// Header that was required in the original call and which is bundled within this /// batch transaction. fn required_header_id(&self) -> HeaderId; @@ -622,11 +622,19 @@ pub(crate) mod tests { } impl TestClientData { - fn receive_messages(&mut self, proof: TestMessagesProof) { + fn receive_messages( + &mut self, + maybe_batch_tx: Option, + proof: TestMessagesProof, + ) { self.target_state.best_self = HeaderId(self.target_state.best_self.0 + 1, self.target_state.best_self.1 + 1); self.target_state.best_finalized_self = self.target_state.best_self; self.target_latest_received_nonce = *proof.0.end(); + if let Some(maybe_batch_tx) = maybe_batch_tx { + self.target_state.best_finalized_peer_at_best_self = + Some(maybe_batch_tx.required_header_id()); + } if let Some(target_latest_confirmed_received_nonce) = proof.1 { self.target_latest_confirmed_received_nonce = target_latest_confirmed_received_nonce; @@ -634,10 +642,18 @@ pub(crate) mod tests { self.submitted_messages_proofs.push(proof); } - fn receive_messages_delivery_proof(&mut self, proof: TestMessagesReceivingProof) { + fn receive_messages_delivery_proof( + &mut self, + maybe_batch_tx: Option, + proof: TestMessagesReceivingProof, + ) { self.source_state.best_self = HeaderId(self.source_state.best_self.0 + 1, self.source_state.best_self.1 + 1); self.source_state.best_finalized_self = self.source_state.best_self; + if let Some(maybe_batch_tx) = maybe_batch_tx { + self.source_state.best_finalized_peer_at_best_self = + Some(maybe_batch_tx.required_header_id()); + } self.submitted_messages_receiving_proofs.push(proof); self.source_latest_confirmed_received_nonce = proof; } @@ -760,13 +776,13 @@ pub(crate) mod tests { async fn submit_messages_receiving_proof( &self, - _maybe_batch_tx: Option, + maybe_batch_tx: Option, _generated_at_block: TargetHeaderIdOf, proof: TestMessagesReceivingProof, ) -> Result { let mut data = self.data.lock(); (self.tick)(&mut data); - data.receive_messages_delivery_proof(proof); + data.receive_messages_delivery_proof(maybe_batch_tx, proof); (self.post_tick)(&mut data); Ok(TestTransactionTracker(data.source_tracked_transaction_status)) } @@ -885,7 +901,7 @@ pub(crate) mod tests { async fn submit_messages_proof( &self, - _maybe_batch_tx: Option, + maybe_batch_tx: Option, _generated_at_header: SourceHeaderIdOf, nonces: RangeInclusive, proof: TestMessagesProof, @@ -895,7 +911,7 @@ pub(crate) mod tests { if data.is_target_fails { return Err(TestError) } - data.receive_messages(proof); + data.receive_messages(maybe_batch_tx, proof); (self.post_tick)(&mut data); Ok(NoncesSubmitArtifacts { nonces, diff --git a/relays/messages/src/message_race_delivery.rs b/relays/messages/src/message_race_delivery.rs index 7a245858b32..06e02a06017 100644 --- a/relays/messages/src/message_race_delivery.rs +++ b/relays/messages/src/message_race_delivery.rs @@ -290,7 +290,171 @@ impl std::fmt::Debug for MessageDeliveryStrategy MessageDeliveryStrategy { +impl MessageDeliveryStrategy +where + P: MessageLane, + SC: MessageLaneSourceClient

, + TC: MessageLaneTargetClient

, +{ + /// Returns true if some race action can be selected (with `select_race_action`) at given + /// `best_finalized_source_header_id_at_best_target` source header at target. + async fn can_submit_transaction_with< + RS: RaceState, TargetHeaderIdOf

>, + >( + &self, + mut race_state: RS, + maybe_best_finalized_source_header_id_at_best_target: Option>, + ) -> bool { + if let Some(best_finalized_source_header_id_at_best_target) = + maybe_best_finalized_source_header_id_at_best_target + { + race_state.set_best_finalized_source_header_id_at_best_target( + best_finalized_source_header_id_at_best_target, + ); + + return self.select_race_action(race_state).await.is_some() + } + + false + } + + async fn select_race_action, TargetHeaderIdOf

>>( + &self, + race_state: RS, + ) -> Option<(RangeInclusive, MessageProofParameters)> { + // if we have already selected nonces that we want to submit, do nothing + if race_state.nonces_to_submit().is_some() { + return None + } + + // if we already submitted some nonces, do nothing + if race_state.nonces_submitted().is_some() { + return None + } + + 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()?; + let target_nonces = self.target_nonces.as_ref()?; + let latest_confirmed_nonce_at_source = self + .latest_confirmed_nonce_at_source(&best_finalized_source_header_id_at_best_target) + .unwrap_or(target_nonces.nonces_data.confirmed_nonce); + + // There's additional condition in the message delivery race: target would reject messages + // if there are too much unconfirmed messages at the inbound lane. + + // Ok - we may have new nonces to deliver. But target may still reject new messages, because + // we haven't notified it that (some) messages have been confirmed. So we may want to + // include updated `source.latest_confirmed` in the proof. + // + // Important note: we're including outbound state lane proof whenever there are unconfirmed + // nonces on the target chain. Other strategy is to include it only if it's absolutely + // necessary. + let latest_received_nonce_at_target = target_nonces.latest_nonce; + let latest_confirmed_nonce_at_target = target_nonces.nonces_data.confirmed_nonce; + let outbound_state_proof_required = + latest_confirmed_nonce_at_target < latest_confirmed_nonce_at_source; + + // The target node would also reject messages if there are too many entries in the + // "unrewarded relayers" set. If we are unable to prove new rewards to the target node, then + // we should wait for confirmations race. + let unrewarded_limit_reached = + target_nonces.nonces_data.unrewarded_relayers.unrewarded_relayer_entries >= + self.max_unrewarded_relayer_entries_at_target || + target_nonces.nonces_data.unrewarded_relayers.total_messages >= + self.max_unconfirmed_nonces_at_target; + if unrewarded_limit_reached { + // so there are already too many unrewarded relayer entries in the set + // + // => check if we can prove enough rewards. If not, we should wait for more rewards to + // be paid + let number_of_rewards_being_proved = + latest_confirmed_nonce_at_source.saturating_sub(latest_confirmed_nonce_at_target); + let enough_rewards_being_proved = number_of_rewards_being_proved >= + target_nonces.nonces_data.unrewarded_relayers.messages_in_oldest_entry; + if !enough_rewards_being_proved { + return None + } + } + + // If we're here, then the confirmations race did its job && sending side now knows that + // messages have been delivered. Now let's select nonces that we want to deliver. + // + // We may deliver at most: + // + // max_unconfirmed_nonces_at_target - (latest_received_nonce_at_target - + // latest_confirmed_nonce_at_target) + // + // messages in the batch. But since we're including outbound state proof in the batch, then + // it may be increased to: + // + // max_unconfirmed_nonces_at_target - (latest_received_nonce_at_target - + // latest_confirmed_nonce_at_source) + let future_confirmed_nonce_at_target = if outbound_state_proof_required { + latest_confirmed_nonce_at_source + } else { + latest_confirmed_nonce_at_target + }; + let max_nonces = latest_received_nonce_at_target + .checked_sub(future_confirmed_nonce_at_target) + .and_then(|diff| self.max_unconfirmed_nonces_at_target.checked_sub(diff)) + .unwrap_or_default(); + let max_nonces = std::cmp::min(max_nonces, self.max_messages_in_single_batch); + let max_messages_weight_in_single_batch = self.max_messages_weight_in_single_batch; + let max_messages_size_in_single_batch = self.max_messages_size_in_single_batch; + let lane_source_client = self.lane_source_client.clone(); + let lane_target_client = self.lane_target_client.clone(); + + // select nonces from nonces, available for delivery + let selected_nonces = match self.strategy.available_source_queue_indices(race_state) { + Some(available_source_queue_indices) => { + let source_queue = self.strategy.source_queue(); + let reference = RelayMessagesBatchReference { + max_messages_in_this_batch: max_nonces, + max_messages_weight_in_single_batch, + 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: available_source_queue_indices, + metrics: self.metrics_msg.clone(), + }; + + MessageRaceLimits::decide(reference).await + }, + None => { + // we still may need to submit delivery transaction with zero messages to + // unblock the lane. But it'll only be accepted if the lane is blocked + // (i.e. when `unrewarded_limit_reached` is `true`) + None + }, + }; + + // check if we need unblocking transaction and we may submit it + #[allow(clippy::reversed_empty_ranges)] + let selected_nonces = match selected_nonces { + Some(selected_nonces) => selected_nonces, + None if unrewarded_limit_reached && outbound_state_proof_required => 1..=0, + _ => return None, + }; + + let dispatch_weight = self.dispatch_weight_for_range(&selected_nonces); + Some(( + selected_nonces, + MessageProofParameters { outbound_state_proof_required, dispatch_weight }, + )) + } + + /// Returns lastest confirmed message at source chain, given source block. + fn latest_confirmed_nonce_at_source(&self, at: &SourceHeaderIdOf

) -> Option { + self.latest_confirmed_nonces_at_source + .iter() + .take_while(|(id, _)| id.0 <= at.0) + .last() + .map(|(_, nonce)| *nonce) + } + /// Returns total weight of all undelivered messages. fn dispatch_weight_for_range(&self, range: &RangeInclusive) -> Weight { self.strategy @@ -322,9 +486,10 @@ where self.strategy.is_empty() } - fn required_source_header_at_target, TargetHeaderIdOf

>>( + async fn required_source_header_at_target< + RS: RaceState, TargetHeaderIdOf

>, + >( &self, - current_best: &SourceHeaderIdOf

, race_state: RS, ) -> Option> { // we have already submitted something - let's wait until it is mined @@ -332,32 +497,41 @@ where return None } - let has_nonces_to_deliver = !self.strategy.is_empty(); - let header_required_for_messages_delivery = - self.strategy.required_source_header_at_target(current_best, race_state); - let header_required_for_reward_confirmations_delivery = self - .latest_confirmed_nonces_at_source - .back() - .filter(|(id, nonce)| *nonce != 0 && id.0 > current_best.0) - .map(|(id, _)| id.clone()); - match ( - has_nonces_to_deliver, - header_required_for_messages_delivery, - header_required_for_reward_confirmations_delivery, - ) { - // if we need to delver messages and proof-of-delivery-confirmations, then we need to - // select the most recent header to avoid extra roundtrips - (true, Some(id1), Some(id2)) => Some(if id1.0 > id2.0 { id1 } else { id2 }), - // if we only need to deliver messages - fine, let's require some source header - // - // if we need new header for proof-of-delivery-confirmations - let's also ask for that. - // Even though it may require additional header, we'll be sure that we won't block the - // lane (sometimes we can't deliver messages without proof-of-delivery-confirmations) - (true, a, b) => a.or(b), - // we never submit delivery transaction without messages, so if `has_nonces_to_deliver` - // if `false`, we don't need any source headers at target - (false, _, _) => None, + // if we can deliver something using current race state, go on + let selected_nonces = self.select_race_action(race_state.clone()).await; + if selected_nonces.is_some() { + return None + } + + // check if we may deliver some messages if we'll relay require source header + // to target first + let maybe_source_header_for_delivery = + self.strategy.source_queue().back().map(|(id, _)| id.clone()); + if self + .can_submit_transaction_with( + race_state.clone(), + maybe_source_header_for_delivery.clone(), + ) + .await + { + return maybe_source_header_for_delivery + } + + // ok, we can't delivery anything even if we relay some source blocks first. But maybe + // the lane is blocked and we need to submit unblock transaction? + let maybe_source_header_for_reward_confirmation = + self.latest_confirmed_nonces_at_source.back().map(|(id, _)| id.clone()); + if self + .can_submit_transaction_with( + race_state.clone(), + maybe_source_header_for_reward_confirmation.clone(), + ) + .await + { + return maybe_source_header_for_reward_confirmation } + + None } fn best_at_source(&self) -> Option { @@ -387,6 +561,11 @@ where self.strategy.source_nonces_updated(at_block, nonces) } + fn reset_best_target_nonces(&mut self) { + self.target_nonces = None; + self.strategy.reset_best_target_nonces(); + } + fn best_target_nonces_updated, TargetHeaderIdOf

>>( &mut self, nonces: TargetClientNonces, @@ -436,128 +615,7 @@ where &self, race_state: RS, ) -> 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()?; - let latest_confirmed_nonce_at_source = self - .latest_confirmed_nonces_at_source - .iter() - .take_while(|(id, _)| id.0 <= best_finalized_source_header_id_at_best_target.0) - .last() - .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 - // if there are too much unconfirmed messages at the inbound lane. - - // The receiving race is responsible to deliver confirmations back to the source chain. So - // if there's a lot of unconfirmed messages, let's wait until it'll be able to do its job. - let latest_received_nonce_at_target = target_nonces.latest_nonce; - let confirmations_missing = - latest_received_nonce_at_target.checked_sub(latest_confirmed_nonce_at_source); - match confirmations_missing { - Some(confirmations_missing) - if confirmations_missing >= self.max_unconfirmed_nonces_at_target => - { - log::debug!( - target: "bridge", - "Cannot deliver any more messages from {} to {}. Too many unconfirmed nonces \ - at target: target.latest_received={:?}, source.latest_confirmed={:?}, max={:?}", - MessageDeliveryRace::

::source_name(), - MessageDeliveryRace::

::target_name(), - latest_received_nonce_at_target, - latest_confirmed_nonce_at_source, - self.max_unconfirmed_nonces_at_target, - ); - - return None - }, - _ => (), - } - - // Ok - we may have new nonces to deliver. But target may still reject new messages, because - // we haven't notified it that (some) messages have been confirmed. So we may want to - // include updated `source.latest_confirmed` in the proof. - // - // Important note: we're including outbound state lane proof whenever there are unconfirmed - // nonces on the target chain. Other strategy is to include it only if it's absolutely - // necessary. - let latest_confirmed_nonce_at_target = target_nonces.nonces_data.confirmed_nonce; - let outbound_state_proof_required = - latest_confirmed_nonce_at_target < latest_confirmed_nonce_at_source; - - // The target node would also reject messages if there are too many entries in the - // "unrewarded relayers" set. If we are unable to prove new rewards to the target node, then - // we should wait for confirmations race. - let unrewarded_relayer_entries_limit_reached = - target_nonces.nonces_data.unrewarded_relayers.unrewarded_relayer_entries >= - self.max_unrewarded_relayer_entries_at_target; - if unrewarded_relayer_entries_limit_reached { - // so there are already too many unrewarded relayer entries in the set - // - // => check if we can prove enough rewards. If not, we should wait for more rewards to - // be paid - let number_of_rewards_being_proved = - latest_confirmed_nonce_at_source.saturating_sub(latest_confirmed_nonce_at_target); - let enough_rewards_being_proved = number_of_rewards_being_proved >= - target_nonces.nonces_data.unrewarded_relayers.messages_in_oldest_entry; - if !enough_rewards_being_proved { - return None - } - } - - // If we're here, then the confirmations race did its job && sending side now knows that - // messages have been delivered. Now let's select nonces that we want to deliver. - // - // We may deliver at most: - // - // max_unconfirmed_nonces_at_target - (latest_received_nonce_at_target - - // latest_confirmed_nonce_at_target) - // - // messages in the batch. But since we're including outbound state proof in the batch, then - // it may be increased to: - // - // max_unconfirmed_nonces_at_target - (latest_received_nonce_at_target - - // latest_confirmed_nonce_at_source) - let future_confirmed_nonce_at_target = if outbound_state_proof_required { - latest_confirmed_nonce_at_source - } else { - latest_confirmed_nonce_at_target - }; - let max_nonces = latest_received_nonce_at_target - .checked_sub(future_confirmed_nonce_at_target) - .and_then(|diff| self.max_unconfirmed_nonces_at_target.checked_sub(diff)) - .unwrap_or_default(); - let max_nonces = std::cmp::min(max_nonces, self.max_messages_in_single_batch); - let max_messages_weight_in_single_batch = self.max_messages_weight_in_single_batch; - let max_messages_size_in_single_batch = self.max_messages_size_in_single_batch; - let lane_source_client = self.lane_source_client.clone(); - let lane_target_client = self.lane_target_client.clone(); - - let available_source_queue_indices = - self.strategy.available_source_queue_indices(race_state)?; - let source_queue = self.strategy.source_queue(); - - let reference = RelayMessagesBatchReference { - max_messages_in_this_batch: max_nonces, - max_messages_weight_in_single_batch, - 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: available_source_queue_indices, - metrics: self.metrics_msg.clone(), - }; - - let selected_nonces = MessageRaceLimits::decide(reference).await?; - let dispatch_weight = self.dispatch_weight_for_range(&selected_nonces); - - Some(( - selected_nonces, - MessageProofParameters { outbound_state_proof_required, dispatch_weight }, - )) + self.select_race_action(race_state).await } } @@ -731,22 +789,6 @@ mod tests { ); } - #[async_std::test] - async fn message_delivery_strategy_selects_nothing_if_too_many_confirmations_missing() { - let (state, mut strategy) = prepare_strategy(); - - // if there are already `max_unconfirmed_nonces_at_target` messages on target, - // we need to wait until confirmations will be delivered by receiving race - strategy.latest_confirmed_nonces_at_source = vec![( - header_id(1), - strategy.target_nonces.as_ref().unwrap().latest_nonce - - strategy.max_unconfirmed_nonces_at_target, - )] - .into_iter() - .collect(); - assert_eq!(strategy.select_nonces_to_deliver(state).await, None); - } - #[async_std::test] async fn message_delivery_strategy_includes_outbound_state_proof_when_new_nonces_are_available() { @@ -980,31 +1022,41 @@ mod tests { ); // nothing needs to be delivered now and we don't need any new headers assert_eq!(strategy.select_nonces_to_deliver(state.clone()).await, None); - assert_eq!(strategy.required_source_header_at_target(&header_id(1), state.clone()), None); + assert_eq!(strategy.required_source_header_at_target(state.clone()).await, None); - // now let's generate two more nonces [24; 25] at the soruce; - strategy.source_nonces_updated(header_id(2), source_nonces(24..=25, 19, 0)); - // - // - so now we'll need to relay source block#2 to be able to accept messages [24; 25]. - assert_eq!(strategy.select_nonces_to_deliver(state.clone()).await, None); - assert_eq!( - strategy.required_source_header_at_target(&header_id(1), state.clone()), - Some(header_id(2)) - ); - - // let's relay source block#2 + // block#2 is generated state.best_finalized_source_header_id_at_source = Some(header_id(2)); state.best_finalized_source_header_id_at_best_target = Some(header_id(2)); state.best_target_header_id = Some(header_id(2)); state.best_finalized_target_header_id = Some(header_id(2)); + // now let's generate two more nonces [24; 25] at the source; + strategy.source_nonces_updated(header_id(2), source_nonces(24..=25, 19, 0)); + // + // we don't need to relay more headers to target, because messages [20; 23] have + // not confirmed to source yet + assert_eq!(strategy.select_nonces_to_deliver(state.clone()).await, None); + assert_eq!(strategy.required_source_header_at_target(state.clone()).await, None); + + // let's relay source block#3 + state.best_finalized_source_header_id_at_source = Some(header_id(3)); + state.best_finalized_source_header_id_at_best_target = Some(header_id(3)); + state.best_target_header_id = Some(header_id(3)); + state.best_finalized_target_header_id = Some(header_id(3)); + // and ask strategy again => still nothing to deliver, because parallel confirmations // race need to be pushed further assert_eq!(strategy.select_nonces_to_deliver(state.clone()).await, None); - assert_eq!(strategy.required_source_header_at_target(&header_id(2), state.clone()), None); + assert_eq!(strategy.required_source_header_at_target(state.clone()).await, None); + + // let's relay source block#3 + state.best_finalized_source_header_id_at_source = Some(header_id(4)); + state.best_finalized_source_header_id_at_best_target = Some(header_id(4)); + state.best_target_header_id = Some(header_id(4)); + state.best_finalized_target_header_id = Some(header_id(4)); // let's confirm messages [20; 23] - strategy.source_nonces_updated(header_id(2), source_nonces(24..=25, 23, 0)); + strategy.source_nonces_updated(header_id(4), source_nonces(24..=25, 23, 0)); // and ask strategy again => now we have everything required to deliver remaining // [24; 25] nonces and proof of [20; 23] confirmation @@ -1012,7 +1064,7 @@ mod tests { strategy.select_nonces_to_deliver(state.clone()).await, Some(((24..=25), proof_parameters(true, 2))), ); - assert_eq!(strategy.required_source_header_at_target(&header_id(2), state), None); + assert_eq!(strategy.required_source_header_at_target(state).await, None); } #[async_std::test] @@ -1041,9 +1093,9 @@ mod tests { ); } - #[test] + #[async_std::test] #[allow(clippy::reversed_empty_ranges)] - fn no_source_headers_required_at_target_if_lanes_are_empty() { + async fn no_source_headers_required_at_target_if_lanes_are_empty() { let (state, _) = prepare_strategy(); let mut strategy = TestStrategy { max_unrewarded_relayer_entries_at_target: 4, @@ -1073,7 +1125,7 @@ mod tests { strategy.latest_confirmed_nonces_at_source, VecDeque::from([(source_header_id, 0)]) ); - assert_eq!(strategy.required_source_header_at_target(&source_header_id, state), None); + assert_eq!(strategy.required_source_header_at_target(state).await, None); } #[async_std::test] @@ -1159,4 +1211,195 @@ mod tests { )), ); } + + #[async_std::test] + #[allow(clippy::reversed_empty_ranges)] + async fn delivery_race_is_able_to_unblock_lane() { + // step 1: messages 20..=23 are delivered from source to target at target block 2 + fn at_target_block_2_deliver_messages( + strategy: &mut TestStrategy, + state: &mut TestRaceState, + occupied_relayer_slots: MessageNonce, + occupied_message_slots: MessageNonce, + ) { + let nonces_at_target = TargetClientNonces { + latest_nonce: 23, + nonces_data: DeliveryRaceTargetNoncesData { + confirmed_nonce: 19, + unrewarded_relayers: UnrewardedRelayersState { + unrewarded_relayer_entries: occupied_relayer_slots, + total_messages: occupied_message_slots, + ..Default::default() + }, + }, + }; + + state.best_target_header_id = Some(header_id(2)); + state.best_finalized_target_header_id = Some(header_id(2)); + + strategy.best_target_nonces_updated(nonces_at_target.clone(), state); + strategy.finalized_target_nonces_updated(nonces_at_target, state); + } + + // step 2: delivery of messages 20..=23 is confirmed to the source node at source block 2 + fn at_source_block_2_deliver_confirmations( + strategy: &mut TestStrategy, + state: &mut TestRaceState, + ) { + state.best_finalized_source_header_id_at_source = Some(header_id(2)); + + strategy.source_nonces_updated( + header_id(2), + SourceClientNonces { new_nonces: Default::default(), confirmed_nonce: Some(23) }, + ); + } + + // step 3: finalize source block 2 at target block 3 and select nonces to deliver + async fn at_target_block_3_select_nonces_to_deliver( + strategy: &TestStrategy, + mut state: TestRaceState, + ) -> Option<(RangeInclusive, MessageProofParameters)> { + state.best_finalized_source_header_id_at_best_target = Some(header_id(2)); + state.best_target_header_id = Some(header_id(3)); + state.best_finalized_target_header_id = Some(header_id(3)); + + strategy.select_nonces_to_deliver(state).await + } + + let max_unrewarded_relayer_entries_at_target = 4; + let max_unconfirmed_nonces_at_target = 4; + let expected_rewards_proof = Some(( + 1..=0, + MessageProofParameters { + outbound_state_proof_required: true, + dispatch_weight: Weight::zero(), + }, + )); + + // when lane is NOT blocked + let (mut state, mut strategy) = prepare_strategy(); + at_target_block_2_deliver_messages( + &mut strategy, + &mut state, + max_unrewarded_relayer_entries_at_target - 1, + max_unconfirmed_nonces_at_target - 1, + ); + at_source_block_2_deliver_confirmations(&mut strategy, &mut state); + assert_eq!(strategy.required_source_header_at_target(state.clone()).await, None); + assert_eq!(at_target_block_3_select_nonces_to_deliver(&strategy, state).await, None); + + // when lane is blocked by no-relayer-slots in unrewarded relayers vector + let (mut state, mut strategy) = prepare_strategy(); + at_target_block_2_deliver_messages( + &mut strategy, + &mut state, + max_unrewarded_relayer_entries_at_target, + max_unconfirmed_nonces_at_target - 1, + ); + at_source_block_2_deliver_confirmations(&mut strategy, &mut state); + assert_eq!( + strategy.required_source_header_at_target(state.clone()).await, + Some(header_id(2)) + ); + assert_eq!( + at_target_block_3_select_nonces_to_deliver(&strategy, state).await, + expected_rewards_proof + ); + + // when lane is blocked by no-message-slots in unrewarded relayers vector + let (mut state, mut strategy) = prepare_strategy(); + at_target_block_2_deliver_messages( + &mut strategy, + &mut state, + max_unrewarded_relayer_entries_at_target - 1, + max_unconfirmed_nonces_at_target, + ); + at_source_block_2_deliver_confirmations(&mut strategy, &mut state); + assert_eq!( + strategy.required_source_header_at_target(state.clone()).await, + Some(header_id(2)) + ); + assert_eq!( + at_target_block_3_select_nonces_to_deliver(&strategy, state).await, + expected_rewards_proof + ); + + // when lane is blocked by no-message-slots and no-message-slots in unrewarded relayers + // vector + let (mut state, mut strategy) = prepare_strategy(); + at_target_block_2_deliver_messages( + &mut strategy, + &mut state, + max_unrewarded_relayer_entries_at_target - 1, + max_unconfirmed_nonces_at_target, + ); + at_source_block_2_deliver_confirmations(&mut strategy, &mut state); + assert_eq!( + strategy.required_source_header_at_target(state.clone()).await, + Some(header_id(2)) + ); + assert_eq!( + at_target_block_3_select_nonces_to_deliver(&strategy, state).await, + expected_rewards_proof + ); + + // when we have already selected some nonces to deliver, we don't need to select anything + let (mut state, mut strategy) = prepare_strategy(); + at_target_block_2_deliver_messages( + &mut strategy, + &mut state, + max_unrewarded_relayer_entries_at_target - 1, + max_unconfirmed_nonces_at_target, + ); + at_source_block_2_deliver_confirmations(&mut strategy, &mut state); + state.nonces_to_submit = Some((header_id(2), 1..=0, (1..=0, None))); + assert_eq!(strategy.required_source_header_at_target(state.clone()).await, None); + assert_eq!(at_target_block_3_select_nonces_to_deliver(&strategy, state).await, None); + + // when we have already submitted some nonces, we don't need to select anything + let (mut state, mut strategy) = prepare_strategy(); + at_target_block_2_deliver_messages( + &mut strategy, + &mut state, + max_unrewarded_relayer_entries_at_target - 1, + max_unconfirmed_nonces_at_target, + ); + at_source_block_2_deliver_confirmations(&mut strategy, &mut state); + state.nonces_submitted = Some(1..=0); + assert_eq!(strategy.required_source_header_at_target(state.clone()).await, None); + assert_eq!(at_target_block_3_select_nonces_to_deliver(&strategy, state).await, None); + } + + #[async_std::test] + async fn outbound_state_proof_is_not_required_when_we_have_no_new_confirmations() { + let (mut state, mut strategy) = prepare_strategy(); + + // pretend that we haven't seen any confirmations yet (or they're at the future target chain + // blocks) + strategy.latest_confirmed_nonces_at_source.clear(); + + // emulate delivery of some nonces (20..=23 are generated, but we only deliver 20..=21) + let nonces_at_target = TargetClientNonces { + latest_nonce: 21, + nonces_data: DeliveryRaceTargetNoncesData { + confirmed_nonce: 19, + unrewarded_relayers: UnrewardedRelayersState { + unrewarded_relayer_entries: 1, + total_messages: 2, + ..Default::default() + }, + }, + }; + state.best_target_header_id = Some(header_id(2)); + state.best_finalized_target_header_id = Some(header_id(2)); + strategy.best_target_nonces_updated(nonces_at_target.clone(), &mut state); + strategy.finalized_target_nonces_updated(nonces_at_target, &mut state); + + // we won't include outbound lane state proof into 22..=23 delivery transaction + // because it brings no new reward confirmations + assert_eq!( + strategy.select_nonces_to_deliver(state).await, + Some(((22..=23), proof_parameters(false, 2))) + ); + } } diff --git a/relays/messages/src/message_race_loop.rs b/relays/messages/src/message_race_loop.rs index 7e3f84dd5d1..3df9eef4960 100644 --- a/relays/messages/src/message_race_loop.rs +++ b/relays/messages/src/message_race_loop.rs @@ -41,14 +41,14 @@ use std::{ /// One of races within lane. pub trait MessageRace { /// Header id of the race source. - type SourceHeaderId: Debug + Clone + PartialEq + Send; + type SourceHeaderId: Debug + Clone + PartialEq + Send + Sync; /// Header id of the race source. - type TargetHeaderId: Debug + Clone + PartialEq + Send; + type TargetHeaderId: Debug + Clone + PartialEq + Send + Sync; /// Message nonce used in the race. type MessageNonce: Debug + Clone; /// Proof that is generated and delivered in this race. - type Proof: Debug + Clone + Send; + type Proof: Debug + Clone + Send + Sync; /// Name of the race source. fn source_name() -> String; @@ -175,9 +175,8 @@ pub trait RaceStrategy: Debug { /// Should return true if nothing has to be synced. fn is_empty(&self) -> bool; /// Return id of source header that is required to be on target to continue synchronization. - fn required_source_header_at_target>( + async fn required_source_header_at_target>( &self, - current_best: &SourceHeaderId, race_state: RS, ) -> Option; /// Return the best nonce at source node. @@ -196,6 +195,9 @@ pub trait RaceStrategy: Debug { at_block: SourceHeaderId, nonces: SourceClientNonces, ); + /// Called when we want to wait until next `best_target_nonces_updated` before selecting + /// any nonces for delivery. + fn reset_best_target_nonces(&mut self); /// Called when best nonces are updated at target node of the race. fn best_target_nonces_updated>( &mut self, @@ -218,7 +220,11 @@ pub trait RaceStrategy: Debug { } /// State of the race. -pub trait RaceState: Send { +pub trait RaceState: Clone + Send + Sync { + /// Set best finalized source header id at the best block on the target + /// client (at the `best_finalized_source_header_id_at_best_target`). + fn set_best_finalized_source_header_id_at_best_target(&mut self, id: SourceHeaderId); + /// Best finalized source header id at the source client. fn best_finalized_source_header_id_at_source(&self) -> Option; /// Best finalized source header id at the best block on the target @@ -281,11 +287,15 @@ impl Default impl RaceState for RaceStateImpl where - SourceHeaderId: Clone + Send, - TargetHeaderId: Clone + Send, - Proof: Clone + Send, - BatchTx: Clone + Send, + SourceHeaderId: Clone + Send + Sync, + TargetHeaderId: Clone + Send + Sync, + Proof: Clone + Send + Sync, + BatchTx: Clone + Send + Sync, { + fn set_best_finalized_source_header_id_at_best_target(&mut self, id: SourceHeaderId) { + self.best_finalized_source_header_id_at_best_target = Some(id); + } + fn best_finalized_source_header_id_at_source(&self) -> Option { self.best_finalized_source_header_id_at_source.clone() } @@ -430,10 +440,9 @@ pub async fn run, TC: TargetClient

>( ).fail_if_connection_error(FailedClient::Source)?; // ask for more headers if we have nonces to deliver and required headers are missing - source_required_header = race_state - .best_finalized_source_header_id_at_best_target - .as_ref() - .and_then(|best| strategy.required_source_header_at_target(best, race_state.clone())); + source_required_header = strategy + .required_source_header_at_target(race_state.clone()) + .await; }, nonces = target_best_nonces => { target_best_nonces_required = false; @@ -536,14 +545,22 @@ pub async fn run, TC: TargetClient

>( P::target_name(), ); - race_state.reset_nonces_to_submit(); race_state.nonces_submitted = Some(artifacts.nonces); target_tx_tracker.set(artifacts.tx_tracker.wait().fuse()); }, &mut target_go_offline_future, async_std::task::sleep, || format!("Error submitting proof {}", P::target_name()), - ).fail_if_error(FailedClient::Target).map(|_| true)?; + ).fail_if_connection_error(FailedClient::Target)?; + + // in any case - we don't need to retry submitting the same nonces again until + // we read nonces from the target client + race_state.reset_nonces_to_submit(); + // if we have failed to submit transaction AND that is not the connection issue, + // then we need to read best target nonces before selecting nonces again + if !target_client_is_online { + strategy.reset_best_target_nonces(); + } }, target_transaction_status = target_tx_tracker => { match (target_transaction_status, race_state.nonces_submitted.as_ref()) { @@ -693,7 +710,13 @@ pub async fn run, TC: TargetClient

>( .fuse(), ); } else if let Some(source_required_header) = source_required_header.clone() { - log::debug!(target: "bridge", "Going to require {} header {:?} at {}", P::source_name(), source_required_header, P::target_name()); + log::debug!( + target: "bridge", + "Going to require {} header {:?} at {}", + P::source_name(), + source_required_header, + P::target_name(), + ); target_require_source_header .set(race_target.require_source_header(source_required_header).fuse()); } else if target_best_nonces_required { diff --git a/relays/messages/src/message_race_strategy.rs b/relays/messages/src/message_race_strategy.rs index e6016448c95..5c8f9a162b4 100644 --- a/relays/messages/src/message_race_strategy.rs +++ b/relays/messages/src/message_race_strategy.rs @@ -205,16 +205,16 @@ impl< self.source_queue.is_empty() } - fn required_source_header_at_target< + async fn required_source_header_at_target< RS: RaceState< HeaderId, HeaderId, >, >( &self, - current_best: &HeaderId, - _race_state: RS, + race_state: RS, ) -> Option> { + let current_best = race_state.best_finalized_source_header_id_at_best_target()?; self.source_queue .back() .and_then(|(h, _)| if h.0 > current_best.0 { Some(h.clone()) } else { None }) @@ -254,6 +254,10 @@ impl< ) } + fn reset_best_target_nonces(&mut self) { + self.best_target_nonce = None; + } + fn best_target_nonces_updated< RS: RaceState< HeaderId, @@ -266,19 +270,37 @@ impl< ) { let nonce = nonces.latest_nonce; + // if **some** of nonces that we have selected to submit already present at the + // target chain => select new nonces let need_to_select_new_nonces = race_state .nonces_to_submit() - .map(|nonces| *nonces.end() <= nonce) + .map(|nonces| nonce >= *nonces.start()) .unwrap_or(false); if need_to_select_new_nonces { + log::trace!( + target: "bridge", + "Latest nonce at target is {}. Clearing nonces to submit: {:?}", + nonce, + race_state.nonces_to_submit(), + ); + race_state.reset_nonces_to_submit(); } + // if **some** of nonces that we have submitted already present at the + // target chain => select new nonces let need_new_nonces_to_submit = race_state .nonces_submitted() - .map(|nonces| *nonces.end() <= nonce) + .map(|nonces| nonce >= *nonces.start()) .unwrap_or(false); if need_new_nonces_to_submit { + log::trace!( + target: "bridge", + "Latest nonce at target is {}. Clearing submitted nonces: {:?}", + nonce, + race_state.nonces_submitted(), + ); + race_state.reset_nonces_submitted(); } @@ -415,10 +437,15 @@ mod tests { let mut state = TestRaceStateImpl::default(); let mut strategy = BasicStrategy::::new(); state.nonces_to_submit = Some((header_id(1), 5..=10, (5..=10, None))); - strategy.best_target_nonces_updated(target_nonces(7), &mut state); + // we are going to submit 5..=10, so having latest nonce 4 at target is fine + strategy.best_target_nonces_updated(target_nonces(4), &mut state); assert!(state.nonces_to_submit.is_some()); - strategy.best_target_nonces_updated(target_nonces(10), &mut state); - assert!(state.nonces_to_submit.is_none()); + // any nonce larger than 4 invalidates the `nonces_to_submit` + for nonce in 5..=11 { + state.nonces_to_submit = Some((header_id(1), 5..=10, (5..=10, None))); + strategy.best_target_nonces_updated(target_nonces(nonce), &mut state); + assert!(state.nonces_to_submit.is_none()); + } } #[test] @@ -426,10 +453,15 @@ mod tests { let mut state = TestRaceStateImpl::default(); let mut strategy = BasicStrategy::::new(); state.nonces_submitted = Some(5..=10); - strategy.best_target_nonces_updated(target_nonces(7), &mut state); + // we have submitted 5..=10, so having latest nonce 4 at target is fine + strategy.best_target_nonces_updated(target_nonces(4), &mut state); assert!(state.nonces_submitted.is_some()); - strategy.best_target_nonces_updated(target_nonces(10), &mut state); - assert!(state.nonces_submitted.is_none()); + // any nonce larger than 4 invalidates the `nonces_submitted` + for nonce in 5..=11 { + state.nonces_submitted = Some(5..=10); + strategy.best_target_nonces_updated(target_nonces(nonce), &mut state); + assert!(state.nonces_submitted.is_none()); + } } #[async_std::test] diff --git a/tools/runtime-codegen/Cargo.lock b/tools/runtime-codegen/Cargo.lock index 46093b70727..8b103a9b944 100644 --- a/tools/runtime-codegen/Cargo.lock +++ b/tools/runtime-codegen/Cargo.lock @@ -42,7 +42,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -54,16 +54,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" dependencies = [ "memchr", ] @@ -86,6 +86,55 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6342bd4f5a1205d7f41e94a41a901f5647c938cdfa96036338e8533c9d6c2450" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" + +[[package]] +name = "anstyle-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "anyhow" version = "1.0.70" @@ -127,13 +176,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.67" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] @@ -157,12 +206,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base58" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" - [[package]] name = "base64" version = "0.13.1" @@ -220,6 +263,17 @@ dependencies = [ "digest 0.10.6", ] +[[package]] +name = "blake2b_simd" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +dependencies = [ + "arrayref", + "arrayvec 0.7.2", + "constant_time_eq", +] + [[package]] name = "block-buffer" version = "0.7.3" @@ -238,7 +292,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -247,7 +301,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -271,11 +325,17 @@ dependencies = [ "serde", ] +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" [[package]] name = "byte-slice-cast" @@ -330,39 +390,46 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.13" +version = "4.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c911b090850d79fc64fe9ea01e28e465f65e821e08813ced95bced72f7a8a9b" +checksum = "956ac1f6381d8d82ab4684768f89c0ea3afe66925ceadb4eeb3fc452ffc55d62" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84080e799e54cff944f4b4a4b0e71630b0e0443b25b985175c7dddc1a859b749" +dependencies = [ + "anstream", + "anstyle", + "bitflags", "clap_lex", - "is-terminal", "once_cell", "strsim", - "termcolor", ] [[package]] name = "clap_derive" -version = "4.1.12" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a932373bab67b984c790ddf2c9ca295d8e3af3b7ef92de5a5bacdccdee4b09b" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] name = "clap_lex" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646" -dependencies = [ - "os_str_bytes", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] name = "codespan-reporting" @@ -401,6 +468,18 @@ dependencies = [ "tracing-error", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "constant_time_eq" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" + [[package]] name = "core-foundation" version = "0.9.3" @@ -413,9 +492,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpp_demangle" @@ -428,9 +507,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] @@ -545,9 +624,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -598,7 +677,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "typenum", ] @@ -608,7 +687,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -618,7 +697,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -650,9 +729,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c00419335c41018365ddf7e4d5f1c12ee3659ddcf3e01974650ba1de73d038" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -662,9 +741,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8307ad413a98fff033c8545ecf133e3257747b3bae935e7602aab8aa92d4ca" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -672,24 +751,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] name = "cxxbridge-flags" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc52e2eb08915cb12596d29d55f0b5384f00d697a646dbd269b6ecb0fbd9d31" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] @@ -753,7 +832,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -883,13 +962,13 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "errno" -version = "0.2.8" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -908,6 +987,19 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "expander" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "eyre" version = "0.6.8" @@ -969,9 +1061,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ "cfg-if", "parity-scale-codec", @@ -979,6 +1071,12 @@ dependencies = [ "serde", ] +[[package]] +name = "fs-err" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" + [[package]] name = "funty" version = "2.0.0" @@ -987,9 +1085,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1002,9 +1100,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1012,15 +1110,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1030,32 +1128,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-timer" @@ -1069,9 +1167,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1105,9 +1203,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1126,9 +1224,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "libc", @@ -1199,9 +1297,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f" +checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" dependencies = [ "bytes", "fnv", @@ -1218,9 +1316,9 @@ dependencies = [ [[package]] name = "hash-db" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" [[package]] name = "hash256-std-hasher" @@ -1312,7 +1410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -1358,9 +1456,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -1389,18 +1487,33 @@ dependencies = [ "http", "hyper", "log", - "rustls", + "rustls 0.20.8", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.23.4", + "webpki-roots 0.22.6", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +dependencies = [ + "http", + "hyper", + "log", + "rustls 0.21.0", "rustls-native-certs", "tokio", - "tokio-rustls", - "webpki-roots", + "tokio-rustls 0.24.0", ] [[package]] name = "iana-time-zone" -version = "0.1.54" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1473,9 +1586,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -1493,25 +1606,25 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix", - "windows-sys 0.45.0", + "rustix 0.37.14", + "windows-sys 0.48.0", ] [[package]] @@ -1553,21 +1666,22 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" dependencies = [ - "jsonrpsee-client-transport 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpsee-core 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpsee-http-client 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpsee-types 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpsee-client-transport 0.16.2", + "jsonrpsee-core 0.16.2", + "jsonrpsee-http-client 0.16.2", + "jsonrpsee-types 0.16.2", ] [[package]] name = "jsonrpsee" -version = "0.16.2" -source = "git+https://github.com/paritytech/jsonrpsee#7144be544f6fbbb607a5df858b736a2b917edc10" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b971ce0f6cd1521ede485afc564b95b2c8e7079b9da41d4273bd9b55140a55d" dependencies = [ - "jsonrpsee-client-transport 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", - "jsonrpsee-core 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", - "jsonrpsee-http-client 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", - "jsonrpsee-types 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", + "jsonrpsee-client-transport 0.17.1", + "jsonrpsee-core 0.17.1", + "jsonrpsee-http-client 0.17.1", + "jsonrpsee-types 0.17.1", "jsonrpsee-wasm-client", "jsonrpsee-ws-client", ] @@ -1580,38 +1694,39 @@ checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" dependencies = [ "futures-util", "http", - "jsonrpsee-core 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpsee-types 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpsee-core 0.16.2", + "jsonrpsee-types 0.16.2", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.16.2" -source = "git+https://github.com/paritytech/jsonrpsee#7144be544f6fbbb607a5df858b736a2b917edc10" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca00d975eda834826b04ad57d4e690c67439bb51b02eb0f8b7e4c30fcef8ab9" dependencies = [ "futures-channel", "futures-util", "gloo-net", "http", - "jsonrpsee-core 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", + "jsonrpsee-core 0.17.1", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.0", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.23.0", ] [[package]] @@ -1628,7 +1743,7 @@ dependencies = [ "futures-timer", "futures-util", "hyper", - "jsonrpsee-types 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpsee-types 0.16.2", "rustc-hash", "serde", "serde_json", @@ -1639,8 +1754,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.16.2" -source = "git+https://github.com/paritytech/jsonrpsee#7144be544f6fbbb607a5df858b736a2b917edc10" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b83cca7a5a7899eed8b2935d5f755c8c4052ad66ab5b328bd34ac2b3ffd3515f" dependencies = [ "anyhow", "async-lock", @@ -1649,7 +1765,7 @@ dependencies = [ "futures-timer", "futures-util", "hyper", - "jsonrpsee-types 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", + "jsonrpsee-types 0.17.1", "rustc-hash", "serde", "serde_json", @@ -1668,9 +1784,9 @@ checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" dependencies = [ "async-trait", "hyper", - "hyper-rustls", - "jsonrpsee-core 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpsee-types 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-rustls 0.23.2", + "jsonrpsee-core 0.16.2", + "jsonrpsee-types 0.16.2", "rustc-hash", "serde", "serde_json", @@ -1681,14 +1797,15 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.2" -source = "git+https://github.com/paritytech/jsonrpsee#7144be544f6fbbb607a5df858b736a2b917edc10" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6483fea826f62260a88a132fa750a47b40d4218d41e3391936579533c6c67509" dependencies = [ "async-trait", "hyper", - "hyper-rustls", - "jsonrpsee-core 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", - "jsonrpsee-types 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", + "hyper-rustls 0.24.0", + "jsonrpsee-core 0.17.1", + "jsonrpsee-types 0.17.1", "serde", "serde_json", "thiserror", @@ -1713,8 +1830,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.2" -source = "git+https://github.com/paritytech/jsonrpsee#7144be544f6fbbb607a5df858b736a2b917edc10" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd301ccc3e08718393432d1961539d78c4580dcca86014dfe6769c308b2c08b2" dependencies = [ "anyhow", "beef", @@ -1726,23 +1844,25 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.16.2" -source = "git+https://github.com/paritytech/jsonrpsee#7144be544f6fbbb607a5df858b736a2b917edc10" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85dc3aea8bbb844dacc45cd98d01f624e4485184149a045761888c2e5fa5a0c6" dependencies = [ - "jsonrpsee-client-transport 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", - "jsonrpsee-core 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", - "jsonrpsee-types 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", + "jsonrpsee-client-transport 0.17.1", + "jsonrpsee-core 0.17.1", + "jsonrpsee-types 0.17.1", ] [[package]] name = "jsonrpsee-ws-client" -version = "0.16.2" -source = "git+https://github.com/paritytech/jsonrpsee#7144be544f6fbbb607a5df858b736a2b917edc10" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a69852133d549b07cb37ff2d0ec540eae0d20abb75ae923f5d39bc7536d987" dependencies = [ "http", - "jsonrpsee-client-transport 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", - "jsonrpsee-core 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", - "jsonrpsee-types 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", + "jsonrpsee-client-transport 0.17.1", + "jsonrpsee-core 0.17.1", + "jsonrpsee-types 0.17.1", ] [[package]] @@ -1762,9 +1882,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.140" +version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" [[package]] name = "libm" @@ -1835,6 +1955,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eb31c1778188ae1e64398743890d0877fef36d11521ac60406b42016e8c2cf" + [[package]] name = "lock_api" version = "0.4.9" @@ -1889,11 +2015,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix", + "rustix 0.37.14", ] [[package]] @@ -1916,12 +2042,11 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ "hash-db", - "hashbrown 0.12.3", ] [[package]] @@ -2076,12 +2201,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "os_str_bytes" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - [[package]] name = "owo-colors" version = "3.5.0" @@ -2241,35 +2360,11 @@ dependencies = [ "toml_edit", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" -version = "1.0.53" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -2357,7 +2452,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -2406,7 +2501,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", "redox_syscall", "thiserror", ] @@ -2428,7 +2523,7 @@ checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] @@ -2445,13 +2540,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.2" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.7.1", ] [[package]] @@ -2460,7 +2555,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", ] [[package]] @@ -2469,6 +2564,12 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +[[package]] +name = "regex-syntax" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" + [[package]] name = "region" version = "3.0.0" @@ -2512,9 +2613,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -2530,18 +2631,32 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustix" -version = "0.36.11" +version = "0.36.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" +checksum = "3a38f9520be93aba504e8ca974197f46158de5dcaa9fa04b57c57cd6a679d658" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.4", "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.37.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b864d3c18a5785a05953adeed93e2dca37ed30f18e69bba9f30079d51f363f" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.4", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" version = "0.20.8" @@ -2554,6 +2669,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-native-certs" version = "0.6.2" @@ -2575,6 +2702,22 @@ dependencies = [ "base64 0.21.0", ] +[[package]] +name = "rustls-webpki" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" + [[package]] name = "ryu" version = "1.0.13" @@ -2584,7 +2727,7 @@ checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "log", "sp-core", @@ -2595,7 +2738,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "lru", "parity-scale-codec", @@ -2619,7 +2762,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -2632,7 +2775,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "log", "sc-allocator", @@ -2645,14 +2788,14 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "anyhow", "cfg-if", "libc", "log", "once_cell", - "rustix", + "rustix 0.36.13", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -2662,9 +2805,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61471dff9096de1d8b2319efed7162081e96793f5ebb147e50db10d50d648a4d" +checksum = "0cfdffd972d76b22f3d7f81c8be34b2296afd3a25e0a547bd9abe340a4dbbe97" dependencies = [ "bitvec", "cfg-if", @@ -2676,9 +2819,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219580e803a66b3f05761fd06f1f879a872444e49ce23f73694d26e5a954c7e6" +checksum = "61fa974aea2d63dd18a4ec3a49d59af9f34178c73a4f56d2f18205628d00681e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2804,29 +2947,29 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -2884,9 +3027,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "54c2bb1a323307527314a36bfb73f24febb08ce2b8a554bf4ffd6f51ad15198c" dependencies = [ "digest 0.10.6", "keccak", @@ -2965,7 +3108,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "hash-db", "log", @@ -2983,9 +3126,11 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ + "Inflector", "blake2", + "expander", "proc-macro-crate", "proc-macro2", "quote", @@ -2995,7 +3140,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "parity-scale-codec", "scale-info", @@ -3008,7 +3153,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "integer-sqrt", "num-traits", @@ -3022,13 +3167,13 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "array-bytes", - "base58", "bitflags", "blake2", "bounded-collections", + "bs58", "dyn-clonable", "ed25519-zebra", "futures", @@ -3065,9 +3210,9 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.6", "sha2 0.10.6", @@ -3078,23 +3223,23 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "6.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc2d1947252b7a4e403b0a260f596920443742791765ec111daa2bbf98eff25" +checksum = "27449abdfbe41b473e625bce8113745e81d65777dd1d5a8462cf24137930dad8" dependencies = [ - "blake2", + "blake2b_simd", "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?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "proc-macro2", "quote", @@ -3105,7 +3250,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "proc-macro2", "quote", @@ -3115,7 +3260,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "environmental", "parity-scale-codec", @@ -3126,7 +3271,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "bytes", "ed25519", @@ -3135,6 +3280,7 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", + "rustversion", "secp256k1", "sp-core", "sp-externalities", @@ -3151,9 +3297,8 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ - "async-trait", "futures", "merlin", "parity-scale-codec", @@ -3167,7 +3312,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "thiserror", "zstd", @@ -3176,7 +3321,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "backtrace", "lazy_static", @@ -3186,7 +3331,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "either", "hash256-std-hasher", @@ -3208,7 +3353,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -3226,7 +3371,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "Inflector", "proc-macro-crate", @@ -3238,7 +3383,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "hash-db", "log", @@ -3258,18 +3403,18 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" [[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?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3282,7 +3427,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "parity-scale-codec", "sp-std 5.0.0", @@ -3294,11 +3439,11 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "ahash 0.8.3", "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", @@ -3317,7 +3462,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3334,7 +3479,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -3345,7 +3490,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -3359,7 +3504,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-03#ad5399644aebc54e32a107ac37ae08e6cd1f0cfb" +source = "git+https://github.com/paritytech/substrate?tag=monthly-2023-04#75dee3c6fc72f6399a43f498e0e42f94fb82a7bd" dependencies = [ "parity-scale-codec", "scale-info", @@ -3425,8 +3570,8 @@ dependencies = [ [[package]] name = "substrate-runtime-proposal-hash" -version = "0.19.0" -source = "git+https://github.com/chevdor/subwasm?branch=master#fd047d76d52beab8c062eb94141f8d14ddc0f59d" +version = "0.19.1" +source = "git+https://github.com/chevdor/subwasm?branch=master#04fd6218fb41c29d04b21db7e821810b25664d9b" dependencies = [ "blake2", "hex", @@ -3445,35 +3590,33 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt-codegen" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e86cb719003f1cedf2710a6e55ca4c37aba4c989bbd3b81dd1c52af9e4827e" +version = "0.28.0" +source = "git+https://github.com/paritytech/subxt?branch=master#e583aa987eb57ac6ce70c7166925189a663d0d31" dependencies = [ "darling", "frame-metadata", "heck", "hex", - "jsonrpsee 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpsee 0.16.2", "parity-scale-codec", - "proc-macro-error", "proc-macro2", "quote", "scale-info", "subxt-metadata", "syn 1.0.109", + "thiserror", "tokio", ] [[package]] name = "subxt-metadata" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593ab5f53435e6352675af4f9851342607f37785d84c7a3fb3139550d3c35f0" +version = "0.28.0" +source = "git+https://github.com/paritytech/subxt?branch=master#e583aa987eb57ac6ce70c7166925189a663d0d31" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-core-hashing 6.0.0", + "sp-core-hashing 8.0.0", ] [[package]] @@ -3489,27 +3632,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.8" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc02725fd69ab9f26eab07fad303e2497fad6fb9eba4f96c4d1687bdf704ad9" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - [[package]] name = "tap" version = "1.0.1" @@ -3518,9 +3649,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.6" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" +checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "termcolor" @@ -3548,7 +3679,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.15", ] [[package]] @@ -3597,14 +3728,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot", @@ -3612,18 +3742,18 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -3632,16 +3762,26 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.8", "tokio", "webpki", ] +[[package]] +name = "tokio-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +dependencies = [ + "rustls 0.21.0", + "tokio", +] + [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "76cd2598a37719e3cd4c28af93f978506a97a2920ef4d96e4b12e38b8cbc8940" dependencies = [ "futures-core", "pin-project-lite", @@ -3650,9 +3790,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -3718,11 +3858,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "cf9cf6a813d3f40c88b0b6b6f29a5c95c6cdbf97c1f9cc53fb820200f5ad814d" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -3731,13 +3870,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -3757,7 +3896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" dependencies = [ "tracing", - "tracing-subscriber 0.3.16", + "tracing-subscriber 0.3.17", ] [[package]] @@ -3805,9 +3944,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "sharded-slab", "thread_local", @@ -3816,9 +3955,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3390c0409daaa6027d6681393316f4ccd3ff82e1590a1e4725014e3ae2bf1920" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -3829,9 +3968,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ "hash-db", ] @@ -3922,6 +4061,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "valuable" version = "0.1.0" @@ -4033,11 +4178,11 @@ dependencies = [ [[package]] name = "wasm-loader" -version = "0.19.0" -source = "git+https://github.com/chevdor/subwasm?branch=master#fd047d76d52beab8c062eb94141f8d14ddc0f59d" +version = "0.19.1" +source = "git+https://github.com/chevdor/subwasm?branch=master#04fd6218fb41c29d04b21db7e821810b25664d9b" dependencies = [ "hex", - "jsonrpsee 0.16.2 (git+https://github.com/paritytech/jsonrpsee)", + "jsonrpsee 0.17.1", "log", "serde", "sp-maybe-compressed-blob", @@ -4046,8 +4191,8 @@ dependencies = [ [[package]] name = "wasm-testbed" -version = "0.19.0" -source = "git+https://github.com/chevdor/subwasm?branch=master#fd047d76d52beab8c062eb94141f8d14ddc0f59d" +version = "0.19.1" +source = "git+https://github.com/chevdor/subwasm?branch=master#04fd6218fb41c29d04b21db7e821810b25664d9b" dependencies = [ "frame-metadata", "hex", @@ -4158,7 +4303,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix", + "rustix 0.36.13", "serde", "sha2 0.10.6", "toml", @@ -4238,7 +4383,7 @@ checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" dependencies = [ "object 0.29.0", "once_cell", - "rustix", + "rustix 0.36.13", ] [[package]] @@ -4269,7 +4414,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix", + "rustix 0.36.13", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -4317,6 +4462,15 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa54963694b65584e170cf5dc46aeb4dcaa5584e652ff5f3952e56d66aff0125" +dependencies = [ + "rustls-webpki", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4350,11 +4504,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.46.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", ] [[package]] @@ -4363,13 +4517,13 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -4378,7 +4532,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] @@ -4387,13 +4550,28 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] @@ -4402,47 +4580,89 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winnow" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deac0939bd6e4f24ab5919fbf751c97a8cfc8543bb083a305ed5c0c10bb241d1" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" dependencies = [ "memchr", ] @@ -4458,23 +4678,22 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.15", ] [[package]] @@ -4498,9 +4717,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.7+zstd.1.5.4" +version = "2.0.8+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" dependencies = [ "cc", "libc", diff --git a/tools/runtime-codegen/Cargo.toml b/tools/runtime-codegen/Cargo.toml index 5eea4cdbc88..90af4b3a415 100644 --- a/tools/runtime-codegen/Cargo.toml +++ b/tools/runtime-codegen/Cargo.toml @@ -14,7 +14,7 @@ clap = { version = "4.0.8", features = ["derive", "cargo"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } color-eyre = "0.6.1" proc-macro2 = "1.0.51" -subxt-codegen = "0.27.1" syn = "1.0" +subxt-codegen = { git = "https://github.com/paritytech/subxt", branch = "master", default-features = false, features = [] } wasm-loader = { git = "https://github.com/chevdor/subwasm", branch = "master" } -wasm-testbed = { git = "https://github.com/chevdor/subwasm", branch = "master" } \ No newline at end of file +wasm-testbed = { git = "https://github.com/chevdor/subwasm", branch = "master" } diff --git a/tools/runtime-codegen/src/main.rs b/tools/runtime-codegen/src/main.rs index e1aa142e558..a91a733da0b 100644 --- a/tools/runtime-codegen/src/main.rs +++ b/tools/runtime-codegen/src/main.rs @@ -112,12 +112,21 @@ fn main() -> color_eyre::Result<()> { pub mod api {} ); // Default module derivatives. - let mut derives = DerivesRegistry::new(&CratePath::default()); - derives.extend_for_all(vec![syn::parse_quote!(Clone)]); + let mut derives = DerivesRegistry::new(); + derives.extend_for_all( + vec![ + syn::parse_quote!(::codec::Encode), + syn::parse_quote!(::codec::Decode), + syn::parse_quote!(Clone), + syn::parse_quote!(Debug), + ], + vec![], + ); // Type substitutes let mut type_substitutes = TypeSubstitutes::new(&CratePath::default()); - type_substitutes.extend( - vec![ + type_substitutes + .extend( + vec![ TypeSubstitute::simple("sp_core::crypto::AccountId32"), TypeSubstitute::custom("bp_millau::millau_hash::MillauHash", "::bp_millau::MillauHash"), TypeSubstitute::simple("bp_millau::BlakeTwoAndKeccak256"), @@ -141,9 +150,10 @@ fn main() -> color_eyre::Result<()> { ), TypeSubstitute::simple("bp_messages::UnrewardedRelayersState"), ] - .drain(..) - .map(|substitute| (substitute.subxt_type, substitute.substitute.try_into().unwrap())), - ); + .drain(..) + .map(|substitute| (substitute.subxt_type, substitute.substitute.try_into().unwrap())), + ) + .map_err(|e| eyre::eyre!("Error extending type substitutes: {:?}", e))?; // Generate the Runtime API. let runtime_api = match metadata_source { @@ -153,6 +163,8 @@ fn main() -> color_eyre::Result<()> { derives, type_substitutes, CratePath::default(), + false, + true, ), RuntimeMetadataSource::WasmFile(source) => { let testbed = WasmTestBed::new(&source) @@ -163,9 +175,12 @@ fn main() -> color_eyre::Result<()> { derives, type_substitutes, CratePath::default(), + false, + true, ) }, - }; + } + .map_err(|e| eyre::eyre!("Error generating runtime api: {:?}", e))?; print_runtime(runtime_api);